Re: Can a Web Service know where itself is deployed??

From: Bobby Bissett <Robert.Bissett_at_Sun.COM>
Date: Sun, 09 May 2004 12:31:24 -0400

> I have a web service developed with jaxrpc. I can deploy it anywhere. Can
> the web service know at run time where it has been deployed? Because I can
> even deploy it, the same service, in two different uris, can it distinguish
> in which uri its operations are invoked??
> If possible, can you tell me how, please?

If you're talking about just deploying it and creating client stubs that
do the right thing, then this is all done for you already. Just deploy
and go.

With the JAX-RPC SI, the address in the wsdl is generated when you query
the service for the wsdl. For instance, your config file for wscompile
might specify a location as http://host/a/b?WSDL. The jaxrpc servlet
will pull the "http://host/a/b" part out of the request and use it to
fix the address lines in the wsdl. As a test, you can bring up a local
server and try both "actual-host-name" and "localhost" in a web browser
and look at the wsdls -- they will use the location you give them.


To unsubscribe, e-mail:
For additional commands, e-mail: