Announcement Announcement Module
Collapse
No announcement yet.
WebServices Client Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebServices Client

    Hi,

    I'm working on a proxy server for a service that communicates via SOAP 1.1 messages. The service requires SOAP attachments as well as control of the HTTP request headers. I cannot find any good way of controlling the HTTP headers on a SOAP client request; am I missing something in the Spring-WS API?

    Also, I require control over the MIME transfer encoding for the SOAP envelope. I cannot currently see any way to do this with Spring-WS. This is a fair assessment of the Spring-WS client?

    Thanks, Chris

  • #2
    When using SAAJ, you can access the headers through the MimeHeaders abstraction on the SAAJ SOAPMessage. For instance, using the callback mechanism explain in http://static.springframework.org/sp....html#d0e2758:

    Code:
    webServiceTemplate.marshalSendAndReceive(o, new WebServiceMessageCallback() {
    
      public void doInMessage(WebServiceMessage message) {
        SaajSoapMessage message = (SaajSoapMessage)message;
        SOAPMessage saajMessage = message.getSaajMessage();
        saajMessage.getMimeHeaders().addHeader("Foo", "Bar");
      }
    });

    Comment

    Working...
    X