0

hi all, iam using a php web services from xignite iam not able to use it properly

$xignite_header = new SoapHeader('http://www.xignite.com/services/',
'Header',"Tracer" => "1"));
$wsdl = new soapclient('http://www.xignite.com/xMetals.asmx?WSDL');
// attach SOAP header
$wsdl->__setSoapHeaders(array($xignite_header));
// call the service: pass the parameters and name of the operation
$input_params = array('Types' => "XAU", 'Currency' => "AUD");
$result = $wsdl->GetRealTimeMetalQuotes($input_params);
// assess the results
if ($wsdl->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '<pre>';

}
else {
// display the results
echo '<h2>Result</h2><pre>';
// this function exposes the complete structure of the return class
print_r($result);
$Request = $result['MetalQuote'];
//$BookList = xml2array($Request, 1);//Parse the XML to an array
//echo '<pre>';
//print_r($BookList);

}

iam getting reponse as

stdClass Object
(
    [GetRealTimeMetalQuotesResult] => stdClass Object
        (
            [MetalQuote] => stdClass Object
                (
                    [Outcome] => Success
                    [Identity] => Header
                    [Delay] => 0.006
                    [Symbol] => XAUAUDO
                    [Type] => XAU
                    [Currency] => AUD
                    [Date] => 4/30/2010
                    [Time] => 10:05:51 PM
                    [Rate] => 1275.44995117
                    [Bid] => 1274.19995117
                    [BidTime] => 10:05:51 PM
                    [Ask] => 1276.69995117
                    [AskTime] => 10:05:51 PM
                )
 
        )
 
)

how do i use rate and bid from the response
thanks

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by eaksin
0

Hi all, I am using a php web services from xignite and have problem same praveen_dusari.
I don't understand about stdClass Object, how do i use Bid and Ask property from response to show in textbox.
Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.