How to use the pywps.response.response function in pywps

To help you get started, we’ve selected a few pywps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geopython / pywps / webservices / tomcat / PywpsServlet.py View on Github external
def doPywps(self,request, response, inputQuery,method):

        # create the WPS object
        try:
            wps = pywps.Pywps(method)
            if wps.parseRequest(inputQuery):
                pywps.debug(wps.inputs)
                wpsresponse = wps.performRequest(processes=[self.getProcesses()])
                if wpsresponse:
                    pywps.response.response(wps.response, response, wps.parser.isSoap,self.wps.parser.isSoapExecute)
        except WPSException,e:
            pywps.response.response(e, response)
github halestudio / hale / legacy / plugins / cst-wps / trunk / src / main / webapp / IOBridgeServlet.py View on Github external
config.loadConfiguration(os.path.join(here,"pywpsio.cfg"))
        os.environ["PYWPS_TEMPLATES"] = os.path.join(here,"Templates")

        ioBridgeProcesses = [ioBridge.createIOBridgeProcess()]

        # create the WPS object
        try:
            wps = pywps.Pywps(method)
            if wps.parseRequest(inputQuery):
                pywps.debug(wps.inputs)
                wpsresponse = wps.performRequest(processes=ioBridgeProcesses)
                if wpsresponse:
                    #pywps.response.response(wps.response, response, wps.parser.isSoap)
                    pywps.response.response(wps.response, response, wps.parser.isSoap)
        except WPSException,e:
            pywps.response.response(e, response)
github geopython / pywps / pywps / Wps / Execute / __init__.py View on Github external
self.templateProcessor.set("processfailed", 1)
            if self.statusMessage:
                self.templateProcessor.set("exceptiontext", self.statusMessage)
            self.templateProcessor.set("exceptioncode", self.exceptioncode)
            if self.locator:
                self.templateProcessor.set("locator", self.locator)

        # update response
        self.response = self.templateProcessor.__str__()

        # print status
        if self.storeRequired and (self.status == self.accepted or
                                   #self.status == self.succeeded or
                                   self.status == self.failed or
                                   (self.spawned and self.status != self.succeeded)):
            pywps.response.response(self.response,
                                    self.outputFile,
                                    self.wps.parser.soapVersion,
                                    self.wps.parser.isSoap,
                                    self.wps.parser.isSoapExecute,
                                    self.contentType,isPromoteStatus=True)
            #self.wps.parser.isSoapExecute
        if self.status == self.started:
            LOGGER.info("Status [%s][%.1f]: %s" %\
                    (self.status,float(self.percent), self.statusMessage))
        else:
            LOGGER.info("Status [%s]: %s" % (self.status, self.statusMessage))
github halestudio / hale / legacy / plugins / cst-wps / trunk / src / main / webapp / IOBridgeServlet.py View on Github external
here = os.path.abspath(os.path.join(os.path.dirname(__file__)))
        config.loadConfiguration(os.path.join(here,"pywpsio.cfg"))
        os.environ["PYWPS_TEMPLATES"] = os.path.join(here,"Templates")

        ioBridgeProcesses = [ioBridge.createIOBridgeProcess()]

        # create the WPS object
        try:
            wps = pywps.Pywps(method)
            if wps.parseRequest(inputQuery):
                pywps.debug(wps.inputs)
                wpsresponse = wps.performRequest(processes=ioBridgeProcesses)
                if wpsresponse:
                    #pywps.response.response(wps.response, response, wps.parser.isSoap)
                    pywps.response.response(wps.response, response, wps.parser.isSoap)
        except WPSException,e:
            pywps.response.response(e, response)
github geopython / pywps / pywps / Wps / Execute.py View on Github external
self.templateProcessor.set("processfailed", 1)
            if self.statusMessage:
                self.templateProcessor.set("exceptiontext", self.statusMessage)
            self.templateProcessor.set("exceptioncode", self.exceptioncode)
            if self.locator:
                self.templateProcessor.set("locator", self.locator)

        # update response
        self.response = self.templateProcessor.__str__()

        # print status
        if self.storeRequired and (self.statusRequired or
                                   self.status == self.accepted or
                                   #self.status == self.succeeded or
                                   self.status == self.failed):
            pywps.response.response(self.response,
                                    self.outputFile,
                                    self.wps.parser.soapVersion,
                                    self.wps.parser.isSoap,
                                    self.contentType)
        
        if self.status == self.started:
            logging.info("Status [%s][%.1f]: %s" %\
                    (self.status,float(self.percent), self.statusMessage))
        else:
            logging.info("Status [%s]: %s" % (self.status, self.statusMessage))
github halestudio / hale / legacy / plugins / cst-wps / trunk / src / main / webapp / CstCoreServlet.py View on Github external
os.environ["PYWPS_TEMPLATES"] = os.path.join(here,"Templates")

        cstProcesses = []
        cstProcesses = coreFunctions.createCstCoreFunctionProcesses()

        # create the WPS object
        try:
            wps = pywps.Pywps(method)
            if wps.parseRequest(inputQuery):
                pywps.debug(wps.inputs)
                wpsresponse = wps.performRequest(processes=cstProcesses)
                if wpsresponse:
                    #pywps.response.response(wps.response, response, wps.parser.isSoap)
                    pywps.response.responseJava(wps.response, response, wps.parser.isSoap)
        except WPSException,e:
            pywps.response.response(e, response)