cancel
Showing results for 
Search instead for 
Did you mean: 

CL_HTTP_CLIENT Multipart - XML as string and a seperate XML file

PSE
Discoverer
0 Kudos
111

Hello Experts, 

im currently implementing a Webservice. I have to transfer a XML string and a seperate XML file via POST request. I'm currently struggeling with the multipart handling for the XML string. 

Does anybody have a working code example? I already tried adding multipart data with set_form_field and set_cdata for the XML string. 

The HTTP Request should look like this: 

 

POST /documents?template_name=library%2sample.template&document_name=ps_demo08&user_id=TechUser HTTP/1.1
Authorization: Bearer {{bearer_token}}
Ocp-Apim-Subscription-Key: {{apiKey}}
User: Technical User 
Password: Technical Password
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: host.net
Content-Length: 308

-----011000010111000001101001
Content-Disposition: form-data; name="xml"

<?xml version="1.0" encodiing= "utf-8"?>
-----011000010111000001101001
Content-Disposition: form-data; name="zugferd"

\\share\User\Downloads\sample.xml
-----011000010111000001101001--

 

 

Thanks for helping.

Accepted Solutions (0)

Answers (0)