Hi,
Normally, if your interceptor is sitting after the
SOAPActionInInterceptor, you can get the aciton value by
message.get(SoapBindingConstants.SOAP_ACTION) because this interceptor
is supposed to extract the action from the transport headers and put
it into the message's property. But when I looked into this
SOAPActionInInterceptor, it seems to have the same problem as your
example and not extracting the soapaction header if it has different
casing.
I can create a jira ticket.

regards, aki

On Thu, Feb 24, 2011 at 8:42 PM, chakras <[email protected]> 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?
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/SOAP-header-wsdl2java-issue-tp3399058p3399058.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to