Skip to main content

interface-based service development

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-03-14

In my experience, most OO distributed computing technologies (RMI, CORBA, etc.) work something like this:

  • define a remote interface (in IDL, Java, etc.)
  • write an implementation of the interface
  • use a tool (rmic, IDL compiler) that generates code which enables a client to get a reference to the implementation of the interface given some endpoint (URL).

The important point is that the remote interface is the contract that both the client and service adhere to. I've had a look at metro, and it doesn't seem to follow this pattern. If I define a remote implementation such as:

class MyServiceImpl implements MyService {
    MyType doIt() {
        // impl omitted

I then use metro to generate a WSDL from this implementation and client code from the WSDL. Because the client code is generated from the WSDL, it knows nothing about MyService. The result is that there is no way for the client to program to MyService.
Is there any way to use metro in a manner that supports programming to interfaces (rather than programming to WSDL documents that are automatically generated from a service implementation)?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-03-25

hi ,
I think the interface contract is actually in the wsdl itself. For your
purpose you migth have a look at the wsdl cusomization feature.
see ref