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 Norio Sasagawa <n-...@ka2.so-net.ne.jp> on 2009/06/01 22:57:12 UTC

I want to send and receive my own Java class object. Is it possible on Axis?

Dear All,

I'm using Tomcat 6.0 and Axis 1.4.
Is it possible to send and receive my own Java class object?
I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl", but it failed.
What's wrong?

My own Java class is below.

public class myReturnInfo {
  String result;
  String[] resultDetail;
}

My client code is below.

myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring, localeString });

Any help would be appreciated.
Thanks in advance.

Norio Sasagawa


Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Norio Sasagawa <n-...@ka2.so-net.ne.jp>.
Dear Chinmoy-san,

Thank you for quick reply.

I've got a compiling errors.
Reproduce process is as follows.
(1)make ReturnInfo.jws.
(2)put it on %TOMCAT_HOME%\webapps\axis\.
(3)access to http://localhost:8080/axis/ReturnInfo.jws?wsdl
(4)verify ReturnInfo.class is made on %TOMCAT_HOME%\webapps\axis\WEB-INF\jwsClasses.
(5)make Test.jws.
(6)put it on %TOMECAT_HOME%\webapps\axix\.
(7)access to http://localhost:8080/axis/Test.jws?wsdl
(8)compiling errors occurs.

Any help will be appreciate.
Thanks in advance.

Norio Sasagawa

Errors is as follows.
-----<<<Errors>>>-----
AXISエラー / [en]-(AXIS error)
申し訳ありません, 何らかの誤りがあるようです... 詳細はこちら: / [en]-(Sorry, something seems to have gone wrong... here 
are the details:)

Fault - コンパイル中のエラー:  D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses
\Test.java / [en]-(Error while compiling:  D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF
\jwsClasses\Test.java)
AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.compileError
 faultSubcode: 
 faultString: コンパイル中のエラー:  D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF
\jwsClasses\Test.java / [en]-(Error while compiling:  D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis
\WEB-INF\jwsClasses\Test.java)
 faultActor: 
 faultNode: 
 faultDetail: 
	{}Errors:Error compiling D:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses
\Test.java:
Line 5, column -1:  シンボルを見つけられません。
Line 6, column -1:  シンボルを見つけられません。
Line 7, column -1:  シンボルを見つけられません。
Line 8, column -1:  シンボルを見つけられません。
Line 0, column 0: 
エラー 4 個

ReturnInfo.jws is as follows.
-----<<<ReturnInfo.jws>>>-----
public class ReturnInfo {
    String result;
    String[] returnDetail;
}

Test.jws is as follows.
-----<<<Test.jws>>>-----
public class Test {

    public ReturnInfo Test(ReturnInfo returnInfo){
        ReturnInfo retReturnInfo = new ReturnInfo();
        retReturnInfo.result = new String("success");
        retReturnInfo.returnDetail = new String[2];
        retReturnInfo.returnDetail[0] = new String("detail-1");
        retReturnInfo.returnDetail[1] = new String("detail-2");
        return retReturnInfo;
    }
}


----- Original Message -----
Date: Tue, 2 Jun 2009 12:20:26 +0530
From: Chinmoy Chakraborty <cc...@gmail.com>
To: axis-dev@ws.apache.org
Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class object. Is it  possible on Axis?

I tried with tomcat 5.0 and it worked. what error you getting when you try
to get wsdl? could you please post the error log?

Chinmoy

On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear All,
>
> I'm using Tomcat 6.0 and Axis 1.4.
> Is it possible to send and receive my own Java class object?
> I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl",
> but it failed.
> What's wrong?
>
> My own Java class is below.
>
> public class myReturnInfo {
>  String result;
>  String[] resultDetail;
> }
>
> My client code is below.
>
> myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> localeString });
>
> Any help would be appreciated.
> Thanks in advance.
>
> Norio Sasagawa
>
>


Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Chinmoy Chakraborty <cc...@gmail.com>.
I tried with tomcat 5.0 and it worked. what error you getting when you try
to get wsdl? could you please post the error log?

Chinmoy

On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear All,
>
> I'm using Tomcat 6.0 and Axis 1.4.
> Is it possible to send and receive my own Java class object?
> I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl",
> but it failed.
> What's wrong?
>
> My own Java class is below.
>
> public class myReturnInfo {
>  String result;
>  String[] resultDetail;
> }
>
> My client code is below.
>
> myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> localeString });
>
> Any help would be appreciated.
> Thanks in advance.
>
> Norio Sasagawa
>
>

Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Norio Sasagawa <n-...@ka2.so-net.ne.jp>.
Dear Kamal-san,

Thanks a lot.
I'll study again how to use Axis according your web site.
Regards.

Norio Sasagawa.

----- Original Message -----
Date: Thu, 4 Jun 2009 19:14:37 +0530
Subject: Re: I want to send and receive my own Java class object. Is it 
	possible on Axis?
From: Kamal Chandana Mettananda <lk...@gmail.com>
To: Norio Sasagawa <n-...@ka2.so-net.ne.jp>
Cc: axis-user@ws.apache.org, axis-dev@ws.apache.org

Hi Norio,

There's a complete tutorial on Web service & the client side with a complete
example. You can go through that and get a better understanding of the
implementation process.

http://lkamal.blogspot.com/2008/07/web-service-axis-tutorial-client-server.html

Hope that will help you. That sample does not send/receive our own class
instances, however that will give you a better understanding of the whole
process and you will be able to write a web service to send/receive your own
class instances easily.

Cheers,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Thu, Jun 4, 2009 at 6:46 PM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear Kamal-san,
>
> Thanks for reply.
> I want to know how to create the WSDL file.
> If you have any sample code, please send it to me.
> -----<<<<<ReplyInfo.java Start>>>>>-----
> public class ReturnInfo {
>    String result;
>    String[] returnDetail;
> }
> -----<<<<<ReplyInfo.java End>>>>>-----
> -----<<<<<Test.java Start>>>>>-----
> public class Test {
>
>    public ReturnInfo Test(ReturnInfo returnInfo){
>        ReturnInfo retReturnInfo = new ReturnInfo();
>        retReturnInfo.result = new String("success");
>        retReturnInfo.returnDetail = new String[2];
>        retReturnInfo.returnDetail[0] = new String("detail-1");
>        retReturnInfo.returnDetail[1] = new String("detail-2");
>        return retReturnInfo;
>    }
> }
> -----<<<<<Test.java End>>>>>-----
>
> Thanks in advance.
>
> Norio Sasagawa.
>
> ----- Original Message -----
> Date: Thu, 4 Jun 2009 11:31:46 +0530
> From: Kamal Chandana Mettananda <lk...@gmail.com>
> To: axis-user@ws.apache.org
> Cc: axis-dev@ws.apache.org, n-sasagawa@ka2.so-net.ne.jp
> Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class
> object. Is it  possible on Axis?
>
> Hi,
>
> Yes, you can send and receive your own class instances. However you need to
> generate the stubs for those classes.
>
> For example; for your myReturnInfo class, the client side also needs to
> have
> the stub.
>
> However while trying this with JWS way, I also received an error message
> saying NoClassDef found.
>
> So I would suggest you to create the WSDL and stubs using WSDL2Java and
> Java2WSDL tools and deploy using the generated deploy.wsdd file.
>
> HTH,
> Kamal
>
> ---------------------------------------
> Kamal Mettananda
> http://lkamal.blogspot.com
>
>
>
>
> On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
> <n-...@ka2.so-net.ne.jp>wrote:
>
> > Dear All,
> >
> > I'm using Tomcat 6.0 and Axis 1.4.
> > Is it possible to send and receive my own Java class object?
> > I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl
> ",
> > but it failed.
> > What's wrong?
> >
> > My own Java class is below.
> >
> > public class myReturnInfo {
> >  String result;
> >  String[] resultDetail;
> > }
> >
> > My client code is below.
> >
> > myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> > localeString });
> >
> > Any help would be appreciated.
> > Thanks in advance.
> >
> > Norio Sasagawa
> >
> >
>
>


Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Norio Sasagawa <n-...@ka2.so-net.ne.jp>.
Dear Kamal-san,

Thanks a lot.
I'll study again how to use Axis according your web site.
Regards.

Norio Sasagawa.

----- Original Message -----
Date: Thu, 4 Jun 2009 19:14:37 +0530
Subject: Re: I want to send and receive my own Java class object. Is it 
	possible on Axis?
From: Kamal Chandana Mettananda <lk...@gmail.com>
To: Norio Sasagawa <n-...@ka2.so-net.ne.jp>
Cc: axis-user@ws.apache.org, axis-dev@ws.apache.org

Hi Norio,

There's a complete tutorial on Web service & the client side with a complete
example. You can go through that and get a better understanding of the
implementation process.

http://lkamal.blogspot.com/2008/07/web-service-axis-tutorial-client-server.html

Hope that will help you. That sample does not send/receive our own class
instances, however that will give you a better understanding of the whole
process and you will be able to write a web service to send/receive your own
class instances easily.

Cheers,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Thu, Jun 4, 2009 at 6:46 PM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear Kamal-san,
>
> Thanks for reply.
> I want to know how to create the WSDL file.
> If you have any sample code, please send it to me.
> -----<<<<<ReplyInfo.java Start>>>>>-----
> public class ReturnInfo {
>    String result;
>    String[] returnDetail;
> }
> -----<<<<<ReplyInfo.java End>>>>>-----
> -----<<<<<Test.java Start>>>>>-----
> public class Test {
>
>    public ReturnInfo Test(ReturnInfo returnInfo){
>        ReturnInfo retReturnInfo = new ReturnInfo();
>        retReturnInfo.result = new String("success");
>        retReturnInfo.returnDetail = new String[2];
>        retReturnInfo.returnDetail[0] = new String("detail-1");
>        retReturnInfo.returnDetail[1] = new String("detail-2");
>        return retReturnInfo;
>    }
> }
> -----<<<<<Test.java End>>>>>-----
>
> Thanks in advance.
>
> Norio Sasagawa.
>
> ----- Original Message -----
> Date: Thu, 4 Jun 2009 11:31:46 +0530
> From: Kamal Chandana Mettananda <lk...@gmail.com>
> To: axis-user@ws.apache.org
> Cc: axis-dev@ws.apache.org, n-sasagawa@ka2.so-net.ne.jp
> Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class
> object. Is it  possible on Axis?
>
> Hi,
>
> Yes, you can send and receive your own class instances. However you need to
> generate the stubs for those classes.
>
> For example; for your myReturnInfo class, the client side also needs to
> have
> the stub.
>
> However while trying this with JWS way, I also received an error message
> saying NoClassDef found.
>
> So I would suggest you to create the WSDL and stubs using WSDL2Java and
> Java2WSDL tools and deploy using the generated deploy.wsdd file.
>
> HTH,
> Kamal
>
> ---------------------------------------
> Kamal Mettananda
> http://lkamal.blogspot.com
>
>
>
>
> On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
> <n-...@ka2.so-net.ne.jp>wrote:
>
> > Dear All,
> >
> > I'm using Tomcat 6.0 and Axis 1.4.
> > Is it possible to send and receive my own Java class object?
> > I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl
> ",
> > but it failed.
> > What's wrong?
> >
> > My own Java class is below.
> >
> > public class myReturnInfo {
> >  String result;
> >  String[] resultDetail;
> > }
> >
> > My client code is below.
> >
> > myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> > localeString });
> >
> > Any help would be appreciated.
> > Thanks in advance.
> >
> > Norio Sasagawa
> >
> >
>
>


Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Kamal Chandana Mettananda <lk...@gmail.com>.
Hi Norio,

There's a complete tutorial on Web service & the client side with a complete
example. You can go through that and get a better understanding of the
implementation process.

http://lkamal.blogspot.com/2008/07/web-service-axis-tutorial-client-server.html

Hope that will help you. That sample does not send/receive our own class
instances, however that will give you a better understanding of the whole
process and you will be able to write a web service to send/receive your own
class instances easily.

Cheers,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Thu, Jun 4, 2009 at 6:46 PM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear Kamal-san,
>
> Thanks for reply.
> I want to know how to create the WSDL file.
> If you have any sample code, please send it to me.
> -----<<<<<ReplyInfo.java Start>>>>>-----
> public class ReturnInfo {
>    String result;
>    String[] returnDetail;
> }
> -----<<<<<ReplyInfo.java End>>>>>-----
> -----<<<<<Test.java Start>>>>>-----
> public class Test {
>
>    public ReturnInfo Test(ReturnInfo returnInfo){
>        ReturnInfo retReturnInfo = new ReturnInfo();
>        retReturnInfo.result = new String("success");
>        retReturnInfo.returnDetail = new String[2];
>        retReturnInfo.returnDetail[0] = new String("detail-1");
>        retReturnInfo.returnDetail[1] = new String("detail-2");
>        return retReturnInfo;
>    }
> }
> -----<<<<<Test.java End>>>>>-----
>
> Thanks in advance.
>
> Norio Sasagawa.
>
> ----- Original Message -----
> Date: Thu, 4 Jun 2009 11:31:46 +0530
> From: Kamal Chandana Mettananda <lk...@gmail.com>
> To: axis-user@ws.apache.org
> Cc: axis-dev@ws.apache.org, n-sasagawa@ka2.so-net.ne.jp
> Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class
> object. Is it  possible on Axis?
>
> Hi,
>
> Yes, you can send and receive your own class instances. However you need to
> generate the stubs for those classes.
>
> For example; for your myReturnInfo class, the client side also needs to
> have
> the stub.
>
> However while trying this with JWS way, I also received an error message
> saying NoClassDef found.
>
> So I would suggest you to create the WSDL and stubs using WSDL2Java and
> Java2WSDL tools and deploy using the generated deploy.wsdd file.
>
> HTH,
> Kamal
>
> ---------------------------------------
> Kamal Mettananda
> http://lkamal.blogspot.com
>
>
>
>
> On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
> <n-...@ka2.so-net.ne.jp>wrote:
>
> > Dear All,
> >
> > I'm using Tomcat 6.0 and Axis 1.4.
> > Is it possible to send and receive my own Java class object?
> > I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl
> ",
> > but it failed.
> > What's wrong?
> >
> > My own Java class is below.
> >
> > public class myReturnInfo {
> >  String result;
> >  String[] resultDetail;
> > }
> >
> > My client code is below.
> >
> > myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> > localeString });
> >
> > Any help would be appreciated.
> > Thanks in advance.
> >
> > Norio Sasagawa
> >
> >
>
>

Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Kamal Chandana Mettananda <lk...@gmail.com>.
Hi Norio,

There's a complete tutorial on Web service & the client side with a complete
example. You can go through that and get a better understanding of the
implementation process.

http://lkamal.blogspot.com/2008/07/web-service-axis-tutorial-client-server.html

Hope that will help you. That sample does not send/receive our own class
instances, however that will give you a better understanding of the whole
process and you will be able to write a web service to send/receive your own
class instances easily.

Cheers,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Thu, Jun 4, 2009 at 6:46 PM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear Kamal-san,
>
> Thanks for reply.
> I want to know how to create the WSDL file.
> If you have any sample code, please send it to me.
> -----<<<<<ReplyInfo.java Start>>>>>-----
> public class ReturnInfo {
>    String result;
>    String[] returnDetail;
> }
> -----<<<<<ReplyInfo.java End>>>>>-----
> -----<<<<<Test.java Start>>>>>-----
> public class Test {
>
>    public ReturnInfo Test(ReturnInfo returnInfo){
>        ReturnInfo retReturnInfo = new ReturnInfo();
>        retReturnInfo.result = new String("success");
>        retReturnInfo.returnDetail = new String[2];
>        retReturnInfo.returnDetail[0] = new String("detail-1");
>        retReturnInfo.returnDetail[1] = new String("detail-2");
>        return retReturnInfo;
>    }
> }
> -----<<<<<Test.java End>>>>>-----
>
> Thanks in advance.
>
> Norio Sasagawa.
>
> ----- Original Message -----
> Date: Thu, 4 Jun 2009 11:31:46 +0530
> From: Kamal Chandana Mettananda <lk...@gmail.com>
> To: axis-user@ws.apache.org
> Cc: axis-dev@ws.apache.org, n-sasagawa@ka2.so-net.ne.jp
> Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class
> object. Is it  possible on Axis?
>
> Hi,
>
> Yes, you can send and receive your own class instances. However you need to
> generate the stubs for those classes.
>
> For example; for your myReturnInfo class, the client side also needs to
> have
> the stub.
>
> However while trying this with JWS way, I also received an error message
> saying NoClassDef found.
>
> So I would suggest you to create the WSDL and stubs using WSDL2Java and
> Java2WSDL tools and deploy using the generated deploy.wsdd file.
>
> HTH,
> Kamal
>
> ---------------------------------------
> Kamal Mettananda
> http://lkamal.blogspot.com
>
>
>
>
> On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
> <n-...@ka2.so-net.ne.jp>wrote:
>
> > Dear All,
> >
> > I'm using Tomcat 6.0 and Axis 1.4.
> > Is it possible to send and receive my own Java class object?
> > I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl
> ",
> > but it failed.
> > What's wrong?
> >
> > My own Java class is below.
> >
> > public class myReturnInfo {
> >  String result;
> >  String[] resultDetail;
> > }
> >
> > My client code is below.
> >
> > myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> > localeString });
> >
> > Any help would be appreciated.
> > Thanks in advance.
> >
> > Norio Sasagawa
> >
> >
>
>

Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Norio Sasagawa <n-...@ka2.so-net.ne.jp>.
Dear Kamal-san,

Thanks for reply.
I want to know how to create the WSDL file.
If you have any sample code, please send it to me.
-----<<<<<ReplyInfo.java Start>>>>>-----
public class ReturnInfo {
    String result;
    String[] returnDetail;
}
-----<<<<<ReplyInfo.java End>>>>>-----
-----<<<<<Test.java Start>>>>>-----
public class Test {

    public ReturnInfo Test(ReturnInfo returnInfo){
        ReturnInfo retReturnInfo = new ReturnInfo();
        retReturnInfo.result = new String("success");
        retReturnInfo.returnDetail = new String[2];
        retReturnInfo.returnDetail[0] = new String("detail-1");
        retReturnInfo.returnDetail[1] = new String("detail-2");
        return retReturnInfo;
    }
}
-----<<<<<Test.java End>>>>>-----

Thanks in advance.

Norio Sasagawa.

----- Original Message -----
Date: Thu, 4 Jun 2009 11:31:46 +0530
From: Kamal Chandana Mettananda <lk...@gmail.com>
To: axis-user@ws.apache.org
Cc: axis-dev@ws.apache.org, n-sasagawa@ka2.so-net.ne.jp
Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class object. Is it  possible on Axis?

Hi,

Yes, you can send and receive your own class instances. However you need to
generate the stubs for those classes.

For example; for your myReturnInfo class, the client side also needs to have
the stub.

However while trying this with JWS way, I also received an error message
saying NoClassDef found.

So I would suggest you to create the WSDL and stubs using WSDL2Java and
Java2WSDL tools and deploy using the generated deploy.wsdd file.

HTH,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear All,
>
> I'm using Tomcat 6.0 and Axis 1.4.
> Is it possible to send and receive my own Java class object?
> I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl",
> but it failed.
> What's wrong?
>
> My own Java class is below.
>
> public class myReturnInfo {
>  String result;
>  String[] resultDetail;
> }
>
> My client code is below.
>
> myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> localeString });
>
> Any help would be appreciated.
> Thanks in advance.
>
> Norio Sasagawa
>
>


Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Norio Sasagawa <n-...@ka2.so-net.ne.jp>.
Dear Kamal-san,

Thanks for reply.
I want to know how to create the WSDL file.
If you have any sample code, please send it to me.
-----<<<<<ReplyInfo.java Start>>>>>-----
public class ReturnInfo {
    String result;
    String[] returnDetail;
}
-----<<<<<ReplyInfo.java End>>>>>-----
-----<<<<<Test.java Start>>>>>-----
public class Test {

    public ReturnInfo Test(ReturnInfo returnInfo){
        ReturnInfo retReturnInfo = new ReturnInfo();
        retReturnInfo.result = new String("success");
        retReturnInfo.returnDetail = new String[2];
        retReturnInfo.returnDetail[0] = new String("detail-1");
        retReturnInfo.returnDetail[1] = new String("detail-2");
        return retReturnInfo;
    }
}
-----<<<<<Test.java End>>>>>-----

Thanks in advance.

Norio Sasagawa.

----- Original Message -----
Date: Thu, 4 Jun 2009 11:31:46 +0530
From: Kamal Chandana Mettananda <lk...@gmail.com>
To: axis-user@ws.apache.org
Cc: axis-dev@ws.apache.org, n-sasagawa@ka2.so-net.ne.jp
Subject: [Norton AntiSpam] Re: I want to send and receive my own Java class object. Is it  possible on Axis?

Hi,

Yes, you can send and receive your own class instances. However you need to
generate the stubs for those classes.

For example; for your myReturnInfo class, the client side also needs to have
the stub.

However while trying this with JWS way, I also received an error message
saying NoClassDef found.

So I would suggest you to create the WSDL and stubs using WSDL2Java and
Java2WSDL tools and deploy using the generated deploy.wsdd file.

HTH,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear All,
>
> I'm using Tomcat 6.0 and Axis 1.4.
> Is it possible to send and receive my own Java class object?
> I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl",
> but it failed.
> What's wrong?
>
> My own Java class is below.
>
> public class myReturnInfo {
>  String result;
>  String[] resultDetail;
> }
>
> My client code is below.
>
> myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> localeString });
>
> Any help would be appreciated.
> Thanks in advance.
>
> Norio Sasagawa
>
>


Re: I want to send and receive my own Java class object. Is it possible on Axis?

Posted by Kamal Chandana Mettananda <lk...@gmail.com>.
Hi,

Yes, you can send and receive your own class instances. However you need to
generate the stubs for those classes.

For example; for your myReturnInfo class, the client side also needs to have
the stub.

However while trying this with JWS way, I also received an error message
saying NoClassDef found.

So I would suggest you to create the WSDL and stubs using WSDL2Java and
Java2WSDL tools and deploy using the generated deploy.wsdd file.

HTH,
Kamal

---------------------------------------
Kamal Mettananda
http://lkamal.blogspot.com




On Tue, Jun 2, 2009 at 2:27 AM, Norio Sasagawa
<n-...@ka2.so-net.ne.jp>wrote:

> Dear All,
>
> I'm using Tomcat 6.0 and Axis 1.4.
> Is it possible to send and receive my own Java class object?
> I tried to make a wsdl file by "http://localhost:8080/axis/Test.jws?wsdl",
> but it failed.
> What's wrong?
>
> My own Java class is below.
>
> public class myReturnInfo {
>  String result;
>  String[] resultDetail;
> }
>
> My client code is below.
>
> myReturnInfo ret = (myReturnInfo) call.invoke( new Object [] { sTring,
> localeString });
>
> Any help would be appreciated.
> Thanks in advance.
>
> Norio Sasagawa
>
>