cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP request configuration (namespaces)

Former Member
0 Kudos

Hi there,

I am trying to consume a web service via CAF/Netweaver which requests a certain name space. here an extract of the wsdl.

- <wsdl:types>

- <s:schema elementFormDefault="qualified" targetNamespace="http://www.serviceobjects.com/">

- <s:element name="GetAddressPlus">

- <s:complexType>

- <s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="Address" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="Address2" type="s:string" />

.......

Unfortunately, the SOAP request which gets created by the Netweaver SOAP adapter (which is correct) can't be understood by the service provider (see pns:GetAddressPlus)

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<SOAP-ENV:Body>

<pns:GetAddressPlus xmlns:pns="http://www.serviceobjects.com/">

<pns:Address>1016 Poplar Drive</pns:Address>

<pns:City>Collierville</pns:City>

<pns:State>TN</pns:State>

<pns:PostalCode>38017</pns:PostalCode>

For the service to work properly, the namespace shall not be attached to the parameters, but just added to the parent element of the message, see below (only GetAddressPlus, no leading namespace)

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<SOAP-ENV:Body>

<GetAddressPlus xmlns="http://www.serviceobjects.com/">

<Address>1016 Poplar Drive</Address>

<City>Collierville</City>

<State>TN</State>

<PostalCode>38017</PostalCode>

Is there a workaround to configure the SOAP generation in such a way, that no namespaces are used within the SOAP message ?

Thx, Nick

Edited by: Nick Laqua on Aug 10, 2009 9:00 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Technically NW SOAP request is valid one and service provider should understand it.

Can you do following:

- Try to call this service from SOAP UI or WSNavigator and post error message if you receive any.

- Try it with namespace prefix and without namespace prefix.

Regards,

Gourav

Former Member
0 Kudos

Hi Gourav,

yes, I know that the request is valid and should be understood, it just doesn't.

I did call the service via NW WSNavigator, the response is a wellformed SOAP Reply which indicates that the request can't have zero length. So basically, the SOAP Request has been transferred correctly, but after parsing on the provider side, no content remains.

Not sure what you mean by the last hint, as I don't know how to issue a request via NW WSNavigator without namespace prefix. I know that the service works without namespace prefix, I just don't know how to produce such a request within the NW framework. That was the original question of mine.

nick

Former Member
0 Kudos

Hi,

Using SOAP UI you can type whatever you want to type in request page (SOAP Message), Do not type in form but in xml.

So in first attempt type SOAP Message with prefix,

in Second attempt modify SOAP request without prefix manually.

Please post error message (as you said "that the request can't have zero length") this means Service is not receiving request at all, else message should be about "Not well formed" message.

I believe that this error is not really related to formatting of request and namespace

Please try it with SOAP UI.

Regards,

Gourav