Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

XML Namespace in WebService Request/Response

Hi all,

I have a question regarding xml namespace usage in wsdl and the corresponding request/response messages.

I have already browsed quite some articles about xml namespaces as well as some forum threads, but I am still not sure.

I have the following part of a wsdl document (generated by Integration Directory), defining a targetnamespace.

u2026
<wsdl:types>
    <xsd:schema targetNamespace="http://www.dorma.com/sap/xi/finance"
                         xmlns="http://www.dorma.com/sap/xi/finance"
                         xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:element name="DebtorGetDetailResponse" type="Z_BAPI_DEBTOR_GETDETAIL_Response"></xsd:element>
        u2026
        <xsd:complexType name="Z_BAPI_DEBTOR_GETDETAIL_Response">
            <xsd:sequence>
                <xsd:element name="DEBITOR_COMPANY_DETAIL" type="BAPI1007_5" minOccurs="0">
                    ...
                </xsd:element> u2026
            </xsd:sequence>
        </xsd:complexType>
        u2026
    </xsd:schema>
    u2026
</wsdl:types>
u2026

In my understanding, all types defined in the schema section of a wsdl document will be in the targetnamespace, if defined.

Therefore the element DEBITOR_COMPANY_DETAIL would be in the namesapce

http://www.dorma.com/sap/xi/finance

.

However, the ABAP proxy generates a response message like follows,

where only the root element is in this namespace and the child elements are in the global namespace:

<?xml version="1.0" encoding="utf-8"?>
<ns1:DebtorGetDetailResponse xmlns:ns1="http://www.dorma.com/sap/xi/finance"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <DEBITOR_COMPANY_DETAIL>
        u2026
    </DEBITOR_COMPANY_DETAIL>
    u2026
</ns1:DebtorGetDetailResponse>

Do I have a wrong understand of the wsdl (xml schema) or is this an erroneous behavior?

The problem is that some 3rd-party software web service module does not accept

the response message as not complient with the respective wsdl document.

Any input is appreciated.

Thanks

Hans

Edited by: Hans-Jürgen Schwippert on Oct 1, 2008 12:02 PM

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question