私はAndroidでリクエストをksoap2を使用してWebサービスPHPに送信しました:
String NAMESPACE="http://www.localhost:81/wsdl";
String METHOD_NAME="insertUser";
String SOAP_ACTIONS="http://www.localhost:81/wsdl#insertUser";
String URL="http://10.0.2.2:81/phpWebservice/pgsql.php";
SoapObject request=new SoapObject(NAMESPACE, METHOD_NAME);
**request.addProperty("name","地獄");**
request.addProperty("birthday", "2012/02/01");
SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
//envelope.dotNet=true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidhttpTranport=new HttpTransportSE (URL);
androidhttpTranport.call(SOAP_ACTIONS, envelope);
Webservicde php as:
require("nusoap.php");
$server = new soap_server();
$server->register('insertUser', // method name
array('name' => 'xsd:string','birthday'=>'xsd:string'), // input parameters
array('return' => 'xsd:int'), // output parameters
$namespace, // namespace
$namespace . '#insertUser', // soapaction
'rpc', // style
'encoded', // use
'Get all user id dua vao =0' // documentation
);
function insertUser($name,$birthday)
{
value of $name=?? Why
}
androidの「name」の値は「地獄」ですが、webserver $ name ='??' Webサービスでの$nameの値はエラーです。手伝って頂けますか?