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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.