##################################################
# deliverator_services_server.py
#      Generated by ZSI.generate.wsdl2dispatch.ServiceModuleWriter
#
##################################################

from services import *
from turbozsi.controller import TopDownController

class DeliveratorServer(TopDownController):
    soapAction = {}
    root = {}
    _wsdl = """<?xml version=\"1.0\" ?>
<definitions name=\"deliverator\" targetNamespace=\"urn:Deliverator\" xmlns=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:soapbind=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding\" xmlns:tns=\"urn:Deliverator\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">

  <types>
    <xsd:schema elementFormDefault=\"qualified\" targetNamespace=\"urn:Deliverator\">
    <xsd:element name=\"QueryExistingRuns\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"APIKey\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"user\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"metaData\" type=\"xsd:string\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"QueryExistingRunsOutput\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Response\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"RunID\" type=\"xsd:int\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"SubmitNewRun\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"APIKey\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"user\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"metaData\" type=\"xsd:string\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"SubmitNewRunOutput\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Response\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"RunID\" type=\"xsd:int\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"SubmitNewParameterFile\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"APIKey\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"fileName\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"generatedAt\" type=\"xsd:int\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"RunID\" type=\"xsd:int\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"metaData\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"pickleObj\" type=\"xsd:string\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"SubmitNewParameterFileOutput\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Response\" type=\"xsd:string\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"SubmitNewImage\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"APIKey\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"IMG_src\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Width\" type=\"xsd:float\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Unit\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"ParameterFile\" type=\"xsd:int\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Field1\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Field2\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Field3\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Axis\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Type\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"metaData\" type=\"xsd:string\"/>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"RunID\" type=\"xsd:int\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name=\"SubmitNewImageOutput\">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element maxOccurs=\"1\" minOccurs=\"0\" name=\"Response\" type=\"xsd:string\"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  </types>

  <message name=\"QueryExistingRunsInput\">
    <part element=\"tns:QueryExistingRuns\" name=\"parameters\"/>
  </message>
  <message name=\"QueryExistingRunsOutput\">
    <part element=\"tns:QueryExistingRunsOutput\" name=\"parameters\"/>
  </message>
  <message name=\"SubmitNewRunInput\">
    <part element=\"tns:SubmitNewRun\" name=\"parameters\"/>
  </message>
  <message name=\"SubmitNewRunOutput\">
    <part element=\"tns:SubmitNewRunOutput\" name=\"parameters\"/>
  </message>
  <message name=\"SubmitNewParameterFileInput\">
    <part element=\"tns:SubmitNewParameterFile\" name=\"parameters\"/>
  </message>
  <message name=\"SubmitNewParameterFileOutput\">
    <part element=\"tns:SubmitNewParameterFileOutput\" name=\"parameters\"/>
  </message>
  <message name=\"SubmitNewImageInput\">
    <part element=\"tns:SubmitNewImage\" name=\"parameters\"/>
  </message>
  <message name=\"SubmitNewImageOutput\">
    <part element=\"tns:SubmitNewImageOutput\" name=\"parameters\"/>
  </message>

  <portType name=\"deliverator-porttype\">
    <operation name=\"QueryExistingRuns\">
        <input message=\"tns:QueryExistingRunsInput\"/>
        <output message=\"tns:QueryExistingRunsOutput\"/>
    </operation>
    <operation name=\"SubmitNewRun\">
        <input message=\"tns:SubmitNewRunInput\"/>
        <output message=\"tns:SubmitNewRunOutput\"/>
    </operation>
    <operation name=\"SubmitNewParameterFile\">
        <input message=\"tns:SubmitNewParameterFileInput\"/>
        <output message=\"tns:SubmitNewParameterFileOutput\"/>
    </operation>
    <operation name=\"SubmitNewImage\">
        <input message=\"tns:SubmitNewImageInput\"/>
        <output message=\"tns:SubmitNewImageOutput\"/>
    </operation>
  </portType>


  <binding name=\"deliverator-binding\" type=\"tns:deliverator-porttype\">
    <soapbind:binding style=\"document\" transport=\"http://schemas.xmlsoap.org/soap/http\"/>
    <operation name=\"QueryExistingRuns\">
        <soap:operation soapAction=\"QueryExistingRuns\"/>
        <input>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </input>
        <output>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </output>
    </operation>
    <operation name=\"SubmitNewRun\">
        <soap:operation soapAction=\"SubmitNewRun\"/>
        <input>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </input>
        <output>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </output>
    </operation>
    <operation name=\"SubmitNewParameterFile\">
        <soap:operation soapAction=\"SubmitNewParameterFile\"/>
        <input>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </input>
        <output>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </output>
    </operation>
    <operation name=\"SubmitNewImage\">
        <soap:operation soapAction=\"SubmitNewImage\"/>
        <input>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </input>
        <output>
        <soap:body encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" namespace=\"urn:deliverator\" use=\"literal\"/>
        </output>
    </operation>
  </binding>

  <service name=\"DeliveratorServer\">
    <port binding=\"tns:deliverator-binding\" name=\"deliverator-port\">
    <soapbind:address location=\"http://kipac.stanford.edu/Deliverator/DeliveratorMethods\"/>
  </port>

  </service>

</definitions>"""

    def __init__(self, post='/DeliveratorMethods', **kw):
        TopDownController.__init__(self, post)

    def soap_QueryExistingRuns(self, ps):
        return ps.Parse(QueryExistingRunsInput.typecode), QueryExistingRunsOutput()
    soap_QueryExistingRuns.requestTC = QueryExistingRunsInput.typecode
    soap_QueryExistingRuns.responseTC = QueryExistingRunsOutput.typecode

    soapAction['QueryExistingRuns'] = 'soap_QueryExistingRuns'
    root[(QueryExistingRunsInput.typecode.nspname,QueryExistingRunsInput.typecode.pname)] = 'soap_QueryExistingRuns'

    def soap_SubmitNewRun(self, ps):
        return ps.Parse(SubmitNewRunInput.typecode), SubmitNewRunOutput()
    soap_SubmitNewRun.requestTC = SubmitNewRunInput.typecode
    soap_SubmitNewRun.responseTC = SubmitNewRunOutput.typecode

    soapAction['SubmitNewRun'] = 'soap_SubmitNewRun'
    root[(SubmitNewRunInput.typecode.nspname,SubmitNewRunInput.typecode.pname)] = 'soap_SubmitNewRun'

    def soap_SubmitNewParameterFile(self, ps):
        return ps.Parse(SubmitNewParameterFileInput.typecode), SubmitNewParameterFileOutput()
    soap_SubmitNewParameterFile.requestTC = SubmitNewParameterFileInput.typecode
    soap_SubmitNewParameterFile.responseTC = SubmitNewParameterFileOutput.typecode

    soapAction['SubmitNewParameterFile'] = 'soap_SubmitNewParameterFile'
    root[(SubmitNewParameterFileInput.typecode.nspname,SubmitNewParameterFileInput.typecode.pname)] = 'soap_SubmitNewParameterFile'

    def soap_SubmitNewImage(self, ps):
        return ps.Parse(SubmitNewImageInput.typecode), SubmitNewImageOutput()
    soap_SubmitNewImage.requestTC = SubmitNewImageInput.typecode
    soap_SubmitNewImage.responseTC = SubmitNewImageOutput.typecode

    soapAction['SubmitNewImage'] = 'soap_SubmitNewImage'
    root[(SubmitNewImageInput.typecode.nspname,SubmitNewImageInput.typecode.pname)] = 'soap_SubmitNewImage'

