The CreatorCon Call for Content is officially open! Get started here.

Is it possible to change namespace on SOAP Response?

Thiagofmeira
Kilo Guru

Hi All,

After the customer sends any SOAP Message to our instance, servicenow answers with the following XML.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <Fault>
         <Detail>
            <faultInfo causingMessageId="ba713a3b-acbd-4c13-a331-d821384d3e21" causingOperation="error" class="SUPPORT" code="STN_SN_INM_ba713a3b-acbd-4c13-a331-d821384d3e21" kind="TECHNICAL" timestamp="2022-05-19T12:37:07.144Z">No incident was found with the provided BackboneID</faultInfo>
         </Detail>
         <Reason>
            <Text xml:lang="en">Please provide a BackboneID</Text>
         </Reason>
      </Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

The customer has concerned that their system cannot read the namespace:

xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

and he says it should be like:

xmlns:env=http://www.w3.org/2003/05/soap-envelope

 

Does anybody know if it is possible to change it? I have even tried to pass that as a string on the response creation, but it seems the structure on the first line is built-in by servicenow automatically.

 

Any idea? 

Thanks

 
6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

are they consuming scripted SOAP API endpoint or some OOB APi?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

if you developed custom scripted SOAP web service then it might be possible to change the namespace

Scripted Web Services : How to add namespace to response XML?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Check this as well

Configuring SOAP requests to return qualified responses

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Thank you for your answer @Ankur !

 

I found another solution.

How the namespace was used for the response tag from servicenow,  we just added the namespace inside of the response tag.  

 

The structure was something alike:

<response xmln:env="customer namespace" "Required attributes" />