SoapAction Customization for WCF

SOAP is a standards-based web services technology that allows providers to abstract data and transport implementations over the web. It relies on Extensible Markup Language (XML) for its message format, and usually relies on other Application Layer protocols, most notably Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.

When working in wcf project, in your service singleWsdl file you can find out soap property that is needed for external application to access your service.


By default your singleWsdl i.e wsdl file show SOAP_ACTION as url as=””. You need to change according to your site in your application service.

This change can be done in two ways.
1. You could specify it in the service contract definition:

this will set the action based on the namespace, the contract name, and the operation name, which is much easier to use, but may not work if you need to set the action to exactly what you want.

2.You could also specify the Action property on the operation contract:

You can also set the ReplyAction if you need to.

Leave a Reply

Your email address will not be published. Required fields are marked *