I have a simple question about deploying web services. Currently I have two endPoints, see below:
Endpoint.publish("http://localhost:8000/eCalcWS/eCalc", new eCalc());
Endpoint.publish("http://localhost:8001/eCalcWS/eCalc_service", new eCalc_service());
Is it possible to have two web services on the same address? How would I do that?
Unfortunately you can not the way you want.
The design is that each endpoint is associated with web service implementor.
From spec:
and on publish (my emphasis):
I remember I also encounter this problem quite a while back which is really bad as I needed to associate 2-3 different implementations with different URLs and it was impossible (got address already bind error).
The way I got around this if I recall was to create my own dispatcher.
I published an endpoint that accepted web service requests for multiple endpoints and dispatched the request to the corresponding implementation. I worked directly on the SOAP message.
But it was possible for me since the xml messages were really simple and quite few.
For you I would recommend to publish in different endpoints if your web service implementations are non-trivial and have complicated messages and expect a lot of clients as the endpoint really just deploys a simple http server under the hood.