ILIAS
Release_4_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
wsdlclient11.php
Go to the documentation of this file.
1
<?php
2
/*
3
* $Id: wsdlclient11.php,v 1.2 2007/04/13 16:52:32 snichol Exp $
4
*
5
* WSDL client sample.
6
* Exercises a document/literal NuSOAP service (added nusoap.php 1.73).
7
* Does not explicitly wrap parameters.
8
*
9
* Service: WSDL
10
* Payload: document/literal
11
* Transport: http
12
* Authentication: none
13
*/
14
require_once(
'../lib/nusoap.php'
);
15
$proxyhost
= isset(
$_POST
[
'proxyhost'
]) ?
$_POST
[
'proxyhost'
] :
''
;
16
$proxyport
= isset(
$_POST
[
'proxyport'
]) ?
$_POST
[
'proxyport'
] :
''
;
17
$proxyusername
= isset(
$_POST
[
'proxyusername'
]) ?
$_POST
[
'proxyusername'
] :
''
;
18
$proxypassword
= isset(
$_POST
[
'proxypassword'
]) ?
$_POST
[
'proxypassword'
] :
''
;
19
$useCURL
= isset(
$_POST
[
'usecurl'
]) ?
$_POST
[
'usecurl'
] :
'0'
;
20
$client
=
new
soapclient(
'http://www.scottnichol.com/samples/hellowsdl3.wsdl'
,
true
,
21
$proxyhost
,
$proxyport
,
$proxyusername
,
$proxypassword
);
22
$err
=
$client
->getError();
23
if
(
$err
) {
24
echo
'<h2>Constructor error</h2><pre>'
.
$err
.
'</pre>'
;
25
}
26
$client
->setUseCurl(
$useCURL
);
27
$person
= array(
'firstname'
=>
'Willi'
,
'age'
=> 22,
'gender'
=>
'male'
);
28
$name
= array(
'name'
=>
$person
);
29
$result
=
$client
->call(
'hello'
,
$name
);
30
if
(
$client
->fault) {
31
echo
'<h2>Fault</h2><pre>'
;
32
print_r(
$result
);
33
echo
'</pre>'
;
34
}
else
{
35
$err
=
$client
->getError();
36
if
(
$err
) {
37
echo
'<h2>Error</h2><pre>'
.
$err
.
'</pre>'
;
38
}
else
{
39
echo
'<h2>Result</h2><pre>'
;
40
print_r(
$result
);
41
echo
'</pre>'
;
42
}
43
}
44
echo
'<h2>Request</h2>'
;
45
echo
'<pre>'
. htmlspecialchars(
$client
->request, ENT_QUOTES) .
'</pre>'
;
46
echo
'<h2>Response</h2>'
;
47
echo
'<pre>'
. htmlspecialchars(
$client
->response, ENT_QUOTES) .
'</pre>'
;
48
echo
'<h2>Debug</h2>'
;
49
echo
'<pre>'
. htmlspecialchars(
$client
->debug_str, ENT_QUOTES) .
'</pre>'
;
50
?>
webservice
soap
lib2
samples
wsdlclient11.php
Generated on Wed Apr 27 2016 19:01:55 for ILIAS by
1.8.1.2 (using
Doxyfile
)