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 Simon Frohn <sf...@i-xs.de> on 2003/06/01 20:46:30 UTC

Re: xsi:nil vs. xsi:null

Hi,


now I tried to set
call.getMessageContext().setSchemaVersion(SchemaVersion.SCHEMA_1999)
which had the desired effect: xsi:null instead of xsi:nil
is used.
However there's now a weird mix of namespaces. Non null Strings
are still encoded using the 2001 schema.
Is there any other parameter I should set to consistently use the 1999 or
2000
schema??

thanks,
Simon


<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
 <soapenv:Body>
  <ns1:Buy soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://www.soapinterop.org/Bid">
   <AD href="#id0"/>
  </ns1:Buy>
  <multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Address"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns2="http://www.soapinterop.org/Bid">
   <address xsi:type="ns3:string" xsi:null="true"
xmlns:ns3="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"/>
   <city xsi:type="ns4:string"
xmlns:ns4="http://www.w3.org/2001/XMLSchema">Raleigh</city>
   <name xsi:type="ns5:string"
xmlns:ns5="http://www.w3.org/2001/XMLSchema">Sam Ruby</name>
   <state xsi:type="ns6:string"
xmlns:ns6="http://www.w3.org/2001/XMLSchema">NC</state>
   <zipCode xsi:type="ns7:string"
xmlns:ns7="http://www.w3.org/2001/XMLSchema">27676</zipCode>
  </multiRef>
 </soapenv:Body>


> Hi,
>
> I am using Axis1.1RC2 on the client side. It seems
> that the server isn't accepting the encoding for null-
> Integers <name xsi:type="xsd:int" xsi:nil="true">. It always
> returns a NumberFormatExeption.
>
> Using the BeanSerializer, is there any way to send
> <name xsi:type="xsd:int" xsi:null="true"> instead of
> Integers <name xsi:type="xsd:int" xsi:nil="true">. ???
>
>
> thanks,
> Simon
>  .
>
>