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

Difference between revisions of "Corona HowTo Web Service"

m (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...)
 
m (obsolete)
 
Line 1: Line 1:
<table border='1' cellpadding='3'>
 
<tr>
 
<td>[http://www.eclipse.org/corona Eclipse Home]</td>
 
<td>[[Corona|Wiki Home]]</td>
 
<td>[[Corona HowTo|How To...]]</td>
 
</tr>
 
</table>
 
----
 
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 ==
 
# Create the ''interface'' that defines the web service endpoints
 
# Create the class ''implements'' the web service endpoint ''interface''
 
# Register the OSGi service
 
## via Declarative Services
 
## 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.
 
 
<code>
 
&lt;component name=&quot;corona.container.project.manager&quot; immediate=&quot;true&quot;&gt;<br>
 
<br>
 
&nbsp;&nbsp;
 
&lt;implementation<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
class=&quot;org.eclipse.corona.container.project.manager.service.ProjectContainerManager&quot;
 
/&gt;<br>
 
<br>
 
&nbsp;&nbsp;
 
&lt;service&gt;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
&lt;provide<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
interface=&quot;org.eclipse.corona.container.project.manager.IProjectContainerManager&quot;
 
/&gt;<br>
 
&nbsp;&nbsp;
 
&lt;/service&gt;<br>
 
<br>
 
&nbsp;&nbsp;
 
&lt;property name=&quot;container.type&quot; type=&quot;String&quot; value=&quot;ProjectContainer&quot; /&gt;<br>
 
&nbsp;&nbsp;
 
&lt;property name=&quot;service.type&quot; type=&quot;String&quot; value=&quot;local&quot; /&gt;<br>
 
<b>&nbsp;&nbsp; &lt;property name=&quot;web.service.name&quot; type=&quot;String&quot; value=&quot;ProjectContainerManager&quot;
 
/&gt;<br>
 
&nbsp;&nbsp;
 
&lt;property name=&quot;web.service.context&quot; type=&quot;String&quot; value=&quot;ProjectContextContainer&quot;
 
/&gt;<br>
 
&nbsp;&nbsp;
 
&lt;property name=&quot;interface.class&quot; type=&quot;String&quot; value=&quot;org.eclipse.corona.container.project.manager.IProjectContainerManager&quot;
 
/&gt;<br>
 
</b>
 
<br>
 
&nbsp;&nbsp;
 
&lt;reference name=&quot;SoaWebService&quot; cardinality=&quot;1..1&quot; policy=&quot;dynamic&quot;<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
interface=&quot;org.eclipse.corona.soa.webservice.IWebServiceDeployer&quot; /&gt;<br>
 
<br>
 
&lt;/component&gt;
 
</code>
 
 
 
[[Category:Corona]]
 

Latest revision as of 10:54, 27 February 2008

Back to the top