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 "Christian Corsano (JIRA)" <ji...@apache.org> on 2008/12/09 16:12:44 UTC

[jira] Issue Comment Edited: (AXIS2-4136) org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement

    [ https://issues.apache.org/jira/browse/AXIS2-4136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654758#action_12654758 ] 

christiancorsano edited comment on AXIS2-4136 at 12/9/08 7:11 AM:
-------------------------------------------------------------------

Same problem here, my wsdl declares an int element in a complex type and I get this error when parsing the soap response enveloppe.

[EDIT] Actually the problem was that I didn't explicitly set a value for fields with minOccurs = 1 in my service.
I still think this is a bug, as it should be the responsibility of the service to return valid results, or to throw an exception on the server side otherwise.
With the current behavior, there's no way to detect that the problem is on the server-side.

      was (Author: christiancorsano):
    Same problem here, my wsdl declares an int element in a complex type and I get this error when parsing the soap response enveloppe.
The response looks just fine :

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <com:getDataResponse xmlns:com="com.conceptoire.a21.business.impl">
      <result>
        <java:person xmlns:java="java:com.conceptoire.a21.business.impl.parameters">
          <java:num>502</java:num>
          <java:ref>1516868162</java:ref>
          <java:type>E</java:type>
        </java:person>
        <java:returnCode xmlns:java="java:com.conceptoire.a21.business.impl.parameters">0</java:returnCode>
        <java:counter xmlns:java="java:com.conceptoire.a21.business.impl.parameters">
          <java:isAuto>true</java:isAuto>
          <java:coef>1.0</java:coef>
          <java:nbItems>2</java:nbItems>
        </java:counter>
        <java:datetime xmlns:java="java:com.conceptoire.a21.business.impl.parameters">2008-12-09T10:28:54.978+01:00</java:datetime>
      </result>
    </com:getDataResponse>
  </soapenv:Body>
</soapenv:Envelope>

The error is on the nbItems element : 
java.lang.Exception: org.apache.axis2.databinding.ADBException: Unexpected subelement nbItems

Here is the relevant part of my WSDL (sorry I can't post the whole thing here) :

<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="java:com.conceptoire.a21.business.impl.parameters" xmlns:stns="java:com.conceptoire.a21.business.impl.parameters" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<xsd:complexType name="counter"> 
    <xsd:sequence> 
     <xsd:element maxOccurs="1" minOccurs="1" name="isAuto" type="xsd:boolean"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="coef" type="xsd:double"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="lastIndexDate" nillable="true" type="xsd:dateTime"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="lastIndex1" nillable="true" type="xsd:string"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="lastIndex2" nillable="true" type="xsd:string"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="history1" type="xsd:double"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="history2" type="xsd:double"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="nbItems" type="xsd:int"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="newIndex1" nillable="true" type="xsd:string"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="newIndex2" nillable="true" type="xsd:string"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="pValue" type="xsd:double"> 
     </xsd:element> 
     <xsd:element maxOccurs="1" minOccurs="1" name="type" nillable="true" type="xsd:string"> 
     </xsd:element> 
    </xsd:sequence> 
   </xsd:complexType> 

My client stub is generated with adb templates, with classes unpacking activated.
  
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement
> --------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4136
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4136
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4.1
>         Environment: axis2 1.4.1
> tomcat 5.5.26
> jdk1.5.0_16
> eclipse 3.4.1
>            Reporter: Tomohiko HORI
>         Attachments: KBWebService.wsdl, KBWebServiceCallbackHandler.java, KBWebServiceStub.java
>
>
> I updated axis2 1.3 to axis2 1.4 and remake the stub by wsdl2Java in eclipse.
> But new stub doesn't handle the webService response. Message is below.
> org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement display_order
> 	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
> 	at jp.co.technomark.qa.outer.faq.service.KBWebServiceStub.fromOM(KBWebServiceStub.java:34464)
> 	at jp.co.technomark.qa.outer.faq.service.KBWebServiceStub.getSearchKBList(KBWebServiceStub.java:591)
> 	at jp.co.technomark.qa.outer.faq.service.KBWebServiceImpl.executeGetSearchFaqList(KBWebServiceImpl.java:56)
> 	at jp.co.technomark.qa.outer.faq.action.FaqInitAction.doExecuteBLogic(FaqInitAction.java:64)
> 	at jp.co.technomark.qa.outer.faq.action.TmfaqBaseBLogicAction.doExecuteBLogic(TmfaqBaseBLogicAction.java:1)
> 	at jp.terasoluna.fw.web.struts.actions.AbstractBLogicAction.doExecute(AbstractBLogicAction.java:263)
> 	at jp.terasoluna.fw.web.struts.actions.ActionEx.execute(ActionEx.java:220)
> 	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
> 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
> 	at jp.terasoluna.fw.web.struts.action.RequestProcessorEx.process(RequestProcessorEx.java:149)
> 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
> 	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at jp.co.technomark.qa.common.TmfaqAccessFilter.doFilter(TmfaqAccessFilter.java:81)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at jp.co.technomark.qa.common.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:73)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
> 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> 	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
> 	at java.lang.Thread.run(Thread.java:595)
> Would you please tell me how I can solve this problem.
> Thanks.
> horit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org