You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jorge Fernández (JIRA)" <ji...@apache.org> on 2007/02/02 17:50:05 UTC

[jira] Created: (AXIS2-2088) Problems with wsdl2java JiBX codegenerator

Problems with wsdl2java  JiBX codegenerator
-------------------------------------------

                 Key: AXIS2-2088
                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.1.1
         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
            Reporter: Jorge Fernández


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.


binding.xml

<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>


build.xml

<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>

LoginServiceJiBX.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="LoginServiceJiBX" targetNamespace="http://login" xmlns:tns="http://login"
    xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://login/types">

    <types>
	<schema targetNamespace="http://login/types" xmlns:tns="http://login/types"
	  xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	  xmlns="http://www.w3.org/2001/XMLSchema">
	  	<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
		<element name="ReturnWebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:soap_session_idElement"/>
					<element ref="tns:web_user_nameElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="WebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:user_nameElement"/>
					<element ref="tns:user_passwordElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="user_nameElement" type="string"/>
		<element name="user_passwordElement" type="string"/>
		<element name="soap_session_idElement" type="string"/>
		<element name="web_user_nameElement" type="string"/>
	</schema>
    </types>
    <message name="LoginEndpoint_webLogin">
    	<part name="parameters" element="ns2:WebLoginElement"/>
    </message>
    <message name="LoginEndpoint_webLoginResponse">
    	<part name="result" element="ns2:ReturnWebLoginElement"/>
    </message>
    <portType name="LoginEndpoint">
	    <operation name="webLogin">
	    	<input message="tns:LoginEndpoint_webLogin" name="LoginEndpoint_webLogin"/>
		<output message="tns:LoginEndpoint_webLoginResponse" name="LoginEndpoint_webLoginResponse"/>
	    </operation>
    </portType>
    <binding name="LoginEndpointBinding" type="tns:LoginEndpoint">
	    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
	    <operation name="webLogin">
		<soap:operation soapAction="webLogin"/>
		    <input name="LoginEndpoint_webLogin">
			<soap:body use="literal"/>
		    </input>
		    <output name="LoginEndpoint_webLoginResponse">
			<soap:body use="literal"/>
		    </output>
	    </operation>
    </binding>
    <service name="LoginServiceJiBX">
	<port name="LoginEndpointPort" binding="tns:LoginEndpointBinding">
		<soap:address location="http://localhost:8080/axis2/services/LoginServiceJiBX"/>
	</port>
    </service>
</definitions>



ReturnWebLoginElement.java


/**
 * ReturnWebLoginElement.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: #axisVersion# #today#
 */
package login.types;

/**
 *  ReturnWebLoginElement bean class
 */
public class ReturnWebLoginElement{
    	/**
    	 * field for Soap_session_idElement
    	 */
    	protected String localSoap_session_idElement ;
                        
    	/**
    	 * Auto generated getter method
    	 * @return String
    	 */
        public  String getSoap_session_idElement(){
        	return localSoap_session_idElement;
     	}

        /**
         * Auto generated setter method
         * @param param Soap_session_idElement
         */
        public void setSoap_session_idElement(String param){
        	this.localSoap_session_idElement=param;
        }
                            
        /**
         * field for Web_user_nameElement
         */
        protected String localWeb_user_nameElement ;
                        
        /**
         * Auto generated getter method
         * @return String
         */
        public  String getWeb_user_nameElement(){
        	return localWeb_user_nameElement;
        }

        /**
         * Auto generated setter method
         * @param param Web_user_nameElement
         */
        public void setWeb_user_nameElement(String param){
        	this.localWeb_user_nameElement=param;
        }               
}


WebLoginElement.java


package login.types;


/**
 *  WebLoginElement bean class
 */
public class WebLoginElement{
	/**
	 * field for User_nameElement
	 */
	protected String localUser_nameElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_nameElement(){
    	return localUser_nameElement;
 	}

    /**
     * Auto generated setter method
     * @param param User_nameElement
     */
	public void setUser_nameElement(String param){
		this.localUser_nameElement=param;
	}
                        
	/**
	 * field for User_passwordElement
	 */
	protected String localUser_passwordElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_passwordElement(){
     	return localUser_passwordElement;
	}
	/**
	 * Auto generated setter method
	 * @param param User_passwordElement
	 */
	public void setUser_passwordElement(String param){
		this.localUser_passwordElement=param;
	}
 }






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Description: 
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.

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:


I use the command like this:

wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml

I made it also in unwrapped mode and there was no problem with that.


  was:
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 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:


I use the command like this:

wsdl2java -uri LoginService.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml


I made it also in unwrapped mode and there was no problem with that.


binding.xml

<?xml version="1.0" encoding="UTF-8"?>
<binding forwards="false" value-style="attribute"  xmlns:ns2="http://login/types">
  <namespace uri="http://login/types" default="elements"/>
  <mapping class="login.types.ReturnWebLoginElement" type-name="return-web-login-element">
    <value style="element" name="local-soap_session_id-element" field="localSoap_session_idElement" usage="optional"/>
    <value style="element" name="local-web_user_name-element" field="localWeb_user_nameElement" usage="optional"/>
  </mapping>
  <mapping class="login.types.WebLoginElement" type-name="web-login-element">
    <value style="element" name="local-user_name-element" field="localUser_nameElement" usage="optional"/>
    <value style="element" name="local-user_password-element" field="localUser_passwordElement" usage="optional"/>
  </mapping>
</binding>


build.xml

<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>

LoginServiceJiBX.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="LoginServiceJiBX" targetNamespace="http://login" xmlns:tns="http://login"
    xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://login/types">

    <types>
	<schema targetNamespace="http://login/types" xmlns:tns="http://login/types"
	  xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	  xmlns="http://www.w3.org/2001/XMLSchema">
	  	<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
		<element name="ReturnWebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:soap_session_idElement"/>
					<element ref="tns:web_user_nameElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="WebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:user_nameElement"/>
					<element ref="tns:user_passwordElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="user_nameElement" type="string"/>
		<element name="user_passwordElement" type="string"/>
		<element name="soap_session_idElement" type="string"/>
		<element name="web_user_nameElement" type="string"/>
	</schema>
    </types>
    <message name="LoginEndpoint_webLogin">
    	<part name="parameters" element="ns2:WebLoginElement"/>
    </message>
    <message name="LoginEndpoint_webLoginResponse">
    	<part name="result" element="ns2:ReturnWebLoginElement"/>
    </message>
    <portType name="LoginEndpoint">
	    <operation name="webLogin">
	    	<input message="tns:LoginEndpoint_webLogin" name="LoginEndpoint_webLogin"/>
		<output message="tns:LoginEndpoint_webLoginResponse" name="LoginEndpoint_webLoginResponse"/>
	    </operation>
    </portType>
    <binding name="LoginEndpointBinding" type="tns:LoginEndpoint">
	    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
	    <operation name="webLogin">
		<soap:operation soapAction="webLogin"/>
		    <input name="LoginEndpoint_webLogin">
			<soap:body use="literal"/>
		    </input>
		    <output name="LoginEndpoint_webLoginResponse">
			<soap:body use="literal"/>
		    </output>
	    </operation>
    </binding>
    <service name="LoginServiceJiBX">
	<port name="LoginEndpointPort" binding="tns:LoginEndpointBinding">
		<soap:address location="http://localhost:8080/axis2/services/LoginServiceJiBX"/>
	</port>
    </service>
</definitions>



ReturnWebLoginElement.java


/**
 * ReturnWebLoginElement.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: #axisVersion# #today#
 */
package login.types;

/**
 *  ReturnWebLoginElement bean class
 */
public class ReturnWebLoginElement{
    	/**
    	 * field for Soap_session_idElement
    	 */
    	protected String localSoap_session_idElement ;
                        
    	/**
    	 * Auto generated getter method
    	 * @return String
    	 */
        public  String getSoap_session_idElement(){
        	return localSoap_session_idElement;
     	}

        /**
         * Auto generated setter method
         * @param param Soap_session_idElement
         */
        public void setSoap_session_idElement(String param){
        	this.localSoap_session_idElement=param;
        }
                            
        /**
         * field for Web_user_nameElement
         */
        protected String localWeb_user_nameElement ;
                        
        /**
         * Auto generated getter method
         * @return String
         */
        public  String getWeb_user_nameElement(){
        	return localWeb_user_nameElement;
        }

        /**
         * Auto generated setter method
         * @param param Web_user_nameElement
         */
        public void setWeb_user_nameElement(String param){
        	this.localWeb_user_nameElement=param;
        }               
}


WebLoginElement.java


package login.types;


/**
 *  WebLoginElement bean class
 */
public class WebLoginElement{
	/**
	 * field for User_nameElement
	 */
	protected String localUser_nameElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_nameElement(){
    	return localUser_nameElement;
 	}

    /**
     * Auto generated setter method
     * @param param User_nameElement
     */
	public void setUser_nameElement(String param){
		this.localUser_nameElement=param;
	}
                        
	/**
	 * field for User_passwordElement
	 */
	protected String localUser_passwordElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_passwordElement(){
     	return localUser_passwordElement;
	}
	/**
	 * Auto generated setter method
	 * @param param User_passwordElement
	 */
	public void setUser_passwordElement(String param){
		this.localUser_passwordElement=param;
	}
 }







Updated on 11th February

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Description: 
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.

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:


I use the command like this:

wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml

This is the trace:

Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.NullPointerException
        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.NullPointerException
        at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
r.java:455)
        at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
ingContext.java:3125)
        at org.jibx.runtime.QName.deserialize(QName.java:234)
        at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
ment.java:261)
        at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
MappingElement.java)
        at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
        at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
ingElement.java)
        at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
lingContext.java:2538)
        at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
:609)
        at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
:625)
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:240)
        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

I made it also in unwrapped mode and there was no problem with that.


  was:
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.

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:


I use the command like this:

wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml

This is the trace:

Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.NullPointerException
        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.NullPointerException
        at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
r.java:455)
        at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
ingContext.java:3125)
        at org.jibx.runtime.QName.deserialize(QName.java:234)
        at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
ment.java:261)
        at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
MappingElement.java)
        at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
        at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
ingElement.java)
        at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
lingContext.java:2538)
        at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
:609)
        at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
:625)
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:240)
        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

I made it also in unwrapped mode and there was no problem with that.



> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Description: 
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.

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:


I use the command like this:

wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml

This is the trace:

Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.NullPointerException
        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.NullPointerException
        at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
r.java:455)
        at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
ingContext.java:3125)
        at org.jibx.runtime.QName.deserialize(QName.java:234)
        at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
ment.java:261)
        at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
MappingElement.java)
        at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
        at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
ingElement.java)
        at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
lingContext.java:2538)
        at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
:609)
        at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
:625)
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:240)
        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

I made it also in unwrapped mode and there was no problem with that.


  was:
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.

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:


I use the command like this:

wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml

I made it also in unwrapped mode and there was no problem with that.



> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Dennis Sosnoski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490661 ] 

Dennis Sosnoski commented on AXIS2-2088:
----------------------------------------

Sorry, Jorge, my error in looking at your former binding.

There are two ways of working with JiBX in Axis2, wrapped and unwrapped. Wrapped is what you get by default, and in looking at your WSDL it looks like that's what you're trying to use. For wrapped handling you need to use concrete <mapping> definitions in your binding, meaning they do not have abstract='true' and they *do* have a name='...' that matches the element name used in the WSDL for a message part.

Unwrapped is the other alternative, which would normally be simpler. For that you use abstract mappings with a type-name rather than a name, and you specify the '-uw' option to WSDL2Java. However, your WSDL uses element references for all the string values being passed rather than defining them inline, and for this to be used with unwrapped you'd need to actually define a separate mapping for each of these elements. The default wrapped handling is actually simpler in this case.

So take off the abstract='true' attributes on your binding, and change the type-name='...' attributes to name='...' attributes. That should get you what you want.

For more details on the wrapped vs. unwrapped handling see http://ws.apache.org/axis2/1_1_1/jibx/jibx-codegen-integration.html and the linked pages (especially the Unwrapped Example and Document/Literal Example pages). For more on understanding JiBX bindings see the tutorial at http://jibx.sourceforge.net/tutorial/binding-tutorial.html and especially the page on mappings at http://jibx.sourceforge.net/tutorial/binding-mappings.html

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández resolved AXIS2-2088.
------------------------------------

    Resolution: Fixed

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490874 ] 

Jorge Fernández commented on AXIS2-2088:
----------------------------------------

OK.

Thanks again. I mark this issue as resolved.

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) Problems with wsdl2java JiBX code generator

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Summary: Problems with wsdl2java  JiBX code generator  (was: Problems with wsdl2java  JiBX codegenerator)

> Problems with wsdl2java  JiBX code generator
> --------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>
> 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.
> binding.xml
> <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>
> build.xml
> <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>
> LoginServiceJiBX.wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="LoginServiceJiBX" targetNamespace="http://login" xmlns:tns="http://login"
>     xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://login/types">
>     <types>
> 	<schema targetNamespace="http://login/types" xmlns:tns="http://login/types"
> 	  xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
> 	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	  xmlns="http://www.w3.org/2001/XMLSchema">
> 	  	<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> 		<element name="ReturnWebLoginElement">
> 			<complexType>
> 				<sequence>
> 					<element ref="tns:soap_session_idElement"/>
> 					<element ref="tns:web_user_nameElement"/>
> 				</sequence>
> 			</complexType>
> 		</element>
> 		<element name="WebLoginElement">
> 			<complexType>
> 				<sequence>
> 					<element ref="tns:user_nameElement"/>
> 					<element ref="tns:user_passwordElement"/>
> 				</sequence>
> 			</complexType>
> 		</element>
> 		<element name="user_nameElement" type="string"/>
> 		<element name="user_passwordElement" type="string"/>
> 		<element name="soap_session_idElement" type="string"/>
> 		<element name="web_user_nameElement" type="string"/>
> 	</schema>
>     </types>
>     <message name="LoginEndpoint_webLogin">
>     	<part name="parameters" element="ns2:WebLoginElement"/>
>     </message>
>     <message name="LoginEndpoint_webLoginResponse">
>     	<part name="result" element="ns2:ReturnWebLoginElement"/>
>     </message>
>     <portType name="LoginEndpoint">
> 	    <operation name="webLogin">
> 	    	<input message="tns:LoginEndpoint_webLogin" name="LoginEndpoint_webLogin"/>
> 		<output message="tns:LoginEndpoint_webLoginResponse" name="LoginEndpoint_webLoginResponse"/>
> 	    </operation>
>     </portType>
>     <binding name="LoginEndpointBinding" type="tns:LoginEndpoint">
> 	    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
> 	    <operation name="webLogin">
> 		<soap:operation soapAction="webLogin"/>
> 		    <input name="LoginEndpoint_webLogin">
> 			<soap:body use="literal"/>
> 		    </input>
> 		    <output name="LoginEndpoint_webLoginResponse">
> 			<soap:body use="literal"/>
> 		    </output>
> 	    </operation>
>     </binding>
>     <service name="LoginServiceJiBX">
> 	<port name="LoginEndpointPort" binding="tns:LoginEndpointBinding">
> 		<soap:address location="http://localhost:8080/axis2/services/LoginServiceJiBX"/>
> 	</port>
>     </service>
> </definitions>
> ReturnWebLoginElement.java
> /**
>  * ReturnWebLoginElement.java
>  *
>  * This file was auto-generated from WSDL
>  * by the Apache Axis2 version: #axisVersion# #today#
>  */
> package login.types;
> /**
>  *  ReturnWebLoginElement bean class
>  */
> public class ReturnWebLoginElement{
>     	/**
>     	 * field for Soap_session_idElement
>     	 */
>     	protected String localSoap_session_idElement ;
>                         
>     	/**
>     	 * Auto generated getter method
>     	 * @return String
>     	 */
>         public  String getSoap_session_idElement(){
>         	return localSoap_session_idElement;
>      	}
>         /**
>          * Auto generated setter method
>          * @param param Soap_session_idElement
>          */
>         public void setSoap_session_idElement(String param){
>         	this.localSoap_session_idElement=param;
>         }
>                             
>         /**
>          * field for Web_user_nameElement
>          */
>         protected String localWeb_user_nameElement ;
>                         
>         /**
>          * Auto generated getter method
>          * @return String
>          */
>         public  String getWeb_user_nameElement(){
>         	return localWeb_user_nameElement;
>         }
>         /**
>          * Auto generated setter method
>          * @param param Web_user_nameElement
>          */
>         public void setWeb_user_nameElement(String param){
>         	this.localWeb_user_nameElement=param;
>         }               
> }
> WebLoginElement.java
> package login.types;
> /**
>  *  WebLoginElement bean class
>  */
> public class WebLoginElement{
> 	/**
> 	 * field for User_nameElement
> 	 */
> 	protected String localUser_nameElement ;
> 	/**
> 	 * Auto generated getter method
> 	 * @return String
> 	 */
> 	public  String getUser_nameElement(){
>     	return localUser_nameElement;
>  	}
>     /**
>      * Auto generated setter method
>      * @param param User_nameElement
>      */
> 	public void setUser_nameElement(String param){
> 		this.localUser_nameElement=param;
> 	}
>                         
> 	/**
> 	 * field for User_passwordElement
> 	 */
> 	protected String localUser_passwordElement ;
> 	/**
> 	 * Auto generated getter method
> 	 * @return String
> 	 */
> 	public  String getUser_passwordElement(){
>      	return localUser_passwordElement;
> 	}
> 	/**
> 	 * Auto generated setter method
> 	 * @param param User_passwordElement
> 	 */
> 	public void setUser_passwordElement(String param){
> 		this.localUser_passwordElement=param;
> 	}
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández resolved AXIS2-2088.
------------------------------------

    Resolution: Later

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-2088:
------------------------------------

    Assignee: Dennis Sosnoski

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Dennis Sosnoski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490871 ] 

Dennis Sosnoski commented on AXIS2-2088:
----------------------------------------

This new problem is a separate issue, which I duplicated and fixed. See AXIS2-2580 for details.

For a fix to the Rampart problem using the Axis2 1.1.1 release, see http://www.sosnoski.com/jibx-wiki/space/axis2-jibx

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Attachment: new_binding.xml

when I use this binding definition instead of binding.xml, y get the following trace:

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
: java.lang.IllegalArgumentException: local part cannot be "null" when creating
a QName
        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.IllegalArgumentException: local part cannot be "null" when
creating a QName
        at javax.xml.namespace.QName.<init>(QName.java:214)
        at javax.xml.namespace.QName.<init>(QName.java:163)
        at org.apache.axis2.jibx.CodeGenerationUtility.collectTopLevelComponents
(CodeGenerationUtility.java:993)
        at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
ity.java:301)
        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

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Attachment: build.xml

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Description: 
First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.

The big one: 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 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:


I use the command like this:

wsdl2java -uri LoginService.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
/schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml


I made it also in unwrapped mode and there was no problem with that.


binding.xml

<?xml version="1.0" encoding="UTF-8"?>
<binding forwards="false" value-style="attribute"  xmlns:ns2="http://login/types">
  <namespace uri="http://login/types" default="elements"/>
  <mapping class="login.types.ReturnWebLoginElement" type-name="return-web-login-element">
    <value style="element" name="local-soap_session_id-element" field="localSoap_session_idElement" usage="optional"/>
    <value style="element" name="local-web_user_name-element" field="localWeb_user_nameElement" usage="optional"/>
  </mapping>
  <mapping class="login.types.WebLoginElement" type-name="web-login-element">
    <value style="element" name="local-user_name-element" field="localUser_nameElement" usage="optional"/>
    <value style="element" name="local-user_password-element" field="localUser_passwordElement" usage="optional"/>
  </mapping>
</binding>


build.xml

<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>

LoginServiceJiBX.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="LoginServiceJiBX" targetNamespace="http://login" xmlns:tns="http://login"
    xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://login/types">

    <types>
	<schema targetNamespace="http://login/types" xmlns:tns="http://login/types"
	  xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	  xmlns="http://www.w3.org/2001/XMLSchema">
	  	<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
		<element name="ReturnWebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:soap_session_idElement"/>
					<element ref="tns:web_user_nameElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="WebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:user_nameElement"/>
					<element ref="tns:user_passwordElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="user_nameElement" type="string"/>
		<element name="user_passwordElement" type="string"/>
		<element name="soap_session_idElement" type="string"/>
		<element name="web_user_nameElement" type="string"/>
	</schema>
    </types>
    <message name="LoginEndpoint_webLogin">
    	<part name="parameters" element="ns2:WebLoginElement"/>
    </message>
    <message name="LoginEndpoint_webLoginResponse">
    	<part name="result" element="ns2:ReturnWebLoginElement"/>
    </message>
    <portType name="LoginEndpoint">
	    <operation name="webLogin">
	    	<input message="tns:LoginEndpoint_webLogin" name="LoginEndpoint_webLogin"/>
		<output message="tns:LoginEndpoint_webLoginResponse" name="LoginEndpoint_webLoginResponse"/>
	    </operation>
    </portType>
    <binding name="LoginEndpointBinding" type="tns:LoginEndpoint">
	    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
	    <operation name="webLogin">
		<soap:operation soapAction="webLogin"/>
		    <input name="LoginEndpoint_webLogin">
			<soap:body use="literal"/>
		    </input>
		    <output name="LoginEndpoint_webLoginResponse">
			<soap:body use="literal"/>
		    </output>
	    </operation>
    </binding>
    <service name="LoginServiceJiBX">
	<port name="LoginEndpointPort" binding="tns:LoginEndpointBinding">
		<soap:address location="http://localhost:8080/axis2/services/LoginServiceJiBX"/>
	</port>
    </service>
</definitions>



ReturnWebLoginElement.java


/**
 * ReturnWebLoginElement.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: #axisVersion# #today#
 */
package login.types;

/**
 *  ReturnWebLoginElement bean class
 */
public class ReturnWebLoginElement{
    	/**
    	 * field for Soap_session_idElement
    	 */
    	protected String localSoap_session_idElement ;
                        
    	/**
    	 * Auto generated getter method
    	 * @return String
    	 */
        public  String getSoap_session_idElement(){
        	return localSoap_session_idElement;
     	}

        /**
         * Auto generated setter method
         * @param param Soap_session_idElement
         */
        public void setSoap_session_idElement(String param){
        	this.localSoap_session_idElement=param;
        }
                            
        /**
         * field for Web_user_nameElement
         */
        protected String localWeb_user_nameElement ;
                        
        /**
         * Auto generated getter method
         * @return String
         */
        public  String getWeb_user_nameElement(){
        	return localWeb_user_nameElement;
        }

        /**
         * Auto generated setter method
         * @param param Web_user_nameElement
         */
        public void setWeb_user_nameElement(String param){
        	this.localWeb_user_nameElement=param;
        }               
}


WebLoginElement.java


package login.types;


/**
 *  WebLoginElement bean class
 */
public class WebLoginElement{
	/**
	 * field for User_nameElement
	 */
	protected String localUser_nameElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_nameElement(){
    	return localUser_nameElement;
 	}

    /**
     * Auto generated setter method
     * @param param User_nameElement
     */
	public void setUser_nameElement(String param){
		this.localUser_nameElement=param;
	}
                        
	/**
	 * field for User_passwordElement
	 */
	protected String localUser_passwordElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_passwordElement(){
     	return localUser_passwordElement;
	}
	/**
	 * Auto generated setter method
	 * @param param User_passwordElement
	 */
	public void setUser_passwordElement(String param){
		this.localUser_passwordElement=param;
	}
 }






  was:
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.


binding.xml

<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>


build.xml

<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>

LoginServiceJiBX.wsdl

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="LoginServiceJiBX" targetNamespace="http://login" xmlns:tns="http://login"
    xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://login/types">

    <types>
	<schema targetNamespace="http://login/types" xmlns:tns="http://login/types"
	  xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	  xmlns="http://www.w3.org/2001/XMLSchema">
	  	<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
		<element name="ReturnWebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:soap_session_idElement"/>
					<element ref="tns:web_user_nameElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="WebLoginElement">
			<complexType>
				<sequence>
					<element ref="tns:user_nameElement"/>
					<element ref="tns:user_passwordElement"/>
				</sequence>
			</complexType>
		</element>
		<element name="user_nameElement" type="string"/>
		<element name="user_passwordElement" type="string"/>
		<element name="soap_session_idElement" type="string"/>
		<element name="web_user_nameElement" type="string"/>
	</schema>
    </types>
    <message name="LoginEndpoint_webLogin">
    	<part name="parameters" element="ns2:WebLoginElement"/>
    </message>
    <message name="LoginEndpoint_webLoginResponse">
    	<part name="result" element="ns2:ReturnWebLoginElement"/>
    </message>
    <portType name="LoginEndpoint">
	    <operation name="webLogin">
	    	<input message="tns:LoginEndpoint_webLogin" name="LoginEndpoint_webLogin"/>
		<output message="tns:LoginEndpoint_webLoginResponse" name="LoginEndpoint_webLoginResponse"/>
	    </operation>
    </portType>
    <binding name="LoginEndpointBinding" type="tns:LoginEndpoint">
	    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
	    <operation name="webLogin">
		<soap:operation soapAction="webLogin"/>
		    <input name="LoginEndpoint_webLogin">
			<soap:body use="literal"/>
		    </input>
		    <output name="LoginEndpoint_webLoginResponse">
			<soap:body use="literal"/>
		    </output>
	    </operation>
    </binding>
    <service name="LoginServiceJiBX">
	<port name="LoginEndpointPort" binding="tns:LoginEndpointBinding">
		<soap:address location="http://localhost:8080/axis2/services/LoginServiceJiBX"/>
	</port>
    </service>
</definitions>



ReturnWebLoginElement.java


/**
 * ReturnWebLoginElement.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: #axisVersion# #today#
 */
package login.types;

/**
 *  ReturnWebLoginElement bean class
 */
public class ReturnWebLoginElement{
    	/**
    	 * field for Soap_session_idElement
    	 */
    	protected String localSoap_session_idElement ;
                        
    	/**
    	 * Auto generated getter method
    	 * @return String
    	 */
        public  String getSoap_session_idElement(){
        	return localSoap_session_idElement;
     	}

        /**
         * Auto generated setter method
         * @param param Soap_session_idElement
         */
        public void setSoap_session_idElement(String param){
        	this.localSoap_session_idElement=param;
        }
                            
        /**
         * field for Web_user_nameElement
         */
        protected String localWeb_user_nameElement ;
                        
        /**
         * Auto generated getter method
         * @return String
         */
        public  String getWeb_user_nameElement(){
        	return localWeb_user_nameElement;
        }

        /**
         * Auto generated setter method
         * @param param Web_user_nameElement
         */
        public void setWeb_user_nameElement(String param){
        	this.localWeb_user_nameElement=param;
        }               
}


WebLoginElement.java


package login.types;


/**
 *  WebLoginElement bean class
 */
public class WebLoginElement{
	/**
	 * field for User_nameElement
	 */
	protected String localUser_nameElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_nameElement(){
    	return localUser_nameElement;
 	}

    /**
     * Auto generated setter method
     * @param param User_nameElement
     */
	public void setUser_nameElement(String param){
		this.localUser_nameElement=param;
	}
                        
	/**
	 * field for User_passwordElement
	 */
	protected String localUser_passwordElement ;
	/**
	 * Auto generated getter method
	 * @return String
	 */
	public  String getUser_passwordElement(){
     	return localUser_passwordElement;
	}
	/**
	 * Auto generated setter method
	 * @param param User_passwordElement
	 */
	public void setUser_passwordElement(String param){
		this.localUser_passwordElement=param;
	}
 }






        Summary: wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task  (was: Problems with wsdl2java  JiBX code generator)

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 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:
> I use the command like this:
> wsdl2java -uri LoginService.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.
> binding.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <binding forwards="false" value-style="attribute"  xmlns:ns2="http://login/types">
>   <namespace uri="http://login/types" default="elements"/>
>   <mapping class="login.types.ReturnWebLoginElement" type-name="return-web-login-element">
>     <value style="element" name="local-soap_session_id-element" field="localSoap_session_idElement" usage="optional"/>
>     <value style="element" name="local-web_user_name-element" field="localWeb_user_nameElement" usage="optional"/>
>   </mapping>
>   <mapping class="login.types.WebLoginElement" type-name="web-login-element">
>     <value style="element" name="local-user_name-element" field="localUser_nameElement" usage="optional"/>
>     <value style="element" name="local-user_password-element" field="localUser_passwordElement" usage="optional"/>
>   </mapping>
> </binding>
> build.xml
> <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>
> LoginServiceJiBX.wsdl
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="LoginServiceJiBX" targetNamespace="http://login" xmlns:tns="http://login"
>     xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://login/types">
>     <types>
> 	<schema targetNamespace="http://login/types" xmlns:tns="http://login/types"
> 	  xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
> 	  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	  xmlns="http://www.w3.org/2001/XMLSchema">
> 	  	<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> 		<element name="ReturnWebLoginElement">
> 			<complexType>
> 				<sequence>
> 					<element ref="tns:soap_session_idElement"/>
> 					<element ref="tns:web_user_nameElement"/>
> 				</sequence>
> 			</complexType>
> 		</element>
> 		<element name="WebLoginElement">
> 			<complexType>
> 				<sequence>
> 					<element ref="tns:user_nameElement"/>
> 					<element ref="tns:user_passwordElement"/>
> 				</sequence>
> 			</complexType>
> 		</element>
> 		<element name="user_nameElement" type="string"/>
> 		<element name="user_passwordElement" type="string"/>
> 		<element name="soap_session_idElement" type="string"/>
> 		<element name="web_user_nameElement" type="string"/>
> 	</schema>
>     </types>
>     <message name="LoginEndpoint_webLogin">
>     	<part name="parameters" element="ns2:WebLoginElement"/>
>     </message>
>     <message name="LoginEndpoint_webLoginResponse">
>     	<part name="result" element="ns2:ReturnWebLoginElement"/>
>     </message>
>     <portType name="LoginEndpoint">
> 	    <operation name="webLogin">
> 	    	<input message="tns:LoginEndpoint_webLogin" name="LoginEndpoint_webLogin"/>
> 		<output message="tns:LoginEndpoint_webLoginResponse" name="LoginEndpoint_webLoginResponse"/>
> 	    </operation>
>     </portType>
>     <binding name="LoginEndpointBinding" type="tns:LoginEndpoint">
> 	    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
> 	    <operation name="webLogin">
> 		<soap:operation soapAction="webLogin"/>
> 		    <input name="LoginEndpoint_webLogin">
> 			<soap:body use="literal"/>
> 		    </input>
> 		    <output name="LoginEndpoint_webLoginResponse">
> 			<soap:body use="literal"/>
> 		    </output>
> 	    </operation>
>     </binding>
>     <service name="LoginServiceJiBX">
> 	<port name="LoginEndpointPort" binding="tns:LoginEndpointBinding">
> 		<soap:address location="http://localhost:8080/axis2/services/LoginServiceJiBX"/>
> 	</port>
>     </service>
> </definitions>
> ReturnWebLoginElement.java
> /**
>  * ReturnWebLoginElement.java
>  *
>  * This file was auto-generated from WSDL
>  * by the Apache Axis2 version: #axisVersion# #today#
>  */
> package login.types;
> /**
>  *  ReturnWebLoginElement bean class
>  */
> public class ReturnWebLoginElement{
>     	/**
>     	 * field for Soap_session_idElement
>     	 */
>     	protected String localSoap_session_idElement ;
>                         
>     	/**
>     	 * Auto generated getter method
>     	 * @return String
>     	 */
>         public  String getSoap_session_idElement(){
>         	return localSoap_session_idElement;
>      	}
>         /**
>          * Auto generated setter method
>          * @param param Soap_session_idElement
>          */
>         public void setSoap_session_idElement(String param){
>         	this.localSoap_session_idElement=param;
>         }
>                             
>         /**
>          * field for Web_user_nameElement
>          */
>         protected String localWeb_user_nameElement ;
>                         
>         /**
>          * Auto generated getter method
>          * @return String
>          */
>         public  String getWeb_user_nameElement(){
>         	return localWeb_user_nameElement;
>         }
>         /**
>          * Auto generated setter method
>          * @param param Web_user_nameElement
>          */
>         public void setWeb_user_nameElement(String param){
>         	this.localWeb_user_nameElement=param;
>         }               
> }
> WebLoginElement.java
> package login.types;
> /**
>  *  WebLoginElement bean class
>  */
> public class WebLoginElement{
> 	/**
> 	 * field for User_nameElement
> 	 */
> 	protected String localUser_nameElement ;
> 	/**
> 	 * Auto generated getter method
> 	 * @return String
> 	 */
> 	public  String getUser_nameElement(){
>     	return localUser_nameElement;
>  	}
>     /**
>      * Auto generated setter method
>      * @param param User_nameElement
>      */
> 	public void setUser_nameElement(String param){
> 		this.localUser_nameElement=param;
> 	}
>                         
> 	/**
> 	 * field for User_passwordElement
> 	 */
> 	protected String localUser_passwordElement ;
> 	/**
> 	 * Auto generated getter method
> 	 * @return String
> 	 */
> 	public  String getUser_passwordElement(){
>      	return localUser_passwordElement;
> 	}
> 	/**
> 	 * Auto generated setter method
> 	 * @param param User_passwordElement
> 	 */
> 	public void setUser_passwordElement(String param){
> 		this.localUser_passwordElement=param;
> 	}
>  }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Attachment: WebLoginElement.java

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Dennis Sosnoski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490207 ] 

Dennis Sosnoski commented on AXIS2-2088:
----------------------------------------

You need to use abstract='true' in your modified binding, as you'd see if you tried compiling the binding. The Wsdl2Java code generation extension for JiBX assumes you've run the binding compile before you run Wsdl2Java, and doesn't duplicate the error checking that you get during the binding compile step.

I've added a check for this particular error condition anyway, and will modify the documentation to state that you need to compile your binding before running Wsdl2Java.

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490625 ] 

Jorge Fernández commented on AXIS2-2088:
----------------------------------------

Hi Dennis,

I have changed what you said. Actually I had compiled the binding before using wsdl2java but as I'm a little lost with the definition of a binding file, I think I was doing something different because I have never used abstract="true" and sometimes I had the exception "no mapping defined for element xxx..." and sometimes the one before. 

My binding.xml is now:

<?xml version="1.0" encoding="UTF-8"?>
<binding forwards="false" value-style="attribute"  xmlns:ns2="http://login/types">
  <namespace uri="http://login/types" prefix="ns2"/>
  <mapping abstract="true" class="login.types.WebLoginElement" type-name="ns2:web-login-element">
    <value style="element" name="local-user_name-element" field="localUser_nameElement" usage="optional"/>
    <value style="element" name="local-user_password-element" field="localUser_passwordElement" usage="optional"/>
  </mapping>
  <mapping abstract="true" class="login.types.ReturnWebLoginElement" type-name="ns2:return-web-login-element">
    <value style="element" name="local-soap_session_id-element" field="localSoap_session_idElement" usage="optional"/>
    <value style="element" name="local-web_user_name-element" field="localWeb_user_nameElement" usage="optional"/>
  </mapping>
</binding>

Now I'm back to the begining because I execute the followin commands and I get the following exception: (files are the same and )

D:\Programas\PFC\eclipse\workspace\Medici-Link>java -cp D:\Programas\PFC\jibx\lib/jibx-run.jar;D:\Programas\PFC\jibx\lib/jibx-bind.jar;build org.jibx.binding.Compile binding.xml

D:\Programas\PFC\eclipse\workspace\Medici-Link>wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p login -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://login/types=login.types,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmlsoap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile new_binding.xml
Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
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


Thanks a lot

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Attachment: binding.xml

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Attachment: LoginServiceJiBX.wsdl

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Dennis Sosnoski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472149 ] 

Dennis Sosnoski commented on AXIS2-2088:
----------------------------------------

The exception looks to be caused by not using the prefix assigned to the namespace on the type-names within the JiBX binding. The binding defines types used by the WSDL with names:

<binding forwards="false" value-style="attribute"  xmlns:ns2="http://login/types">
  <namespace uri="http://login/types" default="elements"/>
  <mapping class="login.types.ReturnWebLoginElement" type-name="return-web-login-element">
    <value style="element" name="local-soap_session_id-element" field="localSoap_session_idElement" usage="optional"/>
    <value style="element" name="local-web_user_name-element" field="localWeb_user_nameElement" usage="optional"/>
  </mapping>
  ...

But the types are expected to be defined within the http://login/types namespace, and this doesn't do it. To have the type-name be in the proper namespace you need to actually use the prefix declared for that namespace as part of the value of the type-name. In this case, the <mapping> element should be changed to:

  <mapping class="login.types.ReturnWebLoginElement" type-name="ns2:return-web-login-element">

With this change, the NPE should be avoided. I've entered a JiBX bug (http://jira.codehaus.org/browse/JIBX-152) to address the NPE issue itself.

There are other problems with the supplied samples, though. The WSDL schema component does not specify elementFormDefault="qualified", so only the top-level elements (WebLoginElement and ReturnWebLoginElement) should be namespaces. The supplied binding applies the namespace to all element names. For use without the '-uw' option the binding would also need to be changed to use element names in the proper namespace on the <mapping> components (unwrapped matches type-names in the binding definition, wrapped matches element names)

I don't have any response to the first point raised, about the ant task, so I'm not marking this bug resolved even though this comment should take care of the "big one" part of the issue.

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Reopened: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández reopened AXIS2-2088:
------------------------------------


> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Fernández updated AXIS2-2088:
-----------------------------------

    Attachment: ReturnWebLoginElement.java

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/ypes=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2088) wsdl2java JiBX code generator and -Ebindingfile option unavailable in ant task

Posted by "Jorge Fernández (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490671 ] 

Jorge Fernández commented on AXIS2-2088:
----------------------------------------

Finally I've done it!!!

Thanks a lot. I had already tried what you said but the only problem 
I had was that I had dropped  the default="elements" attribute for the 
namespace definition in the binding and when I put it back It worked 
perfectly.

Thanks for the references. I had already read them but there is always 
something I can miss.

If you let me I would like to ask one last question: Does JiBX work with rampart??
I'm asking this because I have rampar module engaged but I wasn't using it at this
service and I get an exception besides I checked that the response message was
built correctly:

org.apache.axis2.AxisFault: Error in extracting message properties
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
	at client.LoginServiceJiBXStub.webLogin(LoginServiceJiBXStub.java:142)
	at client.Client.main(Client.java:19)
Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Error in extracting message properties; nested exception is: 
	org.apache.rampart.RampartException: Error in extracting message properties
	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
	at org.apache.axis2.engine.Phase.invoke(Phase.java:382)
	at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655)
	at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:48)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:328)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.rampart.RampartException: Error in extracting message properties
	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:294)
	at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:56)
	at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:59)
	... 23 more
Caused by: org.apache.ws.security.WSSecurityException: Error in converting SOAP Envelope to Document; nested exception is: 
	org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException
	at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:121)
	at org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:146)
	... 25 more
Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException
	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:194)
	at org.apache.axiom.om.impl.dom.NodeImpl.build(NodeImpl.java:469)
	at org.apache.axiom.om.impl.dom.DocumentImpl.build(DocumentImpl.java:476)
	at org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:107)
	... 26 more
Caused by: javax.xml.stream.XMLStreamException
	at org.apache.axiom.om.impl.llom.OMStAXWrapper.updateLastNode(OMStAXWrapper.java:952)
	at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:913)
	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:111)
	... 29 more

	at org.apache.axis2.AxisFault.<init>(AxisFault.java:159)
	... 4 more

> wsdl2java  JiBX code generator and -Ebindingfile option unavailable in ant task
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-2088
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2088
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP2, jre 1.5 update 10, and 1.7.0
>            Reporter: Jorge Fernández
>         Assigned To: Dennis Sosnoski
>         Attachments: binding.xml, build.xml, LoginServiceJiBX.wsdl, new_binding.xml, ReturnWebLoginElement.java, WebLoginElement.java
>
>
> First the little question:  is there any way for passing the -Ebindingfile in the ant task of wsdl2java? because I didn't find it.
> The big one: 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 also made an ant task, following the steps of the jibx tutorial. I generated the binding definition with JiBX tools.
> 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:
> I use the command like this:
> wsdl2java -uri LoginServiceJiBX.wsdl -o src\ -p loginjibx -ss -sd -d jibx -g -sn LoginServiceJiBX -pn LoginEndpointPort -ns2p http://login=login,http://www.w3.org/2001/XMLSchema=org.w3.www._2001.xmlschema,http://login/types=login.types,http:/
> /schemas.xmlsoap.org/wsdl/soap=org.xmlsoap.schemas.wsdl.soap,http://schemas.xmls
> oap.org/wsdl=org.xmlsoap.schemas.wsdl -ssi -Ebindingfile binding.xml
> This is the trace:
> Using AXIS2_HOME:   D:\Programas\PFC\axis2-1.1.1
> Using JAVA_HOME:    D:\Programas\Java\jdk1.5.0_09
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : java.lang.NullPointerException
>         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.NullPointerException
>         at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
> r.java:455)
>         at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
> ingContext.java:3125)
>         at org.jibx.runtime.QName.deserialize(QName.java:234)
>         at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
> ment.java:261)
>         at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
> MappingElement.java)
>         at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
>         at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
> ingElement.java)
>         at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
>         at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
> lingContext.java:2538)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :609)
>         at org.jibx.binding.model.BindingElement.readBinding(BindingElement.java
> :625)
>         at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtil
> ity.java:240)
>         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
> I made it also in unwrapped mode and there was no problem with that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org