Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 455
Registered: ‎01-14-2009
My Device: Apple iPhone 3GS 16GB

Re: How to parse XML with SOAP

IN Command prompt do the below

 

C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin>preverify -classpat
h "C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\lib\net_rim_api.jar"
 "ksoap2-j2me-core-2.1.2.jar"

New Developer
Posts: 58
Registered: ‎08-05-2009
My Device: Not Specified

Re: How to parse XML with SOAP

do you mean, that i should copy the file "ksoap2-j2me-core-2.1.2.jar" to C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\lib?
Developer
Posts: 455
Registered: ‎01-14-2009
My Device: Apple iPhone 3GS 16GB

Re: How to parse XML with SOAP

yes copy it there and then preverify it from there.. you will get the preverified jar in C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\bin\output
New Developer
Posts: 58
Registered: ‎08-05-2009
My Device: Not Specified

Re: How to parse XML with SOAP

command windows shows:Error loading class ksoap2-j2me-core-2.1.2.jar

 

 

 

New Developer
Posts: 17
Registered: ‎01-01-2009
My Device: Not Specified

Re: How to parse XML with SOAP

[ Edited ]

Another quicker/dirtier alternative to implementing KvmSerializable is to cast the result of getProperty() as a SoapObject.  You can then call getProperty() again to get a sub-element.

 

So the following should get you down to the <MetaData> element.

 

 

SoapObject result = (SoapObject)envelope.bodyIn;result = (SoapObject) result.getProperty("JobData");result = (SoapObject) result.getProperty("MetaData");

 


rihan007 wrote:

ok i will make my doubht clearer

 

when i call

 

SoapObject result = (SoapObject)envelope.bodyIn;     
System.out.println(result.getProperty("JobData").toString());

 

 i get this string-

 

<Job ID="12343242"><MetaData Matter="This is some Matter"></MetaData></Job>

 

now i need to extract the job id ,matter into two strings. how to do that?

Message Edited by rihan007 on 29-07-2009 04:09 PM

 

 

 

 


 

 

 

Message Edited by sugarat on 09-03-2009 12:17 PM
Developer
Posts: 81
Registered: ‎07-16-2008
My Device: Curve - 8320
My Carrier: AirTel

Re: How to parse XML with SOAP

[ Edited ]

I was getting the "Error!: Missing stack map at label: 40" from last several hours and found your reply useful in resolving it.

 

Thanks Rihan007  :-)

 

 

*(Vipul)() ;
New Contributor
Posts: 7
Registered: ‎06-30-2010
My Device: Storm 9500
My Carrier: Vodafone

Re: How to parse XML with SOAP

Hi, I have a similar kind of problem that you faced.

 

I have web services to be implemented and am using ksoap2.

Two of them are pushing the data and rest of them are pulling the data from the server.

 I'm afraid it has been quite a while but I'm stuck on it. :-(

No errors but no effect as such..  no response from the web service.

 

Just wanna confrm that I'm doing everything ok.

 

included the ksoap2 preverified jar file and got it working.. ( as i said no errors)

I have a button and on its listener event I initiate the service url , namespace and soapAction.

 

Then SoapObject and SoapSerializationEnvelope..

then setting the envelope.bodyout and add property for the parameters... to be passed in the web services

then setting the HttpTransport followed by try and catch block

 

I do need to push and pull data from the server so will need to store the data objects. and display them..

 

Please suggest me something, im stuck at this point.

 

Thanks

 

 

 

New Contributor
Posts: 7
Registered: ‎06-30-2010
My Device: Storm 9500
My Carrier: Vodafone

Re: How to parse XML with SOAP

in particular im facing a problem in the try block

at the line when we use

 

ht.call(soapAction,envelope);

 

please help

Visitor
Posts: 1
Registered: ‎08-09-2010
My Device: Not Specified

Re: How to parse XML with SOAP

Hi:

¿Did you solve your problem? I have the same problem, I need hint's. I am using ksoap2 and Java.

 

Thanks In Advance

Viviana Rojas