WCF allows you to specify an external WSDL file to be published using the service, not the WSFL generated by WCF. In the WSDL-first project, the approach makes sense to publish the original WSDL, rather than the generated WSDL.
This is set using an external Metadata. Location:
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" externalMetadataLocation="path_to_my_wsdl.wsdl"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
The problem I am facing is that when I do this, it serves for direct WSDL, which has the wrong endpoint address. I want the endpoint address to be replaced at runtime with the real address of the service endpoint (which will differ depending on where it is deployed).
Is there an easy way to do this?
source
share