[ 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to