on 10-16-2008 1:47 PM
Hello Experts,
I am facing a problem where i have to upload a file to webserver using POST , I am using a file adapter to pick the file and http or soap adapter to post the file to webserver. Here the request structure expected by the webserver is a file.
below is the form based web request:
<form enctype="multipart/form-data" name="Upload_File" method="POST" action="https://-------/servlet/zxcdsf">
Choose File: <input type=file name="Upload_File" value="fileUpload" ><br><br>
<input type=submit value="upload">
</form>
Please guide me how to achieve this using SOAP or HTTP.
HI Hemant
You can do a HTTP post method from HTTP adapter using either a URL which can receive the post or a HTTP destination .
But to do a UPLOAD_FILE kind of methods you need a Java code.
If the server is able to interpret the URL then you can even parse the complete file into a URL and send it to receiver using a custom Module.
Else to define in exact format you need to go to Java Proxies. and Java proxy receiver will be able to send such message to server you require.
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
Thanks for your reply,
Here the web server is expecting "html web request" from XI box.
And in XI we have the file in the local directory.
First i want to check using prolog and epilog if its possible in the HTTP outbound adapter generating the required html web request.
Otherwise I have to look for any alternative like JAVA proxy or developing module as u said.
Have you already developed any java proxy or module for this kind of problem. If yes please share with me.
Thanks
Hemant
Hi Hemant
Yes you can try with proglog and epilog
Develop the Java mapping to convert the paylaod to HTML tags and replace the tags with corresponding (&, +, =, and %) . This may be able to post the data.
Try to create generic mapping to convert the payload to HTML this will help if you have more than one interface for the same requirement.
Java proxy code is having an advantage that you can always have that as a receiver for any of these request instead of dealing with individual Java mappings.
Try with epilog and prolog and as you said next step can be Java proxy.
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matias
Thanks for the reply,
In my case the Adapter is HTTP Outbound that is the PI is Sending data to the External Web server. So the blog doesnt help me on that,
Any ways your suggesetion is very helpful.
And if you have developed any Java proxy for changing flat file to html web request. Please share your ideas.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.