camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damian Harvey <>
Subject Setting SOAP Headers using spring-ws
Date Mon, 24 Oct 2011 03:18:57 GMT
Hi all,

I've another SOAP spring-ws question for you.

Currently I can't see a way to dynamically set SOAP headers using spring-ws. I can set static
headers by creating a MessageFactory but I see no way to pass values into it. Is this currently

It looks like the recommended approach for spring-ws is to override the doWithMessage() method
of the WebServiceMessageCallback (
The Camel SpringWebserviceProducer already does this and I can't see an obvious way to override
it. I see two options:

1. Allow for the WebServiceMessageCallback to be overridden so that the developer can provide
his own doWithMessage() method.
2. Have a Camel header for SPRING_WS_SOAP_HEADER that expects a value of type javax.xml.transform.Source
and is added to the SOAP Header in the doWithMessage() method of the DefaultWebserviceMessageCallback.

Which approach is better?

Happy to create a JIRA and I've already written a patch following approach #2.




This communication (and any attachments) is directed in confidence to the addressee(s) listed
above, and may not otherwise be distributed, copied or used. The contents of this communication
may also be subject to privilege, and all rights to that privilege are expressly claimed and
not waived. If you have received this communication in error, please notify us by reply e-mail
or by telephone and delete this communication (and any attachments) without making a copy.

Before opening or using attachments, you should check them for viruses and defects. We do
not accept liability in connection with computer virus, data corruption, delay, interruption,
unauthorised access or unauthorised amendment.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message