Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 1478 invoked from network); 20 May 2004 14:56:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 May 2004 14:56:39 -0000 Received: (qmail 49655 invoked by uid 500); 20 May 2004 14:56:23 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 49490 invoked by uid 500); 20 May 2004 14:56:21 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 49302 invoked by uid 98); 20 May 2004 14:56:19 -0000 Received: from jira@apache.org by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(192.18.33.10):. Processed in 0.275315 secs); 20 May 2004 14:56:19 -0000 X-Qmail-Scanner-Mail-From: jira@apache.org via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(192.18.33.10):. Processed in 0.275315 secs) Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by hermes.apache.org with SMTP; 20 May 2004 14:56:16 -0000 Received: (qmail 22189 invoked from network); 20 May 2004 14:57:01 -0000 Received: from localhost (HELO nagoya) (127.0.0.1) by nagoya.betaversion.org with SMTP; 20 May 2004 14:57:01 -0000 Message-ID: <990784759.1085065021489.JavaMail.apache@nagoya> Date: Thu, 20 May 2004 07:57:01 -0700 (PDT) From: jira@apache.org To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS-429) Incorrect code generated from xsd:choice element in WSDL Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The following comment has been added to this issue: Author: joel yu Created: Thu, 20 May 2004 7:55 AM Body: I did not have the luxury to change the xsd, so I worked around this issue by doing the following: make an interface as follow: public interface ChoiceSupport { public boolean isChoicePart(String propertyName); } have all the Objects that contains xsd:choice implement this interface. then in org.apache.axis.encoding.ser.BeanSerializer(axis 1.1 code), add the following code at line 209(after call to propertyDescriptor[i].get(value); ): if (value instanceof org.apache.axis.xsd.ChoiceSupport) { ChoiceSupport choice = (ChoiceSupport) value; if(choice.isChoicePart(propertyDescriptor[i].getName())) { if(propValue == null) continue; } } now, this work around involves the user know not to set any other choice item when one is already set, ChoiceSupport can be extended to make it more userful. --------------------------------------------------------------------- View this comment: http://issues.apache.org/jira/browse/AXIS-429?page=comments#action_35641 --------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/browse/AXIS-429 Here is an overview of the issue: --------------------------------------------------------------------- Key: AXIS-429 Summary: Incorrect code generated from xsd:choice element in WSDL Type: Bug Status: Open Project: Axis Components: WSDL processing Versions: current (nightly) Assignee: Axis Developers Mailing List Reporter: Doug Bitting Created: Wed, 9 Oct 2002 4:00 AM Updated: Thu, 20 May 2004 7:55 AM Environment: Operating System: Windows NT/2K Platform: PC Description: In one of the test cases (test\wsdl\types\ComprehensiveTypes.wsdl), you'll find the following schema definition: ---- snip here ---- ---- snip here ---- When run through WSDL2Java, it generates the attached ComplexChoice.java file. This compiles and runs fine. However, the SOAP request generated with this ends up with something like the following XML fragment (assuming an element named complexChoice): ---- snip here ---- 1 ---- snip here ---- The above is not valid XML. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira