I am implementing a WCF web service which interacts with a client whose code I do not control. The WSDL was supplied by the client.
I generated C# files from the WSDL using SvcUtil, and besides the errors discussed here I had no issues.
After hosting the service in IIS 7.0 with SSL enabled (required by the client) I attempted to get the client to make a request to the service.
At this point I got the following error:
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).
I verified that I could use the metadata published by the service along with SOAPUI to make the same request. This worked fine.
I then attempted to use SOAPUI using the WSDL supplied with the client. This failed with the same empty action error above.
I then hooked up Wireshark (enabling SSL decryption) and verified that the message sent from the client indeed lacks a SOAPAction, so it appears that this is definitely the issue.
As I cannot change the client is there a way to get a WCF web service to interact with such a client? I'm guessing it would need to accept requests with no SOAPAction and instead derive the desired request from type of the request object in the SOAP envelope?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…