Jump to content

PHP4 - Calling web service using php(nusoap class) with xml file as input


ayewalekar2000

Recommended Posts

Hello,

 

I am trying to call an web service using nusoap class library with php 4. it works for me with input array ($param).

 

following is the code for reference:

 

require_once('libs/nusoap.php');

 

$client = new soapclient($URL,"wsdl");

 

$param = array('Value' => 'This is Avinash Test');

$results = $client->call("GetGenericCollection", $param);

 

if ($client->fault) {

trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faulstring})", E_ERROR);

} else {

// Check for errors

$err = $client->getError();

if ($err) {

// Display the error

echo '<h2>Error</h2><pre>' . $err . '</pre>';

} else {

// Display the result

echo '<h2>Result</h2><pre>';

print_r($result);

echo '</pre>';

}

}

 

 

But, Now I wanted to call it using xml file as input rather array ($param).

 

So requesting help, any help will be appreciated !!!

 

Thanks

ayewalekar2000

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.