BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 04-16-2008, 11:36 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: SMART
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Problem with ksoap2

Please Login to Remove!

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

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

            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

            SoapObject test = new SoapObject("http://www.sugarcrm.com/sugarcrm", "test");
            test.addProperty("string", "Hello");

            envelope.setOutputSoapObject(test);
          
            httpt.call("http://localhost/sugarroot/soap.php/test", envelope);
            SoapObject body = (SoapObject) envelope.getResponse();
            System.out.println("Property Count: " + body.getPropertyCount());
            System.out.println(body.getProperty("string"));
            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 httpt.call() method..
class org.xmlpull.v1.XmlPullParserException | unexpected type (position:TEXT Not authorized t...@1:37 in java.io.InputStreamReader@6a6089f4)

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

Last edited by mark.ramos222 : 04-17-2008 at 12:11 AM. Reason: forgot to remove the wsdl
Offline  
Old 04-17-2008, 03:16 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

"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.
__________________
java developer, Devinto, hamburg/germany
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

SOUTHCO IEC-TO-220-V-18 Qty of 150 per Lot TRANSISTOR INSULATOR NYLON BLACK
$65.0
SOUTHCO  IEC-TO-220-V-18 Qty of 150 per Lot TRANSISTOR INSULATOR  NYLON  BLACK picture10pcs Defl Transistor Diode SGS BU407D 330V 10A 60W TO220 NPN
$15.74
10pcs Defl Transistor Diode SGS BU407D 330V 10A 60W TO220 NPN picture2N385 Vintage Germanium transistors, NPN, qty 13 pcs.
$13.99
2N385 Vintage Germanium transistors, NPN, qty 13 pcs. pictureDANIU™ LCR-TC1 1.8inch Colorful Display Multifunctional TFT Backlight Transistor
$36.0
DANIU™ LCR-TC1 1.8inch Colorful Display Multifunctional TFT Backlight Transistor pictureAPPRX 225PC LOT P/N MJD210 DPAK SMD 3PIN PNP 5A25V TRANSISTOR-NOS
$9.95
APPRX 225PC LOT P/N MJD210 DPAK SMD 3PIN PNP 5A25V TRANSISTOR-NOS picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.