• Post Reply Bookmark Topic Watch Topic
  • New Topic

Send Gui through a web service.

 
Constantinos Grevenitis
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to send a gui using Axis2 and POJOs. How am I supposed to do that???
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GUIs are shown to the user, and an abstract concept to begin with. What do you mean by "send it through a WS"?
 
Constantinos Grevenitis
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a university project. And they told me to send Java Objects (for example a JFrame or a JLabel or a JButton) using Axis2 and POJOs. No RPC, no CORBA..
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ask for a new project.

That one must rank among the worst abuses of a web service (if in fact you have to send swing objects). They probably got the idea from something like this:
Creating a Web services data model for Swing widgets

More realistic would be an updated version of Using Apache Axis version 1 to build Web Services were you also replace the bean serialization and de-serialization mechanism with JAXB 2.0. If you want to spice it up, use Java WebStart to keep the Swing client current with the capabilities of the web service.


Accessing Web Services From a Stand-Alone Java Client
Swing, JAX-WS, and JavaBeans
 
Constantinos Grevenitis
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you mind telling the best way to send Java Objects using Java Web Services??? I am lost and Axis2 doen't work. I am thinking of reading a CORBA book but I am not sure if it is the right idea. Any help will be appreciated. Thank you!!!
 
Constantinos Grevenitis
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I talked to my teacher and I told him that Axis2 doesn't work. He replied telling me to build the web services in any way possible. So I am free now to choose the API and / or the protocols needed. HELP!!!
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't bother with Corba.

What do you mean by "Axis2 doesn't work"? What did you try to do that it couldn't handle?

If you (or rather, your professor) is absolutely set on sending GUI objects over a WS, then one way to do it would be to serialize the object to a byte[], then base64-encode that (so you get an ASCII representation), and then send that as a string over the WS.

Another option would be to use the java.beans.XMLEncoder/XMLDecoder classes to produce an XML representation, and send that directly.
 
Constantinos Grevenitis
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!