cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP serializers generated for Portal web service consumer

Former Member
0 Kudos

I originally posted this message in the XI forum with the subject "Namespace prefix in SOAP Elements causes problems in XI " but I think this is more a Portal/webservices question than XI.

Perhahps one of you can help?

I'm using code generated by NW Developer Studio for use inside Portal components acting as a web service consumer. The problem is that the code generated includes a namespace prefix for each element in the body of the message, but XI doesn't like the namespace prefixes and throws back a DeliveryException.

The SOAP message created by the generated NWDS code is:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wn3="http://www.w3.org/1999/XMLSchema" xmlns:wn2="http://www.w3.org/2000/10/XMLSchema" xmlns:wn1="http://www.w3.org/2001/XMLSchema" xmlns:wn0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wn4="http://allieddomecq.com/poc" xmlns:tns="http://allieddomecq.com/poc">

<SOAP-ENV:Body>

<wn4:PortalSOAP_MT_Request>

<wn4:CustomerIdentifier>0001000064</wn4:CustomerIdentifier>

<wn4:SalesOrganization>ES50</wn4:SalesOrganization>

<wn4:SystemIdentifier>R3D</wn4:SystemIdentifier>

</wn4:PortalSOAP_MT_Request>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

The problem is the "wn4" prefixes on the CustomerIdentifier, SalesOrganization, and SystemIdentifier tags. When we send the soap request from XML Spy without the prefixes, the response comes back OK with the expected data.

I've had a very good look around the generated code - the serializers for creating the soap request - but could not find what exactly might be changed to leave off the prefixes.

Alternatively, is there something I could ask our XI consultant to do, to make his component accept the request with the redundant prefixes in the tags?

Many thanks for any advice/help,

Laura

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

We solved this from the XI side, but would still love to know how to modify the generated serializers for future reference.

Our XI consultant:

"The SOAP call that comes in defines the elements of the Data Type with an explicit namespace definition eg:

<ns:CustomerRecord xmlns:ns="http://company.com">

<ns:CustomerNumber> </ns:CustomerNumber>

<ns:CustomerDetails> </ns:CustomerDetails>

</ns:CustomerRecord>

And wasntt recognised by the XI mapping tool. To get around this problem, I created an external definition which contains these explicit namespace definitions, and used that instead of the DT we created in XI. The mapping now works correctly."