1

我将 Savon 与以下 WSDL 一起使用

<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 吗?如果没有关于支持它的红宝石替代品的任何建议?

4

1 回答 1

1

我在 Savon 上也看到了同样的情况。我可以通过显式设置端点来手动更改端点

Savon.client do
  wsdl.endpoint = "http://service.example.com"
end
于 2012-12-13T21:41:35.167 回答