The Rubis client viewThe submitProblem portThe requestSolution port

Contents

Index

The requestSolution port

Similarly to both the ports already described we give here the WSDL-1.0 definition of the standard requestSolution port.

##  type declarations

   <xsd:element name="requestSolution">
      <xsd:complexType>
         <xsd:sequence>
	    <xsd:element name="ticket" 
                         minOccurs='0' 
                         maxOccurs='1' 
                         type="xsd:string" />  
	   </xsd:sequence>
      </xsd:complexType>
   </xsd:element>
   <xsd:element name="requestSolutionResponse">
      <xsd:complexType>
         <xsd:sequence>
	    <xsd:element name="ticket" 
                         minOccurs='0' 
                         maxOccurs='1' 
                         type="xsd:id" />  
	    <xsd:element name="message" 
                         minOccurs='0' 
                         maxOccurs='1' 
                         type="xsd:string" />  
	    <xsd:element name="solution" 
                         minOccurs='0' 
                         maxOccurs='1' 
                         type="xsd:string" />  
	 </xsd:sequence>
       </xsd:complexType>
    </xsd:element>


##  message definitions

  <message name="requestSolution">
   <part name="ticket" 
         element="tns:requestSolution"/>
  </message>
  <message name="requestSolutionResponse">
    <part name="ticket" 
          element="tns:requestSolutionResponse"/>
    <part name="message" 
          element="tns:requestSolutionResponse"/>
    <part name="solution" 
          element="tns:requestSolutionResponse"/>
  </message>

## port operation description

    <operation name="requestSolution">
      <documentation>
       Request a Rubis outranking digraph with a given ticket.
      </documentation>	
      <input message="tns:requestSolution" 
             name="requestSolution" />
      <output message="tns:requestSolutionResponse" 
              name="requestSolutionResponse" />
    </operation>

## port binding protocol description

      <soap:operation soapAction="requestSolution"/>
      <input name="requestSolution">
   	  <soap:body use="literal" /> 
      </input>
      <output name="requestSolutionResponse">
	  <soap:body use="literal" /> 
      </output>
    </operation>

The XML encoded solution of the Rubis solver may be accessed with the following Python client code, where we reuse the server ticket returned at the submission of the problem.

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

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

## t1 = answer['ticket'] from a previous submitProblem access
t1 = 'quJlfsRBr8ohgbtL'
answer = rubisServer.requestOutrankingDigraph(ticket=t1)

# print request results
print 'Rubis server message:\n', answer['message']
if answer['message'] != 'Solution not available !!':
    problemText = answer['solution']
    fileName = 'problemSolution.xml'
    fileOUT = open(fileName,'w')
    fileOUT.write(problemText)
    fileOUT.close()
    print 'See file: ', fileName

The XML encoded solution file may be consulted here


Raymond Bisdorff, June 2, 2008


The Rubis client viewThe submitProblem portThe requestSolution portContentsIndex