Help for generating axis2 client

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Help for generating axis2 client

Chamila Wijayarathna
Hello all,
I'm new to Apache Axis2. I'm currently following tutorial at http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#createclients for generating a axis2 client. For ADB method it says to create a client.java class which contains the code at Listing 7. But link for Listing 7 is not working. What should I add on client.java?

Thank you.

--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
Reply | Threaded
Open this post in threaded view
|

Re: Help for generating axis2 client

suresh
Code Listing 7- Client.java package org.apache.axis2.axis2userguide; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.DoInOnlyRequest; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.TwoWayOneParameterEchoRequest; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.NoParametersRequest; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.MultipleParametersAddItemRequest; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.TwoWayOneParameterEchoResponse; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.NoParametersResponse; import org.apache.axis2.axis2userguide.Axis2UserGuideServiceStub.MultipleParametersAddItemResponse; public class Client{ public static void main(java.lang.String args[]){ try{ Axis2UserGuideServiceStub stub = new Axis2UserGuideServiceStub ("http://localhost:8080/axis2/services/Axis2UserGuideService"); doInOnly(stub); twoWayOneParameterEcho(stub); noParameters(stub); multipleParameters(stub); } catch(Exception e){ e.printStackTrace(); System.out.println("\n\n\n"); } } /* do in only */ public static void doInOnly(Axis2UserGuideServiceStub stub){ try{ DoInOnlyRequest req = new DoInOnlyRequest(); req.setMessageString("An in only request"); stub.doInOnly(req); System.out.println("done"); } catch(Exception e){ e.printStackTrace(); System.out.println("\n\n\n"); } } /* two way call/receive */ public static void twoWayOneParameterEcho(Axis2UserGuideServiceStub stub){ try{ TwoWayOneParameterEchoRequest req = new TwoWayOneParameterEchoRequest(); req.setEchoString("echo! ... echo!"); TwoWayOneParameterEchoResponse res = stub.twoWayOneParameterEcho(req); System.out.println(res.getEchoString()); } catch(Exception e){ e.printStackTrace(); System.out.println("\n\n\n"); } } /* No parameters */ public static void noParameters(Axis2UserGuideServiceStub stub){ try{ NoParametersRequest req = new NoParametersRequest(); System.out.println(stub.noParameters(req)); } catch(Exception e){ e.printStackTrace(); System.out.println("\n\n\n"); } } /* multiple parameters */ public static void multipleParameters(Axis2UserGuideServiceStub stub){ try{ MultipleParametersAddItemRequest req = new MultipleParametersAddItemRequest(); req.setPrice((float)1.99); req.setItemId((int)23872983); req.setDescription("Must have for cooking"); req.setItemName("flour"); MultipleParametersAddItemResponse res = stub.multipleParametersAddItem(req); System.out.println(res.getSuccessfulAdd()); System.out.println(res.getItemId()); } catch(Exception e){ e.printStackTrace(); System.out.println("\n\n\n"); } } }
Reply | Threaded
Open this post in threaded view
|

Re: Help for generating axis2 client

Isuru Perera
In reply to this post by Chamila Wijayarathna
Hi,

The link works fine.

I'm not sure why it doesn't work for you.

It links to http://axis.apache.org/axis2/java/core/docs/userguide-codelisting7.html

I hope this helps.

Best Regards,



On Sun, Nov 24, 2013 at 10:21 AM, Chamila Wijayarathna <[hidden email]> wrote:
Hello all,
I'm new to Apache Axis2. I'm currently following tutorial at http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#createclients for generating a axis2 client. For ADB method it says to create a client.java class which contains the code at Listing 7. But link for Listing 7 is not working. What should I add on client.java?

Thank you.

--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.



--
Reply | Threaded
Open this post in threaded view
|

RE: Help for generating axis2 client

Martin Gainty
The server is located in Pacific Northwest US which is why chrishantha and myself can reach it

it is possible that you are being directed thru Phillipines routers and as you already know Phillipines Routers are all down

pathping 140.211.11.131 and report back here what you see:

(
if one of the phillipines routers do appear in your pathping listing then clear your arp cache e.g.
arp -d *
)

Martin --
______________________________________________ 
 


From: [hidden email]
Date: Sun, 24 Nov 2013 15:08:29 -0800
Subject: Re: Help for generating axis2 client
To: [hidden email]

Hi,

The link works fine.

I'm not sure why it doesn't work for you.

It links to http://axis.apache.org/axis2/java/core/docs/userguide-codelisting7.html

I hope this helps.

Best Regards,



On Sun, Nov 24, 2013 at 10:21 AM, Chamila Wijayarathna <[hidden email]> wrote:
Hello all,
I'm new to Apache Axis2. I'm currently following tutorial at http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#createclients for generating a axis2 client. For ADB method it says to create a client.java class which contains the code at Listing 7. But link for Listing 7 is not working. What should I add on client.java?

Thank you.

--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.



--
Reply | Threaded
Open this post in threaded view
|

Re: Help for generating axis2 client

Chamila Wijayarathna
It is working now, Thank you


On Mon, Nov 25, 2013 at 5:34 AM, Martin Gainty <[hidden email]> wrote:
The server is located in Pacific Northwest US which is why chrishantha and myself can reach it

it is possible that you are being directed thru Phillipines routers and as you already know Phillipines Routers are all down

pathping 140.211.11.131 and report back here what you see:

(
if one of the phillipines routers do appear in your pathping listing then clear your arp cache e.g.
arp -d *
)

Martin --
______________________________________________ 
 


From: [hidden email]
Date: Sun, 24 Nov 2013 15:08:29 -0800
Subject: Re: Help for generating axis2 client
To: [hidden email]


Hi,

The link works fine.

I'm not sure why it doesn't work for you.

It links to http://axis.apache.org/axis2/java/core/docs/userguide-codelisting7.html

I hope this helps.

Best Regards,



On Sun, Nov 24, 2013 at 10:21 AM, Chamila Wijayarathna <[hidden email]> wrote:
Hello all,
I'm new to Apache Axis2. I'm currently following tutorial at http://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#createclients for generating a axis2 client. For ADB method it says to create a client.java class which contains the code at Listing 7. But link for Listing 7 is not working. What should I add on client.java?

Thank you.

--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.



--



--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.