简体   繁体   中英

WCF service wsdl client error

I have a WCF web service written in .NET 4.5 which is working fine.

The client I am using to call it (a SQL CLR stored procedure) has to use .NET 2 because it's for a Sql Server (2005).

When I test the web service using the built in WCF test client, everything works fine. Likewise, if I build a client using .NET 3+ with svcutil.exe it also works.

However, since I have to use .NET 2 the only solution I found was to use wsdl.exe to generate the client ( original question ) - which it did successfully, except I haven't manage to get it working.

I get the error The message with Action 'action removed' 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, eg Message, Transport, None). The message with Action 'action removed' 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, eg Message, Transport, None).

I found this question , however it recommends looking into the EndpointDispatcher class which I'm not using since I'm on .NET 2.0.

As far as I know all of my namespaces are the same - yet still no luck. I have also tried using the service trace utility but it doesn't seem to show me anything useful.

Is it even possible to use a client made in this manner with a service this way? Or are the endpoints permanently incompatible?

I ended up regenerating my client with wsdl on the off chance I'd changed something, turns out I had. The client updated my namespaces and everything worked from that point on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM