You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by Matthieu Riou <ma...@gmail.com> on 2006/08/22 01:06:08 UTC

Management API

 Hi,

I've just finished the migration of the PM API to Web Services using Axis2.
I've also added a deployment API based on attachments. To get started you'll
basically want to have a look at:

   - The WSDL documents (
   http://svn.apache.org/repos/asf/incubator/ode/trunk/axis2/src/main/wsdl/)
   that sort of replicate the ProcessManagement and InstanceManagement
   interfaces you already know.
   - The client utility class that will help you build messages and send
   them (
   http://svn.apache.org/repos/asf/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ServiceClientUtil.java
   )
   - The different test classes, just to see examples of invocation that
   you can reuse (
   http://svn.apache.org/repos/asf/incubator/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/
   )

Here is a small example of code to demonstrate what you would do to call one
of the PM API methods:

        OMElement message = clientUtil.buildMessage("getScopeInfoWithActivity",
new String[] {"siid", "activityInfo"},
                new String[] {siid, "true"});
        OMElement result = clientUtil.send(message,
"http://localhost:8080/ode/services/InstanceManagement"<http://localhost:8080/ode/services/InstanceManagement>
);
        ScopeInfoDocument scopeIndoDoc = ScopeInfoDocument.Factory.parse(
result.getXMLStreamReader());

The only difference with the test classes is the last instruction, to get an
XML Bean out of the AXIOM elements. Fault handling is not perfect yet but
for now that should work.

To start with you can just deploy Ode's WAR into your favorite container and
open a browser to http://localhost:8080/ode/services/listServices, you
should see the ProcessManagement, InstanceManagement and DeploymentService
listed there. Then you're ready to go...

Cheers,

Matthieu