NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Can NUSOAP parse a static XML?


Joined: 09 Nov 2007
Posts: 1
Reply with quote
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

Code:

$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]
View user's profileFind all posts by fcaserioSend private messageMSN Messenger
Can NUSOAP parse a static XML?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic