axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parikh,Pratik" <Pratik.Par...@cerner.com>
Subject RE: nil = "true"
Date Mon, 14 Nov 2005 08:50:09 GMT

I am interested in this as well.... Please reply it there is one.

Thanks,
Pratik Parikh

-----Original Message-----
From: Ulf.Licht@esprit.com [mailto:Ulf.Licht@esprit.com]
Sent: Monday, November 14, 2005 2:46 AM
To: axis-user@ws.apache.org
Subject: RE: nil = "true"

Lets bring this old topic to life again.

Is it still not possible to make AXIS omit optional elements
(minOccurs="0")in a RPC-SOAP request if no value is given?

The Java method created for a WSDL with optional elements only leaves
the developer the choice to set any value or null for optional
parameters.
When the developer set null he means to say that he does not want to
give a value for this parameter. But what he gets in the SOAP request is
an element containing null (xsi:null="true") instead of no element. For
service processing the request this can make a big difference. "Null"
and "not given" are two different states (in XML). It is just that the
generated Java implementation does not allow to differentiate between
them.

There should be a setting for AXIS controlling the generation of
optional elements for null values. Is there one? Are there other
possibilities?

Regards,
Ulf Licht



List:       axis-user
Subject:    xsi:nil="true"
From:       Seth Tager <javawebgraphics () yahoo ! com>
Date:       2003-08-14 21:53:33

I'm having a problem with a Microsoft .NET service
(MapPoint) choking on any (I think it's any, but I'm not positive)
element that contains nil="true", as in

    <Pushpins xsi:nil="true"/>
    <Route xsi:nil="true"/>

Axis 1.0 eliminated these elements from the request, which makes the
.NET service happy, but 1.1 includes them.

The year-old, archive message (below) seems to be related, but the wsdl
looks like it already has minOccurs="0" maxOccurs="1" as in this
snippet:

                                                 <s:complexType
name="MapSpecification">  <s:sequence>
  <s:element minOccurs="0" maxOccurs="1"
name="Pushpins" type="s0:ArrayOfPushpin"/>
  <s:element minOccurs="0" maxOccurs="1"
name="Route" type="s0:Route"/>
 </s:sequence>
                                                 </s:complexType>

Any suggestions about how to fix, or work around this problem.

>From the archives:

Subject:  RE: nil = "true"
From:     Tom Jordahl <tomj () macromedia ! com>
Date:     2002-07-31 13:58:51


If you are using a document/literal service, you can change the WSDL to
have \ minoccurs=0 maxoccurs=1.  Then if the value if null, it will be
omitted from the XML \ in the request/response.

If you are using rpc/encoded, you can't do this as encoded will always
use nil=true.

See the test in java/test/wsdl/omit for an example.

--
Tom Jordahl
Macromedia


-----Original Message-----
From: Snigdha Pandit [mailto:SnigdhaP@NIIT.com]
Sent: Wednesday, July 31, 2002 5:57 AM
To: Axis Users
Subject: xsi:nil = "true"


hi All,

How can I eliminate elements with xsi:nil attribute set to true?

Thanks and Regards
Snigdha

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

CONFIDENTIALITY NOTICE

This message and any included attachments
are from Cerner Corporation and are intended
only for the addressee. The information
contained in this message is confidential and
may constitute inside or non-public information
under international, federal, or state
securities laws. Unauthorized forwarding,
printing, copying, distribution, or use of such
information is strictly prohibited and may be
unlawful. If you are not the addressee, please
promptly delete this message and notify the
sender of the delivery error by e-mail or you
may call Cerner's corporate offices in Kansas
City, Missouri, U.S.A at (+1) (816)221-1024.
---------------------------------------- --

Mime
View raw message