axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dimuthu Gamage" <dimut...@gmail.com>
Subject Re: generated C code from choice elements in wsdl
Date Wed, 28 May 2008 02:03:25 GMT
Looks like i can't send the attachment to the list.
Please check it from here, http://people.apache.org/~dimuthu/public/case41.zip

Note that you have to use either Axis2/Java 1.4 or the latest snapshot.

Thanks
Dimuthu

On Wed, May 28, 2008 at 7:14 AM, Dimuthu Gamage <dimuthuc@gmail.com> wrote:
> Hi Bennett,
>
> I checked with your WSDL and got everything working as expected. There
> I send array of mixed of element that has either a type or b type,
> where as server understand it and deserialize it correctly. Please see
> the attachment.
>
> The problem may be caused by your logic or some special case that I
> may not have tested. Can you check this again report back with more
> information.
>
> Thanks
> Dimuthu
>
>
> On Wed, May 28, 2008 at 3:02 AM, Bennett, Robert P
> <Robert.Bennett@ca.com> wrote:
>> I have a situation where I am passing a response message that can be one
>> of a set of different complex types.  I am using the 'choice' element to
>> indicate this, like the following.  When I run the attached wsdl through
>> the wsdl2c utility (from axis2 1.4), the adb C code that is generated
>> (the serialize and deserialize functions) assumes that both A and B
>> elements are present in the message and generates an error (or a null
>> pointer reference) if either is missing.  By the way, the flags I used
>> with wsdl2c are
>> "-sd -ss -g -d adb -sp -wv 1 -u -f ".
>>
>> Am I right to assume that the meaning of 'choice' is that one of the
>> list of elements is present, but not all of them?
>>
>> Thank you,
>>   Bob Bennett
>>
>>            <xsd:element name="inputData">
>>                <xsd:complexType>
>>                    <xsd:sequence>
>>                        <xsd:element name="AorB" type="AorBChoice"
>>                                minOccurs="0" maxOccurs="unbounded"/>
>>                    </xsd:sequence>
>>                </xsd:complexType>
>>            </xsd:element>
>>
>>            <xsd:complexType name="AorBChoice">
>>                <xsd:sequence>
>>                  <xsd:choice>
>>                     <xsd:element name="A" type="AType"/>
>>                     <xsd:element name="B" type="BType"/>
>>                  </xsd:choice>
>>                </xsd:sequence>
>>            </xsd:complexType>
>>
>>            <xsd:complexType name="AType">
>>                <xsd:sequence>
>>                     <xsd:element name="Afield1" type="xsd:string"/>
>>                     <xsd:element name="Afield2" type="xsd:string"/>
>>                </xsd:sequence>
>>            </xsd:complexType>
>>
>>            <xsd:complexType name="BType">
>>                <xsd:sequence>
>>                     <xsd:element name="Bfield1" type="xsd:string"/>
>>                     <xsd:element name="Bfield2" type="xsd:string"/>
>>                </xsd:sequence>
>>            </xsd:complexType>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>>
>

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


Mime
View raw message