BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 05-08-2007, 11:45 AM   #1 (permalink)
New Member
Join Date: May 2007
Model: 8800J
Carrier: Cingular
Posts: 6
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default unexpected type (position: TEXT Not authorized t...@1:39

Please Login to Remove!

I wrote a Web service Client using ksoap2 to invoke the StockQuote Service available with axis in Blackberry JDE. I am getting the following error.
"org.xmlpull.vl.XmlPullParserException: unexpected type (position: TEXT Not authorized t...@1:39 in". Did anyone get this error before? Any suggestions? Please find the code snippet below. Thank you.

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

import org.ksoap2.*;
import org.ksoap2.serialization.*;
import org.ksoap2.transport.*;

class StockQuoteScreen extends MainScreen{


LabelField applicationTitle = new LabelField("Stock Quote");
RichTextField stockQuoteTextField = new RichTextField("gotResponse");

// Create the outgoing message
SoapObject requestObject = new SoapObject("x", "getQuote");
// ask for the specially encoded symbol in the included service
requestObject.addProperty("symbol", "XXX");

// use version 1.1 of soap
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

// add the outgoing object as the request
//new MarshalFloat().register(envelope); // not really needed for j2se version

// Create a transport layer for the J2SE platform. You should change this for
// another transport on midp or j2me devices.
HttpTransport transportSE = new HttpTransport("http://localhost:8080/axis/StockQuoteService.jws");
// turn on debug mode if you want to see what is happening over the wire.
//transport.debug = true;
try {
// call and print out the result"getQuote", envelope);
//stockQuoteTextField.setText(((Float)envelope.getRe sponse()).toString());
stockQuoteTextField.setText( tText() + " called ");
//stockQuoteTextField = new RichTextField("gotResponse");
} catch (Exception e) {
// if we get an error print the stacktrace and dump the response out.
stockQuoteTextField.setText( tText() + e);
//stockQuoteTextField = new RichTextField(transportSE.responseDump);

public boolean onClose()
Dialog.alert("Bye Stock Quote!");
return true;

Thank you,

Last edited by leo12_chandu : 05-09-2007 at 11:14 AM. Reason: No responses!!
Old 05-09-2007, 11:10 AM   #2 (permalink)
New Member
Join Date: May 2007
Model: 8800J
Carrier: Cingular
Posts: 6
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile unexpected type (position:TEXT Not authorized t..@139 ..)

I tried writing MarshalFloat class and registered the SOAP object. I am still getting the same problem. I tried invoking the HelloWorld Service which receives a string and echos back the same string. But still I get the same error. Can some one help me with this problem or direct me with some resources or hints . Thank you in advance.

Error : unexpected type (position:TEXT Not authorized t..@139

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

Johnson Controls 90-325F, 10', .29" X2.5" Bulb Mr OEM A19ADB-31
Johnson Controls 90-325F, 10', .29Johnson Controls -30/100F 6'Cap M/R Open-Lo OEM A19ACA-14
Johnson Controls -30/100F 6'Cap M/R Open-Lo OEM A19ACA-14 pictureJohnson Controls 1/2" Well Assm, .430 Inside Dim. OEM WEL14A-603R
Johnson Controls 1/2Johnson Controls Intake Air Filter 5Cfm 1/2" Npt OEM A-4000-155
Johnson Controls Intake Air Filter 5Cfm 1/2Johnson Controls Ductmttempsensor 4" 1K Nickle OEM TE-631GV-2
Johnson Controls Ductmttempsensor 4

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