• 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

Suggestion for JEE without XML

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

I've started learning web services recently, and I find that the number of XML files needed for configuring and deploying very confusing. I was wondering if there was an easier way... for e.g.

Suppose that we don't have XML files. To create a web service we implement an interface called WebServiceInterface which could look like:



Suppose we also have another interface like:


(I will leave the definition of WebServiceDescription and SessionDescription open, so that we can put only what we need in there later).

Now if we have a class MyWebService that implements WebServiceInterface and SessionInterface, such that the WebServiceDescription and SessionDescription objects are configured in some way (perhaps getting the properties by looking up a table on the DB?) could this class be deployed as a web service in a container that inspects the interfaces implemented, rather than inspecting a XML file?

Lets now add a method to the MyWebService class:


I am using @remote to show that this method can be called remotely.

Java knows about local objects, and makes a remote call if you specify a Context other than a local context, and use PortableRemoteObject, etc.

Suppose that our MyWebService class was in the package remote.webservices and we had some way of telling our local JVM that everything within the package remote.webservices is on the machine JUPITER. That is we have setup the JVM without explicitly using a Context object - maybe we could have set the system properties?

Lastly... suppose we had a command in Java like which could by used as


The create command will force the JVM to instantiate the MyWebService object such that will be called on the remote machine JUPITER. That is, the create command generates the remote stub either at runtime, or at compile time.

I could be totally off at a tangent here... but I thought I'll put it out there...

Thanks for reading - and let me know what you think.

Cheers
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic