我想使用编写的 WSDL 文件。
有两种端口类型
<wsdl:portType name="ContentDirectory">
<wsdl:operation name="GetSortCapabilities">
<wsdl:input message="tns:GetSortCapabilitiesRequest" />
<wsdl:output message="tns:GetSortCapabilitiesResponse" />
</wsdl:operation>
<wsdl:operation name="GetSystemUpdateID">
<wsdl:input message="tns:NOTHING_INPUT" />
<wsdl:output message="tns:GetSystemUpdateIDResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="ConnectionManager">
<wsdl:operation name="GetCurrentConnectionIDs">
<wsdl:input message= "tns:NOTHING_INPUT" />
<wsdl:output message="tns:GetCurrentConnectionIDsResponse" />
</wsdl:operation>
<wsdl:operation name="GetProtocolInfo">
<wsdl:input message="tns:NOTHING_INPUT" />
<wsdl:output message="tns:GetProtocolInfoResponse" />
</wsdl:operation>
</wsdl:portType>
和两个绑定
<wsdl:binding name="ContentDirectory" type="tns:ContentDirectory">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Browse">
<soap:operation soapAction="http://www.forge.soa4d.org/DPWS/Samples/MediaRenderer/Browse/" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetSystemUpdateID">
<soap:operation soapAction="http://www.forge.soa4d.org/DPWS/Samples/MediaRenderer/GetSystemUpdateID/" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ConnectionManager" type="tns:ConnectionManager">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetCurrentConnectionIDs">
<soap:operation soapAction="http://www.forge.soa4d.org/DPWS/Samples/MediaRenderer/GetCurrentConnectionIDs/" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetProtocolInfo">
<soap:operation soapAction="http://www.forge.soa4d.org/DPWS/Samples/MediaRenderer/GetProtocolInfo/" 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="Media">
<wsdl:port name="ContentDirectory" binding="tns:ContentDirectory">
<soap:address location="http://localhost:8080/MediaServer/TESTWSDL" />
</wsdl:port>
<wsdl:port name="ConnectionManager" binding="tns:ConnectionManager">
<soap:address location="http://localhost:8080/MediaServer/TESTWSDL" />
</wsdl:port>
</wsdl:service>
当我仅通过一个端口使用此服务时,我的客户端能够读取我的 WSDL。当我在两个端口上使用此服务时出现错误。(不同位置相同)
我在 W3 WSDL 规范中没有发现这方面的问题。
解决办法是什么?