I have the following app configuration file using my ip as a baseAddress:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="HelloServiceExample.HelloService" behaviorConfiguration="mexBehavior">
<endpoint
address="HelloService"
binding="basicHttpBinding"
contract="HelloServiceExample.IHelloService">
</endpoint>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://{IP-ADDRESS}:{PORT}/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
I have written a corresponding wsdl-based moniker string in VBA:
wsdlMonikerString = _
"service4:address='http://{IP-ADDRESS}:{PORT}/HelloService.svc' " & _
", binding=BasicHttpBinding_IHelloService" & _
", bindingNamespace='http://tempuri.org/'" & _
", wsdl='" & wsdlText & "'" & _
", contract=IHelloService" & _
", contractNamespace='http://tempuri.org/'"
Where wsdlText is the string respresentation of the wsdl service. Gotten from http://{IP-ADDRESS}:{PORT}/?singleWsdl. But it does not seem to work, and I can't figure out why. I always get the error:
Run-time error '-2147221020 (800401e4)':
Automation error
Invalid syntax