Vertex SOAP Service WSDL processing problems

2,015 views
Skip to first unread message

Dale Ackerman

unread,
Dec 4, 2014, 4:26:21 PM12/4/14
to sav...@googlegroups.com
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:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:urn='urn:vertexinc:o-series:tps:6:0'>
    <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 = Savon.client(wsdl: 'http://vertex.internal.com:7395/vertex-ws/services/CalculateTax60?wsdl', env_namespace: :soapenv, namespaces: {"xmlns:urn" => 'urn:vertexinc:o-series:tps:6:0'}, convert_request_keys_to: :camelcase, logger: Rails.logger, pretty_print_xml: true, log: true)

client.call(:calculate_tax60, message: {login: {user_name: 'exampleuser', password: 'examplepwd'}})

WSDL
------------------------------------------------------------------

<!--
Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.5-hudson-$BUILD_NUMBER-.
-->
<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">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<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
---------------------------------------------------------------------
HTTPI GET request to vertex.internal.com (net_http)
SOAPAction: "calculateTax60", Content-Type: text/xml;charset=UTF-8, Content-Length: 487
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vev="http://www.vertexinc.com/oseries/services/CalculateTax60" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:vertexinc:o-series:tps:6:0">
  <soapenv:Body>
    <vev:VertexEnvelope>
      <Login>
        <UserName>exampleuser</UserName>
        <Password>examplepwd</Password>
      </Login>
    </vev:VertexEnvelope>
  </soapenv:Body>
</soapenv:Envelope>

HTTPI POST request to vertex.internal.com (net_http)
SOAP response (status 500)
<?xml version="1.0" encoding="UTF-8"?>
  <S:Body>
    <nsf:Fault xmlns:nsf="http://schemas.xmlsoap.org/soap/envelope/">
      <faultcode>nsf:Server</faultcode>
      <faultstring>SAX processing failed on input stream
SAX processing failed when attempting to create new element.  (parent element=null, new element=null, local element name=VertexEnvelope, namespace=http://www.vertexinc.com/oseries/services/CalculateTax60)
</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>

Reply all
Reply to author
Forward
0 new messages