What might be PHP SOAP Error for this code?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
veena.upadhya
Forum Newbie
Posts: 2
Joined: Wed Jul 02, 2008 12:22 am

What might be PHP SOAP Error for this code?

Post by veena.upadhya »

Hello All,

<?php
$wsdl = "http://demo.mchek.com/mChekPaymentGatew ... teway?wsdl";
$id = "16577";
$cliente = new SoapClient($wsdl);
$vem = $cliente->__call('checkStatus',array($id));
print $vem;
?>

Fatal error: Uncaught SoapFault exception: [soap:Client] Not enough message parts were received for the operation. in C:\Program Files\EasyPHP 2.0b1\www\examples\soap\test4.php:5 Stack trace: #0 C:\Program Files\EasyPHP 2.0b1\www\examples\soap\test4.php(5): SoapClient->__call('checkStatus', Array) #1 {main} thrown in C:\Program Files\EasyPHP 2.0b1\www\examples\soap\test4.php on line 5

Can any body solve this error plz?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: What might be PHP SOAP Error for this code?

Post by John Cartwright »

This may or may not be related to your error message, but you should not directly be calling the __call() method. Instead, you should be doing

Code: Select all

<?php
$wsdl = "http://demo.mchek.com/mChekPaymentGateway/services/mChekPaymentGateway?wsdl";
$id = "16577";
$cliente = new SoapClient($wsdl);
$vem = $cliente->checkStatus($id);
print $vem;
?>
veena.upadhya
Forum Newbie
Posts: 2
Joined: Wed Jul 02, 2008 12:22 am

Re: What might be PHP SOAP Error for this code?

Post by veena.upadhya »

Jcart wrote:This may or may not be related to your error message, but you should not directly be calling the __call() method. Instead, you should be doing

Code: Select all

<?php
$wsdl = "http://demo.mchek.com/mChekPaymentGateway/services/mChekPaymentGateway?wsdl";
$id = "16577";
$cliente = new SoapClient($wsdl);
$vem = $cliente->checkStatus($id);
print $vem;
?>
hmm..thats not an issue only nuosoap extension can directly call checkStatus..
however u can copy and paste the code which i have written and then test it.
plz help me to resolve this problem.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: What might be PHP SOAP Error for this code?

Post by John Cartwright »

veena.upadhya wrote:
Jcart wrote:This may or may not be related to your error message, but you should not directly be calling the __call() method. Instead, you should be doing

Code: Select all

<?php
$wsdl = "http://demo.mchek.com/mChekPaymentGateway/services/mChekPaymentGateway?wsdl";
$id = "16577";
$cliente = new SoapClient($wsdl);
$vem = $cliente->checkStatus($id);
print $vem;
?>
hmm..thats not an issue only nuosoap extension can directly call checkStatus..
however u can copy and paste the code which i have written and then test it.
plz help me to resolve this problem.
Thats incorrect. Try it.

As far as your problem goes, I'm not familiar with the API. Are you sending all the required parameters?
Post Reply