Announcement Announcement Module
Collapse
No announcement yet.
How to add http headers in the soap Message Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add http headers in the soap Message

    Hi guys,

    I need to add a custom http header element and included it in the soap Message.
    I added soap headers easily using an interceptor in the ws:outbound-gateway but
    up to know I couldn't figure out how add HTTP headers.

    Can you help me?
    Mariateresa

  • #2
    Hello

    Take a look here, please: http://stackoverflow.com/questions/3...ring-ws-client

    Cheers,
    Artem

    Comment


    • #3
      Hello Artem,

      Thank you I figured it out with the following code
      I wrote it in the interceptor handleRequest method:

      TransportContext context = TransportContextHolder.getTransportContext();
      HttpUrlConnection connection = (HttpUrlConnection) context
      .getConnection();
      connection.getConnection().addRequestProperty("hea derParameter",
      "headerValue");

      return true;

      HTH to someone else.
      Mariateresa

      Comment

      Working...
      X