我想知道,用VBA来称WCF服务为WCF服务的不同参数是什么?
Dim addr As String
addr = "service:mexAddress=""net.http://y000zvk:7878/_vti_bin/Services/RetrieveList.svc/mex"","
addr = addr + "address=""net.http://y000zvk:7878/_vti_bin/Services/RetrieveList.svc/mex"","
addr = addr + "contract=""ServiceReference1.RetrieveList"", contractNamespace=""http://test.com"","
addr = addr + "binding=""basicHttpBinding"",bindingNamespace=""http://tempuri.org/"""
Dim service1 As Object
Set service1 = GetObject(addr)
MsgBox service1.GetSiteTitle()
But I don t really know what to pu in the contract, binding, binding Namespace parameters. I ve created my WCF Services with C# and this is my app.config endpoint :
<client>
<endpoint address="http://y000zvk:7878/_vti_bin/Services/RetrieveList.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_RetrieveList"
contract="ServiceReference1.RetrieveList" name="BasicHttpBinding_RetrieveList" />
</client>
您有什么想法我可以如何调用我的网络服务? 当 i m 进入调试模式时, 我能得到这个错误的信息 :
The MetadataExchangeClient instance could not be initialized because no Binding is available for scheme net.http . You can supply a Binding in the constructor, or specify a configurationName. Parameter name: scheme
提前感谢