ksoap を使用して Android の CrmDiscoveryService に接続していますが、ここで問題が発生します。
SoapFault - faultcode: 'soap:server' faultstring: 'サーバーはリクエストを処理できませんでした.' faultactor: 'null' 詳細: org.kxml2.kdom.Node@4061bd00
//here is namespace,endpoint,soapaction and methodname
public final static String DISCOVERY_NAMESPACE = "http://schemas.microsoft.com/crm/2007/CrmDiscoveryService/";
public final static String DISCOVERY_ENDPOINT_URL = "https://dev.crm5.dynamics.com/MSCRMServices/2007/Passport/CrmDiscoveryService.asmx";
public final static String SOAPACTION = "http://schemas.microsoft.com/crm/2007/CrmDiscoveryService/Execute";
private String MethodName = "Execute";
//below is the code connectting to crmdiscoveryservice
SoapObject rpc = new SoapObject(DISCOVERY_NAMESPACE, MethodName);
RetrievePolicyRequest retrievePolicyRequest = new RetrievePolicyRequest();
PropertyInfo info = new PropertyInfo();
info.name = "parameters";
info.type = retrievePolicyRequest.getClass();
info.setValue(retrievePolicyRequest);
rpc.addProperty(info);
HttpTransportSE ht = new HttpTransportSE(DISCOVERY_ENDPOINT_URL);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.encodingStyle = "utf-8";
envelope.setOutputSoapObject(rpc);
try {
ht.call(SOAPACTION, envelope);
if (envelope.getResponse() != null) {
SoapPrimitive response = (SoapPrimitive) envelope.bodyIn;
Log.e(tag, response.toString());
}
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
}
そして、RetrievePolicyRequest を自分で定義しました。私は何度も試しましたが、まだこの問題があります。この問題を解決する方法を知っている人はいますか?
ありがとうございました!