File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes bind xml with Http requset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "bind xml with Http requset" Watch "bind xml with Http requset" New topic

bind xml with Http requset

krishnath poolo

Joined: Sep 30, 2008
Posts: 4
hi all
i m newbie for j2me and kxml

i want to generate and bind an xml with http request.
for an example


i want to generate this xml and send this to server with request by using post method

please help me
thanks in advance
krishnath poolo

Joined: Sep 30, 2008
Posts: 4
i want to send a http request msg from mobile phone to server like following

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 438
Connection: close
Content-Type: text/xml


is it possible to send like this ???
please reply quickly.
its very urgent.
thanks in advance
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
Hello, If you are trying to send the message from the phone to the server you can use HTTP ((HttpConnection) If you servlet returns a XML response you can use kXML to parse the inputstream. In fact you can use an XmlWriter to write to the outputstream.

Rashid Mayes -
prajapati ajay

Joined: Dec 16, 2008
Posts: 12
hi krishnath

first declare String buffer and this xml tag and its value in stringbuffer object

by using Post method send this to server by HttpConnection
then get response from servlet or Php script
I agree. Here's the link:
subject: bind xml with Http requset
It's not a secret anymore!