我有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?