Presto-X Posted May 1, 2012 Share Posted May 1, 2012 I am trying to connect to a list of customer testimonials via SOAP and I have never had to use SOAP before so I can no clue what I’m doing lol, I did some searching on Google, but I have not been able to get anything working. Once I get a response in XML I will be good to go, please please please if you can spare a few minutes to give a hand. The owner of the dataset had this to say “The call you want is GetQuotes. The first parameter for the call includes an ID (the value of which is {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}) and the number of quotes you want returned.” This is my code so far, from what I have found off of Google $client = new SoapClient("http://www.somedomain.com/cgi-bin/testimonials.DLL/SOAP"); echo '<pre>'; print_r($client->GetQuotes(array('id' => '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'))); echo '</pre>'; Quote Link to comment https://forums.phpfreaks.com/topic/261911-never-connected-to-soap-before/ Share on other sites More sharing options...
silkfire Posted May 1, 2012 Share Posted May 1, 2012 And what did you get in return? Quote Link to comment https://forums.phpfreaks.com/topic/261911-never-connected-to-soap-before/#findComment-1342047 Share on other sites More sharing options...
Jessica Posted May 1, 2012 Share Posted May 1, 2012 the way the person responded is worded awkwardly, the first parameter contains 1 thing and another thing? I think he means two parameters? I would try $client->GetQuotes('{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}', 5); to get 5 quotes, assuming you replaced {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} with an appropriate ID. Quote Link to comment https://forums.phpfreaks.com/topic/261911-never-connected-to-soap-before/#findComment-1342091 Share on other sites More sharing options...
Presto-X Posted May 2, 2012 Author Share Posted May 2, 2012 Thanks so much for the replys guys, Here is my current code, yes I replaced my X's with the correct key. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?PHP $client = new SoapClient("http://www.somedomain.com/cgi-bin/testimonials.DLL/SOAP"); echo '<pre>'; print_r($client->GetQuotes('{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}', 5)); echo '</pre>'; ?> </body> </html> I get the following error, this is the same error I was getting this morning, driving me crazy lol Fatal error: Uncaught SoapFault exception: [Exception] Data access invalid in /home/XXXXX/public_html/test/soap.php:13 Stack trace: #0 /home/XXXXX/public_html/test/soap.php(13): SoapClient->__call('GetQuotes', Array) #1 /home/XXXXX/public_html/test/soap.php(13): SoapClient->GetQuotes('{D198A589-55E0-...', 5) #2 {main} thrown in /home/XXXXX/public_html/test/soap.php on line 13 Quote Link to comment https://forums.phpfreaks.com/topic/261911-never-connected-to-soap-before/#findComment-1342226 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.