WSDL2JAVA: Cannot unwrap element... no abstract mapping definitionfound for type.

Discussion in 'Java' started by vunet, Mar 3, 2009.

  1. vunet

    vunet Guest

    Hello,
    I am new to WSDL2JAVA. My error occurs when running WSDL2JAVA command
    to generate Java out of specified .wsdl file. The file is valid
    (validated correctly by a number of sources)
    but when I run the utility I get an error:


    "Cannot unwrap element... no abstract mapping definition found for
    type"

    (see complete error details below)

    My research showed that WSDL2JAVA may not support "nested types". I am
    not sure if they are in my .wsdl file though. Also, some sources said
    that a different command parameters may help but I cannot get which
    ones. Please suggest something and check the .wsdl file after the
    error.
    Basically, it works for me if I remove the line
    <s:element minOccurs="0" maxOccurs="1" name="ObjectList"
    type="tns:ArrayOfObjectImport"/>



    Error in command prompt:===================

    C:\eclipse\workspace\core_apps>%AXIS2_HOME%\bin\wsdl2java -uri C:\wsdl-
    csexchang
    e2.wsdl -p com.wsclient.mySystems -d jibx -s -ss -sd -ssi -uw -o
    src\com\wsclient\mySystems
    Using AXIS2_HOME: C:\axis2-1.4
    Using JAVA_HOME: C:/Java/jdk1.5.0_14
    Retrieving document at 'C:\wsdl-csexchange2.wsdl'.
    Exception in thread "main"
    org.apache.axis2.wsdl.codegen.CodeGenerationException
    : java.lang.RuntimeException: Cannot unwrap element {http://
    www.url.com/}ImportObjects:
    no abstract mapping definition found for type {http://www.url.com/}
    ArrayOfArtObjectImport (used by element {http://www.url.com/}
    ObjectList)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate
    (CodeGener
    ationEngine.java:271)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
    Caused by: java.lang.RuntimeException: Cannot unwrap element {http://
    www.url.com/}
    ImportObjects: no abstract mapping definition found for type {htt
    p://www.url.com/}ArrayOfArtObjectImport (used by element {http://ww
    w.url.com/}ObjectList)
    at org.apache.axis2.jibx.CodeGenerationUtility.unwrapMessage
    (CodeGenerat
    ionUtility.java:839)
    at org.apache.axis2.jibx.CodeGenerationUtility.engage
    (CodeGenerationUtil
    ity.java:387)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
    (NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage
    (JiBXExte
    nsion.java:77)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate
    (CodeGener
    ationEngine.java:224)
    ... 2 more


    WSDL file:=================================

    ....
    <s:element name="ImportObjects">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="UserID"
    type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="Key" type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="ClientID"
    type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="ObjectList"
    type="tns:ArrayOfObjectImport"/>
    <!-- IF I REMOVE LINE ABOVE IT WORKS BUT ALL OBJECTS ARE IGNORED /
    -->
    </s:sequence>
    </s:complexType>
    </s:element>

    <s:complexType name="ArrayOfObjectImport">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded" name="ObjectImport"
    nillable="true" type="tns:ObjectImport"/>
    </s:sequence>
    </s:complexType>

    <s:complexType name="ObjectImport">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="InventoryNumber"
    type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="ComponentNumber"
    type="s:string"/>
    <s:element minOccurs="0" maxOccurs="1" name="UserId" type="s:string"/
    >

    ....
    vunet, Mar 3, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary

    Cipher.unwrap

    Gary, Aug 8, 2003, in forum: Java
    Replies:
    0
    Views:
    1,179
  2. Robert Mark Bram
    Replies:
    0
    Views:
    682
    Robert Mark Bram
    Feb 4, 2007
  3. Markus
    Replies:
    0
    Views:
    420
    Markus
    Nov 12, 2007
  4. Greg Ewing

    Python COM: Automatic wrap/unwrap?

    Greg Ewing, Nov 8, 2008, in forum: Python
    Replies:
    4
    Views:
    300
    Paul Rudin
    Nov 10, 2008
  5. sdeveloper11
    Replies:
    0
    Views:
    488
    sdeveloper11
    Mar 29, 2011
Loading...

Share This Page