Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 40625 invoked from network); 9 Nov 2006 17:26:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2006 17:26:01 -0000 Received: (qmail 76189 invoked by uid 500); 9 Nov 2006 17:25:58 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 76155 invoked by uid 500); 9 Nov 2006 17:25:58 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 76123 invoked by uid 99); 9 Nov 2006 17:25:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2006 09:25:58 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of davanum@gmail.com designates 66.249.82.233 as permitted sender) Received: from [66.249.82.233] (HELO wx-out-0506.google.com) (66.249.82.233) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Nov 2006 09:25:44 -0800 Received: by wx-out-0506.google.com with SMTP id h28so211497wxd for ; Thu, 09 Nov 2006 09:25:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KtLFPLEwtV/RQfH5zsT5Bd+6W2TFQDQM7Wfms+McEyZeubmTyVGNxPfZrXOGNXqMG7J+PQmq7PS9Gsh09ljQMeysNuOJAJY/b8FPIkmPswEprO5BGcZG+62xmkdDgM2Ll0+34Oc7p4dpKNGUxdIG1LMse5lXLGhbyi947qCiliY= Received: by 10.70.56.2 with SMTP id e2mr1118845wxa.1163093119743; Thu, 09 Nov 2006 09:25:19 -0800 (PST) Received: by 10.70.94.6 with HTTP; Thu, 9 Nov 2006 09:25:19 -0800 (PST) Message-ID: <19e0530f0611090925p7ccc70efra0784ed0532a4f7b@mail.gmail.com> Date: Thu, 9 Nov 2006 12:25:19 -0500 From: "Davanum Srinivas" Reply-To: dims@apache.org To: axis-user@ws.apache.org Subject: Re: Axis2 unexpected subelement error In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <19e0530f0611090848u5222baa9p6bab20fc38aa4cb1@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Because it finds something that should not be there according to the schema. Unless you originally had a schema that allowed a bag of any elements, codegen will try to do the right thing. in this case, throw an error that the xml you get is not according to the schema you specified. -- dims On 11/9/06, Moore, Don H wrote: > The elements are in order. > > Let me explain the problem a little more clearly. I generated code using > a wsdl that does not include the field cdCustType because that field was > not in the data. The data now includes that field, but my application > does not need it and there is nothing in the generated code about this > field. The generated code throws the error when the parser comes to > cdCustType. > > -----Original Message----- > From: Davanum Srinivas [mailto:davanum@gmail.com] > Sent: Thursday, November 09, 2006 10:48 AM > To: axis-user@ws.apache.org > Subject: Re: Axis2 unexpected subelement error > > Moore, > > It depends on the schema. *IF* your schema (in your wsdl) says, they are > needed only then we throw an exception. We also throw an exception if > the schema specifies a certain order and the runtime soap message does > not have the same order. > > -- dims > > On 11/9/06, Moore, Don H wrote: > > > > > > I have an issue with generated Java code using wsdl2Java and Axis2 > > 1.0. I've also tried using Axis2 1.1, Nov 2 2006 build, and have the > same problem. > > From posts I've found in the archives, I see this has been reported a > > few times before, but I haven't found a solution. > > > > Essentially, if additional fields get added to the data which were not > > > in the wsdl when the java files were generated with Axis2, then the > > code blows up with the java.lang.RuntimeException: Unexpected > subelement error. > > Obviously, I can regenerate the java code using a new wsdl. But, as > > long as those additional fields are not needed in my application, then > > > I really shouldn't have to be continuously regenerating the java code. > > > Shouldn't the additional fields just be ignored by the parser? > > > -- > Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service > Developers) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > -- Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers) --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org