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 Tysnes Are Thobias <ar...@edb.com> on 2004/06/30 08:57:08 UTC

Questions about the SOAP Request

Hello!

I'm using Axis 1.1 with Castor and found some "strange" feature I can't
explain
in my Document/literal/wrapped style WebService.

This Request(1):

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <LogOn xmlns="http://www.test.com/test/logon">
   <ns1:LogOnVO xmlns:ns1="http://www.test.com/test/logon">
    <ns1:username>hello</ns1:username>
    <ns1:password>toyou</ns1:password>
   </ns1:LogOnVO>
  </LogOn>
 </soapenv:Body>
</soapenv:Envelope>

And this..(2):

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <LogOn xmlns="http://www.test.com/test/logon">
   <ns1:Foo xmlns:ns1="FooNS">
    <ns1:username>hello</ns1:username>
    <ns1:password>toyou</ns1:password>
   </ns1:Foo>
  </LogOn>
 </soapenv:Body>
</soapenv:Envelope>

And this..(3):

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <LogOn xmlns="BarNS">
   <ns1:Foo xmlns:ns1="FooNS">
    <ns1:username>hello</ns1:username>
    <ns1:password>toyou</ns1:password>
   </ns1:Foo>
  </LogOn>
 </soapenv:Body>
</soapenv:Envelope>

All gives a valid response from the Web Service (without the foo and bar
stuff).

But this one(4):

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <Bar xmlns="BarNS">
   <ns1:Foo xmlns:ns1="FooNS">
    <ns1:username>hello</ns1:username>
    <ns1:password>toyou</ns1:password>
   </ns1:Foo>
  </Bar>
 </soapenv:Body>
</soapenv:Envelope>

Is not working

So.. my question.. why is request 2 and 3 legal !?

Cheers,
Are