The requestSolution portThe Rubis client viewThe hello portThe submitProblem port

Contents

Index

The submitProblem port

Similar to the hello port, we present hereafter the description of the submitProblem port. The same question-response type of message exchange is again implemented. The question consists of the XML encoded problemFile. The Rubis server responds with a message acknowledging the good reception of the problem file and a ticket allowing later on to request the corresponding XML encoded solution file. We use again an RPC literal encoded SOAP exchange over standard HTTP.

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

##  message definitions

  <message name="submitProblem">
   <part name="problemFile" 
         element="tns:submitProblem"/>
  </message>
  <message name="submitProblemResponse">
    <part name="message" 
          element="tns:submitProblemResponse"/>
    <part name="ticket" 
          element="tns:submitProblemResponse"/>
  </message>

## port operation description

    <operation name="submitProblem">
      <documentation>
       Submit a Rubis performance tableau version 0.1. Get a ticket in return.
      </documentation>	
      <input message="tns:submitProblem" 
             name="submitProblem" />
      <output message="tns:submitProblemResponse" 
              name="submitProblemResponse" />
    </operation>

## port binding protocol description

    <operation name="submitProblem">
      <soap:operation soapAction="submitProblem"/>
      <input name="submitProblem">
   	  <soap:body use="literal" /> 
      </input>
      <output name="submitProblemResponse">
	  <soap:body use="literal" /> 
      </output>
    </operation>

An example of XML encoded problem file may be consulted here

The submitProblem port may be accessed with the following Python client code:

#!/usr/bin/env python
# using SOAPpy WSDL library for accessing
# the Rubis Server port submitProblem
# RB March 2008
#########################################

# import the generated class stubs
from SOAPpy import WSDL
import SOAPpy
# get a port proxy instance
url = 'http://ernst-schroeder.uni.lu/rubisServer/Version-1.2/xmcdaRubisServer.wsdl'
rubisServer = WSDL.Proxy(url)

## get xmlProblemFile
fileIN = open('problemDefinition.xml','r')
problemText = fileIN.read()
fileIN.close()

## call the remote submitProblem method
answer = rubisServer.submitRubisProblem(problemFile=problemText)

## print request results
print 'Rubis server message:\n', answer['message']
print 'Rubis server ticket:', answer['ticket']

The successful response of the server is composed of two items: - the server message, and - the ticket identifying the submitted job. An example of response, when running the Python code above is given below:

Rubis server message:
The problem submission was successful !
Rubis server ticket: quJlfsRBr8ohgbtL

The server ticket quJlfsRBr8ohgbtL is required for the subsequent solution request.


Raymond Bisdorff, June 2, 2008


The requestSolution portThe Rubis client viewThe hello portThe submitProblem portContentsIndex