Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 91150 invoked from network); 29 Dec 2008 17:53:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Dec 2008 17:53:19 -0000 Received: (qmail 27724 invoked by uid 500); 29 Dec 2008 17:53:12 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 27651 invoked by uid 500); 29 Dec 2008 17:53:12 -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: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 27639 invoked by uid 99); 29 Dec 2008 17:53:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Dec 2008 09:53:12 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Dec 2008 17:53:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 459D7234C484 for ; Mon, 29 Dec 2008 09:52:44 -0800 (PST) Message-ID: <589055326.1230573164283.JavaMail.jira@brutus> Date: Mon, 29 Dec 2008 09:52:44 -0800 (PST) From: "Nateshan Soundarapandian (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Updated: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response. In-Reply-To: <770535159.1230573044420.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nateshan Soundarapandian updated AXIS2-4191: -------------------------------------------- Attachment: HotelAvailability.wsdl WSDL Document > Axis2 Generated Client: UnExpected SubElement error while processing Response. > ------------------------------------------------------------------------------ > > Key: AXIS2-4191 > URL: https://issues.apache.org/jira/browse/AXIS2-4191 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: adb > Affects Versions: 1.4.1 > Environment: Windows Vista > Reporter: Nateshan Soundarapandian > Attachments: FS_OTA_HotelAvailRQ.xsd, FS_OTA_HotelAvailRS.xsd, HotelAvailability.wsdl > > Original Estimate: 1h > Remaining Estimate: 1h > > Axis generated client is throwing an Unexpected subelement Exception while processing the response from the Web Service. The Response Schema Seems to be well defined. Please advice. > > Exception: > org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: > Unexpected subelement ContactNumber > at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) > at org.opentravel.www.ota._2003._05.HotelAvailabilityStub.fromOM(HotelAvailabilityStub.java:363) > at org.opentravel.www.ota._2003._05.HotelAvailabilityStub.HotelAvailabilityOperation(HotelAvailabilityStub.java:191) > at com.ihg.ws.cxf.servlets.HotelAvailability.doGet(HotelAvailability.java:211) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:114) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:91) > at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103) > at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187) > at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266) > at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:270) > at com.caucho.server.port.TcpConnection.run(TcpConnection.java:678) > at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721) > at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643) > at java.lang.Thread.run(Thread.java:595) > Generated Code (Where I believe the problem is): > while (!loopDone1) { > // We should be at the end element, but make sure > while (!reader.isEndElement()) > reader.next(); > // Step out of this element > reader.next(); > // Step to next element event. > while (!reader.isStartElement() > && !reader.isEndElement()) > reader.next(); > if (reader.isEndElement()) { > // two continuous end elements means we are exiting > // the xml structure > loopDone1 = true; > } else { > if (new javax.xml.namespace.QName( > "http://www.opentravel.org/OTA/2003/05", > "ContactNumber").equals(reader.getName())) { > list1 > .add(org.opentravel.www.ota._2003._05.TelephoneInfoType.Factory > .parse(reader)); > } else { > loopDone1 = true; > } > } > } > Response xml Schema Where the element ContactNumbers are defined (I will upload the complete schemas as well): > > > > > > Contact numbers of the hotel property. Examples are telephone and fax numbers. > > > > > > > Response XML Segment: > > > > > The first ContactNumber element is being processed fine, But the exception is thrown in the second element. > Please Note: I will only email the complete response xml if you need it. I cannot attach it to the issue. > Wsdl2Java Command used to generate the client: > wsdl2java.bat -uri C:\HotelAvailability_.wsdl -o C:\AxisClient p com.ihg.ws -d adb -s -t -u -sn HotelAvailability -pn HotelAvailabilitySOAP -Ew false -ns2p > Many Thanks for your time and attention, > Nateshan -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.