在 wsdl 中隐藏一个 WCF 服务
Hide one WCF service in wsdl
我有自己的 wsdl,方法很少。
它们在例如肥皂用户界面。
我想实现新服务,但我想从wsdl中隐藏它,但我想调用它。
这可能吗?
是的。只需告诉 WCF 您不想在服务配置中公开元数据即可:
<system.serviceModel>
<services>
<service behaviorConfiguration="MyServiceBehavior" name="MyService">
<endpoint address="http://MyService:8888" binding="wsSomeBinding" contract="IMyServiceContract" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
我有自己的 wsdl,方法很少。 它们在例如肥皂用户界面。 我想实现新服务,但我想从wsdl中隐藏它,但我想调用它。
这可能吗?
是的。只需告诉 WCF 您不想在服务配置中公开元数据即可:
<system.serviceModel>
<services>
<service behaviorConfiguration="MyServiceBehavior" name="MyService">
<endpoint address="http://MyService:8888" binding="wsSomeBinding" contract="IMyServiceContract" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>