Anecito, Anthony (HQP) wrote:

Hi All,

Does anyone have a solution of building a Axis client without using all
those JARs? My client code got bloated 10X by including the 11 JARs
(5MB) just to talk to the Axis server. The JAR's include the JAXP
distrubtion from Sun. The JAR's total size is bigger then the JRE from
Sun. I am trying to keep the entire distribution (including JARs) light
weight.

Any ideas?
I believe the minimal client is completely XML-unaware, doesn't even
include an HTTP library as such; you open a socket with inputstream
and outputstream, you send the header data as text, you send the XML
data as text, you receive the XML result as text, and you figure out
where in that text is the fault information or, with luck, a response.
You do need, or at least I needed,

import java.net.URL;
import java.net.Socket;
import java.io.OutputStream;
import java.io.InputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedInputStream;
import java.io.StringWriter;
import java.io.InputStreamReader;
import java.io.IOException;

but that was it.

Of course, you might be losing a whole lot of flexibility; ease of
coding, ease of debugging, ease of upgrading may (or may not,
especially if your SOAP calls are basically simple) go way way down.
YMMV, or then again somebody else may respond to this by showing
that this is always a bad idea. :-)

Tom Myers


Reply via email to