IBM Support

Testing web service hosted by SB2BI with soapUI generates namespace errors

Troubleshooting


Problem

After a web service has been created in Sterling B2B Integrator, the generated WSDL is checked in to soapUI and a request is generated. Submitting this automatically generated request results in a SOAP-FAULT.

Symptom

The SOAP-FAULT returned provides a workflow ID and step ID indicating where to find the error. Looking up the status report of that gives an error message similar to:

The prefix "post" for element "post:Node" is not bound.

Cause

When checking a WSDL into soapUI and generating requests, the xmlns declaration is created in the top-most SOAP envelope. However, this envelope is stripped as part of the request processing, so when it comes time to validate the body of the request, the namespace declaration is no longer part of the document.

Diagnosing The Problem

The actual error message generated will depend on the namespaces that have been defined in the web service WSDL, which in turn depends on the input and output schemas that have been tied to the web service.

For example, the following request is generated for a very simple web service in Sterling B2B Integrator by soapUI 3.6.1:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:hh="http://testnamespace.com/sterling"&gt; <soapenv:Header/>
<soapenv:Body>
<hh:current_time>
<hh:request>?</hh:request>
</hh:current_time>
</soapenv:Body>
</soapenv:Envelope>

When this request is posted, the following SOAP-FAULT is returned:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"&gt;
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault xmlns:mesa="http://www.sterlingcommerce.com/mesa"&gt;
<faultcode>SOAP-ENV:Receiver</faultcode>
<faultstring>Fault occurred in processing, detail provided.</faultstring>
<detail>
<mesa:faultDetail>id= 111034 stepId=10 serviceName=SOARequestHandler_Instance message=Service Specific Exception (check status report) runTime=2013.05.08 12:10:56.0</mesa:faultDetail>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Looking up workflow ID 111034 leads to the status report in Step 10. The status report of the invoked SOARequestHandler_Instance service in the SOA_Message_Handler BP states:

The prefix "hh" for element "hh:current_time" is not bound.

Resolving The Problem

There are multiple ways to approach this problem.

From the client side, you can merely move the xmlns namespace declaration to within the body of the request where it if first used:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;
<soapenv:Header/>
<soapenv:Body>
<hh:current_time xmlns:hh="http://testnamespace.com/sterling"&gt;
<hh:request>?</hh:request>
</hh:current_time>
</soapenv:Body>
</soapenv:Envelope>

This is the suggested format of SOAP request examples from the SOAP notes.

SOAP 1.1: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383539

SOAP 1.2: http://www.w3.org/TR/2007/REC-soap12-part1-20070427/#firstexample

From the server side, since the namespaces being declared are known, they can be defined in either namespaces.properties or customer_overrides.properties with a namespaces prefix. After restart of Sterling B2B Integrator, the definitions will be picked up and the namespace prefix will be recognized. If the change is made in namespaces.properties, ensure that the same change has been made in namespace.properties.in

The property change would look like this for namespaces.properties:

hh = http://testnamespace.com/sterling

and like this for customer_overrides.properties:

namespaces.hh = http://testnamespace.com/sterling

A final option, though not a very good one, would be to turn off input validation in the BP Schema Mapping section for the BP invoked by the SOA_Message_Handler. Schema mappings are located at Deployment -> Web Services -> Schema mappings.


[{"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"5.2.4.1;5.2.4;5.2.3;5.2.2;5.2.1;5.2;5.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21636761