axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norio Sasagawa <n-sasag...@ka2.so-net.ne.jp>
Subject Re: I want to send and receive my own Java class object. Is it possible on Axis?
Date Thu, 04 Jun 2009 13:16:35 GMT
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 <lkamal@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-sasagawa@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
>
>


Mime
View raw message