User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 425,820 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,004 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 335 | Replies: 2
Reply
Join Date: Jul 2008
Posts: 14
Reputation: james1700 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
james1700 james1700 is offline Offline
Newbie Poster

soap error with php

  #1  
Jul 3rd, 2008
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.

  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 7:23 am. Reason: Keep It Organized - please use [code] tags
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2008
Posts: 8
Reputation: kuldeep04 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
kuldeep04's Avatar
kuldeep04 kuldeep04 is offline Offline
Newbie Poster

Re: soap error with php

  #2  
Jul 7th, 2008
Originally Posted by james1700 View 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.

  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.
Kuldeep (KD)
Reply With Quote  
Join Date: Jul 2008
Posts: 14
Reputation: james1700 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
james1700 james1700 is offline Offline
Newbie Poster

Re: soap error with php

  #3  
Jul 14th, 2008
Spot on cheers - what you suggested did the trick.

Regards,

james
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:14 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC