Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

bind xml with Http requset

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
i m newbie for j2me and kxml

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

<user>
<uname>xxxx</uname>
<pword>xxxx</pword>
</user>

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
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

<user>
<uname>xxxxxx</uname>
<passowrd>xxxxx</password>
<user>

is it possible to send like this ???
please reply quickly.
its very urgent.
thanks in advance
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, If you are trying to send the message from the phone to the server you can use HTTP ((HttpConnection) Connector.open). 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.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic