Re: [SOAP] convert perl client code to php - OT
| From: | Bill Moran | Date: | Fri, 08 Aug 2003 17:35:31 +0000 |
| Subject: | Re: [SOAP] convert perl client code to php - OT | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-936@lists.php.net to get a copy of this message | ||
Jesse Thompson wrote:
Does anyone know how I would convert the following perl SOAP call to php? (using Pear SOAP, not using wsdl, and we are using signed client side certificates).
#!perl -w
use SOAP::Lite;
$ENV{HTTPS_CERT_FILE} = 'dmailtest1.crt';
$ENV{HTTPS_KEY_FILE} = 'dmailtest1.key';
#$ENV{HTTPS_CA_FILE} = '';
#$ENV{HTTPS_DEBUG} = 9999999;
my $soap = SOAP::Lite
->uri('https://host.domain/UWDS/WSTest')
->proxy('https://host.domain/ApacheSoap');
my $result = $soap->Test(data=>"Jeremy");
unless ($result->fault) {
print $result->result() . "\n";
} else {
print join ', ',
$result->faultcode,
$result->faultstring;
die;
}
Try this. You should be able to figure out additional details
from the output:
include('SOAP/Client.php');
$soap = new SOAP_Client('https://host.domain/UWDS/WSTest');
$options = array('namespace' => 'http://tempuri.org',
'trace' => 1);$ret = $soap->call('Test',
$param = array('data'=>"Jeremy"),
$options);
if (PEAR::isError($ret)) {
echo $ret->getMessage() . ': ' .
$ret->getUserInfo();
} else {
print_r($ret);} -- Bill Moran Potential Technologies http://www.potentialtech.com