I am having problems converting from Pear SOAP to
PHP5 SOAP, especially when it comes to complex types.
I would be grateful for any help on how this should be
translated:
require_once("SOAP/Client.php");
$wsdlurl = "http://myserver/myservices/mypage.php?wsdl";
$wsdl = new SOAP_WSDL($wsdlurl, array("timeout" => 360));
$soapclient = $wsdl->getProxy();
$soapclient->setEncoding("UTF-8");
$soapclient->__trace(1);
$mydata = array(
"fromDate" => new SOAP_Value("fromDate", "string", "2003-10-01"),
"toDate" => new SOAP_Value("toDate",
"string", "2004-02-31"));
$args = array(
"myId" => new SOAP_Value("myId","int", 1),
"criteria" => new SOAP_Value("criteria", "{urn:engine}myData", $mydata),
"start" => new SOAP_Value("start","int", 0),
"limit" => new SOAP_Value("limit","int", 20));
$res = $soapclient->searchData($args);
if(PEAR::isError($res)) {
echo "Error: ".$res->getMessage()."\n";
} else {
echo "\nRes:\n";
print_r($res);
echo "\n";
}
Any ideas?
Regards,
Henrik