Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > WSDL2JAVA: Cannot unwrap element... no abstract mapping definitionfound for type.

Reply
Thread Tools

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

 
 
vunet
Guest
Posts: n/a
 
      03-03-2009
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\ws dl2java -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.CodeGenerationExcept ion
: 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.jav a:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.jav a: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.unwrap Message
(CodeGenerat
ionUtility.java:839)
at org.apache.axis2.jibx.CodeGenerationUtility.engage
(CodeGenerationUtil
ity.java:387)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e 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.JiBXExtens ion.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"/
>

....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Axis2 JIBX Cannot unwrap element Error sdeveloper11 Java 0 03-29-2011 11:29 AM
Python COM: Automatic wrap/unwrap? Greg Ewing Python 4 11-10-2008 10:22 AM
Deriving abstract class from non-abstract class Matthias Kaeppler Java 1 05-22-2005 01:28 PM
Abstract Classes w/o abstract methods DaKoadMunky Java 4 04-20-2004 04:53 AM
Cipher.unwrap Gary Java 0 08-08-2003 03:24 AM



Advertisments