This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to test Spring WS Service using WebServiceTemplate  RSS feed

Ranch Hand
Posts: 1523
  • 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.


It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!