You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Nateshan Soundarapandian (JIRA)" <ji...@apache.org> on 2008/12/29 18:50:44 UTC

[jira] Created: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response.

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


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):
<xs:element name="ContactNumbers" minOccurs="0">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="ContactNumber" type="TelephoneInfoType" minOccurs="0" maxOccurs="unbounded">
							<xs:annotation>
								<xs:documentation xml:lang="en">Contact numbers of the hotel property. Examples are telephone and fax  numbers.            
                                                               </xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>

Response XML Segment:
<ContactNumbers>
<ContactNumber PhoneNumber="1-305-4469000" PhoneTechType="1" PhoneUseType="5"/>
<ContactNumber PhoneNumber="1-305-4471189" PhoneTechType="3" PhoneUseType="5"/>
</ContactNumbers>
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.


[jira] Updated: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response.

Posted by "Nateshan Soundarapandian (JIRA)" <ji...@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):
> <xs:element name="ContactNumbers" minOccurs="0">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="ContactNumber" type="TelephoneInfoType" minOccurs="0" maxOccurs="unbounded">
> 							<xs:annotation>
> 								<xs:documentation xml:lang="en">Contact numbers of the hotel property. Examples are telephone and fax  numbers.            
>                                                                </xs:documentation>
> 							</xs:annotation>
> 						</xs:element>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> Response XML Segment:
> <ContactNumbers>
> <ContactNumber PhoneNumber="1-305-4469000" PhoneTechType="1" PhoneUseType="5"/>
> <ContactNumber PhoneNumber="1-305-4471189" PhoneTechType="3" PhoneUseType="5"/>
> </ContactNumbers>
> 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.


[jira] Updated: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response.

Posted by "Nateshan Soundarapandian (JIRA)" <ji...@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: FS_OTA_HotelAvailRQ.xsd

Request Schema

> 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):
> <xs:element name="ContactNumbers" minOccurs="0">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="ContactNumber" type="TelephoneInfoType" minOccurs="0" maxOccurs="unbounded">
> 							<xs:annotation>
> 								<xs:documentation xml:lang="en">Contact numbers of the hotel property. Examples are telephone and fax  numbers.            
>                                                                </xs:documentation>
> 							</xs:annotation>
> 						</xs:element>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> Response XML Segment:
> <ContactNumbers>
> <ContactNumber PhoneNumber="1-305-4469000" PhoneTechType="1" PhoneUseType="5"/>
> <ContactNumber PhoneNumber="1-305-4471189" PhoneTechType="3" PhoneUseType="5"/>
> </ContactNumbers>
> 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.


[jira] Updated: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response.

Posted by "Nateshan Soundarapandian (JIRA)" <ji...@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: FS_OTA_HotelAvailRS.xsd

Response Schema

> 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):
> <xs:element name="ContactNumbers" minOccurs="0">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="ContactNumber" type="TelephoneInfoType" minOccurs="0" maxOccurs="unbounded">
> 							<xs:annotation>
> 								<xs:documentation xml:lang="en">Contact numbers of the hotel property. Examples are telephone and fax  numbers.            
>                                                                </xs:documentation>
> 							</xs:annotation>
> 						</xs:element>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> Response XML Segment:
> <ContactNumbers>
> <ContactNumber PhoneNumber="1-305-4469000" PhoneTechType="1" PhoneUseType="5"/>
> <ContactNumber PhoneNumber="1-305-4471189" PhoneTechType="3" PhoneUseType="5"/>
> </ContactNumbers>
> 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.


[jira] Assigned: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response.

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-4191:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> 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
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Critical
>         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):
> <xs:element name="ContactNumbers" minOccurs="0">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="ContactNumber" type="TelephoneInfoType" minOccurs="0" maxOccurs="unbounded">
> 							<xs:annotation>
> 								<xs:documentation xml:lang="en">Contact numbers of the hotel property. Examples are telephone and fax  numbers.            
>                                                                </xs:documentation>
> 							</xs:annotation>
> 						</xs:element>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> Response XML Segment:
> <ContactNumbers>
> <ContactNumber PhoneNumber="1-305-4469000" PhoneTechType="1" PhoneUseType="5"/>
> <ContactNumber PhoneNumber="1-305-4471189" PhoneTechType="3" PhoneUseType="5"/>
> </ContactNumbers>
> 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.


[jira] Updated: (AXIS2-4191) Axis2 Generated Client: UnExpected SubElement error while processing Response.

Posted by "Nateshan Soundarapandian (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nateshan Soundarapandian updated AXIS2-4191:
--------------------------------------------

    Priority: Critical  (was: Major)

> 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
>            Priority: Critical
>         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):
> <xs:element name="ContactNumbers" minOccurs="0">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="ContactNumber" type="TelephoneInfoType" minOccurs="0" maxOccurs="unbounded">
> 							<xs:annotation>
> 								<xs:documentation xml:lang="en">Contact numbers of the hotel property. Examples are telephone and fax  numbers.            
>                                                                </xs:documentation>
> 							</xs:annotation>
> 						</xs:element>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> Response XML Segment:
> <ContactNumbers>
> <ContactNumber PhoneNumber="1-305-4469000" PhoneTechType="1" PhoneUseType="5"/>
> <ContactNumber PhoneNumber="1-305-4471189" PhoneTechType="3" PhoneUseType="5"/>
> </ContactNumbers>
> 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.