Hi,
There is a WCF service with configuration:
<services>
<service name="MyService" behaviorConfiguration="MyServiceBehavior">
<endpoint
binding="basicHttpBinding"
contract="IMyService" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8001/MyService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="True" />
</behavior>
</serviceBehaviors>
</behaviors>
This script is supposed to call it:
Option Explicit
Dim soapClient
Dim serviceUri
Dim serviceName
Dim portName
Dim result
serviceUri = "http://localhost:8001/MyService"
serviceName = "MyService"
portName = "BasicHttpBinding_IMyService"
Set soapClient = CreateObject("MSSOAP.soapClient")
soapClient.ClientProperty("ServerHTTPRequest") = True
soapClient.mssoapinit serviceUri & "?WSDL", serviceName, portName
When running the script this error appears:
Client: WSDLReader:Analyzing the WSDL file failed HRESULT=0x8 0004005 - WSDLReader:Initialization of service failed HRESULT=0x80004005 - WSDL Service:Initialization of the port for service MyService failed HRESULT =0x80004005 - WSDLPort:Analyzing the binding information for port BasicHttpBinding_IMyService failed HRESULT=0x80004005 - WSDLPort:An operation for port BasicHttpBinding_IMyService could not be initialized HRESULT=0x8000 4005 - WSDLOperation:The operation //def:portType[@name="IMyService"]/ def:operation[@name="MyMethod"] was not found in the porttype section HRESULT=0x80004005
What is going wrong? Please, help.
Edit:
Thank you, Cheeso, for the answer. The problem with the MSSOAP appears to be that it requires all xsd schemas to be included inline in the generated WSDL file. WCF doesn't do it by default.