Once you generate your services
You can have a uber class that sits on top of the generated ServerStubs
BTW it would be nice to have the MessageContext parameter (but you can
construct the ServerStub with just the EPR)
public class UberClass extends Object
{
public UberClass()
{
package.ServerStub1 stub1 = new
package.ServerStub1(http://localhost:8080/axis2/Stub1);
package.ServerStub2 stub2 = new
package.ServerStub2(http://localhost:8080/axis2/Stub2);
}
}
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: Walker, Jeff
To: [email protected]
Sent: Wednesday, August 15, 2007 12:14 PM
Subject: RE: Is it possible to access external services?
If there is something clever you can do in Axis2, then I don't know it. (Can
somebody else reply?)
The only way I know is the straightforward approach;
in your 1st web service impl method, simply get a stub to the 2nd service and
call into that. Here, the impl method is acting as a dumb client of the 2nd
service. Of course, the performance of chaining web service calls will be at a
minimum, the addition of the time taken for both calls.
I don't know the EPR question, either. If you find out how to do this, can
you post the solution on this mailing list for all to see and learn?
Thanks,
-jeff
------------------------------------------------------------------------------
From: shams jawaid [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 15, 2007 12:04 PM
To: [email protected]
Subject: RE: Is it possible to access external services?
ok say i have two web services, one that generates a random number and one
that performs addition of two numbers. how can i connect those two so that the
random numbers are inputted from the random number web service to the math web
service for addition? i was told there is a way to put a client inside a web
service that calls another web service..but im confused about that too. i was
also told that you can use the web service EPR to call a web service from
another web service? any advice or recommendations would be greatly appreciated!
--------------------------------------------------------------------------
From: "Walker, Jeff" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: RE: Is it possible to access external services?
Date: Wed, 15 Aug 2007 11:57:53 -0400
I'm confused now, not sure what you mean "..use WSDL to connect two web
services" ?
In Axis, you run the WSDL file through the WSDL2Java class. If you get
all of the arcane arguments right, that will produce a set of classes, which
will include the stub you use on the client side, and the skeleton you use on
the service side. (I use Axis1.3, but most people have moved to Axis2).
In .NET it's the same thing, run the WSDL file through the wsdl.exe
program (again, more arcane arguments to the exe, but Microsoft has a decent
explanation of the argments to wsdl.exe on their website soemwhere). This
produces the classes you need in C# (or whatever language you specified), just
like in the Java counterpart example.
If you download the Axis2 binary zip file, there are a dozen or more
examples of using web services to do many things. Can you be more speciifc in
what you're looking for? For a web service to use another web service, it has
to act as a client. Then the 2nd web serivce acts as a client of the 1st
service. The "two web services"
question has me confused.
-jeff
------------------------------------------------------------------------
From: shams jawaid [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 15, 2007 11:42 AM
To: [email protected]
Subject: RE: Is it possible to access external services?
But how do you actually use the WSDL file to connect two web services,
as in, do you know anywhere i can see an example of code?
----------------------------------------------------------------------
From: "Walker, Jeff" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: <[email protected]>
Subject: RE: Is it possible to access external services?
Date: Wed, 15 Aug 2007 10:46:39 -0400
>Glenn,
>All you need is the wsdl file. In that, there will be the url of the
>service.
>Even if a proxy is used, it will be a good start.
>
>Without the wsdl, you need to do some investigating. You have to have
>the address (url) to do anything, but after that, you should try to
get
>a list of the services available. Then try to create a wsdl file
using
>the famous <url>?wsdl address in your browser.
>-jeff
>
>
>
>-----Original Message-----
>From: Glenn Williams [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 15, 2007 10:33 AM
>To: [email protected]
>Subject: Is it possible to access external services?
>
>Hello,
>
>Is it possible to reference and use external services? I cannot find
any
>documentation to help me with this. I would like to use a service
that
>is
>running externally, and potentially on another server.
>
>Thanks.
>
>glenn
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
------------------------------------------------------------------------
The next generation of Hotmail is here - Windows Live Hotmail
--------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
PROTECTED]
----------------------------------------------------------------------------
Get Pimped! FREE emoticons and customisation from Windows Live - Pimp My
Live! --------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
PROTECTED]