Savon似乎只是阅读多端口肥皂服务的第一个端口

时间:2012-11-04 18:46:09

标签: ruby xml savon

我正在使用带有以下WSDL的Savon

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:v2bind="urn:oasis:names:tc:wsrp:v2:bind" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="urn:oasis:names:tc:wsrp:v2:wsdl">
<import namespace="urn:oasis:names:tc:wsrp:v2:bind" location="http://localhost:8080/wsrp-portlet/wsdl/wsrp-2.0-bindings.wsdl"/>
<wsdl:service name="WSRP_v2_Service">
    <wsdl:port binding="v2bind:WSRP_v2_Markup_Binding_SOAP" name="WSRP_v2_Markup_Service">
        <soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_Markup_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
    </wsdl:port>
    <wsdl:port binding="v2bind:WSRP_v2_ServiceDescription_Binding_SOAP" name="WSRP_v2_ServiceDescription_Service">
        <soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_ServiceDescription_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
    </wsdl:port>
    <wsdl:port binding="v2bind:WSRP_v2_Registration_Binding_SOAP" name="WSRP_v2_Registration_Service">
        <soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_Registration_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
    </wsdl:port>
    <wsdl:port binding="v2bind:WSRP_v2_PortletManagement_Binding_SOAP" name="WSRP_v2_PortletManagement_Service">
        <soap:address location="http://localhost:8080/wsrp-portlet/services/WSRP_v2_PortletManagement_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e"/>
    </wsdl:port>
</wsdl:service>

当我检查时,

savon.wsdl.endpoint

我只有,

#<URI::HTTP:0x00000101eea398 URL:http://localhost:8080/wsrp-portlet/services/WSRP_v2_Markup_Service?wsrpProducerUuid=48322cfd-c68b-4053-b9b4-aff1644d6e1e> 

savon可以处理具有多个端口定义的wsdl吗?如果没有关于支持它的ruby替代品的任何建议吗?

1 个答案:

答案 0 :(得分:1)

我和萨文一直在看同样的事情。我可以通过使用

显式设置端点来手动更改端点
Savon.client do
  wsdl.endpoint = "http://service.example.com"
end