I am working to create my first web service Server. I’ve followed several tutorials with success but when I create my own WSDL and Server I am not getting a response. It’s as if the function isn’t actually getting called on the server. Here is a peak at my WSDL and Server File
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions name="getQtyBreaks" targetNamespace="http://localhost/getQtyBreaks/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://localhost/getQtyBreaks/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://localhost/getQtyBreaks/">
<xsd:element name="getQtyBreaks">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AccountNumber" type="xsd:string"
maxOccurs="1" minOccurs="0">
</xsd:element>
<xsd:element name="PartNumber" type="xsd:string" maxOccurs="1" minOccurs="1"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getQtyBreaksResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ProductPage" type="xsd:string"></xsd:element>
<xsd:element name="Qty1" type="xsd:int" maxOccurs="1"
minOccurs="0">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element></xsd:schema></wsdl:types>
<wsdl:message name="getQtyBreaksRequest">
<wsdl:part name="parameters" element="tns:getQtyBreaks"></wsdl:part>
</wsdl:message>
<wsdl:message name="getQtyBreaksResponse">
<wsdl:part name="parameters" element="tns:getQtyBreaksResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="getQtyBreaksType">
<wsdl:operation name="getQtyBreaks">
<wsdl:input message="tns:getQtyBreaksRequest"></wsdl:input>
<wsdl:output message="tns:getQtyBreaksResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="getQtyBreaksBinding"
type="tns:getQtyBreaksType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getQtyBreaks">
<soap:operation
soapAction="http://localhost/getQtyBreaks/getQtyBreaks" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="getQtyBreaksService">
<wsdl:port name="getQtyBreaksPort" binding="tns:getQtyBreaksBinding">
<soap:address location="http://localhost/getQtyBreaks" />
</wsdl:port>
</wsdl:service></wsdl:definitions>
And here is my PHP SOAP Server File
function getQtyBreaks($AccountNumber, $PartNumber) {
return '1';
}
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("getQtyBreaks.wsdl");
$server->addFunction("getQtyBreaks");
$server->handle();
I am really at a lose, I’ve been struggling with this for two days