Hi,
I am getting a SOAPFault "'uri' option is required in nonWSDL mode". I
am not quite sure what this means and how to fix it. Can somebody help?
Here is my client:
>>>>>>Start of Client>>>>>>>>>
...
$ret_str = "";
$url_base = "http://mydomain.com";
try {
$soapclient = new SoapClient(NULL,
array(
"location" => "$url_base/web_services/server/run_job.php",
"uri" => "urn:do-run-jobs",
"style" => SOAP_RPC,
"use" => SOAP_ENCODED,
"trace" => 1
));
//echo "new SoapClient succeeded\n";
$params = array(new SoapParam("3", "agent_list"),
new SoapParam("sf", "app_host"),
new SoapParam("null", "extra"));
try {
$ret_val = $soapclient->__call('keepAlive', $params);
$ret_str .= "$ret_val\n";
} catch (Exception $e) {
$ret_str .= "Call Exception: ";
$ret_str .= $e->faultstring . "\n";
$lastRequest = $soapclient->__getLastRequest();
$ret_str .= "getLastRequest: $lastRequest\n";
$lastRequestHeaders = $soapclient->__getLastRequestHeaders();
$ret_str .= "getLastRequestHeaders: $lastRequestheaders\n";
$lastRequestResponse = $soapclient->__getLastResponse();
$ret_str .= "getLastResponse: $lastResponse\n\n";
}
} catch (Exception $e) {
$ret_str .= "new SoapClient Exception: ";
$ret_str .= $e->faultstring . "\n\n";
}
>>>>>>End of Client>>>>>>>>>>>
Here is my Server:
>>>>>>Start of Server>>>>>>>>>
...
function keepAlive($agent_list, $app_host) {
$ret_str = "keepAlive: agent_list=$agent_list app_host=$app_host";
return $ret_str;
}
$server = new SoapServer(null);
$server->addFunction('keepAlive');
$server->handle();
>>>>>>End of Server>>>>>>>>>
Request Header:
POST /web_services/server/run_job.php HTTP/1.1
Host: mydomain.com
Connection: Keep-Alive
User-Agent: PHP SOAP 0.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:do-run-jobs#keepAlive"
Content-Length: 597
Request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:do-run-jobs" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:keepAlive><agent_list
xsi:type="xsd:string">3</agent_list><app_host
xsi:type="xsd:string">sf</app_host><extra
xsi:type="xsd:string">null</extra></ns1:keepAlive>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode><faultstring>SoapServer::__construct()
[<a href='function.--construct'>function.--construct</a>]:
Invalid arguments. 'uri' option is required in nonWSDL mode.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
How do I fix this?
Colin Goldberg
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php