This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client = new SoapClient('https://kvikbase.kvik.com:44343/webservices/KvikStores.php?wsdl'); | |
$output = $client->get_employees_by_store( array('storeid'=>27, 'languageid'=>1)); | |
var_dump($output); | |
--- | |
Fatal error: Uncaught SoapFault exception: [HTTP] Unauthorized in /Users/fangel/Sites/soap-test-riversen.php:4 | |
Stack trace: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="https://kvikbase.kvik.com:44343/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="https://kvikbase.kvik.com:44343/"> | |
<types><xsd:schema targetNamespace="https://kvikbase.kvik.com:44343/" | |
> | |
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> | |
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> | |
<xsd:complexType name="Store"> | |
<xsd:all> | |
<xsd:element name="id" type="xsd:int"/> | |
<xsd:element name="storeName" type="xsd:string"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('soap.wsdl_cache_ttl', 0); | |
$client = new SoapClient('http://kvikbase.kvik.com:8080/webservices/KvikStores.php?wsdl'); | |
$output = $client->get_employees_by_store( 67, 1 ); | |
header("Content-Type: text/html;charset=UTF-8"); | |
foreach( $output AS $emp ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: text/plain; charset=UTF-8"); | |
try { | |
// Fetch the server | |
$server = CNApi::getServer(); | |
// Ask the server to handle the call | |
$output = $server->handleCall(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class OAuthServerTest extends PHPUnit_Framework_TestCase { | |
public function testRejectInvalidConsumer() { | |
$unknown_consumer = new OAuthConsumer('unknown', '__unused__'); | |
$stub = $this->getMock('OAuthDataStore'); | |
$stub->expects($this->any()) | |
->method('lookup_consumer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ClassUnderTest { | |
private $table; | |
public function __construct( $table ) { | |
$this->table = $table; | |
} | |
public function lookup($key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onload=function(no){var oo=window.onload;return function(){if(typeof oo=='function'){oo();}no();}}(function(ifAO){return function(){var im=document.getElementsByTagName('img');for(var i=0;i<im.length;i++){if(im[i].src&&im[i].src.match(/aoimages\.s3/)){return ifAO();}}}}(function() { | |
// Enter whatever JS you want run when AidOnline is detected.. | |
alert('You have AidOnline - go away please!'); | |
// End of your own JS.. | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A simple sample OAuth client implementation | |
* | |
* :NOTE: This is not Revision A. compliant. I haven't had the time to update it. | |
* | |
* :NOTE 2: This is adapted from a more specific-case client, and I haven't tested | |
* the generalization! | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'OAuth.php'; | |
$consumer = new OAuthConsumer('consumer-key', 'consumer-secret'); | |
$token = new OAuthToken('token-key', 'token-secret'); // can be both request and access-token | |
// of course it needs to be an access-token to perform authorized request, but for the call to | |
// exchange your request-token for an access-token, this needs to be the request-token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A Client for Campus Notes' (http://getcampusnotes.com) API | |
* | |
* @requires OAuth-php (http://oauth.googlecode.com/svn/code/php/) * | |
* @copyright Campus Notes (C) 2009 | |
*/ | |
/** |
OlderNewer