Results 1 to 3 of 3

Thread: How to add http headers in the soap Message

  1. #1

    Default 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. #2
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    632

    Default

    Hello

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

    Cheers,
    Artem

  3. #3

    Default

    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

Posting Permissions

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