axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Seniunas (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AXIS2-4439) ADBException: Any type element type has not been given
Date Thu, 23 Jul 2009 12:09:14 GMT

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

Anthony Seniunas edited comment on AXIS2-4439 at 7/23/09 5:09 AM:
------------------------------------------------------------------

Actually I was too hasty I still have a problem. I implemented the .wsdl changes two ways.
I'll provide the first test case shortly however the second test case is as follows...

The SOAP request is:-

POST http://www.test.idoxplc.com:80/dmsinterface/services/dms/interface/kirona/envhealth HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/Login"
User-Agent: Axis2
Host: www.test.idoxplc.com
Proxy-Connection: Keep-Alive
Content-Length: 331

<?xml version = '1.0' encoding = 'UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:Login xmlns:ns1="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
         <ns1:Authorisation>Y29yb25hdXNlcjpjMHIwbjR1czNy</ns1:Authorisation>
      </ns1:Login>
   </soapenv:Body>
</soapenv:Envelope>

The SOAP response is:-

HTTP/1.1 200 OK
Date: Thu, 23 Jul 2009 11:24:55 GMT
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
Content-Type: text/xml;charset=utf-8
Set-Cookie: JSESSIONID=ED2B1C16C7C63A35E49A44C004B2BFF6; Path=/dmsinterface
X-Transfer-Encoding: chunked

<?xml version = '1.0' encoding = 'UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <call:LoginResponse xmlns:call="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
         <call:DocumentData>
            <Result>SUCCESS</Result>
            <SessionId>ED2B1C16C7C63A35E49A44C004B2BFF6</SessionId>
            <OriginalMessage>
               <ns1:Login xmlns:ns1="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
                  <ns1:Authorisation>Y29yb25hdXNlcjpjMHIwbjR1czNy</ns1:Authorisation>
               </ns1:Login>
            </OriginalMessage>
         </call:DocumentData>
      </call:LoginResponse>
   </soapenv:Body>
</soapenv:Envelope>

This generates the exception...

com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.

I changed the .wsdl as follows...


<xsd:complexType name="DocumentData">
                <xsd:sequence>
                    <xsd:element name="Doc" type="schema:DocType" form="unqualified" minOccurs="0"
                        maxOccurs="unbounded"/>
                    <xsd:element name="Result" type="xsd:string" form="unqualified" minOccurs="0"/>
                    <xsd:element name="SessionId" type="xsd:string" form="unqualified"
minOccurs="0"/>
					<xsd:element name="OriginalMessage" form="unqualified" minOccurs="0">
					  <xsd:complextype>
						<xsd:sequence>
						  <xsd:any processcontents="skip"/>
						</xsd:sequence>
					  </xsd:complextype>
					</xsd:element>
                </xsd:sequence>
            </xsd:complexType>

I tried a test case that had a originalmessage type , this generates an invalid string exception.
I'll provide details of this shortly. 

My theory and I accept I could be completely wrong is the parse methods are not dealing with
these sorts of elements in the originalmessage element

               <ns1:Login xmlns:ns1="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
                  <ns1:Authorisation>Y29yb25hdXNlcjpjMHIwbjR1czNy</ns1:Authorisation>

It thinks either one of these is a string but they have namespaces.





      was (Author: aseniunas):
    Actually I was too hasty I still have a problem. I implemented the .wsdl changes two ways.
I'll provide the first test case shortly however the second test case is as follows...

The SOAP request is:-

POST http://www.test.idoxplc.com:80/dmsinterface/services/dms/interface/kirona/envhealth HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/Login"
User-Agent: Axis2
Host: www.test.idoxplc.com
Proxy-Connection: Keep-Alive
Content-Length: 331

<?xml version = '1.0' encoding = 'UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns1:Login xmlns:ns1="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
         <ns1:Authorisation>Y29yb25hdXNlcjpjMHIwbjR1czNy</ns1:Authorisation>
      </ns1:Login>
   </soapenv:Body>
</soapenv:Envelope>

The SOAP response is:-

HTTP/1.1 200 OK
Date: Thu, 23 Jul 2009 11:24:55 GMT
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; Tomcat-5.0.28/JBoss-4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
Content-Type: text/xml;charset=utf-8
Set-Cookie: JSESSIONID=ED2B1C16C7C63A35E49A44C004B2BFF6; Path=/dmsinterface
X-Transfer-Encoding: chunked

<?xml version = '1.0' encoding = 'UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <call:LoginResponse xmlns:call="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
         <call:DocumentData>
            <Result>SUCCESS</Result>
            <SessionId>ED2B1C16C7C63A35E49A44C004B2BFF6</SessionId>
            <OriginalMessage>
               <ns1:Login xmlns:ns1="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
                  <ns1:Authorisation>Y29yb25hdXNlcjpjMHIwbjR1czNy</ns1:Authorisation>
               </ns1:Login>
            </OriginalMessage>
         </call:DocumentData>
      </call:LoginResponse>
   </soapenv:Body>
</soapenv:Envelope>

This generates the exception...

com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.

I changed the .wsdl as follows...


<xsd:complexType name="DocumentData">
                <xsd:sequence>
                    <xsd:element name="Doc" type="schema:DocType" form="unqualified" minOccurs="0"
                        maxOccurs="unbounded"/>
                    <xsd:element name="Result" type="xsd:string" form="unqualified" minOccurs="0"/>
                    <xsd:element name="SessionId" type="xsd:string" form="unqualified"
minOccurs="0"/>
					<xsd:element name="OriginalMessage" form="unqualified" minOccurs="0">
					  <xsd:complextype>
						<xsd:sequence>
						  <xsd:any processcontents="skip"/>
						</xsd:sequence>
					  </xsd:complextype>
					</xsd:element>
                </xsd:sequence>
            </xsd:complexType>

I tried a test case that had a originalmessage type , this generates an invalid string exception.
I'll provide details of this shortly. 




  
> ADBException: Any type element type has not been given
> ------------------------------------------------------
>
>                 Key: AXIS2-4439
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4439
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5
>         Environment: Windows XP Desktop computer
>            Reporter: Anthony Seniunas
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>   Original Estimate: 0.33h
>  Remaining Estimate: 0.33h
>
> I've developed a web client  using wsdl2java and I'm getting the following exception
when obtaining a response from a web service.
> org.apache.axis2.databinding.ADBException: Any type element type has not been given 
> The .wsdl fragment relating to this is:-
>             <xsd:complexType name="DocumentData">
>                 <xsd:sequence>
>                     <xsd:element name="Doc" type="schema:DocType" form="unqualified"
minOccurs="0"
>                         maxOccurs="unbounded"/>
>                     <xsd:element name="Result" type="xsd:string" form="unqualified"
minOccurs="0"/>
>                     <xsd:element name="SessionId" type="xsd:string" form="unqualified"
minOccurs="0"/>
>                     <xsd:element name="OriginalMessage" type="xsd:anyType" form="unqualified"
minOccurs="0"/>
>                 </xsd:sequence>
>             </xsd:complexType>
> Note the originalMessage element type - anyType.
> The following is a typical response SOAP message causing the exception:-
> <?xml version = '1.0' encoding = 'UTF-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <soapenv:Body>
>       <call:LoginResponse xmlns:call="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
>          <call:DocumentData>
>             <Result>SUCCESS</Result>
>             <SessionId>D83D8A42672F08AA6EC9377CB32F6317</SessionId>
>             <OriginalMessage>
>                <ns1:Login xmlns:ns1="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
>                   <ns1:Authorisation>Y29yb25hdXNlcjpjMHIwbjR1czNy</ns1:Authorisation>
>                </ns1:Login>
>             </OriginalMessage>
>          </call:DocumentData>
>       </call:LoginResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
> Its unusual but the web service returns the original message hence the usage of anyType.
> I've come across many articles on problems with anyType and its possible this problem
has already been fixed so please can you advise?.

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


Mime
View raw message