axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirco Freiberg <>
Subject general question about choice fields
Date Sat, 26 Jan 2008 19:07:22 GMT
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">
            <element name="account" type="string"></element>
                <element name="id1" type="string"></element>
                <element name="id2" type="string"></element>
                <element name="id3" type="string"></element>

axis deserializes this to an object which contains four fields:

public class PaymentPlanRequest  implements {
    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:
For additional commands, e-mail:

View raw message