aspose file tools*
The moose likes Web Services and the fly likes Using JAX-RPC in a WebStart application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using JAX-RPC in a WebStart application" Watch "Using JAX-RPC in a WebStart application" New topic
Author

Using JAX-RPC in a WebStart application

Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
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/
Murasoli Maran
Ranch Hand

Joined: Jun 08, 2003
Posts: 193
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?.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Murasoli Maran
Ranch Hand

Joined: Jun 08, 2003
Posts: 193
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
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Jun 08, 2003
Posts: 193
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
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Jun 08, 2003
Posts: 193
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
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Jun 08, 2003
Posts: 193
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
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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

Joined: Jun 08, 2003
Posts: 193
Thanks a lot Lasse.Great help from your side.

I am on the way to work with JAX-RPC.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using JAX-RPC in a WebStart application
 
Similar Threads
Making a distributable application
wot is JNLP?
java+InstallShield Multiple Platform installer
Web Start & distribution question
To the Author!!