ksoapライブラリを使用してWebサービスにdouble値を送信しようとしています。 これは私が試みたものですが、動作しません。誰でもこの仕事をする方法を説明することはできますか?Android - wsサービスにdouble値を送信する方法
public String getDataForStaticSearch() throws SoapFault
{
String data = "";
String serviceUrl = RB_Constant.RB_Webservice_URL;
String serviceNamespace = RB_Constant.RB_Webservice_Namespace;
String soapAction = "http://www.roadbrake.com/GetSearchResultsV2";
String type_of_soap = "GetSearchResultsV2";
PropertyInfo headingdirectionObj = new PropertyInfo();
headingdirectionObj.name = "headingdirection";
headingdirectionObj.type = PropertyInfo.INTEGER_CLASS;
try
{
SoapObject Request = new SoapObject(serviceNamespace, type_of_soap);
// strUserLatitude and strUserLongitude are of type double.
// How to pass these values to ws.
Request.addProperty("strUserLatitude", 33.924012);
Request.addProperty("strUserLongitude", -118.3832772);
//headingdirectionObj is of type int
Request.addProperty(headingdirectionObj, 0);
System.out.println("Request Value->"+Request.toString());
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(Request);
try
{
HttpTransportSE androidHttpTransport = new HttpTransportSE(serviceUrl);
androidHttpTransport.call(soapAction, envelope);
}
catch(Exception e)
{
System.out.println("Webservice calling error ->"+e.toString());
}
SoapPrimitive response = (SoapPrimitive)envelope.getResponse();
data = response.toString();
System.out.println("web service response->"+response.toString());
}
catch(Exception e)
{
System.out.println("Soap Method Error ->"+e.toString());
}
return data;
}
を、それを使用することが、私はポストを更新uは..... –
を行っているものといくつかの詳細を記入してくださいそれを参照してください – naresh
@naresh私はあまりにも緯度と経度の二重の値をWSDLサービスに送り、Internal Service Fault Exceptionを取得する必要があります。これで私を助けてくれますか? –