SOAP headers being removed from proxied message

mitchell.shutterfly.com's picture
I'm trying to use the WSO2 ESB to proxy between two Apache Tuscany instances.  The instances are each running the Tuscany Tours sample app spread over two servers.  Tuscany sticks a bunch of stuff in the SOAP header to support doing async callbacks.  When I pass the message thru WSO2, all the stuff in the header completely removed. Here's an example of what is being sent to the ESB (slightly edited, because Axis chokes on the lack of a wsa:Action tag): <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Address>http://mitch-linux.corp.shutterfly.com:8084/Hotel/SearchCallback</wsa:Address><wsa:ReferenceParameters><tuscany:CallbackID xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">HotelSearchCallbackID-f8def3a6-9814-4a83-9aad-68aaa4bae3f6</tuscany:CallbackID><tuscany:ConversationID xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">1108b941-f4f9-4122-b1cc-0b808fd2bf6a</tuscany:ConversationID></wsa:ReferenceParameters></wsa:From> <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">searchAsync</wsa:Action> </soapenv:Header><soapenv:Body><_ns_:searchAsynch xmlns:_ns_="http://common.tuscanyscatours.com/"><arg0 xmlns:ns2="http://common.tuscanyscatours.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="tripLeg"><fromDate>06/12/09</fromDate><fromLocation>LGW</fromLocation><id>f8def3a6-9814-4a83-9aad-68aaa4bae3f6</id><noOfPeople>2</noOfPeople><toDate>13/12/09</toDate><toLocation>FLR</toLocation></arg0></_ns_:searchAsynch></soapenv:Body></soapenv:Envelope> And this is what gets passed on.  Note that the Header tag has been cleaned out of all the good stuff Tuscany added for itself: <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><_ns_:searchAsynch xmlns:_ns_="http://common.tuscanyscatours.com/"><arg0 xmlns:ns2="http://common.tuscanyscatours.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="tripLeg"><fromDate>06/12/09</fromDate><fromLocation>LGW</fromLocation><id>f8def3a6-9814-4a83-9aad-68aaa4bae3f6</id><noOfPeople>2</noOfPeople><toDate>13/12/09</toDate><toLocation>FLR</toLocation></arg0></_ns_:searchAsynch></soapenv:Body></soapenv:Envelope> The only thing I'm doing before passing the message on is to log it.  I've tried messing with various settings on the proxy config, but nothing changes.  Here it is from the synapse config file:    <syn:proxy name="HotelSearch" transports="http" startOnLoad="true" trace="enable">         <syn:target>             <syn:endpoint>                 <syn:address uri="http://mitch-linux.corp.shutterfly.com:8086/Hotel/Search"/>             </syn:endpoint>             <syn:inSequence>                 <syn:log level="full"/>             </syn:inSequence>             <syn:outSequence>                 <syn:log level="full"/>                 <syn:send/>             </syn:outSequence>         </syn:target>         <syn:publishWSDL uri="http://mitch-linux.corp.shutterfly.com:8086/Hotel/Search?wsdl"/>     </syn:proxy> So, does anyone know what would cause the ESB (or maybe its Axis) to rip out all the header info?  It seems to me that unless explicitly told, it should leave everything alone.  
indika's picture

Hi ESB by default , removes

Hi ESB by default , removes all addressing headers  ... You can set following property in the in sequence to avoid this.    <property name="PRESERVE_WS_ADDRESSING" value="true"/>   Please use latest ESB release.    Thanks  Indika 
kreveksa's picture

Does this work on out sequences for responses?

Indika, I have a scenario where I need to add addressing headers on the out sequence for responses. I'm using ESB 1.7.1 with Synapse 1.2. I've modified synapse-core files per Ruwan's commit on May 11, 2010 (https://issues.apache.org/jira/browse/SYNAPSE-525?page=com.atlassian.jira.plugin.ext.subversion%3Asubversion-commits-tabpanel) in SynapseConstants and the Axis2FlexibleMEPClient I've tried adding the headers via the header mediator, as well as a class mediator but it still is getting removed. I have a log full in my out sequence just before calling send that shows the modifications I've made appear in the header. But when the client receives the message, all the addressing headers are removed. -Krozy
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)