无法获得 BlackBerry 的 kSOAP2 响应

发布于 2024-12-05 02:05:48 字数 1639 浏览 0 评论 0原文

我正在尝试对黑莓进行密码验证,我已经编写了代码,运行了“作为黑莓模拟器进行调试”,以便我可以看到控制台。目前我正在尝试打印我的结果但没有任何反应。我没有得到任何输出。我附上代码,我的代码有问题吗?或者我没有应用黑莓的设置?我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

勿忘心安 2024-12-12 02:05:48

解决了。这是一个与 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文