You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Serkan Sunel <Se...@telenity.com> on 2007/04/19 16:04:04 UTC

RE: [jibx-users] wsdl2java & jibx codeGeneration Exception

Hi Dennis,
You are right .I am attaching the other wsdl too now..
As you can see there is a xsd schema in the xxx_interface.wsdl also.
I tried to export xsd:xshema part from the wsdl and run xsd2java again
on it also..I am attaching it also named : bindings.xml

After that I combined all generated binding.xml into one file and run
the wsdl2java against to main wsdl
Now I am getting another exception..

java org.apache.axis2.wsdl.WSDL2Java -uri
/home/serkans/products/platform/current/canvas/platform/parlayx/wsdl/par
layx_payment_reserve_amount_charging_service_2_1.wsdl -ns2p
http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_1
/local=com.telenity.canvas.platform.parlayx.ws.schema.payment.reserve_am
ount_charging.v2_1.local  -sd -s  -ss -t -ssi -g -u -d jibx
-Ebindingfile /home/serkans/downloads/xsd2jibx/lib/bindings.xml -uw -o
../output/
Retrieving document at
'parlayx_payment_reserve_amount_charging_interface_2_1.wsdl', relative
to
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/'.
Retrieving document at 'parlayx_common_faults_2_0.wsdl', relative to
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_payment_reserve_amount_charging_interface_2_1.wsdl'.
Retrieving schema at 'parlayx_common_types_2_1.xsd', relative to
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_common_faults_2_0.wsdl'.
Retrieving schema at 'parlayx_payment_types_2_1.xsd', relative to
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_payment_reserve_amount_charging_interface_2_1.wsdl'.
Retrieving schema at 'parlayx_common_types_2_1.xsd', relative to
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_payment_reserve_amount_charging_interface_2_1.wsdl'.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: Cannot unwrap element
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}chargeReservation: no abstract mapping definition found for type
{http://www.csapi.org/schema/parlayx/common/v2_1}ChargingInformation
(used by element
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}charge)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:224)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException: Cannot unwrap element
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}chargeReservation: no abstract mapping definition found for type
{http://www.csapi.org/schema/parlayx/common/v2_1}ChargingInformation
(used by element
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}charge)
        at
org.apache.axis2.jibx.CodeGenerationUtility.unwrapMessage(CodeGeneration
Utility.java:751)
        at
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility
.java:365)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtensi
on.java:74)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:177)
        ... 2 more


-----Original Message-----
From: jibx-users-bounces@lists.sourceforge.net
[mailto:jibx-users-bounces@lists.sourceforge.net] On Behalf Of Dennis
Sosnoski
Sent: Thursday, April 19, 2007 12:23 AM
To: axis-user@ws.apache.org
Cc: jibx-users@lists.sourceforge.net
Subject: Re: [jibx-users] wsdl2java & jibx codeGeneration Exception

Hi Serkan,

You only attached the main WSDL, not the included one, so I can't see 
exactly what is going on. But the error message seems very direct and 
specific: "No mapping defined for element 
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}chargeReservation" 
According to this, your WSDL is referencing a chargeReservation element 
which is not included in your binding. It looks like you're not using 
unwrapping, so I'd expect that this element is referenced directly by 
one of the <message> components of the WSDL. You need to define bindings

for all the elements so referenced.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Serkan Sunel wrote:
>
> Hi All,
>
>  
>
> Wsdl2Java throws below exception..
>
>  
>
> Ant idea about it ?
>
>  
>
> Ps: I could generate code with wrapped style web service code with ADB

> databing also and had  no problem
>
> ....necessary files are attached..
>
>  
>
> Thanks
>
>  
>
>  
>
> [serkans@serkanslnx bin] java org.apache.axis2.wsdl.WSDL2Java -uri 
> ../wsdl/parlayx_payment_reserve_amount_charging_service_2_1.wsdl -ns2p

>
http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_1
/local=com.telenity.canvas.platform.parlayx.ws.schema.payment.reserve_am
ount_charging.v2_1.local  
> -sd -s  -ss -t -ssi -g -u -d jibx -Ebindingfile out.xml -o ../java
>
> Retrieving document at 
> 'parlayx_payment_reserve_amount_charging_interface_2_1.wsdl', relative

> to 
>
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/bi
n/../wsdl/'.
>
> Retrieving document at 'parlayx_common_faults_2_0.wsdl', relative to 
>
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_payment_reserve_amount_charging_interface_2_1.wsdl'.
>
> Retrieving schema at 'parlayx_common_types_2_1.xsd', relative to 
>
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_common_faults_2_0.wsdl'.
>
> Retrieving schema at 'parlayx_payment_types_2_1.xsd', relative to 
>
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_payment_reserve_amount_charging_interface_2_1.wsdl'.
>
> Retrieving schema at 'parlayx_common_types_2_1.xsd', relative to 
>
'file:/home/serkans/products/platform/current/canvas/platform/parlayx/ws
dl/parlayx_payment_reserve_amount_charging_interface_2_1.wsdl'.
>
> Exception in thread "main" 
> org.apache.axis2.wsdl.codegen.CodeGenerationException: 
> java.lang.RuntimeException: No mapping defined for element 
>
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}chargeReservation
>
>         at 
>
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:224)
>
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
>
> Caused by: java.lang.RuntimeException: No mapping defined for element 
>
{http://www.csapi.org/schema/parlayx/payment/reserve_amount_charging/v2_
1/local}chargeReservation
>
>         at 
>
org.apache.axis2.jibx.CodeGenerationUtility.mapQName(CodeGenerationUtili
ty.java:928)
>
>         at 
>
org.apache.axis2.jibx.CodeGenerationUtility.mapMessage(CodeGenerationUti
lity.java:914)
>
>         at 
>
org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility
.java:384)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>         at 
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
>
>         at 
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
>
>         at java.lang.reflect.Method.invoke(Method.java:585)
>
>         at 
>
org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtensi
on.java:74)
>
>         at 
>
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerati
onEngine.java:177)
>
>         ... 2 more
>
>
------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <binding>
>   <mapping name="Property"
class="com.telenity.canvas.platform.parlayx.ws.schema.payment.v2_1.Prope
rty">
>     <namespace uri="http://www.csapi.org/schema/parlayx/payment/v2_1"
default="elements"/>
>     <value name="name" field="name" usage="required"/>
>     <value name="value" field="value" usage="required"/>
>   </mapping>
>   <mapping name="TimeMetric"
class="com.telenity.util.parlayx.common.TimeMetric">
>     <namespace uri="http://www.csapi.org/schema/parlayx/common/v2_1"
default="elements"/>
>     <value name="metric" field="metric" usage="required"/>
>     <value name="units" field="units" usage="required"/>
>   </mapping>
>   <mapping name="ChargingInformation"
class="com.telenity.util.parlayx.common.ChargingInformation">
>     <namespace uri="http://www.csapi.org/schema/parlayx/common/v2_1"
default="elements"/>
>     <value name="description" field="description" usage="required"/>
>     <value name="currency" field="currency" usage="optional"/>
>     <value name="amount" field="amount" usage="optional"/>
>     <value name="code" field="code" usage="optional"/>
>   </mapping>
>   <mapping name="SimpleReference"
class="com.telenity.util.parlayx.common.SimpleReference">
>     <namespace uri="http://www.csapi.org/schema/parlayx/common/v2_1"
default="elements"/>
>     <value name="endpoint" field="endpoint" usage="required"/>
>     <value name="interfaceName" field="interfaceName"
usage="required"/>
>     <value name="correlator" field="correlator" usage="required"/>
>   </mapping>
>   <mapping name="ServiceError"
class="com.telenity.util.parlayx.common.ServiceError">
>     <namespace uri="http://www.csapi.org/schema/parlayx/common/v2_1"
default="elements"/>
>     <value name="messageId" field="messageId" usage="required"/>
>     <value name="text" field="text" usage="required"/>
>     <collection field="variablesList">
>       <value name="variables" type="java.lang.String"/>
>     </collection>
>   </mapping>
>   <mapping name="ServiceException"
class="com.telenity.util.parlayx.common.ServiceException">
>     <namespace uri="http://www.csapi.org/schema/parlayx/common/v2_1"
default="elements"/>
>     <value name="messageId" field="messageId" usage="required"/>
>     <value name="text" field="text" usage="required"/>
>     <collection field="variablesList">
>       <value name="variables" type="java.lang.String"/>
>     </collection>
>   </mapping>
>   <mapping name="PolicyException"
class="com.telenity.util.parlayx.common.PolicyException">
>     <namespace uri="http://www.csapi.org/schema/parlayx/common/v2_1"
default="elements"/>
>     <value name="messageId" field="messageId" usage="required"/>
>     <value name="text" field="text" usage="required"/>
>     <collection field="variablesList">
>       <value name="variables" type="java.lang.String"/>
>     </collection>
>   </mapping>
> </binding>
>   
>
------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org

------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users