Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to test Spring WS Service using WebServiceTemplate

Mike London
Ranch Hand
Posts: 1213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

Any suggestions would be most welcome.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic