SOAP Request Body (Custom Request Template)

0
I have a complex web service that I am sending data to. (Inserting a Service Call in a ticketing system) I first started with an Export Mapping using the Schema Source as 'Web Service Operation'. This is nice because it returns exactly what the receiving end is expecting. However there are two issues: (1) Due to the complex types, I have to create hundreds of entities when I am only passing a dozen pieces of information and (2) Mendix seems to be requiring more objects than are actually required.  Due to these factors, I was looking at just using a Custom Request Template. I am using SOAPUI to test my request and the request returns with a success response. However, when I copy/paste this request into the Custom Request Template, I receive an error on the SOAP Response in the Mendix App.  Caused by: com.mendix.integration.WebserviceException: Received SOAP fault, code: soap:Receiver, reason: Server was unable to process request. ---> Object reference not set to an instance of an object.     at com.mendix.integration.actions.microflow.WebServiceCallAction.handleSoapFault(WebServiceCallAction.scala:217) My question is: Should I be able to use the exact same SOAP Request from SOAPUI in the Custom Request Template? (It's just a proof of concept since it is static data. I will eventually update using paramters) Secondary: Is there a better way that you know of if I am overlooking something? Thanks in advance, Jeff
asked
2 answers
3

As Dennis Kho said, when you copy from SoapUI, make sure to copy only the content of the body.

Also, make sure that you have the namespace of that element correct.

answered
1

You all were correct with the content of the body being required. I found another question that had one of the errors I had received. It seems that my SOAP request is using a custom namespace, so the custom request body in Mendix had to be formatted differently than SOAPUI.  Here is a screenshot of my SOAPUI and then translated (working) custom mendix request body.

Note that I am using the "getCall" operation and the custom namespace happens to be "pub".

 

Here is the working SOAPUI (with dummy data)

 

Here is the working custom request template. Notice the declared namespace and the first line of code before the contents of the body. (with dummy data)

answered