我有 WCF 服务,它有 2 个端点:wsHttpBinding 和 basicHttpBinding。我可以通过 C# 客户端连接到每个端点。
我的 Wcf 服务配置
<service behaviorConfiguration="App.ServiceBehavior"
name="MyService">
<endpoint address="/ws" binding="wsHttpBinding" bindingConfiguration="httpBindingForWs"
contract="Namespace.IMyService">
<identity>
<dns value="127.0.0.1" />
</identity>
</endpoint>
<endpoint address="/basic" binding="basicHttpBinding" bindingConfiguration="httpBindingForBasic"
contract="Namespace.IMyService">
<identity>
<dns value="127.0.0.1" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://127.0.0.1:12000/MyService" />
</baseAddresses>
</host>
</service>
我可以在 Java 中生成 wsdl。你能给我看示例代码吗,我如何在 Java 中使用 basicHttpBinding?