(keitai-l) lil SOAP lib finally available

From: Jason Pollard <jasonpollard_at_yahoo.com>
Date: 09/10/01
Message-ID: <20010909235356.80957.qmail@web14607.mail.yahoo.com>
To those who would say "Nay, it can't be done," know that 'twould only serve to
shore my resolve, and now it is I who can say, "Yay, it has been done."

Purely to serve my purposes in furthering my knowledge of i-mode developing and
SOAP and small things java, I've made up a little SOAP library which will allow
your i-applis to access Web Services directly.

It's crude and brutish.  But it basically works.  Plus it's open source and
free.  Yay.

Check it:
http://64.173.206.139/NanoSOAP/
A couple of sample clients are included.
Don't download v0.02 unless you like sausage and politics. B-/

I'm open to feature requests, and very keen on getting feedback for this.  This
is my first open source project.

--- Zev Blut <zev@atc.yamatake.co.jp> wrote:
> I am sure there are many people interested in such a library,
> but at 8.3kb it leaves little room for an i-appli to do much else.

Agreed.  I hacked it down to 6222 bytes (did you know pollard means to chop the
dead branches off a tree?), 3949 bytes using jar, and __3347__ bytes using
1stBarrier on the jar(couldn't get Jopt to work, and JavaBlender only works on
i-applis)  I think 3347B kicks ass and I'm very proud of myself.  I would like
to make it still smaller, however.

> Of course, J-Phone has 30kb for Midlets and KDDI has
> 50kb for its midlets so those platforms might be able to use
> this better.
From dictionary.com:
pol·lard n.
A tree whose top branches have been cut back to the trunk so that it may
produce a dense growth of new shoots.
I was thinking of branching it out with more features for those devices with
more memory.  I don't really need that now, so we'll see; if the demand is
there, maybe.

  Did you write the library using DoCoMo's API,
> the MIDP or just the CLDC?  
I checked into that.  The only way I know how to get a Web page is using the
HttpConnection object from the docomo api.  If somebody could point me in the
right direction on how to do this using only CLDC (like with some sample code),
that would be great.  And more portable.  To answer the question it's docomo's
api and the CLDC.

> 
> The big question to me though is XML and SOAP really
> appropriate at this point in time for mobile devices?  Both
> can send lots of data that typical users might not be so
> happy to see when they get the bill.

That's my main concern.  The SOAP spec is kind of wordy.

As a side note, the nanoSOAP package parses the XML/SOAP response as a string
now, because I couldn't find a small enough XML parser.  If anybody knows of a
very tiny (<2K or so) SAX type parser, please let me know.

From Michael Turner:
The first example of a call-return sequence at

  http://www.w3.org/TR/SOAP/

is about 900 bytes, .......
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

Deleting these, making the identifiers less verbose and
crunching out some whitespace, I got a 50% reduction.

I did exactly that.  Thanks for the tip.  It also reduced the class size by a
few hundred bytes.  The lack of encoding info, though, means that there may be
problems with double-byte text.  But I haven't tested that yet.

--Jason

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

[ Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ ]
Received on Mon Sep 10 02:42:48 2001