I'm attempting to build a client side for a quoting web service. The third party who maintains the server side has provided a WSDL in paper form but hasn't hosted it on the web. I'm using php and nusoap to develop the client. I can't initilise my soapclient with the WSDL and am received error messages that don't give me a lot of information about what I'm doing wrong.
The WSDL is:
<?xml version="1.0" encoding="UTF-8" ?>
<definitions name="PriceQuoteService" targetNamespace=" xmlns=" xmlns:ns2=" xmlns:soap=" xmlns:tns=" xmlns:xsd="<types>
<schema targetNamespace=" xmlns=" xmlns:soap11-enc=" xmlns:tns=" xmlns:wsdl=" xmlns:xsi=" <import namespace=" />
<complexType name="LocalAccessDomain">
<sequence>
<element name="bandwidth" type="string" />
<element name="city" type="string" />
<element name="customerName" type="string" />
<element name="litBldgFlag" type="boolean" />
<element name="state" type="string" />
<element name="street" type="string" />
<element name="term" type="short" />
<element name="zip" type="string" />
<element name="zip4" type="string" />
</sequence>
</complexType>
<complexType name="LocalAccessPrice">
<sequence>
<element name="message" type="string" />
<element name="nonRecurringPrice" type="double" />
<element name="quoteId" type="long" />
<element name="recurringPrice" type="double" />
<element name="statusCode" type="string" />
</sequence>
</complexType>
</schema>
</types>
<message name="PQSService_calculatePricesResponse">
<part name="result" type="ns2:LocalAccessPrice" />
</message>
<message name="PQSService_calculatePrices">
<part name="LocalAccessDomain_1" type="ns2:LocalAccessDomain" />
</message>
<portType name="PQSService">
<operation name="calculatePrices" parameterOrder="LocalAccessDomain_1">
<input message="tnsQSService_calculatePrices" />
<output message="tnsQSService_calculatePricesResponse" />
</operation>
</portType>
<binding name="PQSServiceBinding" type="tnsQSService">
<soap:binding style="rpc" transport=" />
<operation name="calculatePrices">
<soapperation soapAction="" />
<input>
<soap:body encodingStyle=" namespace=" use="encoded" />
</input>
<output>
<soap:body encodingStyle=" namespace=" use="encoded" />
</output>
</operation>
</binding>
<service name="PriceQuoteService">
<port binding="tnsQSServiceBinding" name="PQSServicePort">
<soap:address location=" />
</port>
</service>
</definitions>
My request to the webservice is:
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle=" xmlns:SOAP-ENV=" xmlns:xsd=" xmlns:xsi=" xmlns:SOAP-ENC=" xmlns:ns1303=" xsi:type="xsd:string">DS-1</bandwidth><city xsi:type="xsd:string">Fairfield</city><customerName xsi:type="xsd:string">Test Customer</customerName><litBldgFlag xsi:type="xsd:string">Y</litBldgFlag><state xsi:type="xsd:string">OH</state><street xsi:type="xsd:string">1252 Main St</street><term xsi:type="xsd:string">12</term><zip xsi:type="xsd:string">45014</zip><zip4 xsi:type="xsd:string">5556</zip4></LocalAccessDomain></ns1303:calculatePrices></SOAP-ENV:Body></SOAP-ENV:Envelope>
The message back from the server is:
soapenv:Client
java.lang.IllegalArgumentException
I am assuming that the issue is with my request xml and not with the arguments to the API function.
Anyone have any ideas?
The WSDL is:
<?xml version="1.0" encoding="UTF-8" ?>
<definitions name="PriceQuoteService" targetNamespace=" xmlns=" xmlns:ns2=" xmlns:soap=" xmlns:tns=" xmlns:xsd="<types>
<schema targetNamespace=" xmlns=" xmlns:soap11-enc=" xmlns:tns=" xmlns:wsdl=" xmlns:xsi=" <import namespace=" />
<complexType name="LocalAccessDomain">
<sequence>
<element name="bandwidth" type="string" />
<element name="city" type="string" />
<element name="customerName" type="string" />
<element name="litBldgFlag" type="boolean" />
<element name="state" type="string" />
<element name="street" type="string" />
<element name="term" type="short" />
<element name="zip" type="string" />
<element name="zip4" type="string" />
</sequence>
</complexType>
<complexType name="LocalAccessPrice">
<sequence>
<element name="message" type="string" />
<element name="nonRecurringPrice" type="double" />
<element name="quoteId" type="long" />
<element name="recurringPrice" type="double" />
<element name="statusCode" type="string" />
</sequence>
</complexType>
</schema>
</types>
<message name="PQSService_calculatePricesResponse">
<part name="result" type="ns2:LocalAccessPrice" />
</message>
<message name="PQSService_calculatePrices">
<part name="LocalAccessDomain_1" type="ns2:LocalAccessDomain" />
</message>
<portType name="PQSService">
<operation name="calculatePrices" parameterOrder="LocalAccessDomain_1">
<input message="tnsQSService_calculatePrices" />
<output message="tnsQSService_calculatePricesResponse" />
</operation>
</portType>
<binding name="PQSServiceBinding" type="tnsQSService">
<soap:binding style="rpc" transport=" />
<operation name="calculatePrices">
<soapperation soapAction="" />
<input>
<soap:body encodingStyle=" namespace=" use="encoded" />
</input>
<output>
<soap:body encodingStyle=" namespace=" use="encoded" />
</output>
</operation>
</binding>
<service name="PriceQuoteService">
<port binding="tnsQSServiceBinding" name="PQSServicePort">
<soap:address location=" />
</port>
</service>
</definitions>
My request to the webservice is:
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle=" xmlns:SOAP-ENV=" xmlns:xsd=" xmlns:xsi=" xmlns:SOAP-ENC=" xmlns:ns1303=" xsi:type="xsd:string">DS-1</bandwidth><city xsi:type="xsd:string">Fairfield</city><customerName xsi:type="xsd:string">Test Customer</customerName><litBldgFlag xsi:type="xsd:string">Y</litBldgFlag><state xsi:type="xsd:string">OH</state><street xsi:type="xsd:string">1252 Main St</street><term xsi:type="xsd:string">12</term><zip xsi:type="xsd:string">45014</zip><zip4 xsi:type="xsd:string">5556</zip4></LocalAccessDomain></ns1303:calculatePrices></SOAP-ENV:Body></SOAP-ENV:Envelope>
The message back from the server is:
soapenv:Client
java.lang.IllegalArgumentException
I am assuming that the issue is with my request xml and not with the arguments to the API function.
Anyone have any ideas?