cancel
Showing results for 
Search instead for 
Did you mean: 

MultiPart Form upload using HTTP_AAE, how to pass Boundary?

former_member190681
Active Participant
0 Kudos

Dear All,

my case is like SAP Proxy to Http(3rd party application), need to pass SAP structure and some attachments through PI to HTTP application.

HTTP_AAE receiver adapter and create a HTTP POST to an external server. Now the problem is that the HTTPS Protocol Post is supposed to be a multipart message with 3 different content-types, content-lengths and all of them have to be delimited by a "--BOUNDARY" constant.

Multipart Request:

--Ax1240601829151Xa

Content-Disposition: form-data; name="numberLang"

en

--Ax123344djfkfsks

Content-Disposition: form-data; name="fileType"

0

--Ax123344djfkfsks

Content-Disposition: form-data; name="eRequestDocs"

NonEmall.txt

--Ax1240601829151Xa

Content-Disposition: form-data; name="ssocontext"

ksfif

--Ax123344djfkfsks

Content-Disposition: form-data; name="password"

Test@123

--Ax1240601829151Xa

Content-Disposition: form-data; name="exportDestination"

3

--Ax123344djfkfsks

Content-Disposition: form-data; name="importType"

0

--Ax123344djfkfsks

Content-Disposition: form-data; name="username"

samp

--Ax123344djfkfsks

Content-Disposition: form-data; name="excpType"

0

--Ax123344djfkfsks

Content-Disposition: form-data; name="orgname"

Supply Chain

--Ax123344djfkfsks

Content-Disposition: form-data; name="ioMTR"

1

--Ax123344djfkfsks

Content-Disposition: form-data; name="language"

en

--Ax123344djfkfsks

Content-Disposition: form-data; name="NonEmall.txt"; filename="NonEmall.txt"

Content-type: text/xml

for the multipart request we are using javamapping, interface is sending the data to the receiver but receiver application are getting null values.

in the server logs we are getting Boundary dumps and boundary is getting generated differently.

please suggest for further resolving this issue.

Regards,

Kiran Polani

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

It is difficult to find the issue without knowing the Java program. When there is a boundary issue, check your program that the last boundary is like this: --Ax123344djfkfsks Content-Disposition: form-data; name="NonEmall.txt"; filename="NonEmall.txt" Content-type: text/xml --Ax123344djfkfsks-- (two hyphens int the end)

former_member186851
Active Contributor
0 Kudos

Hello Sri,

If your java mapping for Mutlipart did you enable the content type and multipart as per the below link/?