Các bạn ơi, cho mình hỏi với.

Mình có 1 file wsdl thế này:

<definitions targetNamespace="http://calculator.me.org/" name="CalculatorWSService">

<types>

<xsd:schema>
<xsd:import namespace="http://calculator.me.org/" schemaLocation="http://10.1.99.71:8080/CalculatorWSApplication/CalculatorWSService?xsd=1"/>
</xsd:schema>
</types>

<message name="add">
<part name="parameters" element="tns:add"/>
</message>

<message name="addResponse">
<part name="parameters" element="tns:addResponse"/>
</message>

<portType name="CalculatorWS">

<operation name="add">
<input wsam:Action="http://calculator.me.org/CalculatorWS/addRequest" message="tns:add"/>
<output wsam:Action="http://calculator.me.org/CalculatorWS/addResponse" message="tns:addResponse"/>
</operation>
</portType>

<binding name="CalculatorWSPortBinding" type="tns:CalculatorWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

<operation name="add">
<soap:operation soapAction=""/>

<input>
<soap:body use="literal"/>
</input>

<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>

<service name="CalculatorWSService">

<port name="CalculatorWSPort" binding="tns:CalculatorWSPortBinding">
<soap:address location="http://10.1.99.71:8080/CalculatorWSApplication/CalculatorWSService"/>
</port>
</service>
</definitions>

Mình cũng có 1 file test.php

trong đó, mình muốn gọi hàm add của webservice wsdl.

<?php
error_reporting(E_ALL);

ini_set("soap.wsdl_cache_enabled", 0);


$service = new SoapClient("http://10.1.99.71:8080/CalculatorWSApplication/CalculatorWSService?WSDL");

var_dump($service->__getFunctions());

$pam1 = 1;
$pam2 = 5;
$result2= $service->add($pam1,$pam2);

echo $service->__getLastRequest();

echo '<h2>KQ</h2><pre>'; print_r($result2); echo '</pre>';

?>

Kết quả của hàm add phải là 1+5 = 6

nhưng mình chạy thì ra KQ = 0 thế này:

array(1) { [0]=> string(32) "addResponse add(add $parameters)" }
KQ
stdClass Object
(
[return] => 0
)


Các bạn giúp mình với, ko rõ là mình sai ở đâu