我创建了一个WSDL,并在JBoss Fuse上公开了一个web服务作为CXF端点。我在wsdl中指定了一个wsdl:binding和一个wsld:service,但在将其部署到JBoss Fuse并访问之后http://localhost:8081/PlaceOrderService?wsdl,我得到了重复的wsdl:binding和wsdl:service。有人知道为什么吗?
WSDL-一个WSDL:binding和WSDL:service
<wsdl:message name="orderRecordRequest">
<wsdl:part name="orderRecordInput" element="typens:orderRecordRequest" />
</wsdl:message>
<wsdl:message name="orderRecordResponse">
<wsdl:part name="orderRecordOutput" element="typens:orderRecordResponse"/>
</wsdl:message>
<wsdl:portType name="PlaceOrderService">
<wsdl:operation name="OrderService">
<wsdl:input message="tns:orderRecordRequest"/>
<wsdl:output message="tns:orderRecordResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PlaceOrderServiceSOAPBinding" type="tns:PlaceOrderService">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="OrderService">
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PlaceOrderService">
<wsdl:port binding="tns:PlaceOrderServiceSOAPBinding" name="PlaceOrderPort">
<soap:address location="http://localhost:8081/PlaceOrderService"/>
</wsdl:port>
</wsdl:service>
http://localhost:8081/PlaceOrderService?wsdl
重复的wsdl:binding和wsdl:service
<wsdl:binding name="PlaceOrderServiceSOAPBinding" type="tns:PlaceOrderService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="OrderService">
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="PlaceOrderServiceSoapBinding" type="tns:PlaceOrderService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="OrderService">
<soap:operation soapAction="" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PlaceOrderServiceService">
<wsdl:port binding="tns:PlaceOrderServiceSoapBinding" name="PlaceOrderServicePort">
<soap:address location="http://localhost:8081/PlaceOrderService"/>
</wsdl:port>
</wsdl:service>
<wsdl:service name="PlaceOrderService">
<wsdl:port binding="tns:PlaceOrderServiceSOAPBinding" name="PlaceOrderPort">
<soap:address location="http://localhost:8081/PlaceOrderService"/>
</wsdl:port>
</wsdl:service>
我知道我已经迟到了,但对于那些有类似问题的人:请注意绑定名称中的不同情况,确保WSDL中的名称与生成的Java类中的名称匹配。