Jump to content

PLEASE HELP, new to SOAP


gorgon2k

Recommended Posts

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?  :confused:

Link to comment
https://forums.phpfreaks.com/topic/228130-please-help-new-to-soap/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.