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?
the soap:address location appears with the Hostname of the machine. This part of the xml tells the application where to find the web service. So, because the machine is in a private network, this site is unreachable to everyone behind the cloud.
You can use WCF to export WSDL documents from a ServiceDescription instance for your service. WSDL documents are automatically generated for your service when you publish metadata endpoints.
WSDL stands for Web Service Description Language. The WCF service exposes the WSDL document for the clients, to generate proxies and the configuration file. The WSDL file provides the following information for the consumers of the WCF service.
Here's how I fixed it:
In your IIS bindings, be sure to include a host name.
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.
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>
I browsed net and got solution for my problem
the following helped me a lot.
Hope these will be help some other.
nRk
For generating flat WSDL
http://my-tech-talk.blogspot.com/2008/07/adding-flatwsdl-to-wcf-webservice.html
http://weblogs.thinktecture.com/cweyer/2007/05/improving-wcf-interoperability-flattening-your-wsdl.html
http://isinghblog.blogspot.com/2009/03/wcf-service-and-adobe-livecycle_10.html
For chaning host name which will reflect in wsdl address
http://forums.asp.net/p/1096811/1659596.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With