0

I am migrating a Spring2 SOAP service to Spring 5. in the old code, if I called https://server:port/myservice/services/myserviceendpoint from a browser, it would display a page stating "And now... Some Services"

The spring-ws doesn't do that. unfortunately one of the client apps uses that page to determine if the service is up.

How do I mimic that behavior?

ed4becky
  • 1,488
  • 1
  • 17
  • 54
  • Is there any way you could describe your problem in more detail? E.g. what does the server print/output when a client tries to connect to the endpoint? – radholm Feb 23 '21 at 01:33

1 Answers1

0

It's a matter of handling HTTP requests the same way Axis does. Normally, you have to deal with three combinations:

GET /myserviceendpoint
GET /myserviceendpoint?wsdl
POST /myserviceendpoint

Your SOAP service works with POST, so you have that covered by the service itself. All you have to do is create an URL mapping for GET and return the response expected by your client. If it's a plain GET, you return HTML with the "And now... Some Services". If the GET has the ?wsdl parameter, you should return a WSDL for the service. Obviously, you will need to replicate whatever else content the client is expecting.

With that being said, is there a way for the client to stop doing that? They are using something dependent on the implementation. That Axis page is there just to test everything is set up properly. Normally, it shouldn't have been exposed to clients, let alone the clients using it to make sure the service is up.

If they want to make sure the service is up, then, while you are migrating this service to Spring 5, what you can do is add another operation in the service, something called <ping> that responds with a <pong> or something. Basically, to offer an operation on the service that can be called with no side effects to see if the service is up. Since this is a new operation, it's a non breaking change (for both the service and the WSDL) so it's safe to add. Then clients can have something to use instead of relying on other mechanisms offered by your code implementation .

Bogdan
  • 23,890
  • 3
  • 69
  • 61