users@jax-rpc.java.net

RE: about JAXRPCServletDelegate and soap address location

From: Kevin Jones <kevinj_at_develop.com>
Date: Thu, 31 Mar 2005 19:48:31 +0100

> Another scenario would be when I've two copies of the same
> webservice on the same host but deployed on diffenrent
> contexts, and I would like to switch between them at any
> moment only by changing the <soap address
> location> tag in one of the wsdl (without having to tell the
> clients to
> get it from another location).

But in both these cases, by the time you get to do this it's too late, you
already have existing clients that know and use the old address. In these
scenarios wouldn't you be better off simply writing a filter that
redirected/forwarded to the appropriate URL?

Kevin Jones
http://public.xdi.org/=kevin.jones
skype (www.skype.com): kevinrjones

> -----Original Message-----
> From: Alessio Cervellin [mailto:alessio.cervellin_at_sun-cs-italy.com]
> Sent: 31 March 2005 19:25
> To: users_at_jax-rpc.dev.java.net
> Subject: Re: about JAXRPCServletDelegate and soap address location
>
> Doug Kohlert wrote:
> > Alessio,
> > No that is not possible using the ?WSDL. I believe you
> could put the
> > WSDL in your root context and then retrieve it without the
> ?WSDL like
> > any other public file and the servlet would not process it.
> I am not
> > sure why you would want to do this.
>
> Not a real need, I was just wondering... let's say I've two
> endpoints/hosts, HOST_A and HOST_B.
> They publish the same service, described by a WSDL:
> one contains
> <soap address location="http://HOST_A/context/servlet_mapping">
> and the other
> <soap address location="http://HOST_B/context/servlet_mapping">
>
> A client knows he can get the WSDL just by typing
> http://HOST_B/context/servlet_mapping?WSDL
> or
> http://HOST_A/context/servlet_mapping?WSDL
>
> Now suppose that, for some reason (e.g. maintenance), I want
> to redirect all the requests sent to the webservice at HOST_A
> to the soap address location of HOST_B.
> The 1st thing I would think about would be to modify the WSDL
> hosted on HOST_A by changing the soap address location
> specified within it to point to HOST_B. This means that if
> the client asks for the WSDL by using the already-known URL:
> http://HOST_A/context/servlet_mapping?WSDL
> It will get instead a WSDL containing the endpoint of HOST_B:
> <soap address location="http://HOST_B/context/servlet_mapping">
>
> But due to the actual implementation of
> JAXRPCServletDelegate/WSDLPublisher it's not possible since
> it always replaces the endpoint url specified in the wsdl
> with the current host/context, am I right?
>
> Another scenario would be when I've two copies of the same
> webservice on the same host but deployed on diffenrent
> contexts, and I would like to switch between them at any
> moment only by changing the <soap address
> location> tag in one of the wsdl (without having to tell the
> clients to
> get it from another location).
>
> Obviously, as you already told, by publishing the wsdl as any other
> public file and giving to the clients the exact url to it
> would resolve
> any problem... but I must admit that the "?WSDL" url pattern
> is for many
> customers a well-known, and "aesthetically" appreciated, "url
> pattern"
> to retrieve WSDL (or model.gz) files, maybe better than
> something like
> http://HOST/context/myfile.wsdl
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>