Hi: I'm having a problem with wsdl2java code generation. I'm trying JiBX databinding in wrapped mode. I've got my objects defined, my wsdl definition of the service and I made my binding definition manually (I attached all the files). I also made an ant task, following the steps of the jibx tutorial.
This is the problem:
When I use the ant task for compiling the binding definition with the
build.xml, everything seems to go alright. After that, I would have to type
some code for running the service and that's why I decided to use wsdl2java.
When I use wsdl2java for code generation I get this error:
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.RuntimeException: No mapping defined for element {http://login/types
}WebLoginElement
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.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://lo
gin/types}WebLoginElement
at org.apache.axis2.jibx.CodeGenerationUtility.mapQName(CodeGenerationUt
ility.java:928)
at org.apache.axis2.jibx.CodeGenerationUtility.mapMessage(CodeGeneration
Utility.java:914)
at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:384)
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:74)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
ationEngine.java:177)
... 2 more
... 2 more
I use the command like this:
wsdl2java -uri LoginServiceJiBX.wsdl -o build -ss -sd -g -d jibx -ssi
-Ebindingfile binding.xml -ns2p
http://login=login,http://login/types=login.types
I tried it in many ways, defining all the mappings between namespaces and
packages and without them... I think the problem is with that mapping but I
don't know if I'm doing something wrong or it's tool's problem.
I made it also in unwrapped mode and there was no problem with that.
And also another question: is there any way for passing the -Ebindingfile in
the ant task of wsdl2java? because I didn't find it.
I would appreciate any help on this.
Thanks and regards:
Jorge
---------------------------------
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
LoginServiceJiBX.wsdl
Description: 1026571261-LoginServiceJiBX.wsdl
<binding>
<mapping name="WebLoginElement" class="login.types.WebLoginElement">
<value name="localUser_nameElement" field="localUser_nameElement" get-method="getUser_nameElement" set-method="setUser_nameElement"/>
<value name="localUser_passwordElement" field="localUser_passwordElement" get-method="getUser_passwordElement" set-method="setUser_passwordElement"/>
</mapping>
<mapping name="ReturnWebLoginElement" class="login.types.ReturnWebLoginElement">
<value name="localWeb_user_nameElement" field="localWeb_user_nameElement" get-method="getWeb_user_nameElement" set-method="setWeb_user_nameElement"/>
<value name="localSoap_session_idElement" field="localSoap_session_idElement" get-method="getSoap_session_idElement" set-method="setSoap_session_idElement"/>
</mapping>
</binding>
ReturnWebLoginElement.java
Description: 117642524-ReturnWebLoginElement.java
WebLoginElement.java
Description: 4079661065-WebLoginElement.java
<project basedir="." default="generate.all">
<property environment="env"/>
<property name="AXIS2_HOME" value="${env.AXIS2_HOME}"/>
<property name="JIBX_LIB" value="${env.JIBX_LIB}"/>
<property name="ECLIPSE_WORKSPACE" value="${env.ECLIPSE_WORKSPACE}"/>
<property name="build.dir" value="build"/>
<!-- Run JiBX binding compiler -->
<target name="binding">
<!-- JiBX binding compiler task definition -->
<taskdef name="bind" classname="org.jibx.binding.ant.CompileTask" classpath="${JIBX_LIB}/jibx-bind.jar"/>
<bind verbose="true" load="true" binding="binding.xml">
<classpathset dir="${build.dir}"/>
</bind>
</target>
</project>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
