I am using SoapUI version 5.1.3. I am sending a request for our service below.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:upl="http://upload.application.carbon.wso2.org" xmlns:xsd="http://upload.application.carbon.wso2.org/xsd"> <soapenv:Header/> <soapenv:Body> <upl:uploadApp> <upl:fileItems> <xsd:dataHandler>UEsDBBLjAuMC52MjAxMTA1MjcxNTIxMDAvYXJ0aWZhY3QueG1sUEsFBgAAAAAJAAkAMAMAAC4IAAAAAA==</xsd:dataHandler> <xsd:fileName>ESBproject1-1.0.0.car</xsd:fileName> <xsd:fileType>jar</xsd:fileType> </upl:fileItems> </upl:uploadApp> </soapenv:Body> </soapenv:Envelope>
at the end of the web service, when I check the value of the dataHandler, it looks like it is truncated at the end of the line. I inserted the file using the context menu option Insert file as Base64 . I changed the Enable MTOM property to true. what could be the reason for the lack of data sent to the web service?
UPDATE
I wrote an HTTP server to capture a soap request without sending it to a web service, changing the URL in SoapUI to http://localhost:5000/ . below is the server that I wrote
public static void main(String[] args) throws Exception { ServerSocket server = new ServerSocket(5000); Socket conn = server.accept(); StringBuilder sb = new StringBuilder();
after starting the http server, I sent the above request for soap, and I could see that the http client also received the same request as above. but since I enabled MTOM, the SoapUI request must be changed, and the HTTP server should receive another request from the above soap request. According to the MTOM definition described in this SO question , the value of the binary dataHandler must be ported to the shell. it should be replaced with the xop tag and link. As an example, an envelope should look something like this.
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <ns2:uploadApp xmlns:ns2="http://upload.application.carbon.wso2.org"> <ns2:fileItems> <ns1:dataHandler xmlns:ns1="http://upload.application.carbon.wso2.org/xsd"> <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid: 1.4aefed8d8cef221bc29fec3e7341b21813a53a5181b39c2b@apache.org " /> </ns1:dataHandler> <ns1:fileName xmlns:ns1="http://upload.application.carbon.wso2.org/xsd">ESBproject1-1.0.0.car</ns1:fileName> <ns1:fileType xmlns:ns1="http://upload.application.carbon.wso2.org/xsd">jar</ns1:fileType> </ns2:fileItems> </ns2:uploadApp> </soapenv:Body> </soapenv:Envelope>
Now my problem is that the correct way to enable MTOM in SoapUI or is it an error?
source share