Originally posted to servicemix-dev, reposting here...
I've deployed a cxfbc/cxfse to handle incoming web service requests. I'd
like to configure a CXF Interceptor to access the SOAP Header of the
incoming request.
When configured as an inInterceptor on cxfse:endpoint and run inside
servicemix, the header obtained from getHeaders() is null.
I've included source for interceptor along with cxf-se xbean.xml.
I have not specified anything inside WSDL to indicate a SOAP Header is
required/optional. Is it required that i specify SOAP Header in WSDL?
Thanks,
-Lowry
// here is interceptor source
public class SoapHeaderAuthorizationHandler extends
AbstractPhaseInterceptor<SoapMessage>{
public SoapHeaderAuthorizationHandler(){
super(Phase.PRE_PROTOCOL);
}
public void handleMessage(SoapMessage message) throws Fault {
List<Header> headers = message.getHeaders();
for(Header header : headers){
System.err.println("header : "+header.getName());
}
}
}
// Here is bean.xml from cxf-se
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
<cxfse:endpoint useJBIWrapper="false">
<cxfse:pojo>
<bean
class="org.apache.servicemix.samples.wsdl_first.PersonImpl" />
</cxfse:pojo>
<cxfse:inInterceptors>
<bean
class="org.apache.servicemix.samples.wsdl_first.interceptors.SoapHeaderAuthorizationHandler"
/>
</cxfse:inInterceptors>
</cxfse:endpoint>
</beans>
--
View this message in context:
http://www.nabble.com/trying-to-access-SOAP-Header-in-interceptor-of-cxfse-tp25982977p25982977.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.