asmx soap Webサービスにデータを送信しようとしましたが、送信は管理されました。私が持っているエラーは:KSOAPを使用してアンドロイドアプリからasmx Webサービスを呼び出してください
08-13 20:51:12.571:W/System.err(8885):SoapFault - faultcode: 'soap:Server' faultstring: 'サーバーは要求を処理できませんでした。 --->値はnullにはできません。 08-13 20:51:12.571:W/System.err(8885):SoapFault - faultcode: 'soap:Server' faultstring: 'サーバーは要求を処理できませんでした。 --->値はnullにはできません。 08-13 20:51:12.571:W/System.err(8885):SoapFault - faultcode: 'soap:Server' faultstring: 'サーバーは要求を処理できませんでした。 --->値はnullにはできません。ここで
は、Web servcieのURLです: http://87.248.129.182:8090/PostPhotoInfo.asmx
やコード:
private final String NAMESPACE = "http://tempuri.org/";
private final String URL = "http://87.248.129.182:8090/PostPhotoInfo.asmx";
private final String SOAP_ACTION = "http://tempuri.org/PostPhotoInfo";
private final String METHOD_NAME = "PostPhotoInfo";
public void call_asmx() {
//Create request
// photoArray
SoapObject request = new SoapObject(URL, METHOD_NAME);
//SoapObject request2 = new SoapObject(NAMESPACE, "photoArray");
SoapObject IMG = new SoapObject(URL, "PhotoInfo");
PropertyInfo _date = new PropertyInfo();
_date.setName("Date");
_date.setValue("2016-08-12 15:45:00");
_date.setType(String.class);
PropertyInfo _Latitude = new PropertyInfo();
_Latitude.setName("Latitude");
_Latitude.setValue("12.5245123");
_Latitude.setType(double.class);
PropertyInfo _longtitude = new PropertyInfo();
_longtitude.setName("Longitude");
_longtitude.setValue("32.45345");
_longtitude.setType(double.class);
PropertyInfo _CardID = new PropertyInfo();
_CardID.setName("CardID");
_CardID.setValue(14);
_CardID.setType(int.class);
PropertyInfo _ParkingNo = new PropertyInfo();
_ParkingNo.setName("ParkingNo");
_ParkingNo.setValue(12);
_ParkingNo.setType(int.class);
PropertyInfo _Image = new PropertyInfo();
_Image.setName("Image");
_Image.setValue("<< IMAGE DATA >>>");
_Image.setType(Base64.class);
IMG.addProperty(_date);
IMG.addProperty(_Latitude);
IMG.addProperty(_longtitude);
IMG.addProperty(_CardID);
IMG.addProperty(_ParkingNo);
IMG.addProperty(_Image);
request.addSoapObject(IMG);
//Create envelope
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
//Set output SOAP object
envelope.setOutputSoapObject(request);
//Create HTTP call object
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
//Invole web service
androidHttpTransport.call(SOAP_ACTION, envelope);
//Get the response
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
//Assign it to fahren static variable
fahren = response.toString();
} catch (Exception e) {
e.printStackTrace();
//Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
任意のヒントがはるかに高く評価されます。