Can I use nusoap to retrieve and parse static XML files?
http://myserver/security/aniel/previsao_regional.xml
http://myserver/security/aniel/previsao.xml
In this case I would not have a method to call, and the request returns an error message: Response not of type text/xml
$url = "http://myserver/security/aniel/previsao_regional.xml"; // somar
$client = new soapclient("$url");
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
// call
$result = $client->call($call="");
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
|
[/code]