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 "trebor iksrazal (JIRA)" <ax...@ws.apache.org> on 2005/08/04 21:26:43 UTC

[jira] Created: (AXIS-2165) axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments

axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments
--------------------------------------------------------------------------------------------

         Key: AXIS-2165
         URL: http://issues.apache.org/jira/browse/AXIS-2165
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2.1    
 Environment: Linux, java 1.4.2
    Reporter: trebor iksrazal


I have produced a simple test case, which works as expected with JWSDP wscompile, but does not work as expected with axis-wsdl2java. 

With wscompile, the generated class constructor is: 

   public ReturnWeb_Login(java.lang.String errorMessage, int successErrorCode, java.lang.String SOAP_Session_id, java.lang.String web_user_name) {
        this.errorMessage = errorMessage;
        this.successErrorCode = successErrorCode;
        this.SOAP_Session_id = SOAP_Session_id;
        this.web_user_name = web_user_name;
    }

With axis-wsdl2java, the generated class constructor is: 

   public ReturnWeb_Login(
           java.lang.String SOAP_Session_id,
           java.lang.String web_user_name) {
           this.SOAP_Session_id = SOAP_Session_id;
           this.web_user_name = web_user_name;
    }


WSDL:

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="CallCentreWebService" targetNamespace="http://com/callcentreweb" xmlns:tns="http://com/callcentreweb" 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://com/callcentreweb/types">
  <types>
    <schema targetNamespace="http://com/callcentreweb/types" xmlns:tns="http://com/callcentreweb/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/"/>
      <complexType name="ReturnWeb_Base">
        <sequence>
          <element name="errorMessage" type="string"/>
          <element name="successErrorCode" type="int"/></sequence></complexType>
      <complexType name="ReturnWeb_Login">
        <complexContent>
          <extension base="tns:ReturnWeb_Base">
            <sequence>
              <element name="SOAP_Session_id" type="string"/>
              <element name="web_user_name" type="string"/></sequence></extension></complexContent></complexType>
</schema></types>
  <message name="CallCentreWebEndpoint_web_Login">
    <part name="user_name" type="xsd:string"/>
    <part name="user_password" type="xsd:string"/>
  </message>
  <message name="CallCentreWebEndpoint_web_LoginResponse">
    <part name="result" type="ns2:ReturnWeb_Login"/>
  </message>
  <portType name="CallCentreWebEndpoint">
    <operation name="web_Login" parameterOrder="user_name user_password">
      <input message="tns:CallCentreWebEndpoint_web_Login"/>
      <output message="tns:CallCentreWebEndpoint_web_LoginResponse"/>
    </operation>
  </portType>
  <binding name="CallCentreWebEndpointBinding" type="tns:CallCentreWebEndpoint">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
    <operation name="web_Login">
      <soap:operation soapAction=""/>
      <input>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></input>
      <output>
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></output></operation></binding>
  <service name="CallCentreWebService">
    <port name="CallCentreWebEndpointPort" binding="tns:CallCentreWebEndpointBinding">
      <soap:address location="http://127.0.0.1"/></port></service></definitions>


axis-wsdl2java definition: 

  <target name="my-wsdl2java" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
       <echo message="Creating the custom complex objects using IBM tools...." />
       <delete dir="resources/axis/com" />
       <axis-wsdl2java
         output="resources/axis"
         verbose="true"
         url="resources/axis-jira.wsdl"
         >
         <mapping
           namespace="http://com/hostedtelecom/callcentreweb"
           package="com.hostedtelecom.callcentreweb.endpoint" />
       </axis-wsdl2java>
       <echo message="Creating the IDE custom complex objects JAR" />
      <javac srcdir="resources/axis" destdir="${build}" debug="true"> 
      	<include name="**/*.java" /> 
       <classpath refid="classpath-jboss"/> 
      </javac> 
       <copy todir="${build}">
         <fileset dir="resources/axis">
           <include name="**/*.class"/>
         </fileset>
       </copy>
       <jar jarfile="lib/soap-ide_only.jar" >
          <fileset dir="${build}" />
       </jar>
      <delete dir="${build}" />
   </target>

wscompile ant task: 

<taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
       <classpath refid="classpath-jboss"/> 
  </taskdef>

  <!--
  Note that this task only 
  works if you specifically have tools.jar in the classpath. 
  Alternatively, run: 
  wscompile.sh -import   -mapping resources/CallCentreWeb_Mapping.xml resources/config-wsdl.xml
  -->
  <target name="sun-wscompile" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
       <echo message="Creating the custom complex objects using SUN tools...." />
       <delete dir="resources/sun/com" />
       <wscompile
             fork="true"
             base="resources/sun"
             import="true"
             mapping="resources/CallCentreWeb_Mapping.xml"
             verbose="true"
             debug="true"
             sourceBase="resources/sun"
             config="resources/config-wsdl.xml">
             <classpath refid="classpath-jboss"/> 
       </wscompile>
       <echo message="Creating the IDE custom complex objects JAR" />
       <copy todir="${build}">
         <fileset dir="resources">
           <include name="**/*.class"/>
         </fileset>
       </copy>
       <jar jarfile="lib/soap-ide_only.jar" >
          <fileset dir="${build}" />
       </jar>
      <delete dir="${build}" />
   </target>

wscompile dependency for : 
             config="resources/config-wsdl.xml">

<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <wsdl location="resources/axis-jira.wsdl" packageName="com.hostedtelecom.callcentreweb.endpoint">
    </wsdl>
</configuration>

Note :
            mapping="resources/CallCentreWeb_Mapping.xml"

is an wscompile output file. 

Please advise if I can clarify further. Regards,
iksrazal




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2165) axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2165?page=comments#action_12358234 ] 

Davanum Srinivas commented on AXIS-2165:
----------------------------------------

did you check Axis 1.3?

> axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS-2165
>          URL: http://issues.apache.org/jira/browse/AXIS-2165
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1
>  Environment: Linux, java 1.4.2
>     Reporter: trebor iksrazal

>
> I have produced a simple test case, which works as expected with JWSDP wscompile, but does not work as expected with axis-wsdl2java. 
> With wscompile, the generated class constructor is: 
>    public ReturnWeb_Login(java.lang.String errorMessage, int successErrorCode, java.lang.String SOAP_Session_id, java.lang.String web_user_name) {
>         this.errorMessage = errorMessage;
>         this.successErrorCode = successErrorCode;
>         this.SOAP_Session_id = SOAP_Session_id;
>         this.web_user_name = web_user_name;
>     }
> With axis-wsdl2java, the generated class constructor is: 
>    public ReturnWeb_Login(
>            java.lang.String SOAP_Session_id,
>            java.lang.String web_user_name) {
>            this.SOAP_Session_id = SOAP_Session_id;
>            this.web_user_name = web_user_name;
>     }
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="CallCentreWebService" targetNamespace="http://com/callcentreweb" xmlns:tns="http://com/callcentreweb" 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://com/callcentreweb/types">
>   <types>
>     <schema targetNamespace="http://com/callcentreweb/types" xmlns:tns="http://com/callcentreweb/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/"/>
>       <complexType name="ReturnWeb_Base">
>         <sequence>
>           <element name="errorMessage" type="string"/>
>           <element name="successErrorCode" type="int"/></sequence></complexType>
>       <complexType name="ReturnWeb_Login">
>         <complexContent>
>           <extension base="tns:ReturnWeb_Base">
>             <sequence>
>               <element name="SOAP_Session_id" type="string"/>
>               <element name="web_user_name" type="string"/></sequence></extension></complexContent></complexType>
> </schema></types>
>   <message name="CallCentreWebEndpoint_web_Login">
>     <part name="user_name" type="xsd:string"/>
>     <part name="user_password" type="xsd:string"/>
>   </message>
>   <message name="CallCentreWebEndpoint_web_LoginResponse">
>     <part name="result" type="ns2:ReturnWeb_Login"/>
>   </message>
>   <portType name="CallCentreWebEndpoint">
>     <operation name="web_Login" parameterOrder="user_name user_password">
>       <input message="tns:CallCentreWebEndpoint_web_Login"/>
>       <output message="tns:CallCentreWebEndpoint_web_LoginResponse"/>
>     </operation>
>   </portType>
>   <binding name="CallCentreWebEndpointBinding" type="tns:CallCentreWebEndpoint">
>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
>     <operation name="web_Login">
>       <soap:operation soapAction=""/>
>       <input>
>         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></input>
>       <output>
>         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></output></operation></binding>
>   <service name="CallCentreWebService">
>     <port name="CallCentreWebEndpointPort" binding="tns:CallCentreWebEndpointBinding">
>       <soap:address location="http://127.0.0.1"/></port></service></definitions>
> axis-wsdl2java definition: 
>   <target name="my-wsdl2java" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
>        <echo message="Creating the custom complex objects using IBM tools...." />
>        <delete dir="resources/axis/com" />
>        <axis-wsdl2java
>          output="resources/axis"
>          verbose="true"
>          url="resources/axis-jira.wsdl"
>          >
>          <mapping
>            namespace="http://com/hostedtelecom/callcentreweb"
>            package="com.hostedtelecom.callcentreweb.endpoint" />
>        </axis-wsdl2java>
>        <echo message="Creating the IDE custom complex objects JAR" />
>       <javac srcdir="resources/axis" destdir="${build}" debug="true"> 
>       	<include name="**/*.java" /> 
>        <classpath refid="classpath-jboss"/> 
>       </javac> 
>        <copy todir="${build}">
>          <fileset dir="resources/axis">
>            <include name="**/*.class"/>
>          </fileset>
>        </copy>
>        <jar jarfile="lib/soap-ide_only.jar" >
>           <fileset dir="${build}" />
>        </jar>
>       <delete dir="${build}" />
>    </target>
> wscompile ant task: 
> <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
>        <classpath refid="classpath-jboss"/> 
>   </taskdef>
>   <!--
>   Note that this task only 
>   works if you specifically have tools.jar in the classpath. 
>   Alternatively, run: 
>   wscompile.sh -import   -mapping resources/CallCentreWeb_Mapping.xml resources/config-wsdl.xml
>   -->
>   <target name="sun-wscompile" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
>        <echo message="Creating the custom complex objects using SUN tools...." />
>        <delete dir="resources/sun/com" />
>        <wscompile
>              fork="true"
>              base="resources/sun"
>              import="true"
>              mapping="resources/CallCentreWeb_Mapping.xml"
>              verbose="true"
>              debug="true"
>              sourceBase="resources/sun"
>              config="resources/config-wsdl.xml">
>              <classpath refid="classpath-jboss"/> 
>        </wscompile>
>        <echo message="Creating the IDE custom complex objects JAR" />
>        <copy todir="${build}">
>          <fileset dir="resources">
>            <include name="**/*.class"/>
>          </fileset>
>        </copy>
>        <jar jarfile="lib/soap-ide_only.jar" >
>           <fileset dir="${build}" />
>        </jar>
>       <delete dir="${build}" />
>    </target>
> wscompile dependency for : 
>              config="resources/config-wsdl.xml">
> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
>     <wsdl location="resources/axis-jira.wsdl" packageName="com.hostedtelecom.callcentreweb.endpoint">
>     </wsdl>
> </configuration>
> Note :
>             mapping="resources/CallCentreWeb_Mapping.xml"
> is an wscompile output file. 
> Please advise if I can clarify further. Regards,
> iksrazal

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2165) axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments

Posted by "trebor iksrazal (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2165?page=comments#action_12358269 ] 

trebor iksrazal commented on AXIS-2165:
---------------------------------------

What a pleasant suprise - there is now a difference with axis 1.3 . NOTE: I did re-test the same wsdl with axis 1.2 and found no changes from the jira submission. Now with 1.3 I get: 

    public ReturnWeb_Login(
           java.lang.String errorMessage,
           int successErrorCode,
           java.lang.String SOAP_Session_id,
           java.lang.String web_user_name) {
        super(
            errorMessage,
            successErrorCode);
        this.SOAP_Session_id = SOAP_Session_id;
        this.web_user_name = web_user_name;
    }

Which seemingly has the same effect as the wscompile constructor listed above. 

However, I am currently I am developing with AXIS2 . There seemingly is no ant task 'axis-wsdl2java' for axis2 yet. Running from the command line, I get: 

./WSDL2Java.sh -uri wout/axis-jira.wsdl -o wout/

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: The use 'encoded' is not supported!
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:105)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:30)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException: The use 'encoded' is not supported!
        at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.foo(XMLBeansExtension.java:334)
        at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.checkCompatibility(XMLBeansExtension.java:319)
        at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:86)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:76)

Is this a wsdl 2.0 issue, ie, is this a bug or should I change my wsdl ? I'd like to verify that the constructor issue is fixed for axis2 because that is what I am using. 

Regards,
iksrazal

> axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS-2165
>          URL: http://issues.apache.org/jira/browse/AXIS-2165
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1
>  Environment: Linux, java 1.4.2
>     Reporter: trebor iksrazal

>
> I have produced a simple test case, which works as expected with JWSDP wscompile, but does not work as expected with axis-wsdl2java. 
> With wscompile, the generated class constructor is: 
>    public ReturnWeb_Login(java.lang.String errorMessage, int successErrorCode, java.lang.String SOAP_Session_id, java.lang.String web_user_name) {
>         this.errorMessage = errorMessage;
>         this.successErrorCode = successErrorCode;
>         this.SOAP_Session_id = SOAP_Session_id;
>         this.web_user_name = web_user_name;
>     }
> With axis-wsdl2java, the generated class constructor is: 
>    public ReturnWeb_Login(
>            java.lang.String SOAP_Session_id,
>            java.lang.String web_user_name) {
>            this.SOAP_Session_id = SOAP_Session_id;
>            this.web_user_name = web_user_name;
>     }
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="CallCentreWebService" targetNamespace="http://com/callcentreweb" xmlns:tns="http://com/callcentreweb" 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://com/callcentreweb/types">
>   <types>
>     <schema targetNamespace="http://com/callcentreweb/types" xmlns:tns="http://com/callcentreweb/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/"/>
>       <complexType name="ReturnWeb_Base">
>         <sequence>
>           <element name="errorMessage" type="string"/>
>           <element name="successErrorCode" type="int"/></sequence></complexType>
>       <complexType name="ReturnWeb_Login">
>         <complexContent>
>           <extension base="tns:ReturnWeb_Base">
>             <sequence>
>               <element name="SOAP_Session_id" type="string"/>
>               <element name="web_user_name" type="string"/></sequence></extension></complexContent></complexType>
> </schema></types>
>   <message name="CallCentreWebEndpoint_web_Login">
>     <part name="user_name" type="xsd:string"/>
>     <part name="user_password" type="xsd:string"/>
>   </message>
>   <message name="CallCentreWebEndpoint_web_LoginResponse">
>     <part name="result" type="ns2:ReturnWeb_Login"/>
>   </message>
>   <portType name="CallCentreWebEndpoint">
>     <operation name="web_Login" parameterOrder="user_name user_password">
>       <input message="tns:CallCentreWebEndpoint_web_Login"/>
>       <output message="tns:CallCentreWebEndpoint_web_LoginResponse"/>
>     </operation>
>   </portType>
>   <binding name="CallCentreWebEndpointBinding" type="tns:CallCentreWebEndpoint">
>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
>     <operation name="web_Login">
>       <soap:operation soapAction=""/>
>       <input>
>         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></input>
>       <output>
>         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></output></operation></binding>
>   <service name="CallCentreWebService">
>     <port name="CallCentreWebEndpointPort" binding="tns:CallCentreWebEndpointBinding">
>       <soap:address location="http://127.0.0.1"/></port></service></definitions>
> axis-wsdl2java definition: 
>   <target name="my-wsdl2java" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
>        <echo message="Creating the custom complex objects using IBM tools...." />
>        <delete dir="resources/axis/com" />
>        <axis-wsdl2java
>          output="resources/axis"
>          verbose="true"
>          url="resources/axis-jira.wsdl"
>          >
>          <mapping
>            namespace="http://com/hostedtelecom/callcentreweb"
>            package="com.hostedtelecom.callcentreweb.endpoint" />
>        </axis-wsdl2java>
>        <echo message="Creating the IDE custom complex objects JAR" />
>       <javac srcdir="resources/axis" destdir="${build}" debug="true"> 
>       	<include name="**/*.java" /> 
>        <classpath refid="classpath-jboss"/> 
>       </javac> 
>        <copy todir="${build}">
>          <fileset dir="resources/axis">
>            <include name="**/*.class"/>
>          </fileset>
>        </copy>
>        <jar jarfile="lib/soap-ide_only.jar" >
>           <fileset dir="${build}" />
>        </jar>
>       <delete dir="${build}" />
>    </target>
> wscompile ant task: 
> <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
>        <classpath refid="classpath-jboss"/> 
>   </taskdef>
>   <!--
>   Note that this task only 
>   works if you specifically have tools.jar in the classpath. 
>   Alternatively, run: 
>   wscompile.sh -import   -mapping resources/CallCentreWeb_Mapping.xml resources/config-wsdl.xml
>   -->
>   <target name="sun-wscompile" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
>        <echo message="Creating the custom complex objects using SUN tools...." />
>        <delete dir="resources/sun/com" />
>        <wscompile
>              fork="true"
>              base="resources/sun"
>              import="true"
>              mapping="resources/CallCentreWeb_Mapping.xml"
>              verbose="true"
>              debug="true"
>              sourceBase="resources/sun"
>              config="resources/config-wsdl.xml">
>              <classpath refid="classpath-jboss"/> 
>        </wscompile>
>        <echo message="Creating the IDE custom complex objects JAR" />
>        <copy todir="${build}">
>          <fileset dir="resources">
>            <include name="**/*.class"/>
>          </fileset>
>        </copy>
>        <jar jarfile="lib/soap-ide_only.jar" >
>           <fileset dir="${build}" />
>        </jar>
>       <delete dir="${build}" />
>    </target>
> wscompile dependency for : 
>              config="resources/config-wsdl.xml">
> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
>     <wsdl location="resources/axis-jira.wsdl" packageName="com.hostedtelecom.callcentreweb.endpoint">
>     </wsdl>
> </configuration>
> Note :
>             mapping="resources/CallCentreWeb_Mapping.xml"
> is an wscompile output file. 
> Please advise if I can clarify further. Regards,
> iksrazal

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-2165) axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2165?page=all ]
     
Davanum Srinivas resolved AXIS-2165:
------------------------------------

    Resolution: Fixed

Closing bug as fixed. Please ask on mailing list for encoded support in Axis2.

> axis-wsdl2java used with 'extension base' is producing wrong number of constructor arguments
> --------------------------------------------------------------------------------------------
>
>          Key: AXIS-2165
>          URL: http://issues.apache.org/jira/browse/AXIS-2165
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2.1
>  Environment: Linux, java 1.4.2
>     Reporter: trebor iksrazal

>
> I have produced a simple test case, which works as expected with JWSDP wscompile, but does not work as expected with axis-wsdl2java. 
> With wscompile, the generated class constructor is: 
>    public ReturnWeb_Login(java.lang.String errorMessage, int successErrorCode, java.lang.String SOAP_Session_id, java.lang.String web_user_name) {
>         this.errorMessage = errorMessage;
>         this.successErrorCode = successErrorCode;
>         this.SOAP_Session_id = SOAP_Session_id;
>         this.web_user_name = web_user_name;
>     }
> With axis-wsdl2java, the generated class constructor is: 
>    public ReturnWeb_Login(
>            java.lang.String SOAP_Session_id,
>            java.lang.String web_user_name) {
>            this.SOAP_Session_id = SOAP_Session_id;
>            this.web_user_name = web_user_name;
>     }
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="CallCentreWebService" targetNamespace="http://com/callcentreweb" xmlns:tns="http://com/callcentreweb" 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://com/callcentreweb/types">
>   <types>
>     <schema targetNamespace="http://com/callcentreweb/types" xmlns:tns="http://com/callcentreweb/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/"/>
>       <complexType name="ReturnWeb_Base">
>         <sequence>
>           <element name="errorMessage" type="string"/>
>           <element name="successErrorCode" type="int"/></sequence></complexType>
>       <complexType name="ReturnWeb_Login">
>         <complexContent>
>           <extension base="tns:ReturnWeb_Base">
>             <sequence>
>               <element name="SOAP_Session_id" type="string"/>
>               <element name="web_user_name" type="string"/></sequence></extension></complexContent></complexType>
> </schema></types>
>   <message name="CallCentreWebEndpoint_web_Login">
>     <part name="user_name" type="xsd:string"/>
>     <part name="user_password" type="xsd:string"/>
>   </message>
>   <message name="CallCentreWebEndpoint_web_LoginResponse">
>     <part name="result" type="ns2:ReturnWeb_Login"/>
>   </message>
>   <portType name="CallCentreWebEndpoint">
>     <operation name="web_Login" parameterOrder="user_name user_password">
>       <input message="tns:CallCentreWebEndpoint_web_Login"/>
>       <output message="tns:CallCentreWebEndpoint_web_LoginResponse"/>
>     </operation>
>   </portType>
>   <binding name="CallCentreWebEndpointBinding" type="tns:CallCentreWebEndpoint">
>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
>     <operation name="web_Login">
>       <soap:operation soapAction=""/>
>       <input>
>         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></input>
>       <output>
>         <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="http://com/callcentreweb"/></output></operation></binding>
>   <service name="CallCentreWebService">
>     <port name="CallCentreWebEndpointPort" binding="tns:CallCentreWebEndpointBinding">
>       <soap:address location="http://127.0.0.1"/></port></service></definitions>
> axis-wsdl2java definition: 
>   <target name="my-wsdl2java" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
>        <echo message="Creating the custom complex objects using IBM tools...." />
>        <delete dir="resources/axis/com" />
>        <axis-wsdl2java
>          output="resources/axis"
>          verbose="true"
>          url="resources/axis-jira.wsdl"
>          >
>          <mapping
>            namespace="http://com/hostedtelecom/callcentreweb"
>            package="com.hostedtelecom.callcentreweb.endpoint" />
>        </axis-wsdl2java>
>        <echo message="Creating the IDE custom complex objects JAR" />
>       <javac srcdir="resources/axis" destdir="${build}" debug="true"> 
>       	<include name="**/*.java" /> 
>        <classpath refid="classpath-jboss"/> 
>       </javac> 
>        <copy todir="${build}">
>          <fileset dir="resources/axis">
>            <include name="**/*.class"/>
>          </fileset>
>        </copy>
>        <jar jarfile="lib/soap-ide_only.jar" >
>           <fileset dir="${build}" />
>        </jar>
>       <delete dir="${build}" />
>    </target>
> wscompile ant task: 
> <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
>        <classpath refid="classpath-jboss"/> 
>   </taskdef>
>   <!--
>   Note that this task only 
>   works if you specifically have tools.jar in the classpath. 
>   Alternatively, run: 
>   wscompile.sh -import   -mapping resources/CallCentreWeb_Mapping.xml resources/config-wsdl.xml
>   -->
>   <target name="sun-wscompile" description="Generate compiled complex interfaces and classes from wsdl as a jar for an IDE" depends="clean,prepare">
>        <echo message="Creating the custom complex objects using SUN tools...." />
>        <delete dir="resources/sun/com" />
>        <wscompile
>              fork="true"
>              base="resources/sun"
>              import="true"
>              mapping="resources/CallCentreWeb_Mapping.xml"
>              verbose="true"
>              debug="true"
>              sourceBase="resources/sun"
>              config="resources/config-wsdl.xml">
>              <classpath refid="classpath-jboss"/> 
>        </wscompile>
>        <echo message="Creating the IDE custom complex objects JAR" />
>        <copy todir="${build}">
>          <fileset dir="resources">
>            <include name="**/*.class"/>
>          </fileset>
>        </copy>
>        <jar jarfile="lib/soap-ide_only.jar" >
>           <fileset dir="${build}" />
>        </jar>
>       <delete dir="${build}" />
>    </target>
> wscompile dependency for : 
>              config="resources/config-wsdl.xml">
> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
>     <wsdl location="resources/axis-jira.wsdl" packageName="com.hostedtelecom.callcentreweb.endpoint">
>     </wsdl>
> </configuration>
> Note :
>             mapping="resources/CallCentreWeb_Mapping.xml"
> is an wscompile output file. 
> Please advise if I can clarify further. Regards,
> iksrazal

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira