12,165
社区成员




<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref="http://localhost:13214/KingKong.WebSite/WebService.asmx?wsdl" docRef="http://localhost:13214/KingKong.WebSite/WebService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
<soap address="https://localhost:13214/KingKong.WebSite/WebService.asmx" xmlns:q1="http://webservice.enterprise.com/provisioning/" binding="q1:WebServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
<soap address="https://localhost:13214/KingKong.WebSite/WebService.asmx" xmlns:q2="http://webservice.enterprise.com/provisioning/" binding="q2:WebServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" />
</discovery>
using System;
using System.Web.Services.Description;
namespace ***
{
/// <summary>
/// Summary description for HttpsReflector
/// </summary>
public class HttpsReflector : SoapExtensionReflector
{
public HttpsReflector()
{
//
// TODO: Add constructor logic here
//
}
public override void ReflectMethod()
{
//throw new NotImplementedException();
}
public override void ReflectDescription()
{
ServiceDescription description = ReflectionContext.ServiceDescription;
foreach (Service service in description.Services)
{
foreach (Port port in service.Ports)
{
foreach (ServiceDescriptionFormatExtension extension in port.Extensions)
{
SoapAddressBinding soapAddressBinding = extension as SoapAddressBinding;
if (soapAddressBinding != null)
{
soapAddressBinding.Location = soapAddressBinding.Location.Replace("http://", "https://");
}
}
}
}
}
}
}
<webServices>
<soapExtensionReflectorTypes>
<clear/>
<add type="***.HttpsReflector, ***"/>
</soapExtensionReflectorTypes>
</webServices>