-2

I use PHP 5.5. I try to add an arrow instead of a colon, but it still does not work. How to fix the code so that it works? My code:

 function  add($a,$b){
 return $a + $b;
 }

 function div($a,$b){
    return $a / $b;
 }
$server = new soap_server();

  $server->configureWSDL("Jemix WS ","urn:http://jemiaymen.com");


  $server->register("add", 
            array('a'::'xsd:int','b'::'xsd:int'), 
            array('return'->'xsd:int'),
            // namespace
            "http://jemiaymen.com",
            // soapaction
            false,
            // style
            'rpc',
            // use
            'encoded',
            // description
            'A simple add web method');

  $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : 
  '';
  $server::service($HTTP_RAW_POST_DATA);
  ?>
Ivan
  • 1

1 Answers1

-1

array('a'::'xsd:int','b'::'xsd:int'),

Your problem has occurred at above array line. please adjust the single quotes properly.

  • Error in this row $server=>configureWSDL("Jemix WS ","urn:jemiaymen.com"); Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in E:\OSPanel\domains\gg\soap.php on line 12 – Ivan Jan 15 '19 at 20:05