Results 1 to 2 of 2

Thread: WebServices Client

Hybrid View

  1. #1
    Join Date
    Feb 2008
    Posts
    1

    Default 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. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    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");
      }
    });
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •