943,975 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 717
  • PHP RSS
Jul 3rd, 2008
0

soap error with php

Expand Post »
Hi,

I am hoping some is going to be able to help me here because i am going crazy trying to figure this out.

I am trying to code some php to interact with a web service that another company has provided. Below is the php code i have created.

php Syntax (Toggle Plain Text)
  1. <?php
  2.  
  3. $soapclient = new soapclient("http://www.humyo.com/Assets/StorageAPI.wsdl");
  4.  
  5. $hash = $soapclient->getAuthToken('emailaddress','password','API v1.0');
  6.  
  7. print_r($hash);
  8.  
  9. $result = $soapclient->createUser($hash -> authToken,'31','65','emailaddresshere','simon','22563','GB');
  10.  
  11. print_r($result);

What i am trying to achieve starts from the $hash line. The results of this query when actioned on its own is:

Array
( [authToken] => MGViMmViMjVlMDQxMDNjZmNiZmVhY2aiMzkYYYZjZjM4OTc2IQ==
[user_id] => 34 )

What i need to find out is how from that line i can just pull the authToken and insert it to the $result query. I currently have $hash -> authToken but that does not work.

Does any one know how or a way i can pull just the authToken from the first query and enter it in to the second query.

If you need any more info please let me know.

regards,

james
Last edited by peter_budo; Jul 7th, 2008 at 8:23 am. Reason: Keep It Organized - please use [code] tags
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
james1700 is offline Offline
14 posts
since Jul 2008
Jul 7th, 2008
0

Re: soap error with php

Click to Expand / Collapse  Quote originally posted by james1700 ...
Hi,

I am hoping some is going to be able to help me here because i am going crazy trying to figure this out.

I am trying to code some php to interact with a web service that another company has provided. Below is the php code i have created.

php Syntax (Toggle Plain Text)
  1. <?php
  2.  
  3. $soapclient = new soapclient("http://www.humyo.com/Assets/StorageAPI.wsdl");
  4.  
  5. $hash = $soapclient->getAuthToken('emailaddress','password','API v1.0');
  6.  
  7. print_r($hash);
  8.  
  9. $result = $soapclient->createUser($hash -> authToken,'31','65','emailaddresshere','simon','22563','GB');
  10.  
  11. print_r($result);

What i am trying to achieve starts from the $hash line. The results of this query when actioned on its own is:

Array
( [authToken] => MGViMmViMjVlMDQxMDNjZmNiZmVhY2aiMzkYYYZjZjM4OTc2IQ==
[user_id] => 34 )

What i need to find out is how from that line i can just pull the authToken and insert it to the $result query. I currently have $hash -> authToken but that does not work.

Does any one know how or a way i can pull just the authToken from the first query and enter it in to the second query.

If you need any more info please let me know.

regards,

james
Hi james,

I think u have to pass your data with array. i mean first create array for your data and then passed it from your class method.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kuldeep04 is offline Offline
9 posts
since Jul 2008
Jul 14th, 2008
0

Re: soap error with php

Spot on cheers - what you suggested did the trick.

Regards,

james
Reputation Points: 10
Solved Threads: 0
Newbie Poster
james1700 is offline Offline
14 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Hi is this correct?
Next Thread in PHP Forum Timeline: Dynamic Chat





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC