Announcement Announcement Module
Collapse
No announcement yet.
Using WebserviceTemplate with pre-generated SOAP-Envelope Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using WebserviceTemplate with pre-generated SOAP-Envelope

    Hi!

    I'd like to call a webservide using WebserviceTemplate with a message that already contains a SOAP-Envelope. My problem is that the WebserviceTemplate wraps another SOAP-Envelope around it. 8-) How can I avoid this? Or do I have to use a plain commons HTTP-client or something?

    (The reason I'm doing this is because the existing soap-envelope already contains WS-Security information, which I want to leave untouched.)

    Thanks and best regards,

    Hans-Peter Störr

  • #2
    I'd like to call a webservide using WebserviceTemplate with a message that already contains a SOAP-Envelope. My problem is that the WebserviceTemplate wraps another SOAP-Envelope around it. 8-) How can I avoid this?
    If you use a Soap message factory, it's just natural that Spring-Ws wraps the message with a Soap envelope How about using a Pox message factory? I know, it looks more like a hack but it can do the trick.
    do I have to use a plain commons HTTP-client or something?
    If your needs are simple you can do that or even use the jdk's UrlConnection class but you'll be missing the benefits of the WebServiceTemplate (abstraction, interceptors, logging, marshalling, ...).
    The reason I'm doing this is because the existing soap-envelope already contains WS-Security information, which I want to leave untouched
    You can always insert the header you want using an interceptor or simpler, a callback with the WebServiceTemplate.

    Comment

    Working...
    X