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

V

vunet

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top