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'=>'lwilliams@biosoteria.com','AuthorizedPassword'=>'*******');
$var = array('UserID'=>'lwilliams@biosoteria.com');
$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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.