Web services 获取BlackBerry中SOAP连接的org.xmlpull.v1.XmlPullParserException

Web services 获取BlackBerry中SOAP连接的org.xmlpull.v1.XmlPullParserException,web-services,soap,blackberry,ksoap2,Web Services,Soap,Blackberry,Ksoap2,我正在我的Web服务调用应用程序中使用ksoap2.jar。 连接时,当我使用Wi-fi或模拟器进行测试时,服务器会出现以下错误: org.xmlpull.v1.XmlPullParserException:意外类型位置:END_文档null@1:java.io中的0。InputStreamReader@6111a1f1 当我使用SIM卡进行测试时,它会抛出以下错误:java.io.InterruptedIOException:本地连接在120000之后超时 我已经为此webservice连接编

我正在我的Web服务调用应用程序中使用ksoap2.jar。 连接时,当我使用Wi-fi或模拟器进行测试时,服务器会出现以下错误: org.xmlpull.v1.XmlPullParserException:意外类型位置:END_文档null@1:java.io中的0。InputStreamReader@6111a1f1

当我使用SIM卡进行测试时,它会抛出以下错误:java.io.InterruptedIOException:本地连接在120000之后超时

我已经为此webservice连接编写了以下代码:

    SoapObject rpc = new SoapObject(serviceNamespace, methodName);
        rpc.addProperty("UserID", "1");
        rpc.addProperty("UserName", "xyz");
        rpc.addProperty("ContactNo", "9014567890");
        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

        envelope.bodyOut = rpc;
        envelope.dotNet = true;
        envelope.encodingStyle = SoapSerializationEnvelope.ENC;

        HttpTransport ht = new HttpTransport(serviceUrl + getConnectionString().trim());
        ht.debug = true;
        System.out.println("debug true ------- ");
        ht.setXmlVersionTag(" version=\"1.0\" encoding=\"UTF-8\"?>");
        SoapObject  response = null;
        try
        {
            ht.call(soapAction, envelope);
             response = (SoapObject )envelope.getResponse();
             String resultbody = response.getProperty("updateUserDetailResult").toString();
        }
        catch(org.xmlpull.v1.XmlPullParserException ex2){

            resultLbl.setText(ex2.toString());
        }
        catch(Exception ex){
        String bah = ex.toString();
        resultLbl.setText(bah);
        }




/**
     * Looks through the phone's service book for a carrier provided BIBS network
     * 
     * @return The uid used to connect to that network.
     */
    private static String getCarrierBIBSUid() 
    {
        net.rim.device.api.servicebook.ServiceRecord[] records = ServiceBook.getSB().getRecords();
        int currentRecord;

        for (currentRecord = 0; currentRecord < records.length; currentRecord++) 
        {
            if (records[currentRecord].getCid().toLowerCase().equals("ippp")) {
                if (records[currentRecord].getName().toLowerCase().indexOf("bibs") >= 0) {
                    return records[currentRecord].getUid();
                }
            }
        }
        return null;
    }

    /**
     *  Getting the connection string based on the connection
     * @return
     */
    public static String getConnectionString() 
    {
        String connectionString = null;

        // Wifi is the preferred transmission method
        if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED) 
        {
            connectionString = ";interface=wifi";

        }
        // Is the carrier network the only way to connect?
        else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT) 
        {
            String carrierUid = getCarrierBIBSUid();
            if (carrierUid == null) 
            {
                // Has carrier coverage, but not BIBS. So use the carrier's TCP
                // network

                connectionString = ";deviceside=true";
            } 
            else 
            {
                // otherwise, use the Uid to construct a valid carrier BIBS
                // request

                connectionString = ";deviceside=false;connectionUID=" + carrierUid + ";ConnectionType=";
            }
        }

        // Check for an MDS connection instead (BlackBerry Enterprise Server)
        else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS)
        {
            connectionString = ";deviceside=false";

        }

        // If there is no connection available abort to avoid bugging the user
        // unnecssarily.
        else if (CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE) 
        {

        }

        // In theory, all bases are covered so this shouldn't be reachable.
        else 
        {
            connectionString = ";deviceside=true";
        }

        return connectionString;
    }
我使用的是经过验证的ksoapjar文件ksoap2-j2me-core-prev-2.1.2.jar

我不知道到底哪里出了问题。我在论坛上搜索过,但没有找到合适的解决方案


谢谢。

有人能帮忙吗?ksoap没有人会遇到类似的问题吗?