MIOLO20
Toggle main menu visibility
Página principal
Estruturas de dados
Estruturas de dados
Hierarquia de classes
Campos de dados
Tudo
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Funções
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variáveis
$
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Ficheiros
Lista de ficheiros
Globais
Tudo
$
_
a
c
d
e
f
g
i
l
m
o
p
r
s
u
Funções
Variáveis
$
_
c
e
f
l
m
o
p
s
Exemplos
•
Tudo
Estruturas de dados
Namespaces
Ficheiros
Funções
Variáveis
Carregando...
Procurando...
Nenhuma entrada encontrada
demo6.php
Ir para a documentação deste ficheiro.
1
<?php
2
3
// This demonstrates how to use the SOAP client
4
5
// Internally this client uses the native PHP SoapClient. The use of PhpWsdl
6
// is best for doing SOAP with http Auth protected webservices or if you
7
// prefer to work with a documented PHP client class that handles all the SOAP
8
// for you.
9
10
if
(isset($_GET[
'name'
])){
11
// Perform SOAP request
12
require_once(
'class.phpwsdlclient.php'
);
// All depencies are loaded here
13
ini_set(
'soap.wsdl_cache_enabled'
,0);
// Disable caching in PHP
14
PhpWsdl::$CacheTime
=0;
// Disable caching in PhpWsdl
15
$client=
new
PhpWsdlClient
(
'http://wan24.de/test/phpwsdl2/demo4.php?WSDL'
);
// The constructor has to be called with the target webservice WSDL URI
16
?><html><head><title>SOAP demo</title></head><body><p><?php
17
echo htmlentities($client->SayHello($_GET[
'name'
]));
// Perform the SOAP request and output the response
18
19
// You could also use the PhpWsdlClient->DoRequest method
20
//echo htmlentities($client->DoRequest('SayHello',Array('you')));
21
22
// PhpWsdlClient can produce a documented PHP SOAP client for you
23
/*$php=$client->CreatePhpSoapClient(null,Array('openphp'=>false));// $php will contain the generated PHP SOAP client source code
24
eval($php);// This will load the SOAP client classes from the PHP code string
25
$soapDemo=new SoapDemoSoapClient();// Create an instance of the generated class (the name of the webservice+"SoapClient" is the default class name)
26
echo htmlentities($soapDemo->SayHello('you'));*/
27
28
?></p></body></html><?php
29
}
else
{
30
// Show HTML form
31
?><html><head><title>SOAP demo</title></head><body>
32
<form method=
"get"
>
33
<p>Enter a name: <input type=
"text"
name=
"name"
value=
"<?php echo (isset($_GET['name']))?str_replace('"
','
"
',htmlentities($_GET['
name
'])):'
you
'; ?>"> <input type="submit"></p>
34
</form>
35
</body></html><?php
36
}
37
38
?>
PhpWsdlClient
Definição
class.phpwsdlclient.php:34
PhpWsdl\$CacheTime
static $CacheTime
Definição
class.phpwsdl.php:256
classes
contrib
phpWsdl
demo6.php
Gerado por
1.10.0