当前位置: 代码迷 >> J2EE >> WS-I: (BP2402) The wsdl:binding element does not use a soapbind:binding,该如何处理
  详细解决方案

WS-I: (BP2402) The wsdl:binding element does not use a soapbind:binding,该如何处理

热度:822   发布时间:2016-04-22 02:11:46.0
WS-I: (BP2402) The wsdl:binding element does not use a soapbind:binding
我写了一个WebService服务端
然后准备写一个客户端对其进行测试
但在生成JAVA客户端代码时发生错误
WS-I: (BP2402) The wsdl:binding element does not use a soapbind:binding element as defined in section "3 SOAP Binding." of the WSDL 1.1 specification

请帮我分析一下引发这个错误的原因会有哪些?
怎么解决这个问题?是不是要在服务端加代码?

------解决方案--------------------
WSDL定义最好采用手动定义的方式,然后根据定义好的WSDL生成服务器和客户端的代码。原因在于不同的soap是吸纳,生成的WSDL定义有可能不满足WS-I协议

XML code
<binding name="bindingSendSMSService" type="tns:typeSendSMSService">        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>        <operation name="SendSMS">            <soap:operation soapAction="SendSMS"/>            <input>                <soap:body use="literal"/>            </input>            <output>                <soap:body use="literal"/>            </output>        </operation> </binding>
  相关解决方案