5
votes

Hi

We developed web service using WCF service and hosted on Windows 2003 server machine with IIS 5.1. WCF hosted on basicHttpBinding.

when try to access wsdl of service "*.svc?wsdl" it generating wrong wsdl, that wsdl cannot be used java and php clients.
when I check the wsdl in

<wsdl:import namespace="xxxxx" location="http://machine name/xxx/xxx.svc?wsdl=wsdl0"/> 
<soap:address location="http://machine name/xcxx/xxx.svc" /> 

How can i remove machine and replace it with my web site url?
How can i generate full WSDL document like what ASMX web service will generate?

2

2 Answers

3
votes

Here's how I fixed it:

  1. In your IIS bindings, be sure to include a host name.

  2. Install this hotfix: http://support.microsoft.com/kb/971842. There are links on the KB page to download the hotfix. The hotfix required a reboot for me.

  3. To "activate" the hotfix, add the following to the behavior element in your web.config:

    <useRequestHeadersForMetadataAddress>
        <defaultPorts>
            <add port="80" scheme="http" />
            <add port="443" scheme="https" />
        </defaultPorts>
    </useRequestHeadersForMetadataAddress>