Re: [SOAP] convert perl client code to php - OT
| From: | Jesse Thompson | Date: | Fri, 08 Aug 2003 18:19:02 +0000 |
| Subject: | Re: [SOAP] convert perl client code to php - OT | ||
| References: | 1 2 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-938@lists.php.net to get a copy of this message | ||
I get a 404 error when contacting the uri directly. However if I contact the proxy instead it generates a 500 error.
// jesse
Bill Moran wrote:
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::LiteTry 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',->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; }'trace' => 1);$ret = $soap->call('Test',$param = array('data'=>"Jeremy"), $options);if (PEAR::isError($ret)) {echo $ret->getMessage() . ': ' . $ret->getUserInfo();} else {print_r($ret);}