View Single Post
Old 08-16-2011, 06:36 PM   #1 (permalink)
ShadowGAP
New Member
 
Join Date: Aug 2011
Model: 8520
PIN: N/A
Carrier: Vodafone
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Problem using a java stub to consume a webservice

Please Login to Remove!

I'm trying to develop a javaME client for blackberry that consumes a web service.

I'm using blackberry plugin 1.3 for eclipse 3.6 (Helios) for the development. I've been provided a WSDL file for the WS and its URL. I've followed the steps described at a tutorial (Blackberry Application Development Part 2 (Stub Generator & Introduction to Eclipse)) and the guidelines of the article from Sun website about JavaME and WebServices.

So:

1. I used the JWT 2.5.2_01 with the wsdl file as an input and so created the stub files.

2. Imported the .java files to an eclipse blackberry project

3. Started developing my client application:
-basic ui app
-basic screens
-Istantiate the stub
-Check http availabillity

All good till that step. When i invoke a stub method for the first time (i.e. the one that implements a login operation) i catch an exception with the following message:

java.rmi.MarshalException : The end tag of either SOAP envelope or SOAP body is missing


Notes:

i) I'm using Blackberry JRE 4.5 to build the project and 1.3 compiler compliance. Tested with run configurations with BB JRE 4.5 , 6.0 , 7.0. BB 9900 or BB 9800 simulator with MDS on. Haven't tested on real device.

ii) Because the WSDL file had some xs:datetime elements wich are not supported by the JavaME API i've been guided to manually change them in the WSDL file to xs:string and generate the stub with this version of the WSDL file.

Questions:
(a) Is it possible that Note (ii) is the cause of this exception?
(b) If yes, is there a more "proper" workaround for the xs:datetime neing not supported by JavaME?
(c) If not, what else can be possibly causing this exception?

Thanks in advance
Offline   Reply With Quote