简体   繁体   中英

php soap client for stand alone soap server listening on custom port

i built a standalone webservice using gSoap 2.8.14 and c++. Now i am trying to write a php client for this web service but unable to do so. My webservice is listening on port 9009 PHP Code is as follows:

$params = array('user' => 'username','password' => 'password','session-id'=>'approved');
$client = new SoapClient("authenticate.wsdl");
var_dump($client->__getFunctions());
$res = $client->verifyUser ( $params);

print_r( $res);

Any help on how to specify custom port for php client will be great

Simply specify the host and port passing an array of options to the constructor

$client = new SoapClient("authenticate.wsdl", 
                          array('proxy_host' => 'YOUR_HOST',
                                'proxy_port' => '9009'));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM