gorgon2k Posted February 18, 2011 Share Posted February 18, 2011 OK guys, I'm working on a project that involves a SOAP api. I only have reference to the method list here - http://www.ilinc.com/pdf/documentation/ilinc-web-services.pdf . basically, I got it so that I assume it's connecting fine but no matter what I do I can't get a response. I'm assuming I'm having an Issue traversing the response XML but I don't even know how to test that. here's my code... $wsdl_url = 'http://webservice.ilinc.com/perl/ilinc/api/webservice/ilinc-api.pl?WSDL'; $client = new SOAPClient($wsdl_url); $options = array('APIVersion'=>'10.0','ClientID'=>'132449','AuthorizedUserName'=>'[email protected]','AuthorizedPassword'=>'*******'); $var = array('UserID'=>'[email protected]'); $testUser = $client->GetUserID($options,array('parameters'=>$var)); print $testUser; print $testUser->return->ErrorStr; print $testUser->return->ErrorID; Now in the above code, if I do print $testUser i get this response "Catchable fatal error: Object of class stdClass could not be converted to string in /home/content/12/5907812/html/SOAP_test2.php on line 7". the other two prints return nothing. here's a snippet of the example resonse for the GetUserID method <?xml version="1.0" ?> <iLinc:Response version="10.0" xmlns:iLinc="http://www.ilinc.com"> <iLinc:GetUserIDResponse Reference="reference"> <ErrorID>error-id</ErrorID> <ErrorStr>error-str</ErrorStr> <UserID>user-id</UserID> <EncryptedUserID>encrypted-user-id</EncryptedUserID> </iLinc:GetUserIDResponse> </iLinc:Response> Can anyone tell me what I'm doing wrong? Link to comment https://forums.phpfreaks.com/topic/228130-please-help-new-to-soap/ Share on other sites More sharing options...
ChemicalBliss Posted February 18, 2011 Share Posted February 18, 2011 I dont know the SOAP api but to get a readable result from testUser: print_r $testUser; print_r $testUser->return->ErrorStr; print_r $testUser->return->ErrorID; - View in the page source hope this helps Link to comment https://forums.phpfreaks.com/topic/228130-please-help-new-to-soap/#findComment-1176450 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.