Namespaces management of the WrapSoap function component

Technote (troubleshooting)


Problem(Abstract)

It is not possible to insert a body content which is namespace qualified but without the usage of a prefix (default namespace approach: xmlns="..").

Symptom

The WrapSoap function component does not correctly handle SOAP body contents including elements defined in a namespace which are not prefix-qualified. Indeed in such cases it generates a prefix for the user-defined namespace and uses it to qualify the body elements defined in the namespace.

For example, for body content:

<MyRequest xmlns="http://www.mycompany.com/GenApp">
DummyContent
</MyRequest>

the WrapSoap function component produces the following soap message:

<soap: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" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:MyRequest xmlns="http://www.mycompany.com/GenApp" xmlns:ns1="http://www.mycompany.com/GenApp">
DummyContent
</ns1:MyRequest>
</soap:Body>
</soap:Envelope>"

on which the prefix "ns1" has been generated instead of the unnamed prefix used in the passed soap content. That is:

original: <MyRequest xmlns="http://www.mycompany.com/GenApp">

generated: <ns1:MyRequest xmlns="http://www.mycompany.com/GenApp" xmlns:ns1="http://www.mycompany.com/GenApp">

In the generated SOAP message, the namespace "http://www.mycompany.com/GenApp" is defined twice, since the original definition included in the body content in input is actually duplicated though the definition of the "ns1" prefix. Moreover the elements in the namespace are qualified with the attribute "ns1" (this might not be desired, since in the original message the user defines the element in the namespace as not prefix-qualified).
The final SOAP envelope is still well formed and the body is semantically equivalent to the one passed as input, but it is not in the form that user wanted (not prefix-qualified elements in the namespace).

Cause

The issue originated within the Axis library used by the WrapSoap function component and so it cannot be removed by fixing the ITDI code.

Resolving the problem

The simplest way to work around this limitation is adding the following declaration

xmlns:="http://www.mycompany.com/GenApp"

to the "Namespace declarations to add to the SOAP Envelope" function component parameter.
It is formally incorrect (note :=), but the final result is to define the empty string prefix for the namespace in subject (instead of the generated "ns1") which, in turn, leads to the removal of the unwanted prefix being generated.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

IBM Security Directory Integrator
General

Software version:

7.1

Operating system(s):

All Platforms

Software edition:

All Editions

Reference #:

1616880

Modified date:

2013-10-07

Translate my page

Machine Translation

Content navigation