
Getting a error when parsing SOAP API response a [XOP/XML] using nodejs or javascript
Here is my response
--MIMEBoundary_e6fff532a5484248aea750d25d37bcec820c7 e0a3338bc30
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.f6fff532a5484248aea750d25d37bcec820c7e0a3338bc3 0@apache.org>
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:listContactsResponse xmlns:ns="http://wrappers.webservice.appservices.core.inteqnet.com" ><ns:return xmlns:ax226="http://beans.webservice.components.inteqnet.com/xsd" xmlns:ax224="http://beans.webservice.appservices.core.inteqnet.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax226

{
"Email": "testca@test.com",
"Full Name": "CA, tobedeleted EndUser3",
"ID": "84",
"Job Title": "Self Service",
"Phone Details": "Business",
"Phone Number": "284335"
},
{
"Email": "testca@test.com",
"Full Name": "CA, tobedeleted EndUser4",
"ID": "85",
"Job Title": "Self Service",
"Phone Details": "Business",
"Phone Number": "284336"
},
{
"Email": "testca@test.com",
"Full Name": "CA, tobedeleted EndUser5",
"ID": "86",
"Job Title": "Self Service",
"Phone Details": "Business",
"Phone Number": "284337"
},
]</ax226:responseText><ax226:statusCode>000</ax226:statusCode><ax226:statusMessage>Success: The request was successfully fulfilled by the server; the service returned results of the operation.</ax226:statusMessage><ax226:warnings></ax226:warnings></ns:return></ns:listContactsResponse></soapenv:Body></soapenv:Envelope>
--MIMEBoundary_e6fff532a5484248aea750d25d37bcec820c7 e0a3338bc30--
In the response you can see some headers are in a response so when I parsing a this response usning a xml2json node library it returning a invalid xml input. This is because of the response is not in a xml format, it is in binary xop/xml.
I have tried a lot but unable to find a solution.
Can someone please have a look into this and provide me a solution how I can parse this response. I want this solution in a node js or a javascript.
Thanks in advance!
Kishore

-
codexmonkey -
Thanks - Reply
{{ DiscussionBoard.errors[11268981].message }} -