•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 429,743 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 4,080 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 RSS, Web Services and SOAP advertiser: Programming Forums
Views: 1971 | Replies: 0
![]() |
•
•
Join Date: Mar 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
I am new to SOAP and getting this error
" RESULTS: Array ( [faultcode] => Client [faultactor] => [faultstring] => Could not authenticate SOAP request: Could not retrieve authentication credentials from SOAP header [detail] => )"
The cURL PHP extension is required for NuSOAP to make a connection over SSL
I am new to SOAP and getting this error
" RESULTS: Array ( [faultcode] => Client [faultactor] => [faultstring] => Could not authenticate SOAP request: Could not retrieve authentication credentials from SOAP header [detail] => )"
The cURL PHP extension is required for NuSOAP to make a connection over SSL
php Syntax (Toggle Plain Text)
<? require_once "nusoap/nusoap.php"; /** * @file * Example code to access the Omniture Web Services for Administration Console * and retrieve the current token count. * * @author Omniture <clientcare@omniture.com> * @copyright 2006 Omniture, Inc. All Rights Reserved */ // reference the downloaded WSDL define('WSDL_DOCUMENT', "./Omniture_wsdl.xml"); // seed random list($usec, $sec) = explode(' ', microtime()); srand((float) $sec + ((float) $usec * 100000)); // SOAP login credentials $username = "provided"; $secret = '*provided; function get_header($username, $secret) { // Create a unique identifier, a.k.a. nonce. // This example is used for simplicity in demonstration. A method // that guarantees uniqueness should be used in a production environment. $nonce = md5(rand()); $created = date("Y-m-d H:i:s"); $combo_string = $nonce . $created . $secret; $sha1_string = sha1($combo_string); $password = base64_encode($sha1_string); $headers = '<wsse:Security SOAP-ENV:mustUnderstand="1"> <wsse:UsernameToken wsu:Id="User"> <wsse:Username>'.$username.'</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis- 200401-wss-username-token-profile-1.0#PasswordDigest">'.$password.'</ wsse:Password> <wsse:Nonce>'.$nonce.'</wsse:Nonce> <wsu:Created>'.$created.'</wsu:Created> </wsse:UsernameToken> </wsse:Security>'; return $headers; } // Create nuSOAP client $client = new soapclient(WSDL_DOCUMENT, TRUE); // handle client setup error if($err = $client->getError()) { echo "ERROR:".$err."\n"; exit(); } // call Omniture Web services function $result = $client->call('Company.GetTokenCount', // function name array('auth_key' => $username), // parameters 'http://omniture.com', // namespace '', // SOAP Action get_header($username, $secret)); // security header // Display results echo "RESULTS:\n"; print_r($result); echo "\n"; ?>
Last edited by peter_budo : May 31st, 2008 at 6:37 am. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
•
•
•
•
DaniWeb RSS, Web Services and SOAP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Detect expiration in Web.Caching.Cache on a webservice
- Next Thread: pls Help!! how to search for string in a file with C# and Web Services??


Linear Mode