The submitProblem portThe Rubis client viewThe hello port

Contents

Index

The hello port

The hello port is formally described in terms of WSDL-1.0. The port involves a question-response schema with a synchronous exchange of two messages of type string via a SOAP literal RPC encoding over HTTP.

## http://ernst-schroeder.uni.lu/rubisServer/Version-1.2/xmcdaRubisServer.wsdl
<definition>

##  type declarations
  <types>
   <xsd:element name="hello">
     <xsd:complexType>
       <xsd:sequence>
       <xsd:element name="message" 
                    minOccurs='0' 
                    maxOccurs='1' 
                    type="xsd:string" />  
       </xsd:sequence>
      </xsd:complexType>
   </xsd:element>

   <xsd:element name="helloResponse">
    <xsd:complexType>
        <xsd:sequence>
	    <xsd:element name="message" 
                         minOccurs='0' 
                         maxOccurs='1' 
                         type="xsd:string" />  
	</xsd:sequence>
    </xsd:complexType>
   </xsd:element>
  </types>

##  message definitions

   <message name="hello">
     <part name="message" element="tns:hello"/>
   </message>

   <message name="helloResponse">
    <part name="message" element="tns:helloResponse"/>
   </message>

## port operation description
  <portType name="rubisServerPortType">
    <operation name="hello">
      <documentation>
       Returns the D3-Rubis server greetings.
      </documentation>	
      <input message="tns:hello" 
          name="hello" />
      <output message="tns:helloResponse" 
           name="helloResponse" />
    </operation>
  </portType>

## port binding protocol description
  <binding name="rubisServerBinding" type="tns:rubisServerPortType">

    <soap:binding style="rpc" 
                  transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="hello">
      <soap:operation soapAction="hello"/>
      <input name="hello">
   	  <soap:body use="literal" /> 
      </input>
      <output name="helloResponse">
	  <soap:body use="literal" /> 
      </output>
    </operation>

  </binding>

## web service provider for the port
  <service name="rubisServer">
    <port name="rubisServerPortType" binding="tns:rubisServerBinding">
      <soap:address
         location="http://ernst-schroeder.uni.lu/cgi-bin/xmcdaRubisServer-1.0.py"/>
    </port>
  </service>
</definitions>

Based on this WSDL description, the following Python code allows to verify for instance the connection with the <Ernst-Schroeder.uni.lu> Rubis Server of the University of Luxembourg.

#!/usr/bin/env python
# using SOAPpy WSDL library for accessing
# the D3 Rubis Server from a WSDL description
# RB March 2008 
#############################################

## import the generic web service tools
from SOAPpy import WSDL

## get a port proxy instance
url = 'http://ernst-schroeder.uni.lu/rubisServer/Version-1.2/xmcdaRubisServer.wsdl'
rubisServer = WSDL.Proxy(url)

## call the remote hello method
message = rubisServer.hello()

## print hello response
print 'D3 Rubis server message:\n', message

The response from the Rubis Server <ernst-schroeder.uni.lu> will be the following:

*********************************************
* This is the Ernst-Schroeder Apache Server *
* of the University of Luxembourg.          *
* Welcome to the Rubis Web services.        *
* RB March 2008, version 1.0                *
*********************************************

Raymond Bisdorff, June 2, 2008


The submitProblem portThe Rubis client viewThe hello portContentsIndex