• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using JAX-RPC in a WebStart application

 
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I built a WebStart [1] application that connects to a web service
with JAX-RPC static stubs.

It works great!

The key steps were:

0) generating the static stubs
1) packaging the JAX-RPC runtime jars
and static stubs with my application code
2) declaring the JAX-RPC runtime jars in a JNLP file

The list of JAX-RPC JAR's is found here:

https://jax-rpc.dev.java.net/faq/index.html

Cheers,

-Sean

[1] http://java.sun.com/products/javawebstart/
 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sean,

I am concidering a web application using JAX-RPC.How's it?.Can it be deployed with Tomcat?.If so how's it's implementation?.Straightforward API?.Can i get serverside objects in clientside to method call once it deployed with Tomcat?.If it compleately reliable,i think it'll be the best technology for me than servlets.

I have to do a CRM.with XML data transfer and swing client.

What's ur suggestien?.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Murasoli Maran:
I have to do a CRM.with XML data transfer and swing client.


If the data you're transferring is relatively simple, JAX-RPC calls to a web service should be a feasible solution.
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:

If the data you're transferring is relatively simple, JAX-RPC calls to a web service should be a feasible solution.



JAX-RPC calls to a web service??..I think JAX-RPC is something like RPC.Remote procedure call with object support.Any new insights?.

How to integrate JAX-RPC to a servlet?.And deploy in Tomcat?.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Murasoli Maran:
JAX-RPC calls to a web service??..I think JAX-RPC is something like RPC.Remote procedure call with object support.Any new insights?.


Yes, JAX-RPC is a library for making web service calls, i.e. sending SOAP messages over HTTP. The "RPC" in JAX-RPC comes from the fact that the JAX-RPC API gives the developer an RPC-like feel from using the service.

Originally posted by Murasoli Maran:
How to integrate JAX-RPC to a servlet?.And deploy in Tomcat?.


You either need a web service engine like Apache Axis (which can be deployed on Tomcat) or you need to make your servlet parse the incoming SOAP envelope yourself (not impossible, but definitely a tedious job).
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:

You either need a web service engine like Apache Axis (which can be deployed on Tomcat) or you need to make your servlet parse the incoming SOAP envelope yourself (not impossible, but definitely a tedious job).



It seems that JAX-RPC will be very good.But i think deployment in Tomcat will be a hassle.

To a medium sized client-server application,what do u suggest?.How good is JAX-RPC?.What abt servlets?.In servlets i need lot more coding than JAX-RPC.So JAX-RPC will be good for me.But how's it's performance?.I dont like to recode again after choosing one platform
[ May 29, 2004: Message edited by: Murasoli Maran ]
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Murasoli Maran:
To a medium sized client-server application,what do u suggest?.How good is JAX-RPC?.What abt servlets?.In servlets i need lot more coding than JAX-RPC.So JAX-RPC will be good for me.But how's it's performance?.I dont like to recode again after choosing one platform


For anything that's supposed to be maintained by someone else than the original developer, I'd suggest using any commercial or open source implementation over a do-it-yourself SOAP parsing library.

The performance of a full-fledged SOAP parsing library is probably less than what you could get out of a task-specific servlet (a couple of regex's might do) but the difference is so negligible that it doesn't show up in small applications.
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:

For anything that's supposed to be maintained by someone else than the original developer, I'd suggest using any commercial or open source implementation over a do-it-yourself SOAP parsing library.

The performance of a full-fledged SOAP parsing library is probably less than what you could get out of a task-specific servlet (a couple of regex's might do) but the difference is so negligible that it doesn't show up in small applications.



Thanks Lasse..But what about deployment of a JAX-RPC application?.I can use only Tomcat.Is it easy to deploy in Tomcat in original webhosting than local networks?.i need both.Can i install Apache Axis(as you told)in deploying webservers which maynot have that already?.I dont worry about local networks.But i worry about internet servers in which configuration is not in my hands.

I like concidering all possible issues before starting.So implementation will be a fun.
[ May 30, 2004: Message edited by: Murasoli Maran ]
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have the possibility to deploy a .war file on the server, then you have the possibility to use Axis. Axis comes as a .war file -- you just need to "merge" the Axis .war file into your .war file (including the libraries and the few elements from the Axis' web.xml).
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lasse Koskela:
If you have the possibility to deploy a .war file on the server, then you have the possibility to use Axis. Axis comes as a .war file -- you just need to "merge" the Axis .war file into your .war file (including the libraries and the few elements from the Axis' web.xml).



But that brings another complexity.

Servlets and JSP's are deployed as war files.What abt the JAX-RPC class bundle?.I think JAX-RPC and my custom classes uses JAX-RPC API will be a class bundle itself.and which is not a servlet.So where and how i put these class files and how i can set Tomcat configuration?.

I am looking for it in tutorials.But i like ur suggestiens also.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You include JAR files into a WAR file just like you include .class files into a WAR file -- just in a different directory.

Individual class files go to:
/WEB-INF/classes/com/foobar/MyClass.class

JAR files go to:
/WEB-INF/lib/foobar.jar


In other words, if your regular application looks like:
/index.jsp
/WEB-INF/web.xml
/WEB-INF/classes/com/foobar/MyServlet.class

Then adding Axis would make your application look a bit like:
/index.jsp
/WEB-INF/web.xml
/WEB-INF/classes/com/foobar/MyServlet.class
/WEB-INF/lib/axis.jar
/WEB-INF/lib/jaxrpc.jar
/WEB-INF/lib/saaj.jar
/WEB-INF/lib/commons-logging.jar
/WEB-INF/lib/commons-discovery.jar
/WEB-INF/lib/wsdl4j.jar
 
Murasoli Maran
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Lasse.Great help from your side.

I am on the way to work with JAX-RPC.
 
reply
    Bookmark Topic Watch Topic
  • New Topic