thiagovespa.com.br/blog/2012/05/31/chamando-um-webservice-soap-com-php/
Fonte de Estudos Acima
php.net/manual/en/soapclient.soapclient.php
$function
=
'ConvertTemp'
;
$arguments
=
array
(
'ConvertTemp'
=>
array
(
'Temperature'
=> 31,
'FromUnit'
=>
'degreeCelsius'
,
'ToUnit'
=>
'degreeFahrenheit'
));
$result
=
$client
->__soapCall(
$function
,
$arguments
,
$options
);
echo
'Response: '
;
print_r(
$result
);
?>
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
soap:Envelope
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd
=
"http://www.w3.org/2001/XMLSchema"
xmlns:soap
=
"http://schemas.xmlsoap.org/soap/envelope/"
>
<
soap:Body
>
<
Temperature
>double</
Temperature
>
<
FromUnit
>degreeCelsius or degreeFahrenheit or degreeRankine or degreeReaumur or kelvin</
FromUnit
>
<
ToUnit
>degreeCelsius or degreeFahrenheit or degreeRankine or degreeReaumur or kelvin</
ToUnit
>
</
ConvertTemp
>
</
soap:Body
>
</
soap:Envelope
>
Nenhum comentário:
Postar um comentário