Difference between revisions of "Advanced Topics"

From GCube System
Jump to: navigation, search
(How to persist the state)
Line 1: Line 1:
 
== How to publish the state ==
 
== How to publish the state ==
 +
#Import GCUBEProvider WSDL inside the Stateful WSDL:
 +
<pre>
 +
<definitions name="Stateful" targetNamespace="http://acme.org/sample"....
 +
xmlns:provider=http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider />
 +
 +
<import namespace=http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider 
 +
location="../gcube/common/core/providers/GCUBEProvider.wsdl"/>
 +
 
...
 
...
  
 +
</definition>
 +
</pre>
 +
 +
# Declare the WS-Resource Property in the Stateful WSDL:
 +
<pre>
 +
<definitions name="Stateful"
 +
    targetNamespace="http://acme.org/sample" ...>
 +
 +
  <types>
 +
<xsd:schema targetNamespace="http://acme.org/sample">   
 +
    <xsd:import namespace="http://gcube-system.org/namespaces/common/core/types" schemaLocation="../gcube/common/core/types/GCUBETypes.xsd"/>
 +
   
 +
  <xsd:element name="aboutSF" type="coretypes:VOID" />
 +
<xsd:element name="aboutSFResponse" type="xsd:string" />
 +
 +
<xsd:element name="Name" type="xsd:string"/>
 +
        <xsd:element name="Visits" type="xsd:int"/>
 +
       
 +
            <xsd:element name="StatefulResourceProperties">
 +
                <xsd:complexType>
 +
                    <xsd:sequence>
 +
                        <xsd:element ref="tns:Name" minOccurs="1" maxOccurs="1"/>
 +
                        <xsd:element ref="tns:Visits" minOccurs="1" maxOccurs="1"/>
 +
                    </xsd:sequence>
 +
                </xsd:complexType>
 +
            </xsd:element>
 +
           
 +
</xsd:schema>
 +
    </types>
 +
</pre>
 +
 +
# Extend the Stateful PortType with the GCUBEProvider in the Stateful WSDL:
 +
<pre>
 +
<portType name="StatefulPortType"
 +
    wsrp:ResourceProperties="tns:StatefulResourceProperties"
 +
        wsdlpp:extends="provider:GCUBEProvider">
 +
...
 +
</portType>
 +
</pre>
 +
 +
# Include the GCUBEProvider in the list of providers on service WSDD:
 +
<pre>
 +
<parameter name="providers" value="GCUBEProvider"/>
 +
</pre>
 +
 +
# Provide a Publication Profile:
 +
<pre>
 +
<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:tutorial="http://acme.org/sample"
 +
                xmlns:provider="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">
 +
               
 +
                <agg:PollIntervalMillis>60000</agg:PollIntervalMillis>
 +
               
 +
                <agg:ResourcePropertyNames>tutorial:Name</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>tutorial:Visits</agg:ResourcePropertyNames>
 +
               
 +
                <agg:ResourcePropertyNames>provider:RI</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>provider:ServiceID</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>provider:ServiceName</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>provider:ServiceClass</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>provider:VO</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>provider:GHN</agg:ResourcePropertyNames>
 +
                <agg:ResourcePropertyNames>provider:Scope</agg:ResourcePropertyNames>
 +
               
 +
            </agg:GetMultipleResourcePropertiesPollType>
 +
        </agg:AggregatorConfig>
 +
       
 +
        <agg:AggregatorData/>
 +
       
 +
    </Content>
 +
   
 +
</ServiceGroupRegistrationParameters>
 +
 +
</pre>
 +
#Include the Publication Profile resource on the stateful JNDI section:
 +
<pre>
 +
 +
</pre>
 
== How to persist the state ==
 
== How to persist the state ==
  
--[[User:Manuele.simi|Manuele.simi]] 01:19, 27 March 2008 (EET)
+
 
 +
== Interfacing the Information System ==
 +
 
 +
== ISClient interface
 +
 
 +
==== Sample usage ====
 +
 
 +
=== ISPublisher interface ===
 +
 
 +
==== Sample usage ====
 +
 
 +
== Service security
 +
 
 +
=== Configuring gContainer with Security ===
 +
 
 +
=== Configuring gCube Service with Credentials ===
 +
 
 +
--[[User:Manuele.simi|Manuele.simi]] 20:11, 28 March 2008 (EET)

Revision as of 20:11, 28 March 2008

How to publish the state

  1. Import GCUBEProvider WSDL inside the Stateful WSDL:
<definitions name="Stateful" targetNamespace="http://acme.org/sample"....
xmlns:provider=http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider />

<import namespace=http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider   
location="../gcube/common/core/providers/GCUBEProvider.wsdl"/>

...

</definition>
  1. Declare the WS-Resource Property in the Stateful WSDL:
<definitions name="Stateful"
    targetNamespace="http://acme.org/sample" ...>

   <types>
	<xsd:schema targetNamespace="http://acme.org/sample">    	
	    <xsd:import namespace="http://gcube-system.org/namespaces/common/core/types" schemaLocation="../gcube/common/core/types/GCUBETypes.xsd"/>
	    	
  		<xsd:element name="aboutSF" type="coretypes:VOID" />
		<xsd:element name="aboutSFResponse" type="xsd:string" />		
		
		<xsd:element name="Name" type="xsd:string"/>
        <xsd:element name="Visits" type="xsd:int"/>
        
            <xsd:element name="StatefulResourceProperties">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element ref="tns:Name" minOccurs="1" maxOccurs="1"/>
                        <xsd:element ref="tns:Visits" minOccurs="1" maxOccurs="1"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element> 	
            
	</xsd:schema>
    </types>
  1. Extend the Stateful PortType with the GCUBEProvider in the Stateful WSDL:
<portType name="StatefulPortType"
    wsrp:ResourceProperties="tns:StatefulResourceProperties"
        wsdlpp:extends="provider:GCUBEProvider">
 ...
 </portType>
  1. Include the GCUBEProvider in the list of providers on service WSDD:
 
<parameter name="providers" value="GCUBEProvider"/>
  1. Provide a Publication Profile:
<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:tutorial="http://acme.org/sample"
                xmlns:provider="http://gcube-system.org/namespaces/common/core/porttypes/GCUBEProvider">
                
                <agg:PollIntervalMillis>60000</agg:PollIntervalMillis>
                
                <agg:ResourcePropertyNames>tutorial:Name</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>tutorial:Visits</agg:ResourcePropertyNames>
                
                <agg:ResourcePropertyNames>provider:RI</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>provider:ServiceID</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>provider:ServiceName</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>provider:ServiceClass</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>provider:VO</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>provider:GHN</agg:ResourcePropertyNames>
                <agg:ResourcePropertyNames>provider:Scope</agg:ResourcePropertyNames>
                
            </agg:GetMultipleResourcePropertiesPollType>
        </agg:AggregatorConfig>
        
        <agg:AggregatorData/>
        
    </Content>
    
</ServiceGroupRegistrationParameters>

  1. Include the Publication Profile resource on the stateful JNDI section:

How to persist the state

Interfacing the Information System

== ISClient interface

Sample usage

ISPublisher interface

Sample usage

== Service security

Configuring gContainer with Security

Configuring gCube Service with Credentials

--Manuele.simi 20:11, 28 March 2008 (EET)