Hi,

anyone know how to add some value to Soap Header in cxf?

I have generated a client code with "wsdl2java", but I don't know how to
add this values to the soap header of the message.

I tried with this code:

 

  Map<String, Object> soapHeaders = new HashMap<String, Object>();

    List h1 = new ArrayList();

    h1.add("value1");

    soapHeaders.put("parameter1", h1);

    List h2 = new ArrayList();

    h2.add("parameter2");

    soapHeaders.put("value2", h2);

     ...

     ...

    requestContext.put(MessageContext.HTTP_REQUEST_HEADERS,
soapHeaders);

 

but, this seems that they are ignored by the server part of the web
services.

 

Thanks

Davide

Reply via email to