• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Suggestion for JEE without XML

Clive Naicker
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic