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 "Yuval (JIRA)" <ji...@apache.org> on 2007/11/09 12:51:50 UTC

[jira] Created: (AXIS2-3331) wrong codegen for anytype

wrong codegen for anytype
-------------------------

                 Key: AXIS2-3331
                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.3, nightly
            Reporter: Yuval


I'm trying to use Axis2 to access vmware webservices.

Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.

Object is wrong because the code will not even compile (it has no .serialize() method).
OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.

IMHO it should be generated as OMNode.

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

 <complexType name="DynamicProperty">
    <sequence>
       <element name="name" type="xsd:string" />
       <element name="val" type="xsd:anyType" />
    </sequence>
 </complexType>

For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl


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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545444 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3331:
-----------------------------------------------------

It seems that you fix is correct. Can you please attach your schema (or a part of schema to reproduce the issue). And a test case?
So that I can veryfy that.

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Closed: (AXIS2-3331) wrong codegen for anytype

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

Yuval closed AXIS2-3331.
------------------------

    Resolution: Fixed

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542984 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3331:
-----------------------------------------------------

please try with a nighly build 
I fixed this.

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Assigned: (AXIS2-3331) wrong codegen for anytype

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

Amila Chinthaka Suriarachchi reassigned AXIS2-3331:
---------------------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12541721 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3331:
-----------------------------------------------------

did you try to codegen with a SNAPSHOT? 
Object is the correct way to handle this since object is the supper type for any java type. 
I think you have just replace the OMElement with object in Axis2 1.3 generated code. that is wrong you have to generate the code with a SNAPSHOT.
Recently I did an interop test with the http://131.107.72.15/SoapWsdl_BaseDataTypes_XmlFormatter_Service_Indigo/BaseDataTypesDocLitB.svc?wsdl
and it worked fine.
if this is not the case please paste you non compiling code fragment.

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Yuval (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542145 ] 

Yuval commented on AXIS2-3331:
------------------------------

The relevant response text is:

<soapenv:Body>
<RetrievePropertiesResponse xmlns="urn:vim2">
  <returnval>
    <obj type="Task">task-144</obj>
    <propSet>
      <name>info</name>
      <val xsi:type="TaskInfo">
        <key>task-144</key>
...
      </val>
    </propSet>
  </returnval>
</RetrievePropertiesResponse>
</soapenv:Body>

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Yuval (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544945 ] 

Yuval commented on AXIS2-3331:
------------------------------

Thank you

I have confirmed that anytype is handled correctly on the tested use case with SNAPSHOT of Nov 22.

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Reopened: (AXIS2-3331) wrong codegen for anytype

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

Yuval reopened AXIS2-3331:
--------------------------


The joy was premature.

On the following return:

<RetrievePropertiesResponse xmlns="urn:vim2">
  <returnval>
    <obj type="Task">task-173</obj>
    <propSet>
      <name>info.progress</name>
      <val xsi:type="xsd:int">20</val>
    </propSet>
    <propSet>
      <name>info.state</name>
      <val xsi:type="TaskInfoState">running</val>
    </propSet>
  </returnval>
</RetrievePropertiesResponse>

propSet is an array of type DynamicProperty, which is defined as:
         <complexType name="DynamicProperty">
            <sequence>
               <element name="name" type="xsd:string" />
               <element name="val" type="xsd:anyType" />
            </sequence>
         </complexType>

The generated code for reading "val" in DynamicProperty contains:
                    object.setVal(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader,
    com.vmware.vim2.ExtensionMapper.class));
reader.next();

The problem is caused by the convention that parsing an object leaves the XmlStreamReader iterator on the closing tag. getAnyTypeObject when "val" is "xsd:int" leaves the reader on CHARACTERS and not on the "</val>" closing tag. This is in conflict with what would happen for a complex type.

The next code that is executed is:
   while (!reader.isStartElement() && !reader.isEndElement())
      reader.next();
Which excpects to reach the closing tag "</propSet>", but it actually arrives "</val>". It would return from parsing "propSet" while on "</val>" and next code will fail.

I have fixed it on my code by adding:
                    while (!xmlStreamReader.isStartElement() && !xmlStreamReader.isEndElement())
                        xmlStreamReader.next();
In ConverterUtils.getAnyTypeObject() the end of the true block of the (attributeNameSpace.equals(Constants.XSD_NAMESPACE)) check. I don't know if it is correct.




> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Resolved: (AXIS2-3331) wrong codegen for anytype

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

Amila Chinthaka Suriarachchi resolved AXIS2-3331.
-------------------------------------------------

    Resolution: Fixed

fixed already

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Yuval (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542141 ] 

Yuval commented on AXIS2-3331:
------------------------------

Maybe I had cached files from Axis2-1.3 when I used SNAPSHOT?!? It doesn't make sense.

Anyway, the code from today's SNAPSHOT (Nov 13) generates the following line:
   object.setVal(org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(reader));
However, ConverterUtil.getAnyTypeObject() only knows about primitive types. It does not call the generated ExtensionMapper.

I get:
Caused by: org.apache.axis2.databinding.ADBException: Unknown type ==> TaskInfo
	at org.apache.axis2.databinding.utils.ConverterUtil.getAnyTypeObject(ConverterUtil.java:1390)
	at com.vmware.vim2.DynamicProperty$Factory.parse(DynamicProperty.java:513)
	... 6 more

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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


[jira] Commented: (AXIS2-3331) wrong codegen for anytype

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545774 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3331:
-----------------------------------------------------

I fixed the issue. please have a look at

> wrong codegen for anytype
> -------------------------
>
>                 Key: AXIS2-3331
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3331
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, nightly
>            Reporter: Yuval
>            Assignee: Amila Chinthaka Suriarachchi
>
> I'm trying to use Axis2 to access vmware webservices.
> Several problems arised with "anyType" code generation. Axis2 1.3 generated it as OMElement, while the nightly snapshot of Nov 06, 2007 generated it as java.lang.Object.
> Object is wrong because the code will not even compile (it has no .serialize() method).
> OMElement is wrong because it ignores text nodes (string type), thus the "builder2.getOMElement().getFirstElement()" generated call returns null.
> IMHO it should be generated as OMNode.
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>  <complexType name="DynamicProperty">
>     <sequence>
>        <element name="name" type="xsd:string" />
>        <element name="val" type="xsd:anyType" />
>     </sequence>
>  </complexType>
> For reference, the full wsdl can be downloaded after free registration from http://www.vmware.com/download/sdk/index.html (VMware Infrastructure SDK Packages version 2.0.1). I'm using ant, but it should be identical to the following call:
> java org.apache.axis2.wsdl.WSDL2Java -g -ss -ns2p urn:vim2=com.vmware.vim2,urn:vim2Service=com.vmware.vim2service -u -uri vimService.wsdl

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