mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Web services are in UTF8
This commit is contained in:
parent
0c0402110e
commit
a27af6c433
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/webservices/client.php
|
||||
\brief Page demo client appel WebServices Dolibarr
|
||||
\version $Id$
|
||||
*/
|
||||
* \file htdocs/webservices/client.php
|
||||
* \brief Page demo client appel WebServices Dolibarr
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
// This is to make Dolibarr working with Plesk
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
|
|
@ -39,7 +39,7 @@ dol_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL);
|
|||
$soapclient = new soapclient_nusoap($WS_DOL_URL);
|
||||
if ($soapclient)
|
||||
{
|
||||
|
||||
$soapclient->soap_defencoding='UTF-8';
|
||||
}
|
||||
|
||||
// Call the WebService method and store its result in $result.
|
||||
|
|
@ -56,18 +56,18 @@ echo '</head>'."\n";
|
|||
|
||||
echo '<body>'."\n";
|
||||
|
||||
echo "<h2>Question</h2>";
|
||||
echo "<h2>Request</h2>";
|
||||
echo '<h4>Function</h4>';
|
||||
echo $WS_METHOD;
|
||||
echo '<h4>Request</h4>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient->request, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo "<h2>Réponse</h2>";
|
||||
echo "<h2>Response</h2>";
|
||||
echo '<h4>Result</h4>';
|
||||
echo '<pre>';
|
||||
print_r($result);
|
||||
echo '</pre>';
|
||||
echo '<h4>Response</h4>';
|
||||
echo '<h4>SOAP Message</h4>';
|
||||
echo '<pre>' . htmlspecialchars($soapclient->response, ENT_QUOTES) . '</pre>';
|
||||
|
||||
echo '</body>'."\n";;
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ dol_syslog("Call Dolibarr webservices interfaces");
|
|||
|
||||
// Create the soap Object
|
||||
$server = new soap_server();
|
||||
$server->soap_defencoding='UTF-8';
|
||||
$ns='dolibarr';
|
||||
$server->configureWSDL('WebServicesDolibarr',$ns);
|
||||
$server->wsdl->schemaTargetNamespace=$ns;
|
||||
|
||||
|
||||
// Register methods available for clients
|
||||
/*
|
||||
$server->register('getVersions',
|
||||
|
|
@ -48,7 +48,7 @@ $ns);
|
|||
*/
|
||||
|
||||
$server->register('getVersions',
|
||||
// Tableau parametres entr<EFBFBD>e
|
||||
// Tableau parametres entree
|
||||
array(),
|
||||
// Tableau parametres sortie
|
||||
array('dolibarr'=>'xsd:string','mysql'=>'xsd:string','apache'=>'xsd:string'),
|
||||
|
|
@ -64,13 +64,13 @@ $server->service($HTTP_RAW_POST_DATA);
|
|||
function getVersions()
|
||||
{
|
||||
dol_syslog("Function: getVersions");
|
||||
|
||||
|
||||
$versions_array=array();
|
||||
|
||||
|
||||
$versions_array['dolibarr']=DOL_VERSION;
|
||||
$versions_array['mysql']='NA';
|
||||
$versions_array['apache']='NA';
|
||||
|
||||
|
||||
return $versions_array;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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="dolibarr" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="dolibarr">
|
||||
<types><xsd:schema targetNamespace="dolibarr"
|
||||
>
|
||||
<types><xsd:schema targetNamespace="dolibarr">
|
||||
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
|
||||
</xsd:schema>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user