on 02-12-2012 10:13 AM
Hi ,
I am trying to use the multipart/form request functionality of the HTTP AAE adapter in PI 7.3,
Using the comm channel the following multipart message needs to be sent :
POST /stpserver/upload HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.0-rc3
Host: qc.int.fxall.com
Content-Length: 1702
Content-Type: multipart/form-data;
boundary=Oi2W-TQU6DBkXQ8g7jdrQYidRK0jI1
--Oi2W-TQU6DBkXQ8g7jdrQYidRK0jI1
Content-Disposition: form-data; name="abc1"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
test1
--Oi2W-TQU6DBkXQ8g7jdrQYidRK0jI1
Content-Disposition: form-data; name="abc2"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit
test2
--Oi2W-TQU6DBkXQ8g7jdrQYidRK0jI1
Content-Disposition: form-data; name="abc3"; filename="file
v4.xml"
Content-Type: application/octet-stream; charset=ISO-8859-1
Content-Transfer-Encoding: binary
<fxTradeExt>
<fxall category="client" version="1.0">
................
In the comm channel have set the Set Form parameter and "Main Payload Parameter Name" to abc3.
Set Multipart and Specify Content Details are set accordingly. The issue is where should we set the other form-data (abc1/abc2 in the above example) that is to be passed to the receiver.
The message log shows the following relevant debug messages:
ContentType is multipart/form-data;
boundary="----=_Part_948_1526565974.1329033780891"
However the log also mentions :
Request is single part
Could anyone please advise if this is feasible in HTTP AAE.
Thanks and Regards
Subhro
Hi Subhro!
As far as I know, if you use "Set Form" and "Main Payload Parameter Name", you'll get only one parameter value as main payload. You can try not to set "Set Form" parameter, than you should get message with the set of payloads.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Trying to now use java mapping to generate the HTTP Stream - however facing one issue . The Content-Type is always added by the adapter and not finding a way to stop this - can someone please help me with any advise.
POST /BAT/TaO/FXall/test/upload? HTTP/1.1
Content-Type: application/xml; charset=UTF-8 --- added by HTTP Adapter
User-Agent: SAP HttpClient v1.0
Host: 10.94.40.18
Content-Length: 1681
Content-Type: multipart/form-data; -- added by Java mapping
boundary=Oi2W-TQU6DBkXQ8g7jdrQYidRK0jI1
Please note HTTP AAE adapter is being used.
Thanks and Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Subhro, could you please specify briefly how did you finally solve this (if you did)?
I'm in exactly the same situation, having to send three multipart parameters, one of them being a text file. I'd like to know basically what is required. Did you use HTTP_AAE adapter + Java code based mapping?
Many thanks
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.