Hello,
I am new to using Savon and to SOAP for that matter (don't use it much) I need to use a SOAP service Vertex TAX I can't seem to get Savon to build a proper request defined by the WSDL and the XSD I am in need of some help to understand how I can get this to work. Thank in advance...
SOAPUI - Test Request Works fine
-----------------------------------------------------------------
<soapenv:Header/>
<soapenv:Body>
<urn:VertexEnvelope>
<!-- section 1.1 -->
<urn:Login>
<urn:UserName>exampleuser</urn:UserName>
<urn:Password>examplepwd</urn:Password>
</urn:Login>
<urn:QuotationRequest documentDate="2014-11-18" transactionType="SALE">
<urn:Seller>
<urn:Company>WLC</urn:Company>
</urn:Seller>
<!-- section 1.2.4 -->
<urn:Customer>
<urn:CustomerCode>1057</urn:CustomerCode>
<urn:Destination>
<urn:StreetAddress1>SOME PLACE PARK RD</urn:StreetAddress1>
<urn:StreetAddress2></urn:StreetAddress2>
<urn:City>NORTH CHICAGO</urn:City>
<urn:MainDivision>IL</urn:MainDivision>
<urn:PostalCode>60064</urn:PostalCode>
<urn:Country>USA</urn:Country>
</urn:Destination>
</urn:Customer>
<!-- section 1.2.10 -->
<urn:LineItem>
<!-- section 1.2.10.16 -->
<urn:ExtendedPrice>129.95</urn:ExtendedPrice>
</urn:LineItem>
<!-- section 1.2.10 -->
<urn:LineItem>
<!-- section 1.2.10.16 -->
<urn:ExtendedPrice>1539.43</urn:ExtendedPrice>
</urn:LineItem>
<!-- section 1.2.10 -->
<urn:LineItem>
<!-- section 1.2.10.16 -->
<urn:ExtendedPrice>550.75</urn:ExtendedPrice>
</urn:LineItem>
<!-- section 1.2.10 -->
<urn:LineItem>
<!-- section 1.2.10.16 -->
<urn:ExtendedPrice>13000.00</urn:ExtendedPrice>
</urn:LineItem>
</urn:QuotationRequest>
</urn:VertexEnvelope>
</soapenv:Body>
</soapenv:Envelope>
RUBY Calls
------------------------------------------------------------------
client.call(:calculate_tax60, message: {login: {user_name: 'exampleuser', password: 'examplepwd'}})
WSDL
------------------------------------------------------------------
<wsdl:types>
<xsd:schema>
<xsd:import namespace="urn:vertexinc:o-series:tps:6:0" schemaLocation="http://vertex.internal.com:7395/vertex-ws/services/CalculateTax60?xsd=1"/> </xsd:schema>
</wsdl:types>
<wsdl:message name="calculateTaxRequest">
<wsdl:part element="vev:VertexEnvelope" name="part"/>
</wsdl:message>
<wsdl:message name="calculateTaxResponse">
<wsdl:part element="vev:VertexEnvelope" name="VertexEnvelope"/>
</wsdl:message>
<wsdl:portType name="CalculateTaxWS60">
<wsdl:operation name="calculateTax60">
<wsdl:input message="tns1:calculateTaxRequest" name="calculateTaxRequest"/>
<wsdl:output message="tns1:calculateTaxResponse" name="calculateTaxResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CalculateTax60SoapBinding" type="tns1:CalculateTaxWS60">
<wsdl:operation name="calculateTax60">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="calculateTaxRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="calculateTaxResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CalculateTaxWSService60">
<wsdl:port binding="tns1:CalculateTax60SoapBinding" name="CalculateTax60">
<wsdlsoap:address location="http://vertex.internal.com:7395/vertex-ws/services/CalculateTax60"/> </wsdl:port>
</wsdl:service>
</wsdl:definitions>
Savon Log
---------------------------------------------------------------------
SOAPAction: "calculateTax60", Content-Type: text/xml;charset=UTF-8, Content-Length: 487
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Body>
<vev:VertexEnvelope>
<Login>
<UserName>exampleuser</UserName>
<Password>examplepwd</Password>
</Login>
</vev:VertexEnvelope>
</soapenv:Body>
</soapenv:Envelope>
SOAP response (status 500)
<?xml version="1.0" encoding="UTF-8"?>
<S:Body>
<faultcode>nsf:Server</faultcode>
<faultstring>SAX processing failed on input stream
</faultstring>
<detail>
<ns:VertexException xmlns:ns="urn:vertexinc:oseries:exception:1:0">
<ns:exceptionType>SAXException</ns:exceptionType>
<ns:rootCause>XML namespace is not supported by current set of registered builders. Notify XML creator that updated schema version must be used. (element=VertexEnvelope, invalid namespace=
http://www.vertexinc.com/oseries/services/CalculateTax60, supported namespaces=urn:vertexinc:o-series:tps:2:1,
etl.vertexinc.com, urn:vertexinc:o-series:tps:5:0, urn:vertexinc:o-series:tps:4:0, urn:vertexinc:o-series:tps:4:1, urn:vertexinc:o-series:tps:2:2:1, urn:vertexinc:o-series:tps:2:2,
sqlexp.vertexinc.com, urn:vertexinc:o-series:tps:6:0,
taxml.vertexinc.com,
license.vertexinc.com)
</ns:rootCause>
</ns:VertexException>
</detail>
</nsf:Fault>
</S:Body>
</S:Envelope>