0

i'm trying to connect my page to a webservice soap. My hosting doesn't support soap so SoapClient isn't recognized. I have a working example to connect to that ws but uses SoapClient. This is:

$params = array('location'=>"www.wssite.com/test.php",
                            'trace'=>1,
                            'exceptions'=>1);
$client = new SoapClient("url_of_wsdl",$params);
var_dump($client->__getFunctions());
var_dump($client->__getTypes());

$pars = array('ipcInvocationName' => 'wsinvokeservice',
          'ipcMethodNamespace' => 'svcmsgxml.bldximsgin',
          'ttIn' => array(
          'ttInRow' => array( array('ParPos' => '0','ParNam' => 'MethodName',
              'ParVal' => POST),
           array('ParPos' => '1','ParNam' => 'XMLDocumentIn',
              'ParVal' => 'LoginXmlValue'))),
          'ttOut' => array('ttOutRow' => array(array('ParPos' => '0',
              'ParNam' => 'ContentType','ParVal' => ''),array('ParPos' => '1',
              'ParNam' => 'Result','ParVal' => ''),
               array('ParPos' => '2','ParNam' => 'XMLDocumentOut','ParVal' => '')));

$return = $client->wssigateway($pars);

It works good!

I used NuSoap in this way:

require_once 'soap/nusoap.php';

$wsdl = 'url_of_wsdl';


$client = new soapclient($wsdl,true);
$err = $client -> getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
    exit();
}
    $pars = array()//the same as above 
    $result = $client -> call('wssigateway',$pars);

The script works for too much time and does get me nothing.. why? can someone help me?

Jayyrus
  • 12,961
  • 41
  • 132
  • 214

1 Answers1

0

Try $client = new nusoap_client($wsdl,true);

instead of $client = new soapclient($wsdl,true);

Nibhrit
  • 188
  • 1
  • 2
  • 14