无法获得 BlackBerry 的 kSOAP2 响应
我正在尝试对黑莓进行密码验证,我已经编写了代码,运行了“作为黑莓模拟器进行调试”,以便我可以看到控制台。目前我正在尝试打印我的结果但没有任何反应。我没有得到任何输出。我附上代码,我的代码有问题吗?或者我没有应用黑莓的设置?我正在使用 ksoap2 并且已将 jar 附加到库中。我创建了一个 Android 应用程序,它使用几乎相同的代码连接到相同的服务。我收到此错误:
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";
I'm trying to do password validation for BlackBerry, I've written the code, ran "debug as blackberry emulator" so I can see the console. Currently I'm trying to print my result but nothing happens. I get no output. I will attach the code, is there something wrong with my code here? Or have I not applied a setting for blackberry? I am using ksoap2 and I have attached the jar to the library. I have created a Android app that connects to the same service using almost the same code. I get this error:
java.io.InterruptedIOException: Local connection timed out after ~ 120000
I've gone to the run configurations and activated the MDS and enabled registration, anything else that could be preventing the connection?
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");
}
Here is my variables to activate SOAP, I put the x's in as I can't show the exact 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";
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决了。这是一个与 MDS 相关的问题,并且在调试运行设置中,选中了“禁用注册”框,因此取消选择该框即可。
Solved. It was a MDS related problem, and also in the debug run settings, the box "disable registation" was selected, so deselect that and you're good to go.