Issue with SOAP Response Namespaces

New Here ,
Jun 19, 2017 Jun 19, 2017

Copy link to clipboard

Copied

I have a web service built but have a problem getting the response to be sent in the format required by the consumer

Here is a sample response from their docs:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Body><SendInspectionRequestTPAResponse xmlns="http://InspectionService/">

<SendInspectionRequestTPAResult xsi:type="xsd:int">244264</SendInspectionRequestTPAResult>

</SendInspectionRequestTPAResponse>

</soap:Body>

</soap:Envelope>

Here is what my web service is sending instead. Notice that the result is given the name result instead of SendInspectionRequestTPAResult and also that

instead of <soap it is using <soapenv. Does anyone have any idea what I am doing wrong?

<?xml version='1.0' encoding='UTF-8'?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<soapenv:Body>

<ns:SendInspectionRequestTPAResponse xmlns:ns="http://InspectionService/">

<ns:return>123456</ns:return>

</ns:SendInspectionRequestTPAResponse>

</soapenv:Body>

</soapenv:Envelope>

Thanks!

Views

358

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation