I just want to know, is there any simple way for parsing MTOM/XOP SOAP response.
The problem is that I use plain HTTP to send soap message and javax.xml for parsing response. But some services responds me with mulipart/related and it requires much more complex logic to parse it (performance matters).
So I wonder may I somehow take advantage of apache cxf, apache axiom or any other library for parsing MTOM/XOP SOAP response?
Java – How to parse XOP/MTOM SOAP response using java
cxfjavamtomsoapxop
Related Topic
- Java – How to read / convert an InputStream into a String in Java
- Java – How to generate random integers within a specific range in Java
- Java – How to determine whether an array contains a particular value in Java
- Java – How to declare and initialize an array in Java
- Java – How to parse JSON in Java
- Actionscript – How to pass “Null” (a real surname!) to a SOAP web service in ActionScript 3
- Java – How to convert a String to an int in Java
- Java – How to create a memory leak in Java
Best Answer
These unit tests show you how to use CXF to extract attachments out of an MTOM message. I'll inline one of the tests in case this link doesn't exist in the future:
In your case, the
ct
will come from the content type header of the response. The"mimedata"
will be the content of the response.