0
我正在嘗試對BlackBerry進行密碼驗證,我已經編寫代碼,運行「作爲黑莓模擬器調試」,以便我可以看到控制檯。目前我正在嘗試打印我的結果,但沒有任何反應。我沒有輸出。我將附上代碼,這裏有我的代碼有問題嗎?還是我沒有申請黑莓的設置?我正在使用ksoap2,並將該jar附加到庫中。我創建了一個使用幾乎相同的代碼連接到相同服務的Android應用程序。我得到這個錯誤:無法爲BlackBerry獲取kSOAP2響應
java.io.InterruptedIOException將:本地連接後〜120000
我去了運行配置超時並激活MDS並啓用註冊,其他任何可能會阻止該連接?
SoapObject rpc = new SoapObject(NAMESPACE, METHOD_NAME);
rpc.addProperty("User", "raji");
rpc.addProperty("Password", "PASSWORD");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = rpc;
envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.XSD;
HttpTransport ht = new HttpTransport(URL);
ht.debug = true;
try
{
ht.call(SOAP_ACTION, envelope);
String result = (envelope.getResult()).toString();
String result2 = (envelope.getResponse().toString());
System.out.println(result + "HERE YA GO");
System.out.println(result2 + "HERE YA GO");
}
catch(org.xmlpull.v1.XmlPullParserException ex2){
}
catch(Exception ex){
String bah = ex.toString();
System.out.println(bah + "HERE YA GO 2");
}
這裏是我的變量來激活SOAP,我把X的,因爲我不能顯示確切的IP。
public static final String NAMESPACE = "http://tempuri.org/";
public static final String URL = "http://xxx.xxx.xx.x:xxxxx/XXXXXXX/IDLMobile.asmx?WSDL";
public static final String SOAP_ACTION = "http://tempuri.org/ValidateUser";
public static final String METHOD_NAME = "ValidateUser";