You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by trebor iksrazal <ik...@yahoo.com> on 2005/08/04 14:47:50 UTC

Inheritance issue with WDSL2Java - ok with wscompile

Hi all, 

I just finished project using JWSDP and I'm starting a
new one using Axis :-) . I know axis well from other
projects. 

I have this WSDL, which I would like to use in my new
project: 

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

The purpose of this is that all web services will have
"ReturnWeb_Base" - and some will return more values.
The above returns a few additonal values as shown. 

This is my constructor as it works with wscompile: 

	return new ReturnWeb_Login (
Messages_Codes.get(successErrorCode),
successErrorCode.intValue(), soap_session_id,
web_user_name);

However, with WDSL2Java, the generated constructor
only accepts two strings:

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

The wscompile generated 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;
    }

My ant task is as follows: 

    <axis-wsdl2java
         output="resources"
         verbose="true"
         url="resources/CallCentreWebService.wsdl"
        
namespacemappingfile="resources/CallCentreWeb_Mapping.xml"
         >
         <mapping
          
namespace="http://com/hostedtelecom/callcentreweb"
          
package="com.hostedtelecom.callcentreweb.endpoint" />
       </axis-wsdl2java>

Any ideas? 
iksrazal

"None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe"


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

Re: Inheritance issue with WDSL2Java - ok with wscompile

Posted by trebor iksrazal <ik...@yahoo.com>.
I have created: 

http://issues.apache.org/jira/browse/AXIS-2165

Please advise if I can clarify the problem further. 

Regards,
iksrazal

--- Davanum Srinivas <da...@gmail.com> wrote:

> Please log a bug and upload your wsdl. Are u using
> Axis 1.2.1?
> 
> thanks,
> dims
> 
> On 8/4/05, trebor iksrazal <ik...@yahoo.com>
> wrote:
> > Hi all,
> > 
> > I just finished project using JWSDP and I'm
> starting a
> > new one using Axis :-) . I know axis well from
> other
> > projects.
> > 
> > I have this WSDL, which I would like to use in my
> new
> > project:
> > 
> >  <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>
> > 
> > The purpose of this is that all web services will
> have
> > "ReturnWeb_Base" - and some will return more
> values.
> > The above returns a few additonal values as shown.
> > 
> > This is my constructor as it works with wscompile:
> > 
> >         return new ReturnWeb_Login (
> > Messages_Codes.get(successErrorCode),
> > successErrorCode.intValue(), soap_session_id,
> > web_user_name);
> > 
> > However, with WDSL2Java, the generated constructor
> > only accepts two strings:
> > 
> >  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;
> >     }
> > 
> > The wscompile generated 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;
> >     }
> > 
> > My ant task is as follows:
> > 
> >     <axis-wsdl2java
> >          output="resources"
> >          verbose="true"
> >          url="resources/CallCentreWebService.wsdl"
> > 
> >
>
namespacemappingfile="resources/CallCentreWeb_Mapping.xml"
> >          >
> >          <mapping
> > 
> > namespace="http://com/hostedtelecom/callcentreweb"
> > 
> > package="com.hostedtelecom.callcentreweb.endpoint"
> />
> >        </axis-wsdl2java>
> > 
> > Any ideas?
> > iksrazal
> > 
> > "None are more hopelessly enslaved than those who
> falsely believe they are free. -- Goethe"
> > 
> > 
> > 
> >
> ____________________________________________________
> > Start your day with Yahoo! - make it your home
> page
> > http://www.yahoo.com/r/hs
> > 
> > 
> 
> 
> -- 
> Davanum Srinivas -http://blogs.cocoondev.org/dims/
> 


"None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe"

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Inheritance issue with WDSL2Java - ok with wscompile

Posted by trebor iksrazal <ik...@yahoo.com>.
Yes, I am running Axis 1.2.1 . I will write a simple
test case and submit via JIRA today. 

Regards,
iksrazal

--- Davanum Srinivas <da...@gmail.com> wrote:

> Please log a bug and upload your wsdl. Are u using
> Axis 1.2.1?
> 
> thanks,
> dims
> 
> On 8/4/05, trebor iksrazal <ik...@yahoo.com>
> wrote:
> > Hi all,
> > 
> > I just finished project using JWSDP and I'm
> starting a
> > new one using Axis :-) . I know axis well from
> other
> > projects.
> > 
> > I have this WSDL, which I would like to use in my
> new
> > project:
> > 
> >  <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>
> > 
> > The purpose of this is that all web services will
> have
> > "ReturnWeb_Base" - and some will return more
> values.
> > The above returns a few additonal values as shown.
> > 
> > This is my constructor as it works with wscompile:
> > 
> >         return new ReturnWeb_Login (
> > Messages_Codes.get(successErrorCode),
> > successErrorCode.intValue(), soap_session_id,
> > web_user_name);
> > 
> > However, with WDSL2Java, the generated constructor
> > only accepts two strings:
> > 
> >  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;
> >     }
> > 
> > The wscompile generated 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;
> >     }
> > 
> > My ant task is as follows:
> > 
> >     <axis-wsdl2java
> >          output="resources"
> >          verbose="true"
> >          url="resources/CallCentreWebService.wsdl"
> > 
> >
>
namespacemappingfile="resources/CallCentreWeb_Mapping.xml"
> >          >
> >          <mapping
> > 
> > namespace="http://com/hostedtelecom/callcentreweb"
> > 
> > package="com.hostedtelecom.callcentreweb.endpoint"
> />
> >        </axis-wsdl2java>
> > 
> > Any ideas?
> > iksrazal
> > 
> > "None are more hopelessly enslaved than those who
> falsely believe they are free. -- Goethe"
> > 
> > 
> > 
> >
> ____________________________________________________
> > Start your day with Yahoo! - make it your home
> page
> > http://www.yahoo.com/r/hs
> > 
> > 
> 
> 
> -- 
> Davanum Srinivas -http://blogs.cocoondev.org/dims/
> 


"None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe"


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

Re: Inheritance issue with WDSL2Java - ok with wscompile

Posted by Davanum Srinivas <da...@gmail.com>.
Please log a bug and upload your wsdl. Are u using Axis 1.2.1?

thanks,
dims

On 8/4/05, trebor iksrazal <ik...@yahoo.com> wrote:
> Hi all,
> 
> I just finished project using JWSDP and I'm starting a
> new one using Axis :-) . I know axis well from other
> projects.
> 
> I have this WSDL, which I would like to use in my new
> project:
> 
>  <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>
> 
> The purpose of this is that all web services will have
> "ReturnWeb_Base" - and some will return more values.
> The above returns a few additonal values as shown.
> 
> This is my constructor as it works with wscompile:
> 
>         return new ReturnWeb_Login (
> Messages_Codes.get(successErrorCode),
> successErrorCode.intValue(), soap_session_id,
> web_user_name);
> 
> However, with WDSL2Java, the generated constructor
> only accepts two strings:
> 
>  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;
>     }
> 
> The wscompile generated 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;
>     }
> 
> My ant task is as follows:
> 
>     <axis-wsdl2java
>          output="resources"
>          verbose="true"
>          url="resources/CallCentreWebService.wsdl"
> 
> namespacemappingfile="resources/CallCentreWeb_Mapping.xml"
>          >
>          <mapping
> 
> namespace="http://com/hostedtelecom/callcentreweb"
> 
> package="com.hostedtelecom.callcentreweb.endpoint" />
>        </axis-wsdl2java>
> 
> Any ideas?
> iksrazal
> 
> "None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe"
> 
> 
> 
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
> 
> 


-- 
Davanum Srinivas -http://blogs.cocoondev.org/dims/