Consuming REST service, XML as a body

0
I am currently trying to consume a REST service that does not accept JSON, only XML as per below: Method: Post URL: https://sap.test.com/api/v0.1/xml/login <?xml version="1.0" encoding="UTF-16"?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body> <dis:Login xmlns:dis="http://www.sap.com/SBO/DIS"> <DatabaseName>TEST_Systems</DatabaseName> <CompanyUsername>TEST</CompanyUsername> <CompanyPassword>TEST</CompanyPassword> </dis:Login> </env:Body> </env:Envelope> However, when looking through the documentation(s) and through the forums it seems that I can only send a JSON message through the REST module. I'm guessing that by adjusting the Java of the module/calls I could change this behaviour, how simple would this be to implement? I'm not very experienced with Java but maybe there is a simple solution for this. The response I am receiving in JSON, so that should not be a problem.
asked
3 answers
1

Hi Niels,

To be sure: you are not able to use the regular Consuming Webservice component?

For a specific implementation (also communication with SAP) we did extend the REST module with XML-functionality, probably you are looking for something like that?

answered
0

Since you mention that it is actually a SOAP webservice you probably want to use the XML to Domain mapping tools. And then send the xml via a http request to the webservice. If you want I can help you to implement this. Contact me via the website on my profile.

answered
0

how we can pass xml(soapapi) as request in mendix

answered