Depends on what you mean by "attach".   There really are two options:

1) As a custom http header.   For that, your interceptor would call 
message.get(Message.PROTOCOL_HEADERS) to get the Map<String, List<String>> for 
the headers that would be sent and just add whatever you want.   Server side 
would do the same, get the map, read the value.

2) As a custom SOAP header.    See the FAQ:
http://cxf.apache.org/faq.html
The Header.HEADER_LIST method also works in an interceptor.   Call 
message.get(Header.HEADER_LIST) to get/set the list of headers. 

Dan



On Fri September 18 2009 9:34:38 am Malte Finsterwalder wrote:
> Hi,
> 
> I'm rather new to cxf. I'm using cxf 2.2.3 in a Spring container
> running inside Tomcat 6.
> 
> My server is running behind a firewall, though.
> I would like to create a Web Service Gateway, that forwards my
> WS-calls to the appropriate server. So I got the idea, to set a
> request parameter (or alike) before actually sending the http-request.
> The Gateway can then read the target address from this request
> parameter and forward the request accordingly.
> 
> Is is possible to create an interceptor, to attach such a parameter?
> In which phase would this interceptor have to work?
> Or is there a better way to attach information to the request, without
> actually altering the WS-definition (wsdl/xsd)?
> 
> Greetings,
>   Malte
> 

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to