Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
b6b2759e
Commit
b6b2759e
authored
18 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Dolibarr offre des fonctions Web services nativement
parent
926e9a30
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/webservices_client.php
+43
-43
43 additions, 43 deletions
htdocs/webservices_client.php
with
43 additions
and
43 deletions
htdocs/webservices_client.php
+
43
−
43
View file @
b6b2759e
...
...
@@ -23,53 +23,53 @@
\file htdocs/webservices_client.php
\brief Page demo client appel WebServices Dolibarr
\version $Revision$
*/
*/
require_once
(
"./master.inc.php"
);
require_once
(
NUSOAP_PATH
.
'/nusoap.php'
);
// Include SOAP
$WS_DOL_URL
=
$dolibarr_main_url_root
.
'/webservices.php'
;
$WS_METHOD
=
'getVersions'
;
// Set the parameters to send to the WebService
$parameters
=
array
(
"param1"
=>
"value1"
);
// Set the WebService URL
dolibarr_syslog
(
"Create soapclient for URL="
.
$WS_DOL_URL
);
$soapclient
=
new
soapclient
(
$WS_DOL_URL
);
if
(
$soapclient
)
{
}
// Call the WebService method and store its result in $result.
dolibarr_syslog
(
"Call method "
.
$WS_METHOD
);
$result
=
$soapclient
->
call
(
$WS_METHOD
,
$parameters
);
// Show page with result
$WS_DOL_URL
=
$dolibarr_main_url_root
.
'/webservices.php'
;
$WS_METHOD
=
'getVersions'
;
// Set the parameters to send to the WebService
$parameters
=
array
(
"param1"
=>
"value1"
);
// Set the WebService URL
dolibarr_syslog
(
"Create soapclient for URL="
.
$WS_DOL_URL
);
$soapclient
=
new
soapclient
(
$WS_DOL_URL
);
if
(
$soapclient
)
{
}
// Call the WebService method and store its result in $result.
dolibarr_syslog
(
"Call method "
.
$WS_METHOD
);
$result
=
$soapclient
->
call
(
$WS_METHOD
,
$parameters
);
// Show page with result
header
(
"Content-type: text/html; charset=utf8"
);
print
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'
.
"
\n
"
;
echo
'<html>'
.
"
\n
"
;
echo
'<head>'
;
echo
'<title>WebService Test: '
.
$WS_METHOD
.
'</title>'
;
echo
'</head>'
.
"
\n
"
;
echo
'<body>'
.
"
\n
"
;
echo
"<h2>Question</h2>"
;
echo
'<h4>Function</h4>'
;
echo
$WS_METHOD
;
echo
'<h4>Request</h4>'
;
echo
'<pre>'
.
htmlspecialchars
(
$client
->
request
,
ENT_QUOTES
)
.
'</pre>'
;
echo
"<h2>Réponse</h2>"
;
echo
'<h4>Result</h4>'
;
echo
'<pre>'
;
print_r
(
$result
);
echo
'<html>'
.
"
\n
"
;
echo
'<head>'
;
echo
'<title>WebService Test: '
.
$WS_METHOD
.
'</title>'
;
echo
'</head>'
.
"
\n
"
;
echo
'<body>'
.
"
\n
"
;
echo
"<h2>Question</h2>"
;
echo
'<h4>Function</h4>'
;
echo
$WS_METHOD
;
echo
'<h4>Request</h4>'
;
echo
'<pre>'
.
htmlspecialchars
(
$client
->
request
,
ENT_QUOTES
)
.
'</pre>'
;
echo
"<h2>Réponse</h2>"
;
echo
'<h4>Result</h4>'
;
echo
'<pre>'
;
print_r
(
$result
);
echo
'</pre>'
;
echo
'<h4>Response</h4>'
;
echo
'<pre>'
.
htmlspecialchars
(
$client
->
response
,
ENT_QUOTES
)
.
'</pre>'
;
echo
'</body>'
.
"
\n
"
;;
echo
'<h4>Response</h4>'
;
echo
'<pre>'
.
htmlspecialchars
(
$client
->
response
,
ENT_QUOTES
)
.
'</pre>'
;
echo
'</body>'
.
"
\n
"
;;
echo
'</html>'
.
"
\n
"
;;
?>
?>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment