2015-02-04 2 views
0
client = Savon.client(:wsdl => 'LOCATION OF FILE CODE OF WHICH I HAVE POSTED BELOW' 

Savon.call(:create_shipments, :message => some_hash) 

내가 URI를 얻고을 확인할 수 없습니다 :: InvalidURIError : 나쁜 URI는 (? URI되지 않습니다)URI 문제 루비 URI

나는 URL은 URL

에 대한 URI 도서관에서 풋이었다 않았다 -

https://ws.aramex.net/shippingapi/shipping/service_1_0.svc는 어떤 오류를 나에게

WSDL 파일을 제공하지 동일한 URL에 URI.parse 시도 - 원래 012,305,817 링크 - 제거 된 원치 않는 콘텐츠는

<?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> 

답변

0

을 설치는 잘 작동합니다. 너의 서비스 계획에 문제가있어. 나는 당신의 서비스를 연결하고 제발 우리 작업을 얻기 위해 노력하고 난 빈 결과를 얻고있다 :

client = Savon.client(:wsdl => 'you service path') 
client.operations #=> [] 

은 또한 당신이 online 도구를 사용하여 서비스를 확인하실 수 있습니다. 당신에게 서비스 스키마를 읽으려고 할 때 오류가 발생했습니다 :

SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'https://ws.aramex.net/shippingapi/shipping/service_1_0.svc?wsdl' 

먼저 서비스를 수정하십시오.