Unable to test Spring WS Service using WebServiceTemplate
posted 3 years ago
I have a simple Spring WS Web Service that works.
I can use a tool like "POSTMAN" (plug-in to Chrome) and send this service XML requests. I then receive the correct XML Response back in POSTMAN.
All good so far.
When I try to use the Spring WebServiceTemplate, I get a 404 error on the response.
I set my defaultUri to the web service root (as I did with POSTMAN) and generated an XML Request. Note that I tested the XML Request generated in the WebServiceTemplate code and it returns a correct response.).
However, calling the webServiceTemplate.sendSourceAndReceiveToResult(source, result) call below...
Results in this unhelpful Error Stack:
The referenced "myServiceClient" lines in the error stack above is just where it's calling the web service. Not helpful.
I'm baffled. There are many confused postings I've found on the Internet on this exact problem, but no solutions.
I've tried using a different version of the Spring libs, but that didn't work.