IBM Support

SOAP header information in case of exception scenario (when a fault
is thrown in code) is not displayed as part of the SOAP envelope

Question & Answer


Question

The SOAP header information in case of exception scenario (when a fault is thrown in code) is not displayed as part of the SOAP envelope, when a service request is sent to a web service hosted on the InfoSphere MDM Collaboration Server.

Cause

This is a default behavior and behaving as per the SOAP specification.

Answer

The faultcode/exceptions in SOAP by default returns only in SOAP body section of the SOAP envelope and is not returned to the SOAP header section.

For example, the following Soap request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="<use_sample_namespace_url_here>">
<soapenv:Header/>
<soapenv:Body>
<sam:getListOfMatchingItems>
<catalogName>testCatalog</catalogName>
<attributePath>testSpec/testString</attributePath>
<attributeValue>Text</attributeValue>
</sam:getListOfMatchingItems>
</soapenv:Body>
</soapenv:Envelope>

by default returns the following SOAP response with the faultcode in the SOAP body section only. The response do not contain SOAP header section with the faultcode. This is a default behavior and is behaving as per the SOAP specification.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>Could not validate against WSDL:s4s-att-invalid-value: Invalid attribute value for 'type' in element 'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xs:string' as a QName: the prefix 'xs' is not declared.</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">sdsvm904008.svl.ibm.com</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>



Refer the section 4.4 SOAP Fault for the usage of SOAP faultcode in SOAP header and body sections.

Related Information

[{"Product":{"code":"SS2U2U","label":"InfoSphere Master Data Management Collaboration Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF010","label":"HP-UX"}],"Version":"11.0;11.4","Edition":"","Line of Business":{"code":"","label":""}}]

Product Synonym

MDMCE
MDMCS
MDMPIM
MDM Server for PIM
MDM Collaboration Server
InfoSphere MDM Server for PIM
InfoSphere MDM Collaboration Server
InfoSphere Master Data Management Collaboration Server
InfoSphere Master Data Management Collaborative Edition
InfoSphere Master Data Management Server for Product Information Management

Document Information

More support for:
InfoSphere Master Data Management Collaboration Server

Software version:
11.0, 11.4

Operating system(s):
AIX, Linux, Solaris, HP-UX

Document number:
266829

Modified date:
16 June 2018

UID

swg21967257

Manage My Notification Subscriptions