cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] [Commented] (CXF-5738) given soap action does not match any operation
Date Tue, 01 Dec 2015 14:47:11 GMT


Thierry RAMANAMPANOHARANA commented on CXF-5738:

The difference between CXF 2.6 and CXF 2.7 regarding the operation look-up is that when the
SOAPAction is provided but no operations are bound to the given action name then in 2.7 a
fault is thrown:
public static class SoapActionInAttemptTwoInterceptor extends AbstractSoapInterceptor {
        public SoapActionInAttemptTwoInterceptor() {
        public void handleMessage(SoapMessage message) throws Fault {
            BindingOperationInfo boi = message.getExchange().getBindingOperationInfo();
            if (boi == null) {
            String action = getSoapAction(message);
            if (StringUtils.isEmpty(action)) {
            SoapOperationInfo soi = boi.getExtensor(SoapOperationInfo.class);
            if (soi == null || action.equals(soi.getAction())) {

            Object o = boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME);
            if (o == null) {
                o = boi.getOperationInfo().getInput().getExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME);
            if (o != null && action.equals(o.toString())) {
            throw new Fault("SOAP_ACTION_MISMATCH", LOG, null, action);

The work-around consisting of removing the SOAPAction from the message works indeed but the
cause of the seems to be the fact that CXF does not implement the [Default Action pattern|]
described by WSDL.

In 2.7, the correct approach was taken so that a fault is thrown when no operations are found.
It is just that CXF forgot to associate the default action pattern to the operation.

> given soap action does not match any operation
> ----------------------------------------------
>                 Key: CXF-5738
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Soap Binding
>    Affects Versions: 2.7.11
>            Reporter: Nicola
> I'm generating a service from an existing wsdl (,
after creating the service the cxf generated wsdl has some small difference from the original
one (, if I create client methods, using for
example soapui, from the cxf generated wsdl all is fine but if I use the original wsdl the
requests fail with the error:
> "the given soapaction does not match an operation"
> the problem is the SOAPAction http header:
> cxf expects no SOAPAction header or an empty one, if you look at the wsdl generated by
cxf you can see a section not present in the original wsdl that define an empty soap action:
> <soap:operation soapAction="" style="document"/>
> after this section there is also the original one that define:
> <soap:operation soapAction=""/>
> I defined an interceptor that remove the SOAPAction http header if present and this workaround
the problem
> cxf should not modify the original wsdl or however should accept calls generated using
the provided wsdl

This message was sent by Atlassian JIRA

View raw message