Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Here is an example of an interface to a service. Note that the interface is optional, you can expose a class as a service - we've just used an interface in this example as its good practice and makes the example easier to follow.

An error occurred: cvs.activesoap.codehaus.org. The system administrator has been notified.

There's a method on this interface which accepts an XMLBeans type. We can have as many methods as we like all auto-published, the only requirement is that when using the XMLBeansRegistery, the parameter must be an XMLBeans type, so that when we register it we can auto-deduce the QName which matches the correct method on the service.

Then if we register an implementation of this interface with the XMLBeansRegistry we can automatically publish the service as both REST and SOAP endpoints...

An error occurred: cvs.activesoap.codehaus.org. The system administrator has been notified.

Exposing services over HTTP

The following example demonstrates how to make a service available over HTTP using the SOAP protocl (1.2 is the default)

An error occurred: cvs.activesoap.codehaus.org. The system administrator has been notified.

Here is the same service exposed as a pure REST service

An error occurred: cvs.activesoap.codehaus.org. The system administrator has been notified.

Client interface

As well as implementing web services, its also useful to be able to invoke them easily in a document centric way.

The following example demonstates how to invoke a web service using an XMLBeans interface for a WSDL endpoint.

An error occurred: cvs.activesoap.codehaus.org. The system administrator has been notified.

Here's the same thing again for a service exposed via pure REST

An error occurred: cvs.activesoap.codehaus.org. The system administrator has been notified.
  • No labels