BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   Problem with ksoap2 (

mark.ramos222 04-16-2008 11:36 PM

Problem with ksoap2
I am trying to use ksoap to connect to SugarCRM and i had the following code:


try {
HttpTransport httpt = new HttpTransport("http://localhost/sugarroot/soap.php");

            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

            SoapObject test = new SoapObject("", "test");
            test.addProperty("string", "Hello");

  "http://localhost/sugarroot/soap.php/test", envelope);
            SoapObject body = (SoapObject) envelope.getResponse();
            System.out.println("Property Count: " + body.getPropertyCount());
            System.out.println("Result: " + envelope.getResponse());
        } catch (IOException ex) {
            System.err.println("Error: " + ex.getClass() + " | " + ex.getMessage());
        } catch (XmlPullParserException ex) {
            System.err.println("Error: " + ex.getClass() + " | " + ex.getMessage());

the goal is just to send a string and the SugarCRM will echo it back.. it is Step 0 in the Overview of SugarCRM's API. but i don't know the problem with my code.. so please help.. i had the following error upon executing the line on the method..
class org.xmlpull.v1.XmlPullParserException | unexpected type (position:TEXT Not authorized t...@1:37 in

I hope to get a response on this.
Thank you!

simon.hain 04-17-2008 03:16 AM

"not authorized t..." sounds like an authorization problem. care to post the full message? you can also check if the exception is a subclass of soapfault to get a more sophisticated message.

All times are GMT -5. The time now is 05:44 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.