Difference between revisions of "DILIGENT Provider"

From Gcube Wiki
Jump to: navigation, search
(HOW TO PLUG DILIGENT Provider into DILIGENT Services.)
(HOW TO PLUG DILIGENT Provider into DILIGENT Services.)
Line 1: Line 1:
== HOW TO PLUG DILIGENT Provider into DILIGENT Services. ==
+
== HOW TO PLUG the DILIGENT Provider into DILIGENT Services. ==
  
 
The DILIGENTProvider provide new ws-resource properties and operation ( not in this first version ) to DILIGENT services.
 
The DILIGENTProvider provide new ws-resource properties and operation ( not in this first version ) to DILIGENT services.
Line 8: Line 8:
  
 
* Modify yourservice.wsdl importing DiligentProvider.wsdl.
 
* Modify yourservice.wsdl importing DiligentProvider.wsdl.
 
+
** add the namespace mapping:  xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
        ** add the namespace mapping:  xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
+
** import DiligentProvider.wsdl from standard globus schema location:
 
+
<pre><wsdl:import namespace=
    ** import DiligentProvider.wsdl from standard globus schema location:
+
+
<nowiki><wsdl:import namespace=
+
 
   "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
 
   "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
   location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/>
+
   location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/></pre>
</nowiki>
+
** extends DiligentProvider provider in your porttype:
** extends DiligentProvider provider in your porttype:
+
  
<nowiki><portType name="YourServicePortType"  
+
<pre><portType name="YourServicePortType"  
 
     wsdlpp:extends="wsrpw:GetResourceProperty
 
     wsdlpp:extends="wsrpw:GetResourceProperty
 
                   wsrpw:GetMultipleResourceProperties
 
                   wsrpw:GetMultipleResourceProperties
Line 26: Line 22:
 
            wsrlw:ImmediateResourceTermination
 
            wsrlw:ImmediateResourceTermination
 
    wsntw:NotificationProducer
 
    wsntw:NotificationProducer
    diligent:DiligentProvider">
+
    diligent:DiligentProvider"></pre>
</nowiki>
+
 
* Add DiligentProvider to the list of the provider of your service wsdd file:
 
* Add DiligentProvider to the list of the provider of your service wsdd file:
 +
<pre><parameter name="providers" value="org.diligentproject.common.provider.DILIGENTProvider GetRPProvider GetMRPProvider
  
<parameter name="providers" value="org.diligentproject.common.provider.DILIGENTProvider GetRPProvider GetMRPProvider SetRPProvider QueryRPProvider"/>
+
SetRPProvider QueryRPProvider"/></pre>
 
+
 
* Add DiligentProvider functionalities to your service Resource class implementation;
 
* Add DiligentProvider functionalities to your service Resource class implementation;
 +
** import diligent provider package: import org.diligentproject.common.provider.*;
 +
** create an object of class DILIGENTPropertySet instead of SimpleResourcePropertySet:
 +
<pre>this.propSet =  new DILIGENTPropertySet(DILIGENTResourceQNames.RESOURCE_PROPERTIES);</pre>
 +
this will add 7 new resource properties to your resource:
  
** import diligent provider package: import org.diligentproject.common.provider.*;
+
<pre><xsd:element name="RunningInstanceID" type="xsd:string"/>
 
+
** create an object of class DILIGENTPropertySet instead of SimpleResourcePropertySet:
+
 
+
this.propSet =  new DILIGENTPropertySet(DILIGENTResourceQNames.RESOURCE_PROPERTIES);
+
 
+
  this will add 7 new resource properties to your resource:
+
 
+
<xsd:element name="RunningInstanceID" type="xsd:string"/>
+
  
 
<xsd:element name="ServiceID" type="xsd:string"/>
 
<xsd:element name="ServiceID" type="xsd:string"/>
Line 54: Line 45:
 
<xsd:element name="VOName" type="xsd:string"/>
 
<xsd:element name="VOName" type="xsd:string"/>
 
 
<xsd:element name="ResourceType" type="xsd:string"/>
+
<xsd:element name="ResourceType" type="xsd:string"/></pre>
  
* Also you have to modify the registration file that you pass to DIS-IP in order to register also the new ws-properties( in future version the DILIGENT provider
+
* Also you have to modify the registration file that you pass to DIS-IP in order to register also the new ws-properties( in future version of the DILIGENT provider new ws-properties will be added automatically to registration file):
new ws-properties will be added automatically to registration file):
+
<pre><ServiceGroupRegistrationParameters
 
+
<ServiceGroupRegistrationParameters
+
 
   xmlns:sgc="http://mds.globus.org/servicegroup/client"
 
   xmlns:sgc="http://mds.globus.org/servicegroup/client"
 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Line 76: Line 65:
  
 
       <agg:AggregatorConfig>
 
       <agg:AggregatorConfig>
       <agg:GetMultipleResourcePropertiesPollType xmlns:registry="http://diligentproject.org/namespaces/informationservice/disregistry/DISRegistryService"
+
       <agg:GetMultipleResourcePropertiesPollType
 +
 
 +
xmlns:registry="http://diligentproject.org/namespaces/informationservice/disregistry/DISRegistryService"
  
 
<!-- ADD the DILIGENT provider Ns -->
 
<!-- ADD the DILIGENT provider Ns -->
Line 104: Line 95:
 
   </Content>
 
   </Content>
  
</ServiceGroupRegistrationParameters>
+
</ServiceGroupRegistrationParameters></pre>
  
  
  
 
The DiligentProvider Resource Properties are filled during registration to DIS by DIS-IP/NAL methods.
 
The DiligentProvider Resource Properties are filled during registration to DIS by DIS-IP/NAL methods.
 +
--[[User:Andrea|Andrea]] 17:15, 15 February 2007 (EET)

Revision as of 16:15, 15 February 2007

HOW TO PLUG the DILIGENT Provider into DILIGENT Services.

The DILIGENTProvider provide new ws-resource properties and operation ( not in this first version ) to DILIGENT services.

It's present inside the DHN_installer archive, and automatically deployed on the DHN.

These are the steps to follow:

<wsdl:import namespace=
   		 "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
   		 location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/>
    • extends DiligentProvider provider in your porttype:
<portType name="YourServicePortType" 
    				wsdlpp:extends="wsrpw:GetResourceProperty
                   	wsrpw:GetMultipleResourceProperties
                   	wsrpw:SetResourceProperties
                    	wsrpw:QueryResourceProperties
	            	wsrlw:ImmediateResourceTermination
		    		wsntw:NotificationProducer
		    		diligent:DiligentProvider">
  • Add DiligentProvider to the list of the provider of your service wsdd file:
<parameter name="providers" value="org.diligentproject.common.provider.DILIGENTProvider GetRPProvider GetMRPProvider

 SetRPProvider QueryRPProvider"/>
  • Add DiligentProvider functionalities to your service Resource class implementation;
    • import diligent provider package: import org.diligentproject.common.provider.*;
    • create an object of class DILIGENTPropertySet instead of SimpleResourcePropertySet:
this.propSet =  new DILIGENTPropertySet(DILIGENTResourceQNames.RESOURCE_PROPERTIES);

this will add 7 new resource properties to your resource:

<xsd:element name="RunningInstanceID" type="xsd:string"/>

			<xsd:element name="ServiceID" type="xsd:string"/>
	
			<xsd:element name="DHNID" type="xsd:string"/>
		
			<xsd:element name="ServiceName" type="xsd:string"/>
	
			<xsd:element name="ServiceClass" type="xsd:string"/>
	
			<xsd:element name="VOName" type="xsd:string"/>
	
			<xsd:element name="ResourceType" type="xsd:string"/>
  • Also you have to modify the registration file that you pass to DIS-IP in order to register also the new ws-properties( in future version of the DILIGENT provider new ws-properties will be added automatically to registration file):
<ServiceGroupRegistrationParameters
   xmlns:sgc="http://mds.globus.org/servicegroup/client"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
   xmlns:agg="http://mds.globus.org/aggregator/types"
   xmlns="http://mds.globus.org/servicegroup/client">
   <!-- Specifies that the registration will be renewed every 30
        seconds -->
   <RefreshIntervalSecs>60</RefreshIntervalSecs>


   <!-- <Content> specifies registration specific information -->
   <Content xsi:type="agg:AggregatorContent"
      xmlns:agg="http://mds.globus.org/aggregator/types">

      <agg:AggregatorConfig>
      <agg:GetMultipleResourcePropertiesPollType 	

xmlns:registry="http://diligentproject.org/namespaces/informationservice/disregistry/DISRegistryService"

	<!-- ADD the DILIGENT provider Ns -->

      xmlns:provider="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider">

  	   <agg:PollIntervalMillis>60000</agg:PollIntervalMillis>

   	   <agg:ResourcePropertyNames>registry:UniqueID</agg:ResourcePropertyNames>
   	   <agg:ResourcePropertyNames>registry:ResourceType</agg:ResourcePropertyNames>
   	   <agg:ResourcePropertyNames>registry:AuthPolicies</agg:ResourcePropertyNames>
  	   <agg:ResourcePropertyNames>registry:Profile</agg:ResourcePropertyNames>
  	
	<!-- ADD these list of WS-Properties -->
         <agg:ResourcePropertyNames>provider:RunningInstanceID</agg:ResourcePropertyNames>
	   <agg:ResourcePropertyNames>provider:ServiceID</agg:ResourcePropertyNames>
	   <agg:ResourcePropertyNames>provider:ServiceName</agg:ResourcePropertyNames>
	   <agg:ResourcePropertyNames>provider:ServiceClass</agg:ResourcePropertyNames>
         <agg:ResourcePropertyNames>provider:VOName</agg:ResourcePropertyNames>
         <agg:ResourcePropertyNames>provider:ResourceType</agg:ResourcePropertyNames>
	   <agg:ResourcePropertyNames>provider:DHNID</agg:ResourcePropertyNames>
   

 </agg:GetMultipleResourcePropertiesPollType>
 	 </agg:AggregatorConfig>
      <agg:AggregatorData/>
   </Content>

</ServiceGroupRegistrationParameters>


The DiligentProvider Resource Properties are filled during registration to DIS by DIS-IP/NAL methods. --Andrea 17:15, 15 February 2007 (EET)