Can any one provide a sample example to work on web services client in J2ME.
How to consume web services in J2ME.
Can any one suggest best book or site for J2ME case study.
[ December 17, 2008: Message edited by: prasanth duggirala ]
J2ME Web Services (2004 June)
SOA Without SOAP: The Java ME Perspective (June 2007)
Web Services APIs for J2ME, Part 1: Remote service invocation API (2004 Jul)
Web Services APIs for J2ME, Part 2: Java API for XML processing (2004 Nov)
Turn Your J2ME Mobile Devices into Web Service Clients (2005 May)
The most recent article (SOA Without SOAP) makes a case that SOAP on J2ME could actually be a dead end:
SOAP's dependence on XML is also a disadvantage, however. While it's true that the Web Services APIs for Java ME (WSA) support a subset of the SOAP 1.1 standard and a simple API for parsing XML, WSA support is far from widespread. ... The pragmatic Java ME developer understands this, which is why alternative approaches must often be explored. And even if SOAP was universally supported on Java ME platforms, some developers would look for different solutions because of the extra overhead involved in using SOAP. ... In other words, services are invoked using the HTTP GET and POST methods, with any input data passed in using query parameters (for GET requests) or the request body (for POST requests) ... If data security is a concern, use code from the Bouncy Castle Crytographic APIs-an open source cryptography project-to encrypt the communication, as described in Data Encryption for J2ME Profiles.
How to Create a HTTP connection in J2ME.
i have a URL with will return a URL string.
and i want make a request to that URL and display in next form.
please give me an example for Http Connection.
i got the connection and able to get the values in emulator Peer.
i tested in phone Nokia N91 what happened is i cant able to get the responce.
I have doubt, throw J2ME app we are req to a server for resonse as i kept the URL this will get the respons String and i am displaying in J2ME app.
i am getting responce like this <h1>Length Required</h1> i am not able to see the Responce string iam getting in the emulator.
please help me in this issue.
please find the attachemants
It is already apparent that the emulator environment is more forgiving than the Nokia N91 over the wireless network.
I am assuming that you are actually receiving an (error) HTTP Response Code: HTTP/1.1 411 Length Required.
This suggests to me that successful transmission of a J2ME client HTTP request over the wireless network requires a valid Content-Length header in the request (even though HTTP/1.1 doesn't require it (RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1; 4.4 Message Length). To be compatible with HTTP/1.0 Content-Length should be included anyway).
J2ME Tech Tips: Client-Server communication over HTTP using MIDP and servlets
HTTP POST Basics
content-length property in wireless toolkit