Hi there.
I tried that but the error that came back was as follows:
--->
Warning: unserialize() expects parameter 1 to be string, array given in /var/www/web4/web/client_2
bool(false)
--->
I think I figured out how to describe this problem/issue better perhaps...
I need to pass (somehow) the result from the function across soap back to a php5 client, currently the wsdl appears to be correct (when testing against xmethods) but I (may be wrong) have determined that the result coming from the request is actually blank... (ie: an empty array is passed.
My confusion arises from the way the soap client appears to think that the resulting array is an object..
I tweaked the wsdl file to correct an error with the last part (to who the server program).
<?xml version="1.0" ?>
- <wsdl:definitions xmlns="http://schemas.xmls
- <wsdl:types>
- <xsd:schema targetNamespace="http://sc
- <xsd:complexType name="productArray">
- <xsd:complexContent>
- <xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:produc
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
- <xsd:complexType name="product">
- <xsd:all>
<xsd:element name="category" type="xsd:string" />
<xsd:element name="description" type="xsd:string" />
<xsd:element name="name" type="xsd:string" />
<xsd:element name="price" type="xsd:float" />
<xsd:element name="product_id" type="xsd:int" />
<xsd:element name="rsize" type="xsd:string" />
<xsd:element name="stocklevel" type="xsd:int" />
</xsd:all>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<message name="__constructRequest" />
- <message name="getSingleProductRequ
<part name="product_id" type="xsd:string" />
</message>
- <message name="getSingleProductResp
<part name="getSingleProductRetu
</message>
- <wsdl:portType name="JewelleryServicePort
- <wsdl:operation name="__construct">
<wsdl:input message="tns:__constructRe
</wsdl:operation>
- <wsdl:operation name="getSingleProduct">
<wsdl:input message="tns:getSingleProd
<wsdl:output message="tns:getSingleProd
</wsdl:operation>
</wsdl:portType>
- <binding name="JewelleryServiceBind
<soap:binding style="rpc" transport="http://schemas.
- <wsdl:operation name="__construct">
<soap:operation soapAction="" style="rpc" />
- <wsdl:input>
<soap:body use="encoded" namespace="http://schema.e
</wsdl:input>
</wsdl:operation>
- <wsdl:operation name="getSingleProduct">
<soap:operation soapAction="" style="rpc" />
- <wsdl:input>
<soap:body use="encoded" namespace="http://schema.e
</wsdl:input>
- <wsdl:output>
<soap:body use="encoded" namespace="http://schema.e
</wsdl:output>
</wsdl:operation>
</binding>
- <wsdl:service name="JewelleryService">
- <wsdl:port name="JewelleryServicePort
<soap:address location="http://www.dataf
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Main Topics
Browse All Topics





by: dereshPosted on 2007-09-26 at 00:38:40ID: 19961206
you could try to serailize array before its returned from soap server
ku']); ngleProduc t($item));
and then deserialize this on client, because in wsdl type for your function return is string, and serializing should fix that.
so instead of:
return $prods;
you return this:
return serialize($prods);
and in your client script:
$item = htmlspecialchars($_POST['s
$data = unserialize($client->getSi