Difference between revisions of "DILIGENT Provider"
Manuelesimi (Talk | contribs) (→DILIGENT Provider upgrade for Process Design) |
|||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:TO BE REMOVED]] | ||
+ | |||
+ | [[Image:Alert_icon2.gif]] ''THIS SECTION OF GCUBE DOCUMENTATION IS OBSOLETE. THE NEW VERSION IS UNDER CONSTRUCTION.'' | ||
+ | |||
== HOW TO PLUG the DILIGENT Provider into DILIGENT Services. == | == HOW TO PLUG the DILIGENT Provider into DILIGENT Services. == | ||
Line 7: | Line 11: | ||
These are the steps to follow: | These are the steps to follow: | ||
− | * | + | * yourservice.wsdl has to import DiligentProvider.wsdl. |
− | ** | + | ** adding the namespace mapping: |
<pre>xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"</pre> | <pre>xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"</pre> | ||
− | * | + | * importing DiligentProvider.wsdl from standard globus schema location: |
<pre><wsdl:import namespace= | <pre><wsdl:import namespace= | ||
"http://diligentproject.org/namespaces/common/provider/DILIGENTProvider" | "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider" | ||
location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/></pre> | location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/></pre> | ||
− | * | + | * extending DiligentProvider provider in your porttype: |
<pre><portType name="YourServicePortType" | <pre><portType name="YourServicePortType" | ||
wsdlpp:extends="wsrpw:GetResourceProperty | wsdlpp:extends="wsrpw:GetResourceProperty | ||
Line 22: | Line 26: | ||
wsrlw:ImmediateResourceTermination | wsrlw:ImmediateResourceTermination | ||
wsntw:NotificationProducer | wsntw:NotificationProducer | ||
− | diligent: | + | diligent:DiligentProviderPortType"></pre> |
− | * | + | * The service wsdd file has to be modified in order to include the ''org.diligentproject.common.provider.DILIGENTProviderImpl'' to the list of providers: |
− | <pre><parameter name="providers" value="org.diligentproject.common.provider. | + | <pre><parameter name="providers" value="org.diligentproject.common.provider.DILIGENTProviderImpl GetRPProvider GetMRPProvider |
SetRPProvider QueryRPProvider"/></pre> | 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.*; | ** import diligent provider package: import org.diligentproject.common.provider.*; | ||
− | ** create an instance of class DILIGENTPropertySet instead of SimpleResourcePropertySet: | + | **the Resource class of the Service has to implement the interface ''DILIGENTProvider'': |
+ | |||
+ | <pre> | ||
+ | |||
+ | public class DISBrokerResource implements Resource, ResourceProperties, DILIGENTProvider{ | ||
+ | |||
+ | ... | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | |||
+ | * Developers has to create an instance of class DILIGENTPropertySet instead of SimpleResourcePropertySet: | ||
<pre>this.propSet = new DILIGENTPropertySet(DILIGENTResourceQNames.RESOURCE_PROPERTIES);</pre> | <pre>this.propSet = new DILIGENTPropertySet(DILIGENTResourceQNames.RESOURCE_PROPERTIES);</pre> | ||
this will add 8 new resource properties to your resource: | this will add 8 new resource properties to your resource: | ||
Line 41: | Line 57: | ||
<xsd:element name="DLs" type="xsd:string"/></pre> | <xsd:element name="DLs" type="xsd:string"/></pre> | ||
− | * Also | + | *The interface DILIGENTProvider requires the implementation of the method: |
+ | |||
+ | |||
+ | <pre> | ||
+ | public DILIGENTPropertySet getDILIGENTPropertySet() { | ||
+ | return (DILIGENTPropertySet)this.propSet; | ||
+ | } | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | 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. | ||
+ | |||
+ | * Also is needed to modify the registration file that is passed 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): | ||
<pre><ServiceGroupRegistrationParameters | <pre><ServiceGroupRegistrationParameters | ||
xmlns:sgc="http://mds.globus.org/servicegroup/client" | xmlns:sgc="http://mds.globus.org/servicegroup/client" | ||
Line 92: | Line 121: | ||
</ServiceGroupRegistrationParameters></pre> | </ServiceGroupRegistrationParameters></pre> | ||
− | * | + | * The 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 the build file, just add the command : |
Line 116: | Line 145: | ||
--[[User:Andrea|Andrea]] 17:15, 15 February 2007 (EET) | --[[User:Andrea|Andrea]] 17:15, 15 February 2007 (EET) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 173: | Line 150: | ||
The creation of Compound Services using gCube Services that include the DILIGENT Provider has some issues related to the WSDL processing. In fact, the Service WSDLs that include the DILIGENT Provider WSDL are not correctly validated by the WSDL preprocessor. This is because of some types imported from an external XML Schema are not correctly resolved. | The creation of Compound Services using gCube Services that include the DILIGENT Provider has some issues related to the WSDL processing. In fact, the Service WSDLs that include the DILIGENT Provider WSDL are not correctly validated by the WSDL preprocessor. This is because of some types imported from an external XML Schema are not correctly resolved. | ||
− | In order to allow the creation of Compound Services, a slightly modification to the Diligent Provider's WSDL has been | + | In order to allow the creation of Compound Services, a slightly modification to the Diligent Provider's WSDL has been needed. The definition of the types above has been reorganized and all of them has been included in a separate schema file named ''DiligentProvider.xsd''. |
This file has to be imported inside the gCube service's WSDL schema sections as follows: | This file has to be imported inside the gCube service's WSDL schema sections as follows: | ||
Latest revision as of 18:57, 6 July 2016
THIS SECTION OF GCUBE DOCUMENTATION IS OBSOLETE. THE NEW VERSION IS UNDER CONSTRUCTION.
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:
- yourservice.wsdl has to import DiligentProvider.wsdl.
- adding the namespace mapping:
xmlns:diligent="http://diligentproject.org/namespaces/common/provider/DILIGENTProvider"
- importing DiligentProvider.wsdl from standard globus schema location:
<wsdl:import namespace= "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider" location="../../common/provider/DILIGENTProvider/DiligentProvider.wsdl"/>
- extending DiligentProvider provider in your porttype:
<portType name="YourServicePortType" wsdlpp:extends="wsrpw:GetResourceProperty wsrpw:GetMultipleResourceProperties wsrpw:SetResourceProperties wsrpw:QueryResourceProperties wsrlw:ImmediateResourceTermination wsntw:NotificationProducer diligent:DiligentProviderPortType">
- The service wsdd file has to be modified in order to include the org.diligentproject.common.provider.DILIGENTProviderImpl to the list of providers:
<parameter name="providers" value="org.diligentproject.common.provider.DILIGENTProviderImpl GetRPProvider GetMRPProvider SetRPProvider QueryRPProvider"/>
- Add DiligentProvider functionalities to your service Resource class implementation;
- import diligent provider package: import org.diligentproject.common.provider.*;
- the Resource class of the Service has to implement the interface DILIGENTProvider:
public class DISBrokerResource implements Resource, ResourceProperties, DILIGENTProvider{ ...
- Developers has to 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"/>
- 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.
- Also is needed to modify the registration file that is passed 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>
- The 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 the 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 for Process Design
The creation of Compound Services using gCube Services that include the DILIGENT Provider has some issues related to the WSDL processing. In fact, the Service WSDLs that include the DILIGENT Provider WSDL are not correctly validated by the WSDL preprocessor. This is because of some types imported from an external XML Schema are not correctly resolved. In order to allow the creation of Compound Services, a slightly modification to the Diligent Provider's WSDL has been needed. The definition of the types above has been reorganized and all of them has been included in a separate schema file named DiligentProvider.xsd. This file has to be imported inside the gCube service's WSDL schema sections as follows:
<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. Since the Process Design supports only one level of schema organization in the file system (i.e. schema/Myservice/myservice.wsdl), the gCube services that have to respect this constraint have now to include the Diligent Provider WSDL file has also to be modified as follows:
<wsdl:import namespace= "http://diligentproject.org/namespaces/common/provider/DILIGENTProvider" location="../diligentproject/common/provider/DILIGENTProvider/DiligentProvider.wsdl"/>