Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 44382 invoked from network); 28 May 2008 17:51:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 May 2008 17:51:46 -0000 Received: (qmail 77104 invoked by uid 500); 28 May 2008 17:51:46 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 77095 invoked by uid 500); 28 May 2008 17:51:46 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 77084 invoked by uid 99); 28 May 2008 17:51:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 10:51:46 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Robert.Bennett@ca.com designates 208.232.182.53 as permitted sender) Received: from [208.232.182.53] (HELO mail14.ca.com) (208.232.182.53) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 May 2008 17:50:51 +0000 Received: from USILMS12.ca.com ([141.202.201.12]) by mail14.ca.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 28 May 2008 12:51:13 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: generated C code from choice elements in wsdl Date: Wed, 28 May 2008 13:51:11 -0400 Message-ID: <4090CC433D85994DA9A5A0FAD9A9EF5B050359EA@USILMS12.ca.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: generated C code from choice elements in wsdl Thread-Index: AcjA6diRerIYSptvSJCTx98z/yycqwAAUfag References: <4090CC433D85994DA9A5A0FAD9A9EF5B05035650@USILMS12.ca.com> <4090CC433D85994DA9A5A0FAD9A9EF5B05035769@USILMS12.ca.com> From: "Bennett, Robert P" To: "Apache AXIS C User List" X-OriginalArrivalTime: 28 May 2008 17:51:13.0710 (UTC) FILETIME=[6BB794E0:01C8C0EB] X-Virus-Checked: Checked by ClamAV on apache.org > -----Original Message----- > From: Dimuthu Gamage [mailto:dimuthuc@gmail.com]=20 > Sent: Wednesday, May 28, 2008 1:38 PM > To: Apache AXIS C User List > Subject: Re: generated C code from choice elements in wsdl >=20 > On Wed, May 28, 2008 at 5:57 PM, Bennett, Robert P=20 > 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=20 > >> snapshot. > > > > I had generated the problem code using Axis2/Java 1.4, so=20 > I'll try the=20 > > latest snapshot. I'm having trouble reaching=20 > > http://cvs.apache.org/dist/axis2/nightly now (connection refused). =20 > > I'll try again later and report my results. >=20 > The nightly build URL is http://people.apache.org/dist/axis2/nightly/. > Anyway i don't think there is much difference in Axis2/Java=20 > 1.4 and the nightly build. Anyway can you check the code i=20 > attached your version (should work for 1.4) and make sure it=20 > is the same code as the one you generated, if it doesn't=20 > work please report back. D'oh!!! I thought I was using 1.4, but it turns out I was using 1.3. NEVER MIND. Looks like 1.4 is generating the correct code after all. Thanks, Bob >=20 > Thanks > Dimuthu >=20 > > > > Thanks again, > > Bob > > > >> > >> Thanks > >> Dimuthu > >> > >> On Wed, May 28, 2008 at 7:14 AM, Dimuthu Gamage=20 > =20 > >> 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=20 > or b type,=20 > >> > where as server understand it and deserialize it correctly. > >> Please see > >> > the attachment. > >> > > >> > The problem may be caused by your logic or some special=20 > case that I=20 > >> > may not have tested. Can you check this again report=20 > back with more=20 > >> > information. > >> > > >> > Thanks > >> > Dimuthu > >> > > >> > > >> > On Wed, May 28, 2008 at 3:02 AM, Bennett, Robert P=20 > >> > 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=20 > the 'choice' > >> >> element to indicate this, like the following. When I run the=20 > >> >> attached wsdl through the wsdl2c utility (from axis2 1.4), > >> the adb C > >> >> code that is generated (the serialize and deserialize=20 > functions)=20 > >> >> assumes that both A and B elements are present in the=20 > message and=20 > >> >> generates an error (or a null pointer reference) if either is=20 > >> >> 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 > >> >> > >> >> > >> >> > >> >> > >> >> type=3D"AorBChoice" > >> >> minOccurs=3D"0" > >> maxOccurs=3D"unbounded"/> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> type=3D"xsd:string"/> > >> >> type=3D"xsd:string"/> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> type=3D"xsd:string"/> > >> >> type=3D"xsd:string"/> > >> >> > >> >> > >> >> > >> >> > >> >> > >>=20 > --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > >> >> For additional commands, e-mail: axis-c-user-help@ws.apache.org > >> >> > >> > > >> > >>=20 > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > >> For additional commands, e-mail: axis-c-user-help@ws.apache.org > >> > >> > >> > > > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > > > >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-c-user-help@ws.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org