Adding custom HTTP header in Mule HTTP endpoint -


i trying add custom header in mule's http endpoint:

<flow name="flow">     <poll frequency="60000">         <http:outbound-endpoint             address="http://user:pass@example.com"             followredirects="true" method="get" exchange-pattern="request-response">             <properties>                 <spring:entry key="custom-header-name" value="custom-header-value" />             </properties>         </http:outbound-endpoint>     </poll>     <echo-component /> </flow> 

but way of using <spring:entry> element adding custom header not seem work.

i tried replacing

<properties>     <spring:entry key="custom-header-name" value="custom-header-value" /> </properties> 

with

<property key="custom-header-name" value="custom-header-value"/> 

but not work either. not seeing error, response getting 1 without custom header.

am following right way add custom headers? using mule 3.2.0.

if want add custom header name mule .. there 2 ways :-

1) use set property in flow :-

< set-property propertyname="custom header"  doc:name="set custom header" value="here set message"/ > 

2) use soap intercepter have create java class httpheaderinterceptor.java , refer in intercepter using spring bean.. please refer :- http://java.dzone.com/articles/adding-http-headers-soap

either way can follow ... easy way using set property in mule flow before cxf soap component .... result can see in soap ui in header section in response... hope


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -