cancel
Showing results for 
Search instead for 
Did you mean: 

Adaptive webservice model not generating namespace information for XML?

Former Member
0 Kudos

Hello!

I am using Web Dynpro for java to connect to a third party webservice running outside the SAP landscape. I have imported the WSDL document for this WS in an Adaptive WS model.

I have a problem. The webservice is running on IBM websphere but it doesn't accept the xml in my request. It appears to be the a namespace issue with web dynpro not qualifying all elements in the request with namespace.

Is it a valid webservice call if you omit the namespace for an element or is this a bug in the Adaptive WS implementation?

Web Dynpro web service model generated request:

<?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:Header>

<sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">

<enableSession>true</enableSession>

</sapsess:Session>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<ns1:tamKontrolleraKontoLastAnrop xmlns:ns1="http://schemas.fora.se/modell/tam/1.0/TAM_Data">

<AnvandarNamn>30039647</AnvandarNamn>

</ns1:tamKontrolleraKontoLastAnrop>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

As you can see the tag

<AnvandarNamn>30039647</AnvandarNamn>

is missing a namespace.

It should be

<ns1:AnvandarNamn>30039647</ns1:AnvandarNamn>

Using a third part tool called Soapui i generate this request that works:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tam="http://schemas.fora.se/modell/tam/1.0/TAM_Data">

<soapenv:Header/>

<soapenv:Body>

<tam:tamKontrolleraKontoLastAnrop>

<tam:AnvandarNamn>30039647</tam:AnvandarNamn>

</tam:tamKontrolleraKontoLastAnrop>

</soapenv:Body>

</soapenv:Envelope>

Is there a way to force web dynpro to add namespace to all elements or can you thing of another solution? The WS is developed in-house so I am able to change it.

I posted this question as a reply to the following thread before realizing it was posted in the XI forum. I am not involving XI in this Web Service

Many thanks for any help!

Regards,

Richard Linnander

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I solved this myself. We changed a parameter in the WSDL and regenerated the webservice so that it no longer throws an exception when it receives an element without a namespace defined.

<xsd:schema elementFormDefault="unqualified" targetNamespace="http://xYxY" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Edited by: Navet Project on Dec 10, 2008 4:46 PM