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 17:38:08 GMT
On Wed, May 28, 2008 at 5:57 PM, Bennett, Robert P
<Robert.Bennett@ca.com> wrote:
>> -----Original Message-----
>> From: Dimuthu Gamage [mailto:dimuthuc@gmail.com]
>> Sent: Tuesday, May 27, 2008 10:03 PM
>> To: Apache AXIS C User List
>> Subject: Re: generated C code from choice elements in wsdl
>>
>> Looks like i can't send the attachment to the list.
>> Please check it from here,
>> http://people.apache.org/~dimuthu/public/case41.zip
>
> Thank you for your quick and thorough reply.
>
>>
>> Note that you have to use either Axis2/Java 1.4 or the latest
>> snapshot.
>
> I had generated the problem code using Axis2/Java 1.4, so I'll try the
> latest snapshot.  I'm having trouble reaching
> http://cvs.apache.org/dist/axis2/nightly now (connection refused).  I'll
> try again later and report my results.

The nightly build URL is http://people.apache.org/dist/axis2/nightly/.
Anyway i don't think there is much difference in Axis2/Java 1.4 and
the nightly build. Anyway can you check the code i attached your
version (should work for 1.4) and make sure it is the same code as the
one you generated,  if it doesn't work please report back.

Thanks
Dimuthu

>
> Thanks again,
>   Bob
>
>>
>> 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
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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