Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
/**
* Creates a interface to Tempuri
*
* Tempuri offers a Webservice using Soap; WSDL is available.
*
* @author saftmeister
* @link http://tempuri.org/
*/
class Tempuri
{
/**
* The WSDL URL
*
* @var string
*/
const WSDL = 'http://90.145.71.139/wicsws/OrderEntry.asmx?wsdl';
/**
* Our Singleton pattern instance
*
* @var Tempuri
* @access private
* @staticvar
*/
private static $_instance;
/**
* The SOAP Client instance
*
* @var SoapClient
* @access private
*/
private $soap;
/**
* Create a new instance of Tempuri
*
* We are a Singleton pattern, so we have to be private
* @access private
*/
private function __construct()
{
try {
$this->soap = new SoapClient(self::WSDL, array("trace" => 1, "exceptions" => 1));
}
catch(SoapFault $e)
{
echo $e->getMessage();
}
}
/**
* Get the Tempuri Singleton instace
*
* @return Tempuri
* @access public
* @static
*/
public static function getInstance()
{
if(self::$_instance == null)
{
self::$_instance = new Tempuri();
}
return self::$_instance;
}
/**
* Implements the method AddOrderFinishResult of WebService
*
* @param mixed $referentie
* @access public
*/
public function addOrderFinish($referentie)
{
$result = -1;
try {
$addOrderFinishResult = $this->soap->__call('AddOrderFinish', array(
'AddOrderFinish' => array(
'Referentie' => $referentie
)
));
// Debugging: var_dump($addOrderFinishResult);
$result = $addOrderFinishResult->AddOrderFinishResult;
}
catch(SoapFault $e)
{
echo $e->getMessage();
}
return $result;
}
}
$ergebnis = Tempuri::getInstance()->addOrderFinish('Keine Ahnung, was ein Referentie ist');
var_dump($ergebnis);
string 'Geen Order gevonden.' (length=20)