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: general question about choice fields
Date Mon, 28 Jan 2008 14:40:21 GMT
This is a bug. Please file a JIRA.

Anne

On Jan 26, 2008 2:07 PM, Mirco Freiberg <mirco.freiberg@web.de> wrote:
> Hi!
> If I had a xsd (as a part of a wsdl) defining a choice for a request
> message, how would I have to
>
> Short example. Pls have a look at this type definition:
>
>     <complexType name="PaymentPlanRequest">
>         <sequence>
>             <element name="account" type="string"></element>
>             <choice>
>                 <element name="id1" type="string"></element>
>                 <element name="id2" type="string"></element>
>                 <element name="id3" type="string"></element>
>             </choice>
>         </sequence>
>     </complexType>
>
> axis deserializes this to an object which contains four fields:
>
> public class PaymentPlanRequest  implements java.io.Serializable {
>     private java.lang.String account;
>     private java.lang.String id1;
>     private java.lang.String id2;
>     private java.lang.String id3;
>     public PaymentPlanRequest() {
>     }
>     public PaymentPlanRequest(
>            java.lang.String account,
>            java.lang.String id1,
>            java.lang.String id2,
>            java.lang.String id3) {
>            this.account = account;
>            this.id1 = id1;
>            this.id2 = id2;
>            this.id3 = id3;
>     }
>
> Now I am building a request setting the account and just one of the id
> fields and leaving the other fields unset.
> As a result of this the axis serializer delivers a soap request which
> equivalently contains a value filled account and id tag and two  more id
> tags with the attribute xsi:nil="true".
> Unfortunately the server complains about unexpected elements when
> receiving these nil elements and quits with an exception. According to
> the contract this behavior is right.
>
> I am very unshure about how to solve this problem so any hints will be
> appreciated. Thank you, Mirco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message