What App server or servlet engine are you using?   I've seen this type of 
thing with various servlet engines.   Some of them mangle the case of the 
headers pretty bad.

The "real" bug is that the PROTOCOL_HEADERS map should use a case insensitive 
key set.   That's what i would log as the bug.

Dan


On Thursday 24 February 2011 2:42:49 PM chakras wrote:
> I have a CXF web service running that prints out a WSDL. Taking this WSDL
> and running it through CXF version of wsdl2java generates me the stub,
> 
> wsdl2java -verbose -p mypackage.base -sn Myservice -client %1
> 
> When I invoke it, I always get a SOAP fault in my interceptor. My
> interceptor is SecurityInterceptor given below,
> 
> read [ReadHeadersInterceptor, SecurityInterceptor, SoapActionInInterceptor,
> StartBodyInterceptor]
> 
> On investigating further I find that the 'SOAPAction', is passed as
> Soapaction - so when I do this
> (reqHeaders.get(SoapBindingConstants.SOAP_ACTION);) -  I don't get any
> Action defined. The work around for now that I could do is this,
> 
>         // Fall back on parsing headers (we get Soapaction instead of
> SOAPAction also)
>         if (action.length() == 0) {
>             Map<String, List<String>> reqHeaders =
> CastUtils.cast((Map)message.get(Message.PROTOCOL_HEADERS));
>             for (Map.Entry<String, List<String>> entry :
> reqHeaders.entrySet()) {
> 
>                 String key = entry.getKey();
>                 List value = entry.getValue();
>                 if (SoapBindingConstants.SOAP_ACTION.equalsIgnoreCase(key))
> {
>                     if (value != null && value.size() > 0)
>                         action.append(value.get(0).toString());
>                 }
>             }
>         }
> 
> Is this how it is supposed to work?

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

Reply via email to