Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Corona HowTo Web Service

Revision as of 15:01, 30 April 2007 by Dennis.oflynn.compuware.com (Talk | contribs) (New page: <table border='1' cellpadding='3'> <tr> <td>[http://www.eclipse.org/corona Eclipse Home]</td> <td>Wiki Home</td> <td>How To...</td> </tr> </table> ---- Corona's...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Eclipse Home Wiki Home How To...

Corona's server-side environment supports the deployment of an OSGi service as web service endpoints. When an OSGi service is registered, a special web service deployer service will check if the newly registered service should also be deployed as a set of web service endpoints.

To enable an OSGi service to be deployed as web service endpoints, the service must have the following properties defined:

web.service.name
The name of the web service endpoints
web.service.context
The context to be associated with the web services
interface.class
The name of the interface class that defines the endpoints to be exposed as web services

Steps

  1. Create the interface that defines the web service endpoints
  2. Create the class implements the web service endpoint interface
  3. Register the OSGi service
    1. via Declarative Services
    2. via Code

Example

The following is an OSGi Declarative Services deployment descriptor used to register the OSGi service for Corona's ProjectContainerManager. Notice the use of service properties to specify the additional parameters required to deploy the OSGi service as web service endpoints.

<component name="corona.container.project.manager" immediate="true">

   <implementation
      class="org.eclipse.corona.container.project.manager.service.ProjectContainerManager" />

   <service>
      <provide
         interface="org.eclipse.corona.container.project.manager.IProjectContainerManager" />
   </service>

   <property name="container.type" type="String" value="ProjectContainer" />
   <property name="service.type" type="String" value="local" />
   <property name="web.service.name" type="String" value="ProjectContainerManager" />
   <property name="web.service.context" type="String" value="ProjectContextContainer" />
   <property name="interface.class" type="String" value="org.eclipse.corona.container.project.manager.IProjectContainerManager" />

   <reference name="SoaWebService" cardinality="1..1" policy="dynamic"
      interface="org.eclipse.corona.soa.webservice.IWebServiceDeployer" />

</component>

Back to the top