View Single Post
Old 12-13-2008, 03:31 AM   #19 (permalink)
Thumbs Must Hurt
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default testing webservice on simulator

Hi All,
I have developed a client on BB using ksoap2.

I have tried using the MDS simulator along with the device simulator (as mentioned in some post), but whenever i send a request, i get the following Exception:

org.xmlpull.v1.XmlPullParserException: expected: START_TAG {}Envelope (position:START_TAG <{}soap:Envelope>@1:205 in

I dunno whats going wrong or how to go about it. Please help.

I am developing using the following components:
BB OS: 4.1.0
JDE: 4.1.0
ksoap2: lib\ksoap2-j2me-core-prev-2.1.2.jar

PS: I can access it through http demo application, but not through my web service. I am pasting my code below:

    private String IPorHostname = "";
    private String path = "/xyzs/service.asmx";
    public MXYZ_Main() {

        SoapObject request = new SoapObject("", "DealerOutstanding");

        request.addProperty("dlr_code", "1177");

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.bodyOut = request;
        envelope.dotNet = true;

        HttpTransport ht = new HttpTransport(IPorHostname + path);
        ht.debug = true;

        try {
  "", envelope);
            SoapObject result = (SoapObject) envelope.getResponse();
            String str = result.getProperty("DealerOutstandingResult").toString();
            System.out.println("Soap: " + str);
        } catch (XmlPullParserException ex) {
        } catch (IOException ex) {
        } catch (Exception ex) {
            System.out.println("ex " + ex.toString());

Last edited by Meenal : 12-13-2008 at 04:26 AM.
Offline   Reply With Quote