Java web services

R

Rogan Dawes

Hi folks,

I am trying to write a tool that allows interactive querying of
arbitrary Web Services.

I have a reasonable starting point, using Sverre Huseby's SOAPDebugger,
but it does not support complex types (or arrays).

http://shh.thathost.com/pub-java/#SOAPDebugger

It is my understanding that in order to support complex types, one has
to have a corresponding java class (possibly created via WSDL2Java) that
maps to the requisite type.

Does anyone know of a way of doing this without creating Java classes?

superficially, it should not be so complex, if it all boils down to base
types in the end (int, string, date, etc)

Things I have been tossing around:

* Use WSDL2Java to create classes based on the supplied WSDL, require
that the JDK be in the classpath, and compile the necessary classes on
the fly.

* Use JROM (http://www.alphaworks.ibm.com/tech/jrom) which seems like a
possibility, but appears to be unmaintained code (also licensing might
be an issue)

* Try to do this at a lower level somehow, messing directly with the XML
myself. Unfortunately, I'm not very familiar with raw XML processing, so
this could be tricky! :-(

Does anyone have any suggestions on how I could achieve my objective?

Many thanks!

Rogan
 
C

Chris Head

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rogan Dawes wrote:
[snip]
* Use WSDL2Java to create classes based on the supplied WSDL, require
that the JDK be in the classpath, and compile the necessary classes on
the fly.
[snip]

Greetings,
Similar to this possibility, but much more efficient, would be a
bytecode generator. Instead of generating source code and compiling it,
figure out what classes you need and build the bytecode by hand (see
Jakarta BCEL - Byte Code Engineering Library -
http://jakarta.apache.org/bcel/ for one example; there are others).
Presumably you would have to parse the WSDL somehow in your program (I
personally don't even know what that is...) as I'm assuming WSDL2Java
produces source, which is not what you're looking for anymore.

Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)

iD8DBQFDInh96ZGQ8LKA8nwRAs9hAKCbqgq9/e1ljO/uAoRNYBIRv8KW4gCfaPjB
EmQvSCDLwJJ5DnZNH5EvC4o=
=J6iA
-----END PGP SIGNATURE-----
 
R

Rogan Dawes

Chris said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rogan Dawes wrote:
[snip]
* Use WSDL2Java to create classes based on the supplied WSDL, require
that the JDK be in the classpath, and compile the necessary classes on
the fly.

[snip]

Greetings,
Similar to this possibility, but much more efficient, would be a
bytecode generator. Instead of generating source code and compiling it,
figure out what classes you need and build the bytecode by hand (see
Jakarta BCEL - Byte Code Engineering Library -
http://jakarta.apache.org/bcel/ for one example; there are others).
Presumably you would have to parse the WSDL somehow in your program (I
personally don't even know what that is...) as I'm assuming WSDL2Java
produces source, which is not what you're looking for anymore.

Chris

Thanks for the suggestion. At this point, I'm not gunning for
efficiency, but minimum effort from my side ;-)

WSDL is an abbreviation for Web Services Definition Language (I think),
which describes the available functions, and their parameters. It is a
fairly complex XML schema, which I'd like to avoid parsing myself, if at
all possible.

However, it seems that to do what I want to, I might have to do that
parsing myself :-( Ah well!

Thanks for the comments.

Rogan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top