Multiple operations with soapAction = "" in a WCF service contract?

I need to create a service that will be “returned” by a third party. As a result, I need to match their WSDL.

Their WSDL has all the operations defined using soapAction="" , so my service should do the same. Sorry, I get an error message:

Operations A and B have the same action (). Each operation must have a unique action value.

There was a mode in ASMX web services where soapAction would not be used, but the name of the request element would be used instead. Is there a way to use WCF not only to send to a request element, but also to retrieve WSDL without soapAction?

+7
c # wsdl wcf
source share
1 answer

This is possible in asmx, but out of the box you won’t find a clean way to do this in WCF, because it uses an action to send messages to operations.

I think you need a hack to set soapAction to "*" and then write a custom dispatcher .

A potential side effect of this is a bad WSDL, if you need to open a WSDL, you have to generate / steal it and then use the externalMetadataLocation attribute

+11
source share

All Articles