Re: Help Required on Segmentation Fault on invoking a WebService developed in Java Axis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



smarty wrote:
Hi All,

iam getting a segmentation fault when i call a Java webservice function.
When i call getFunctions method of the SoapClient it lists out the functions
exposed by webservice but when i try to call the function it gives a
segmentation fault. My php code is :

<?php
 try
    {
  $client = new SoapClient("
http://72.167.92.140:9080/axis2/services/SendEmailWS?wsdl";);
        var_dump($client->__getFunctions());
  var_dump($client->__getTypes());
  $namedArray = array('xmlData'    => "TEST");
  $results = $client->testPhp($namedArray);
  echo "MESSAGE ID IS :<br>";
     print_r($results);
 }
 catch (SOAPFault $exception)
 {
  echo $exception;
 }
?>

Hi smarty,

I just checked whether it would work on WSO2 WSF/PHP <http://wso2.org/projects/wsf/php> and it woks fine for me. It is quite simple, you just want to do,

<code>

*try {

$client = new WSClient(array("wsdl"=>"http://72.167.92.140:9080/axis2/services/SendEmailWS?wsdl";, "to" => "http://72.167.92.140:9080/axis2/services/SendEmailWS";));
   $proxy = $client->getProxy();
   $return_val =  $proxy->testPhp(array("param0" => "TEST"));
   echo $return_val["return"];

}
catch (Exception $e) {

 if ($e instanceof WSFault) {
       printf("Soap Fault: %s\n", $e->Reason);
 } else {
       printf("Message = %s\n",$e->getMessage());
 }

}
*
</code>



Thanks
Buddhika

[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux