Forum Moderators: coopster
You can see output at: <snip>
[PHP]
<?PHP
require_once('nusoap.php');
// define parameter array
$param = array( 'APPCLIENT_ID' => '2220','EVENT_ID' => '6','STARTDATE' => '','INCDAYS' => '');
// define path to server application
$serverpath ='http://services.Preview.example.com/webservices/TicketSearch.asmx';
//define method namespace
$namespace="http://www.yoursite.com/webservices/";
// create client object
$soapclient = new soapclient($serverpath);
//set soap Action
$soapAction='http://www.yoursite.com/webservices/GetVenueList';
//to see debug messages
//$soapclient -> debug_flag = 1;
// make the call
$result = $soapclient->call('GetVenueList',$param,$namespace,$soapAction);
// if a fault occurred, output error info
if (isset($fault))
{
print "Error: ". $fault;
}
else if ($result)
{
// Display the response messages
echo '<h2>Response</h2>';
echo '' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '';
// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($soapclient->debug_str, ENT_QUOTES) . '</pre>';
}
else
{
print "No result";
}
// kill object
unset($soapclient);
?>
[/PHP]
[edited by: dreamcatcher at 8:36 am (utc) on Oct. 31, 2006]
[edited by: coopster at 9:22 am (utc) on Oct. 31, 2006]
[edit reason] No URLs, thanks. [/edit]
Well
I have xml in a variable and now i need to parse it.
xml is something like this:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetVenueListResponse xmlns="http://www.yoursite.com/webservices/">
<GetVenueListResult>
<ROOT xmlns="">
<METHODINFO>
<channelName>Basic View</channelName>
<methodName>GetVenueList</methodName>
<parameters>APPCLIENT_ID=2220&EVENT_ID=6&STARTDATE=&INCDAYS=</parameters>
<processTime type="milliseconds">4.2844</processTime>
</METHODINFO>
<DATA xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<row THISID="945" THISNAME="Lowell Memorial Auditorium" ST="MA" />
<row THISID="1598" THISNAME="Stage Theatre" ST="CO" />
<row THISID="2963" THISNAME="Walnut Street Theatre" ST="PA" />
</DATA>
</ROOT>
</GetVenueListResult>
</GetVenueListResponse>
</soap:Body>
</soap:Envelope> I need to parse info in data element mainly, please help me so that i can parse it
[edited by: dreamcatcher at 11:24 am (utc) on Oct. 31, 2006]
[edit reason] Generalized url. [/edit]