Contributions
Add MTOM using SoapUi opensource
Hi All, I am using soapui open source to add an attachment (MTOM enabled) to an operation and invoke the web service using java. When I execute the code, i get the message: Receiving response: HTTP/1.1 415 Cannot process the message because the content type 'multipart/related; type="application/xop+xml";.... The same request when sent through the SoapUI UI interface, gives me a proper response. The code I am using to add the attachment is: WsdlRequest req = op.addNewRequest("Req1"); req.setRequestContent(op.createRequest(true)); File fileToAttach = new File("c:\\tmp\\Test1.txt"); req.attachFile(fileToAttach, true); req.setMtomEnabled(true); I have also noticed that though the Content Type of the wsdl request is text/xml the response of the web service, when captured in fiddler, shows Content Type as multipart/related after the request is submitted, using request.submit. Do I have to call any other method for getting a proper response? Can you please let me know where am I going wrong? Thank you Shashank884Views0likes0CommentsRe: Add MTOM Attachment using SoapUI
Yes, it happens when I use java and soapui programatically. The same request xml works fine in the UI. I have also noticed that though the Content Type of the request is text/xml the response of the web service, when captured in fiddler, shows Content Type as multipart/related after the request is submitted, using request.submit7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes0CommentsAdd MTOM Attachment using SoapUI
Hi, I am using soapui open source to add an attachment (MTOM enabled) to an operation and invoke the web service using java. When I execute the code, i get the message: Receiving response: HTTP/1.1 415 Cannot process the message because the content type 'multipart/related; type="application/xop+xml";.... The same request when sent through the SoapUI UI interface, gives me a proper response. The code I am using to add the attachment is: WsdlRequest req = op.addNewRequest("Req1"); req.setRequestContent(op.createRequest(true)); File fileToAttach = new File("c:\\tmp\\Test1.txt"); req.attachFile(fileToAttach, true); req.setMtomEnabled(true); Do I have to call any other method for getting a proper response? Can you please let me know where am I going wrong? Thank you Shashank7 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes2Comments