DILIGENT Provider

From Gcube Wiki
Revision as of 14:40, 26 June 2007 by Andrea (Talk | contribs) (DILIGENT Provider upgrade for Process Design)

Jump to: navigation, search

HOW TO PLUG the DILIGENT Provider into DILIGENT Services.

The DILIGENTProvider provides new WS-ResourceProperties and operations (not in the Beta version) to DILIGENT services.

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

These are the steps to follow:

  • Modify yourservice.wsdl importing DiligentProvider.wsdl.
    • add the namespace mapping:
xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
    • import DiligentProvider.wsdl from standard globus schema location:
<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 instance of class DILIGENTPropertySet instead of SimpleResourcePropertySet:
this.propSet =  new DILIGENTPropertySet(DILIGENTResourceQNames.RESOURCE_PROPERTIES);

this will add 8 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="DiligentType" type="xsd:string"/>                        
                        <xsd:element name="DLs" 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:DiligentType</agg:ResourcePropertyNames>
           <agg:ResourcePropertyNames>provider:DLs</agg:ResourcePropertyNames>
	   <agg:ResourcePropertyNames>provider:DHNID</agg:ResourcePropertyNames>
   

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

</ServiceGroupRegistrationParameters>
  • Your Service Build file has to be modified in order to copy into the build schema dir the DILIGENT Provider WSDL. So in the init target of your build file, just add the command :


<!-- Sets up the build directory structure -->
	<target name="init">
		<mkdir dir="${build.dir}" />
		<mkdir dir="${build.dest}" />
		..........
		<mkdir dir="${schema.dest}" />
		<copy toDir="${schema.dest}">
			.......
                        *******ADD THESE LINES*****
			<fileset dir="${schema.provider.src}" casesensitive="yes">
                              <include name="diligentproject/common/**/*"/>
                        </fileset>

		</copy>



The DiligentProvider Resource Properties are filled during registration to DIS by DIS-IP/NAL methods.

--Andrea 17:15, 15 February 2007 (EET)

DILIGENT Provider upgrade

The latest version of DILIGENT Provider includes some minor changes inside DILIGENT Services implementation classes, In particular the Resource class of your Service has to implement the interface DILIGENTProvider:


public class  DISBrokerResource   implements Resource, ResourceProperties,  DILIGENTProvider{

...

The interface DILIGENTProvider requires the implementation of the method:


public DILIGENTPropertySet getDILIGENTPropertySet() {
	return (DILIGENTPropertySet)this.propSet;
}

This method allows HNM to set the DILIGENT Provider Specific RP of your Service (NO Problem for the service specific RP :->), and allows also HNM to retrieve info that let it to register your RPs to a new VO.

Some minor changes have to be applied also to your WSDD file and WSDL files...

In the WSDD section related to the service that uses the DILIGENT Provider you have to add ( or modify if your service already included the previous version of the provider) :

     <parameter name="providers" value="org.diligentproject.common.provider.DILIGENTProviderImpl GetRPProvider GetMRPProvider
      SetRPProvider QueryRPProvider"/>

In the prevoius version the name of the provider was org.diligentproject.common.provider.DILIGENTProvider.

The WDSL file has to be modified in this way:

<portType name="YourServicePortType" 
    		wsdlpp:extends="wsrpw:GetResourceProperty
                      wsrpw:GetMultipleResourceProperties
                      wsrpw:SetResourceProperties
                      wsrpw:QueryResourceProperties
	              wsrlw:ImmediateResourceTermination
		      wsntw:NotificationProducer
		      diligent:DiligentProviderPortType">

If your service already included the prevoius version, just modified the content of wsdlpp:extends from diligent:DiligentProvider to diligent:DiligentProviderPortType

--Andrea 12:51, 19 April 2007 (EEST)


DILIGENT Provider upgrade for Process Design

The creation of Compound Services using gCube Services that include the DILIGENT Provider exposed some issue related to WSDL processing. In particular the Service WSDLs that include DILIGENT Provider WSDL, are not correctly validated by the WSDL preprocessor cause some imported types are not correctly included. In order to let the creation of correct Compound Services we needed to modify the Diligent Provider WSDL removing types definition and including them is a separate schema file DiligentProvider.xsd. This file has to be included inside gCube services WSDL ( togheter with DiligentProvider.wsdl file) in that way:

 <xsd:import
       namespace="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
       schemaLocation="../diligentproject/common/provider/DILIGENTProvider/DiligentProvider.xsd"/> 

the Schema Location path has also to be fixed. All services need to have only a single schema subfolder ( i.e. schema/Myservice/myservice.wsdl) otherwise the Process Design will not solve DiligentProvider.wsdl/xsd inclusion. For this reason the Diligent Provider WSDL inclusion has to be modified in the following way:

<wsdl:import namespace=
   		 "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
   		 location="../diligentproject/common/provider/DILIGENTProvider/DiligentProvider.wsdl"/>