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 Wenslauw <we...@gmail.com> on 2006/01/05 15:26:04 UTC

namespace problem after upgrading

hi,

After upgrading from axis 1.1 to 1.2 the response from our webservices
changed.

It looked like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
    <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>
           <ns1:submitOrderResponse
                soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
               
xmlns:ns1="http://update.ws.integration.om.bla.nl<http://update.ws.integration.om.contrado.nl/>">

                <ns1:submitOrderReturn xsi:type="ns1:WSResult">
                     <ns1:orderId xsi:type="xsd:long">100004</ns1:orderId>
                   </ns1:submitOrderReturn>
            </ns1:submitOrderResponse>
      </soapenv:Body>
      </soapenv:Envelope>

And below is what it is like now. I've tried to google for it, but I
couldn't find anything helpful. The problem is that the namespace ns1 is
missing for the submitOrderReturn and orderId tags. Anyone have any idea why
this has changed? I would like to change it back, because the clients are
having trouble interpreting the response.

<?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>
  <ns1:submitOrderResponse
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns1="http://update.ws.integration.om.bla.nl<http://update.ws.integration.om.contrado.nl/>">

    <submitOrderReturn xsi:type="ns1:WSResult">
      <orderId xsi:type="xsd:long">100000</orderId>
    </submitOrderReturn>
  </ns1:submitOrderResponse>
</soapenv:Body>
</soapenv:Envelope>

Thanks,

Wenslauw

Re: namespace problem after upgrading

Posted by Anne Thomas Manes <at...@gmail.com>.
According to WS-I rules, the accessor elements for the parameters in an RPC
style service (in this case "submitOrderReturn") should not be namespace
qualified. The namespace qualification of orderId is determined by how you
defined the submitOrderReturn type. (Did you specify
elementFormDefault="qualified"?)

In regards to the submitOrderReturn element, the 1.2 response is correct and
the previous 1.1 response was incorrect. I don't know if there's a way to
make 1.2 behave incorrectly in this case. It's possible that your clients
are barfing only on the orderId element (and not the submitOrderReturn
element), in which case you should ask your clients to generate new
interfaces based on the new WSDL. (If your clients are using .NET, though,
you will have to adjust your service so that all child elements are
qualified.)

If your clients are in fact barfing on the unqualified submitOrderReturn
element, I suggest you either revert back to Axis 1.1 or convert the service
to document/literal style, in which case you define what elements are and
are not namespace qualified in your schema.

Anne

On 1/5/06, Wenslauw <we...@gmail.com> wrote:
>
> hi,
>
> After upgrading from axis 1.1 to 1.2 the response from our webservices
> changed.
>
> It looked like this:
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>     <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>
>            <ns1:submitOrderResponse
>                 soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/"
>                 xmlns:ns1="http://update.ws.integration.om.bla.nl<http://update.ws.integration.om.contrado.nl/>">
>
>                 <ns1:submitOrderReturn xsi:type="ns1:WSResult">
>                      <ns1:orderId xsi:type="xsd:long">100004</ns1:orderId>
>
>                    </ns1:submitOrderReturn>
>             </ns1:submitOrderResponse>
>       </soapenv:Body>
>       </soapenv:Envelope>
>
> And below is what it is like now. I've tried to google for it, but I
> couldn't find anything helpful. The problem is that the namespace ns1 is
> missing for the submitOrderReturn and orderId tags. Anyone have any idea why
> this has changed? I would like to change it back, because the clients are
> having trouble interpreting the response.
>
> <?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>
>   <ns1:submitOrderResponse
>       soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>       xmlns:ns1="http://update.ws.integration.om.bla.nl<http://update.ws.integration.om.contrado.nl/>">
>
>     <submitOrderReturn xsi:type="ns1:WSResult">
>       <orderId xsi:type="xsd:long">100000</orderId>
>     </submitOrderReturn>
>   </ns1:submitOrderResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Thanks,
>
> Wenslauw
>