You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andre Huertas <an...@creditex.com> on 2004/12/02 22:38:05 UTC

Namespace prefixes in SOAP and "no operation" error

Hi,

   I'm running the test cases generated by WSDL2JAVA on some document style
web services and have been getting some "no operation" errors that directly
relate to the use of namespace prefixes in related SOAP messages.  When I
run my test case the SOAP message generated by Axis is:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <ns1:tradeMessage xsi:type="TradeMessageType" xmlns=""
xmlns:ns1="http://www.abc123.com/Trades">
            <ns1:tradeId>123</ns1:tradeId>
        </ns1:tradeMessage>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

the server responses with: 'No such operation: "tradeMessage"'

if I get rid of the prefixes in the above SOAP message everything works
fine:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <tradeMessage>
            <tradeId>123</tradeId>
        </tradeMessage>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

First of all, does anyone know what causes this behaviour? Second, why does
Axis use xsi:type? Isn't the first example bad XML (the xsi:type is not
bound)?

My environment info: Axis 1.2 with Castor running on Tomcat 5.0 


Any help would be appreciated,
Andre Huertas
This email and any files transmitted with it are intended solely for the
person(s)to whom it is addressed. If you are not the intended recipient,
please delete the message and all copies of it from your system, and destroy
any hardcopies of it and contact the sender of the email.