axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Thomas Manes <atma...@gmail.com>
Subject Re: Eliminating element with xsi:nil
Date Thu, 19 Jan 2006 20:49:23 GMT
You can just use XSLT to transform the message.

On 1/19/06, Kasi, Anand <Anand.Kasi@sabre-holdings.com> wrote:
>
>  Thanks Anne. I like the idea of adding a handler to the outgoing message.
> However, I thought Axis did not let you remove elements from the soap body.
> Do you have any code examples as to how I can remove an xml element that has
> xsi:nil = true from the soap body from the handler?
>
>
>
>
> Thanks,
>
> Anand
>
>
>  ------------------------------
>
> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
> *Sent:* Thursday, January 19, 2006 10:21 AM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Eliminating element with xsi:nil
>
>
>
> If you have defined the field as nillable="true" and you have not
> specified minOccurs="0", then the message would not be valid if you left out
> the element. There's no way to tell Axis to do something invalid.
>
> I suggest that you add a handler to the outgoing message and transform it
> to remove the nil elements.
>
> Anne
>
> On 1/19/06, *Kasi, Anand* <Anand.Kasi@sabre-holdings.com> wrote:
>
> Thanks for the tip. However, I do not have the option of changing the wsdl
> to include nillable="false" and minOccurs="0". This is because our customers
> already are using client proxy which generated from the wsdl. I was
> wondering if there was a way to include new fields in the response, without
> impacting those customers who do not need the new functionality. Those who
> need the new functionality will regenerate from the new wsdl with new fields
> in it. Currently it does not work because it sees the new field come across
> in the response as <errorLevel xsi:nil="true"/> and obviously does not
> know what errorLevel is.
>
>
>
> Is there any way of configuring Axis on the server side, to eliminate the
> xml elements from the soap response when xsi:nil is set to true?
>
>
>
> Regards,
> Anand
>  ------------------------------
>
> *From:* Anne Thomas Manes [mailto:atmanes@gmail.com]
> *Sent:* Wednesday, January 18, 2006 6:27 PM
> *To:* axis-user@ws.apache.org
> *Subject:* Re: Eliminating element with xsi:nil
>
>
>
> Define the element as nillable="false" and specify minOccurs="0".
>
> Anne
>
> On 1/18/06, *Kasi, Anand* <Anand.Kasi@sabre-holdings.com> wrote:
>
> Hi All,
>
> I am using Axis 1.3. Is there any way of eliminating the xml element from
> the soap message when the element 's xsi:nil is set to "true" .
>
> Instead of
>
>
>
> <advisory>
>
>                     <advCondTextCode>Generic Error < /advCondTextCode>
>
>                     <code>10 0</code>
>
>                     <errorLevel xsi:nil="true"/>
>
>                     <fullAdvisoryText xsi:nil="true"/>
>
>   </advisory>
>
> I want to see
>
>    <advisory>
>
>                     <advCondTextCode>Generic Error < /advCondTextCode>
>
>                     <code>10 0</code>
>
>   </advisory>
>
> Thanks,
> Anand
>
>
>
>
>

Mime
View raw message