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
New Developer
sanjurat1984
Posts: 9
Registered: ‎04-24-2009
My Device: Not Specified

How to handle XML in my Blackberry

In my application I have to send a set of data to the server.

I have to send these data as XML.

 

1) In BB how can I generate an XML? In other words I have to create a XML like this.

 <Login>

       <UserName>Ravi</UserName>

       <Password>pw</PassWord>

 </Login>

 

how can I create this XML?

 

2) After creating the XML I have to send this as a HTTPPost. How can I do it?

 

3) After I send the data I have to check all the data is properly send. In other words with out data losses. Can I use checksum for this? If so hoe can I do that? Are there any alternatives?

Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to handle XML in my Blackberry

1. Give a look at the below thread, similar discussion. Thre are few more you can search for it.

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=3440

 

2. Give a look at this KB article for differnt ways of connection you can make.

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

3.You can tell the server to write back something to confirm that it recieved the data and at client side read the message sent by client and get confirmed about the status.


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: How to handle XML in my Blackberry

You can check the ietf for what "should happen" but offhand a response code less than 400 probably would mean

the XML was legal or server could return bad request or illegal blah blah blah  - XML is already pretty redundant for

error checking LOL.

 

Please use plain text.