Hey guys. I need some help with a line of code for invoking a web service for an email validation. Here is the problem: I'm getting this error "Notice: Use of undefined constant Body - assumed 'Body' in C:\xampp\htdocs\invokeEmailService\validateEmail_client.php on line 16"
validateEmail_client.html <html> <head> <title>Page to validate email</title> </head> <body> <form action="validateEmail_client.php" method="post"> <table> <tr> <td colspan="2">Testing Validiy of Email</td> </tr> <tr> <td>Email</td> <td><input type="txt_email" name="txt_email"></td> </tr> <tr> <td> </td> <td><input type="submit" value="Invoke"></td> </tr> </table> </form> </body> </html>
validateEmail_client.php <?php // Pull in the NuSOAP code require_once('nusoap.php'); //Retrieving data from form $Email=$_POST['txt_email']; // Create the client instance $wsdl=' http://www.ezzylearning.com/services/EmailValidationService.asmx?wsdl'; $client = new nusoap_client($wsdl,true); $param = array('email' => $Email); $result = $client->call('ValidateEmail',$param); if ($result) { return Body; } else { echo $Email." is a wrong email"; } ?>
These are the parts of the wdsl that I'm using: <wsdl:message name="ValidateEmailHttpPostIn"> // parameter (email) <wsdl:part name="email" type="s:string"/> </wsdl:message> <wsdl:message name="ValidateEmailHttpPostOut"> //return Body <wsdl:part name="Body" element="tns:boolean"/> </wsdl:message>
Join our real-time social learning platform and learn together with your friends!