顯示具有 Web Service 標籤的文章。 顯示所有文章
顯示具有 Web Service 標籤的文章。 顯示所有文章

2008年10月17日 星期五

WSDL 的主機名稱換成 host name

在取得 web service 的 WSDL 時,發生了一個怪現象

例如, 我要取得 http://server1.domain.com.tw/service1/myService.svc?wsdl,但在其內容,卻包含下面這一段

<xsd:import namespace="http://tempuri.org/" schemalocation="http://host1/service1/myService.svc?xsd=xsd0" />

注意到 server1.domain.com.tw 是對外的 FQDN,而 host1 是該台機器的 host name。

但,host1 對於外部來說,是不可解析的。 怎麼辦呢?

又爬了文,找到 http://blogs.msdn.com/wenlong/archive/2007/08/02/how-to-change-hostname-in-wsdl-of-an-iis-hosted-service.aspx

原來,只需要在 IIS 中設網站的識別碼,如下圖。

image 

按確定後,記得要 IISReset

2007年3月12日 星期一

Web Service Software Factory

這個東西很好用。真沒想到微軟愈來愈smart 了。 不過,要按照順序安裝以下的東西。連結到 google 找一下就有了。 Enterprise Library for .NET Framework 2.0 - January 2006 GuidanceAutomationExtensions.msi GuidanceAutomationToolkit.msi Web Service Software Factory - December 2006 (refresh).msi 要試試哦!真是好東西。

Share with Facebook