I have created a simple HelloWorld application in WSE2.0 SP3.
When I browse to the endpoint url over http (e.g.
http://localhost/TestService.ashx) the WSDL is fine and I can create a
client proxy and call into the service. Examining the WSDL shows the
soap:binding transport attribute is populated...
<wsdl:binding name="TestServiceBinding" type="tns:TestServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
.
.
</wsdl:binding>
However over https e.g. (https://localhost/TestService.ashx) the WSDL
is returned exactly as for http except for an empty soap:binding
transport attribute. This appears to cause problems when creating a
client proxy...
<wsdl:binding name="TestServiceBinding" type="tns:TestServicePortType">
<soap:binding transport="" style="document" />
.
.
</wsdl:binding>
IIS is configured with a valid server certificate. The WSE2 service
code is as follows...
/// <summary>
/// TestService
/// </summary>
public class TestService : SoapService {
[SoapMethod("HelloWorld")]
public string HelloWorld() {
return "Hello World";
}
}
Please can anyone help?
Thanks & Regards,
Andy.
(originally posted to microsoft.public.dotnet.framework.webservices)
google@funk45.com - 18 Nov 2005 10:31 GMT
Ok, I found a solution albeit a little hacky...
protected override XmlDocument GetDescription(System.Uri location) {
XmlDocument serviceDescription = base.GetDescription(location);
XmlNode soapBindingXmlNode =
serviceDescription.SelectSingleNode("//*[@transport]");
XmlNode soapBindingTransportXmlNode =
soapBindingXmlNode.Attributes.GetNamedItem("transport");
if (soapBindingTransportXmlNode.InnerXml.Length == 0) {
soapBindingTransportXmlNode.InnerXml =
"http://schemas.xmlsoap.org/soap/http";
}
return serviceDescription;
}
Hopefully someone might find this useful one day...
Cheers,
Andy.