Hi Asma, What joe has mentioned is the normal way for creation of stubs for your webservice B and then include those stubs to ur web service A and then use them to invoke web service B.
Your web service A will be a web service client to webservice B. That's how it will work. Now if you don't want this approach then try writing a SOAP client for your web service B If you have all the information of web service B, then you write a SOAP Client application and call that web service B by running the soap client. The soap client is a java program that can be called from your webservice A. When I say all the information of web service B it includes 1. service url 2. service name 3. service portname 4. service target namespace 5. service operation 6. operation inputs >From the wsdl of the Webservice B you can create a SOAP Message and then send >this soap message usign the soap client. You can use JAXWS API's for this. Please have a look at the javax.xml.ws package. Hope this helps. Thanks & Regards Dhanush -----Original Message----- From: Asma Maalej [mailto:[email protected]] Sent: Tuesday, August 25, 2009 2:55 PM To: [email protected] Subject: Re: How to call a web service from another one??? Hello thank you for your reply. But I don't need to invoke the Axis2 webservice from the stubs clients, however, I need to call a webservice A from an other webservice B. How could this call be happen? I mean I wonder if there is a way (method call ) across which both of webservice A and B can interact between them? I'm really blocked and I'm looking forward to your help. Caristi, Joe a écrit : > You can use the Axis2 Code Generator Tool to create client stubs from > your WSDL. Here is a link to a tutorial: > http://today.java.net/pub/a/today/2006/06/22/axis-2-generated-client-c > ode.html > > > > -----Original Message----- > From: Asma Maalej [mailto:[email protected]] > Sent: Monday, August 24, 2009 12:13 PM > To: [email protected] > Subject: How to call a web service from another one??? > > Hello > > I am using Axis2.1.4.1 and eclipse ganymede 3.4 and I am trying to > create a web service which is a consumer to another webservice, but I > don't know how could I call another web service from the consumer one. > I knew that with Axis1, this call between web services will be made > across a method from the generated stubs of the webservice which would > be called > > here is the instruction: > > service = (new > package_name.service_nameServiceLocator()).getService_name(); > > have you any idea, how would I make this call in Axis2?? > > thanks > / > / > > -- > Asma MÂALEJ BESBES > Laboratoire LAAS - CNRS > Toulouse - France > Tèl: +33 (0)5 61 33 62 63 > Mobile: +33 (0)6 72 18 36 56 > E-mail: [email protected] > > > STATEMENT OF CONFIDENTIALITY: > > > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain confidential or privileged information. > If you are not the intended recipient, please notify WHI Solutions > immediately at [email protected], and destroy all copies of this message > and any attachments. > > -- Asma MÂALEJ BESBES Laboratoire LAAS - CNRS Toulouse - France Tèl: +33 (0)5 61 33 62 63 Mobile: +33 (0)6 72 18 36 56 E-mail: [email protected]
