Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 无法解决URI问题Ruby URI_Ruby On Rails_Ruby_Wsdl_Uri_Savon - Fatal编程技术网

Ruby on rails 无法解决URI问题Ruby URI

Ruby on rails 无法解决URI问题Ruby URI,ruby-on-rails,ruby,wsdl,uri,savon,Ruby On Rails,Ruby,Wsdl,Uri,Savon,我正在获取URI::InvalidURIError:坏URI不是URI 我为url创建了一个puts-in URI库 网址是—— 试图在同一个url上解析URI.parse,但没有给我任何错误 WSDL文件-删除不需要的内容-链接到原始 固定- 只需安装gemhttpclient,我想您的wsdl服务可能无法正常工作。你的服务计划有问题。 我已尝试连接您的服务并获取可能的操作,但结果为空: <?xml version="1.0" encoding="UTF-8"?> <

我正在获取URI::InvalidURIError:坏URI不是URI

我为url创建了一个puts-in URI库

网址是——

试图在同一个url上解析URI.parse,但没有给我任何错误

WSDL文件-删除不需要的内容-链接到原始

固定-


只需安装gemhttpclient

,我想您的wsdl服务可能无法正常工作。你的服务计划有问题。 我已尝试连接您的服务并获取可能的操作,但结果为空:

    <?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://ws.aramex.net/ShippingAPI/v1/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" name="Service_1_0">
  <wsdl:types>
    <xsd:schema targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified">
      <xsd:element name="ShipmentCreationRequest">
    <xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified">
      <xs:element type="xs:anyType" name="anyType" nillable="true"/>
      <xs:element type="xs:anyURI" name="anyURI" nillable="true"/>
      <xs:element type="xs:base64Binary" name="base64Binary" nillable="true"/>
      <xs:element type="xs:boolean" name="boolean" nillable="true"/>
      <xs:element type="xs:byte" name="byte" nillable="true"/>
      <xs:element type="xs:dateTime" name="dateTime" nillable="true"/>
      <xs:element type="xs:decimal" name="decimal" nillable="true"/>
      <xs:element type="xs:double" name="double" nillable="true"/>
      <xs:element type="xs:float" name="float" nillable="true"/>
      <xs:element type="xs:int" name="int" nillable="true"/>
      <xs:element type="xs:long" name="long" nillable="true"/>
      <xs:element type="xs:QName" name="QName" nillable="true"/>
      <xs:element type="xs:short" name="short" nillable="true"/>
      <xs:element type="xs:string" name="string" nillable="true"/>
      <xs:element type="xs:unsignedByte" name="unsignedByte" nillable="true"/>
      <xs:element type="xs:unsignedInt" name="unsignedInt" nillable="true"/>
      <xs:element type="xs:unsignedLong" name="unsignedLong" nillable="true"/>
      <xs:element type="xs:unsignedShort" name="unsignedShort" nillable="true"/>
      <xs:element type="tns:char" name="char" nillable="true"/>
      <xs:simpleType name="char">
        <xs:restriction base="xs:int"/>
      </xs:simpleType>
      <xs:element type="tns:duration" name="duration" nillable="true"/>
      <xs:simpleType name="duration">
        <xs:restriction base="xs:duration">
          <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
          <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
          <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:element type="tns:guid" name="guid" nillable="true"/>
      <xs:simpleType name="guid">
        <xs:restriction base="xs:string">
          <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:attribute type="xs:QName" name="FactoryType"/>
      <xs:attribute type="xs:ID" name="Id"/>
      <xs:attribute type="xs:IDREF" name="Ref"/>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="ShipmentCreationRequest">
    <wsdl:part name="parameters" element="tns:ShipmentCreationRequest"/>
  </wsdl:message>
  <wsdl:message name="ShipmentCreationResponse">
    <wsdl:part name="parameters" element="tns:ShipmentCreationResponse"/>
  </wsdl:message>
  <wsdl:portType name="Service_1_0">
    <wsdl:operation name="CreateShipments">
      <wsdl:input name="ShipmentCreationRequest" message="tns:ShipmentCreationRequest" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipments"/>
      <wsdl:output name="ShipmentCreationResponse" message="tns:ShipmentCreationResponse" wsaw:Action="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipmentsResponse"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding type="tns:Service_1_0" name="Service_1_0">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="CreateShipments">
      <soap:operation style="document" soapAction="http://ws.aramex.net/ShippingAPI/v1/Service_1_0/CreateShipments"/>
      <wsdl:input name="ShipmentCreationRequest">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="ShipmentCreationResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service_1_0">
    <wsdl:port name="Service_1_0" binding="tns:Service_1_0">
      <soap:address location="https://ws.aramex.net/shippingapi/shipping/service_1_0.svc"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
您也可以使用此工具检查您的服务。当我尝试读取您的服务架构时,出现错误:

client = Savon.client(:wsdl => 'you service path')
client.operations #=> []
试着先修复你的服务

client = Savon.client(:wsdl => 'you service path')
client.operations #=> []
SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'https://ws.aramex.net/shippingapi/shipping/service_1_0.svc?wsdl'