def _capabilitiesRequestFinished(self): # Receive the server capabilities XML if self._theReply.error() == 1: QMessageBox.information( None, '', QApplication.translate( "QgsWpsGui", "Connection Refused. Please check your Proxy-Settings")) pass # get the cookie information from http header cookies = self._theReply.header(QNetworkRequest.SetCookieHeader) serverCookie = WpsServerCookie(self._theReply.url()) if cookies is not None: serverCookie.setServerCookies(cookies) xmlString = self._theReply.readAll().data() self._theReply.deleteLater() self.doc = QtXml.QDomDocument() self.doc.setContent(xmlString, True) root = self.doc.documentElement() version = root.attribute("version") if version != "1.0.0": QMessageBox.information( None, QApplication.translate("QgsWps", "Only WPS Version 1.0.0 is supported"), xmlString) pass self.capabilitiesRequestFinished.emit()
def _describeProcessFinished(self): # Receive the XML process description self.processUrl = self._theReply.url() self.processXML = self._theReply.readAll().data() # get the cookie information from http header cookies = self._theReply.header(QNetworkRequest.SetCookieHeader) serverCookie = WpsServerCookie(self.processUrl) if cookies is not None: QMessageBox.information(None, '', "the first time to use this server") serverCookie.setServerCookies(cookies) self._theReply.deleteLater() qDebug(self.processXML) self._parseProcessXML() self._requestExecuted = True self.describeProcessFinished.emit()
def _capabilitiesRequestFinished(self): # Receive the server capabilities XML if self._theReply.error() == 1: QMessageBox.information(None, '', QApplication.translate("QgsWpsGui","Connection Refused. Please check your Proxy-Settings")) pass # get the cookie information from http header cookies = self._theReply.header(QNetworkRequest.SetCookieHeader) serverCookie = WpsServerCookie(self._theReply.url()) if cookies is not None: serverCookie.setServerCookies(cookies) xmlString = self._theReply.readAll().data() self._theReply.deleteLater() self.doc = QtXml.QDomDocument() self.doc.setContent(xmlString, True) root = self.doc.documentElement() version = root.attribute("version") if version != "1.0.0": QMessageBox.information(None, QApplication.translate("QgsWps","Only WPS Version 1.0.0 is supported"), xmlString) pass self.capabilitiesRequestFinished.emit()