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 "Anthony Seniunas (JIRA)" <ji...@apache.org> on 2009/07/22 16:23:15 UTC

[jira] Created: (AXIS2-4439) ADBException: Any type element type has not been given

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
            Priority: Blocker


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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Anthony Seniunas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734953#action_12734953 ] 

Anthony Seniunas commented on AXIS2-4439:
-----------------------------------------

Hi Andreas, sorry I was part way through analysing the problem.  Last night I stepped through the code and was surprised to find the exception was'nt occurring with the first request/response pair above but the second request/response pair.

The following is the stack trace:-

GetDocumentList failedgetDocumentList: GetDocumentList Web service call failed:In valid string sufix
com.kirona.uniform.webservices.exceptions.EnvhealthRuntimeException: getDocumentList: GetDocumentList Web service call failed:In valid string sufix
	at com.kirona.uniform.webservices.client.impl.EnvhealthInterfaceImpl.getDocumentList(EnvhealthInterfaceImpl.java:393)
	at com.kirona.uniform.webservices.client.impl.EnvhealthInterfaceImpl.main(EnvhealthInterfaceImpl.java:642)
Caused by: com.kirona.uniform.webservices.exceptions.EnvhealthRemotingException: GetDocumentList Web service call failed:In valid string sufix
	at com.kirona.uniform.webservices.client.impl.EnvhealthInterfaceImpl.GetDocumentList(EnvhealthInterfaceImpl.java:411)
	at com.kirona.uniform.webservices.client.impl.EnvhealthInterfaceImpl.getDocumentList(EnvhealthInterfaceImpl.java:383)
	... 1 more
Caused by: org.apache.axis2.AxisFault: In valid string sufix
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at com.kirona.uniform.webservices.client.EnvhealthStub.fromOM(EnvhealthStub.java:1719)
	at com.kirona.uniform.webservices.client.EnvhealthStub.getDocumentList(EnvhealthStub.java:749)
	at com.kirona.uniform.webservices.client.impl.EnvhealthInterfaceImpl.GetDocumentList(EnvhealthInterfaceImpl.java:406)
	... 2 more
Caused by: java.lang.RuntimeException: In valid string sufix
	at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:603)
	at com.kirona.uniform.model.DocIndexDetailsType$Factory.parse(DocIndexDetailsType.java:1016)
	at com.kirona.uniform.model.DocType$Factory.parse(DocType.java:642)
	at com.kirona.uniform.model.DocumentData$Factory.parse(DocumentData.java:732)
	at com.kirona.uniform.model.GetDocumentListResponse$Factory.parse(GetDocumentListResponse.java:419)
	at com.kirona.uniform.webservices.client.EnvhealthStub.fromOM(EnvhealthStub.java:1671)
	... 4 more
Process exited with exit code 0.

The request is:-

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

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

The following is the response:-

<?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:GetDocumentListResponse xmlns:call="http://www.testplc.com/ws/services/dms/interface/kirona/envhealth/">
         <call:DocumentData>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>11111111</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-06-10 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Letter</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=21960&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:21960:11111111</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>87686867</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-06-12 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Application</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=21981&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:21981:87686867</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>11111111</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-06-24 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Application</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22003&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22003:11111111</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>11111111</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-06-24 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Application</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22005&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22005:11111111</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>11111111</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-07-02 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Application</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22021&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22021:11111111</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>99999999</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-07-15 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Application</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22056&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22056:99999999</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>IVA REF</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-07-20 00:00:00.0</DateCreated>
                  <Description>KIRONA TEST DOCUMENT</Description>
                  <DocType>Letter</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22066&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22066:IVA REF</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>IVA REF</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>UFWEB USER</CreatedBy>
                  <DateCreated>2009-07-23 00:00:00.0</DateCreated>
                  <Description>KIRONA TEST IMAGE</Description>
                  <DocType>Letter</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22109&amp;ext=jpg&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22109:IVA REF</ExternalDocId>
                  <MimeType>image/jpeg</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <Doc>
               <Result>SUCCESS</Result>
               <DocIndexDetails>
                  <CaseRef>33333333</CaseRef>
                  <Category>Environmental Health</Category>
                  <CreatedBy>DOUG DANIEL</CreatedBy>
                  <DateCreated>2009-07-23 00:00:00.0</DateCreated>
                  <Description>TEST FORM</Description>
                  <DocType>Application</DocType>
                  <Section>Environmental Services</Section>
                  <Sensitivity>Public</Sensitivity>
               </DocIndexDetails>
               <DocSystemDetails>
                  <DocDisplayURL>RESERVED</DocDisplayURL>
                  <DocRetrieveURL>http://TESTDMS38N39CH:8080/IDOXSoftware/IG_remote_display?docid=22110&amp;ext=txt&amp;version=1</DocRetrieveURL>
                  <ExternalDocId>72:22110:33333333</ExternalDocId>
                  <MimeType>text/plain</MimeType>
                  <Pages>1</Pages>
                  <Version>1</Version>
               </DocSystemDetails>
            </Doc>
            <OriginalMessage>
               <ns1:GetDocumentList xmlns:ns1="http://www.idoxplc.com/ws/services/dms/interface/kirona/envhealth/">
                  <ns1:Address>1 Test Street</ns1:Address>
               </ns1:GetDocumentList>
            </OriginalMessage>
         </call:DocumentData>
      </call:GetDocumentListResponse>
   </soapenv:Body>
</soapenv:Envelope>

Looking at the stack trace , is the problem with DateCreated?

The .wsdl fragment for DocIndexDetails is:-

            <xsd:complexType name="DocIndexDetailsType">
                <xsd:sequence>
                    <xsd:element name="CaseRef" type="xsd:string" form="unqualified"/>
                    <xsd:element name="Category" type="xsd:string" form="unqualified"/>	
                    <xsd:element name="CreatedBy" type="xsd:string" form="unqualified"/>	
	<xsd:element name="DateCreated" type="xsd:date" form="unqualified"/>	
                    <xsd:element name="Description" type="xsd:string" form="unqualified"/>
                    <xsd:element name="DocType" type="xsd:string" form="unqualified"/>					
                    <xsd:element name="Section" type="xsd:string" form="unqualified"/>
                    <xsd:element name="Sensitivity" type="xsd:string" form="unqualified"/>
                </xsd:sequence>
            </xsd:complexType>


> 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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734766#action_12734766 ] 

Andreas Veithen commented on AXIS2-4439:
----------------------------------------

Anthony,

When reporting an exception, please always post the exact error message and the stack trace.

> 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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Anthony Seniunas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734502#action_12734502 ] 

Anthony Seniunas commented on AXIS2-4439:
-----------------------------------------

Hi , I've tried the .wsdl workaround and I no longer get the exception. Although I don't own or maintain the source .wsdl I can maintain a separate version for code generation purposes. Obviously it would be preferable not to have to do this. In my view this issue is likely to be an ongoing one so a permanent fix is recommended.

> 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.


[jira] Issue Comment Edited: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Anthony Seniunas (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Anthony Seniunas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734981#action_12734981 ] 

Anthony Seniunas commented on AXIS2-4439:
-----------------------------------------

I think I understand the problem the date in the response is neither a valid date or date time. The format looks closer to a date time but the 'T' is missing. I think the only solution is for me to ask the web service developers to provide a correctly formatted date or date/time.

> 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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Anthony Seniunas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734578#action_12734578 ] 

Anthony Seniunas commented on AXIS2-4439:
-----------------------------------------

I've spotted a problem with the above test case the lowercase complextype tag confused the issue. I corrected 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>

This now generated a dummy originalmessage type (originalMessage_type0) and produces the same exception (my test case one) as if I'd created a separate original message type. The exception is :-

In valid string sufix

I'll provide more details when I get time to debug further.



> 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.


[jira] Assigned: (AXIS2-4439) ADBException: Any type element type has not been given

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

Andreas Veithen reassigned AXIS2-4439:
--------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

Amila,

Since you did the current implementation of anyType in ADB, can you provide some feedback?

> 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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Anthony Seniunas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734572#action_12734572 ] 

Anthony Seniunas commented on AXIS2-4439:
-----------------------------------------

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.


[jira] Resolved: (AXIS2-4439) ADBException: Any type element type has not been given

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

Andreas Veithen resolved AXIS2-4439.
------------------------------------

    Resolution: Duplicate
      Assignee: Andreas Veithen  (was: Amila Chinthaka Suriarachchi)

To summarize:

- There is an issue with the way ADB handles anyType. I reopened AXIS2-3797 which is related to the same issue.
- Support for <any> worked as expected.
- The remaining problem was related to an incorrect data format in the message and there is no issue in Axis2.

Therefore, I'm closing this issue with resolution "Duplicate".

> 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: Andreas Veithen
>            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.


[jira] Commented: (AXIS2-4439) ADBException: Any type element type has not been given

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734285#action_12734285 ] 

Andreas Veithen commented on AXIS2-4439:
----------------------------------------

There are actually two answers to this issue:

1. The intention of the "OriginalMessage" element is to wrap the original message, i.e. a single element. This could be better expressed using the following schema construct:

<xsd:element name="OriginalMessage" form="unqualified" minOccurs="0">
  <xsd:complexType>
    <xsd:sequence>
      <xsd:any processContents="skip"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

Indeed, this would constraint the content to be a single element. So if you have control over the WSDL, one option is to change that. ADB will then generate code that represents the content of OriginalMessage as an OMElement.

2. Up to version 1.3, Axis2 also used OMElement in the case of xsd:anyType. Obviously this is not the right solution, at least when the document specifies the type explicitly using xsi:type. Therefore this behavior was changed in version 1.4, so that ADB maps to the appropriate Java type. The problem is that now ADB considers xsi:type as mandatory. There is a comment [1] in AXIS2-3797 that explains the rationale behind this. Apparently the assumption that has been made is that xsd:anyType necessarily refers to any type defined in the schema (or any standard schema type). I believe that this is wrong and contradicts the XML schema specs [1], specifically section 2.5.4:

"Example

<xsd:element name="anything" type="xsd:anyType"/>

The content of the element declared in this way is unconstrained, so the element value may be 423.46, but it may be any other sequence of characters as well, or indeed a mixture of characters and elements."

My interpretation is that anyType really means any content you want. Assuming that this is the correct interpretation, it means that neither Axis2 1.3 nor 1.4 handle anyType in the right/appropriate way and that we need to support mapping to a Java type as well as mapping to an OMElement (if no xsi:type argument is given).

[1] https://issues.apache.org/jira/browse/AXIS2-3797?focusedCommentId=12627287&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12627287
[2] http://www.w3.org/TR/xmlschema-0/

> 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
>            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.