On Wednesday 13 March 2002 12:05, you wrote:
> Its xsi:nil and not xsi:null for specifying that an element value holds a
> null value...
dovle pretty sad to disappoint you but this is the answer that I am reveiving
from my apache soap when an attribute has null value: (snapshot from
UtilSnoop)
<return xmlns:ns2="kns" xsi:type="ns2:test.TestSerializable">
<testVector xmlns:ns3="http://xml.apache.org/xml-soap" xsi:type="ns3:Vector"
xsi:null="true"/>
<name xsi:type="xsd:string" xsi:null="true"/>
<number xsi:type="xsd:int">0</number>
<valid xmlns:ns4="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns4:Array" ns4:arrayType="xsd:boolean[]" xsi:null="true"/>
Are you shure that you receive the xsi:nil="true" ?
I have read the Soap specification and I have found the same :
A NULL value or a default value MAY be represented by omission of the
accessor element. A NULL value MAY also be indicated by an accessor element
containing the attribute xsi:null with value '1' or possibly other
application-dependent attributes and values. (Quoting from W3C specs for
ksoap1.1)
So what could be wrong inhere ?
Has anyone managed to send an struct object with null attribute values ? (I
believe you have but ...)
TIA for your answers
dovle
>
> -----Original Message-----
> From: dovle [mailto:[EMAIL PROTECTED]]
> Sent: 12 March 2002 20:12
> To: [EMAIL PROTECTED]
> Subject: Re: HELP : xsi:null="true"
>
>
> Not mentioned:
> using orion 5.2
> apache soap 2.2
>
> And the TestSerializable is registered to the BeanSerializer
>
> Please help !!!
>
> > Problems encontered and don't know if this is apache's fault or I am
> > doing something wrong.
> >
> > I send the message as xml schema 1999 .
> >
> > I have a bean that contains some null values and is serialized like this
> > <item xsi:type="n1:test.TestSerializable">
> > <number xsi:type="xsd:int">0</number>
> > <name xsi:null="true" />
> > <valid xsi:null="true" />
> > <testVector xsi:null="true" />
> > </item>
> >
> > (is part of a Vector, of course)
> >
> > On serverside I get the following exception :
> > <faultstring>No mapping found for ':name' using encoding style
> > 'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
> >
> > When I send a TestSerizable with a name but with valid == null then I get
> > the same exception, but for :valid . And so on.
> >
> > Does apache soap 2.2 knows to use xsi:null (even if using schema 1999) ?
> > I have tried with schema 2000 and still the same .
> >
> > Or else, what is wrong inhere ? I have no idea.
> >
> > Please , need quick help, deadline comming :o(
> > dovle
>
> ************************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom
> they are addressed. Any views or opinions are solely those of
> the author and do not necessarily represent those of Exel
> Computer Systems plc. If you have received this email in error
> please notify Customer Services on 0115 946 0101.
> ************************************************************************