WSE2.0 + SP3: empty soap:binding transport over SSL -- why?

WSE2.0 + SP3: empty soap:binding transport over SSL -- why?

Post by googl » Sat, 19 Nov 2005 02:25:09


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://www.yqcomputer.com/ "
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)
 
 
 

WSE2.0 + SP3: empty soap:binding transport over SSL -- why?

Post by googl » Sat, 19 Nov 2005 19:31:34

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://www.yqcomputer.com/ ";
}

return serviceDescription;
}

Hopefully someone might find this useful one day...
Cheers,
Andy.