Today, MetaService-java hit Jolie's SVN. You can find it in /trunk/support/metaservice-java. Basically, MetaService-java is a Java API abstraction layer for interacting with MetaService, so that you can use it as if it were a Java object.

This project was born for two reasons:
- it will be part of a solution for the integration of Java enterprise web applications with Service-Oriented Computing;
- it is a good example of how to implement an API abstraction layer to MetaService from an Object-oriented language, so its source code could be a useful reading for the Plasma::Service developers.

I'll let the code (and its comments) and a simple example speak for themselves. They're in Java, but they should be pretty easy to understand even for people non-proficient with it. Example follows.


MetaService metaService = new EmbeddedMetaService(); // Create a MetaService instance.

// Set up access to a SOAP Web Service.
MetaServiceChannel myWebService = metaService.addRedirection(
"MyWebService", // Resource name to assign
"socket://www.mywebservice.com:80/", // Service location
Value.create( "soap" ), // Protocol to use
Value.create( "My metadata" ) // Descriptive metadata
);

// Done! Let's communicate with it.
myWebService.send( "getNameById", Value.create( 4 ) );
Value response = myWebService.recv();
System.out.println( response.strValue() ); // Will print the name.


The API is still to be refined, but pretty much usable already. =)