Davide,
In addition to what Ulhas mentioned, you could also have it done "automatically" at wsdl2java time. If you run wsdl2java with the "-exsh true" flag, all the headers would be added as additional parameters to the methods. Example: @WebMethod public void addSyndicationService( @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", name = "synServiceType") java.lang.String synServiceType, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "debug_zip") java.lang.String debugZip, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "debug_phone") java.lang.String debugPhone, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "debug_association_type") java.lang.String debugAssociationType, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "display_locale") java.lang.String displayLocale, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "client_id") java.lang.String clientId, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "developer_email") java.lang.String developerEmail, @WebParam(targetNamespace = "http://www.google.com/api/adsense/v2", header = true, name = "developer_password") java.lang.String developerPassword ) throws AdSenseApiException_Exception; That said, there have been some runtime bugs with that. You may need the latest trunk for that to actually work. Dan On Friday 20 July 2007 11:38, Pirola Davide wrote: > 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 -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog