Re: PHP/ Soap issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2011 14:07, Louis Huppenbauer wrote:
I think it would be best if you could provide us with the .wsdl (and possibly with the server-code).

Thanks for the quick response Louis..

WSDL

<?xml version="1.0" encoding="UTF-8"?>
<definitions name="CatalogueService"
  targetNamespace="http://example.com/catalogue.wsdl";
  xmlns="http://schemas.xmlsoap.org/wsdl/";
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:tns="http://example.com/catalogue.wsdl";
  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
  xmlns:xsd1="http://example.com/schema";>

<types>
<xsd:schema
         targetNamespace="http://example.com/schema";
         xmlns="http://www.w3.org/2001/XMLSchema";>
<xsd:complexType name="product">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
<xsd:element name="price" type="xsd:double"/>
<xsd:element name="SKU" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>

<message name="getProductRequest">
<part name="sku" type="xsd:string"/>
</message>

<message name="getProductResponse">
<part name="product" type="xsd1:product"/>
</message>

<portType name="Product_PortType">
<operation name="getProduct">
<input message="tns:getProductRequest"/>
<output message="tns:getProductResponse"/>
</operation>
</portType>

<binding name="Product_Binding" type="tns:Product_PortType">
<soap:binding style="rpc"
         transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getProduct">
<soap:operation soapAction="urn:examples:CatalogueService"/>
<input>
<soap:body
             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
             namespace="urn:examples:CatalogueService"
             use="encoded"/>
</input>
<output>
<soap:body
             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
             namespace="urn:examples:CatalogueService" use="encoded"/>
</output>
</operation>
</binding>

<service name="Product_Service">
<port name="Product_Port" binding="tns:Product_Binding">
<soap:address location="http://example.com/api/catalogue"/>
</port>
</service>
</definitions>

SERVER CODE

ini_set('soap.wsdl_cache_enabled',false);
$server = new SoapServer('http://example.com/catalogue.wsdl');
$server->handle();


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux