• Post Reply Bookmark Topic Watch Topic
  • New Topic

Publishing Java Class as a web service

 
Hitesh Dhingra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I have a java class and the wsdl describing the java class . I want to publish the java class as a webservice. I will be using JBoss as the application server and jetty as a servlet container and most probably WSIF for the invocation of the web service . My questions are
(1) how do i publish java class as a web service? is it something like *.wsr archives?
(2) how to write a gateway to invoke the service? I mean how do i handle requests ?
I shall be highly obliged if anyone responds to my sos call at his earliest.
Thanx in advance,
Hitesh Dhingra
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since JBoss doesn't boast its own web services engine, you'll need to embed one such as Apache Axis. The way you expose your code as a web service is still much dependent on the engine you're using (before the J2EE web services JSR ends up into the appserver products).
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it useful :
Link
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I stand corrected... Apparently JBoss has a web services engine called JBoss.NET (which is, in fact, Apache Axis embedded into JBoss)...
 
Hitesh Dhingra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx Koskela and puisungnoen ... i am sorry i forget to mention that i will be embeding apache axis in jboss as a runtime engine .... now i am facing problem of gateway .... actually we have a single gateway to entertain http request and http responses there i have to decide whether i have to invoke a service or redirect it to some servlet ...... bascially how will i look up for a service and invoke the service as i can have multiple services deployed .... secondly we will not be using soap requests so no uddi registry .... so i am stuck in deciding how to design the gateway and invoke the service ..... and how to write a service provider .... i hope i could explain my problem ....
Awaiting a response at your earliest
Regards,
Hitesh Dhingra
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is this "gateway"? Is it a web application running on a physically separate machine? Is it a web application running on the same server as the web services?
Regarding "not using SOAP", what protocol are you using to invoke the web services? (PS. It's no surprise that you aren't using UDDI, most don't need such a registry)
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hitesh Dhingra:
...will not be using soap requests ... how to design the gateway and invoke the service .....

Many of the answers may be here and the adjoining pages: http://xmlrpc-c.sourceforge.net/xmlrpc-howto/xmlrpc-howto-java.html
1. the service itself can be considered "the gateway", unless you are talking about proxie issues.
2. no SOAP needed, unless you really need the extended envelop capabilities.
Consider security.
3. to be clear, "delivering" a java class through your web service would usually mean that that class executes at your server (and is not transmitted to the client). But one could also have an application in which the web service actually provides serialized classes for some reason. Just thought I'd spell this out because your question is a little unclear about your intentions.
'hope this helps
John
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!