Change or Add SOAPAction Header
It wasn’t the easiest thing to find, so I wanted to link to this page on how to change the SOAPAction header of a message in CXF. This is especially useful if you have a SOAPAction header that is = “” and causing issues when trying to connect to a .NET or WCF server with a Java client. (Keywords galore!)
Here’s the error I was getting:
javax.xml.ws.soap.SOAPFaultException: The message with Action ” cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
And here’s the easy, one-line solution:
For the most part, you probably don’t even need an interceptor for this. Just
do something like:
before calling the method. That should do it.
Thanks, Daniel Kulp.
Find me, Google: Empty SOAPAction header
Posted on November 8, 2010, in Java, Misc Tech and tagged ContractFilter mismatch, CXF, Java, SOAPAction Header, SOAPFaultException, Web Services. Bookmark the permalink. 5 Comments.
can u please explain clearly with example.i didnt understand how to call WCF service from mirth
i have also get same error when i call wcf service from mirth
I’m not sure what mirth is, so I can’t really help you with that one.
Several things in here’ haven’t considered before.Thank you for making this type of awesome publish that is really perfectly written, is going to be mentioning lots of buddies relating to this. Maintain blogging.
Haha…..! Very smart dialogue mate. I was guess you expressed the impression about change or add SOAPAction header like that. Thanks for published!