Mi date una mano col parsing di un xml soap?
Nel caso specifico vorrei registrare dei dati che mi passa il servizio di xignite. Non ho trovato documentazioni comprensibili, ma solo un piccolo esempio/demo (sotto) ma ho capito come prendere i dati:
codice:// define the SOAP client using the url for the service $client = new soapclient('http://www.xignite.com/xMetals.asmx?WSDL', array('trace' => 1)); // create an array of parameters $param = array( 'Type' => "XAU", 'Currency' => "USD", 'StartDate' => "11/6/2010", 'EndDate' => "12/5/2010"); // call the service, passing the parameters and the name of the operation $result = $client->GetHistoricalSpotPriceRange($param); // assess the results if (is_soap_fault($result)) { echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; } else { echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } // print the SOAP request echo '<h2>Request</h2><pre>' . htmlspecialchars($client->__getLastRequest(), ENT_QUOTES) . '</pre>'; // print the SOAP request Headers echo '<h2>Request Headers</h2><pre>' . htmlspecialchars($client->__getLastRequestHeaders(), ENT_QUOTES) . '</pre>'; // print the SOAP response echo '<h2>Response</h2><pre>' . htmlspecialchars($client->__getLastResponse(), ENT_QUOTES) . '</pre>';



Rispondi quotando
