def xmlToSuccess(ret): ''' 返回xml 转换成 成功返回的ProcessResult对象''' global X_CNC_REQUEST_ID, X_CNC_LOCATION, X_CNC_CNAME requestId = ret.getheader(X_CNC_REQUEST_ID) location = ret.getheader(X_CNC_LOCATION) cname = ret.getheader(X_CNC_CNAME) msg = util.getReturnXmlMsg(ret) return ProcessResult(ret.status, msg, xCncRequestId = requestId, location = location, cname = cname)
def xmlToSuccess(ret): ''' 返回xml 转换成 成功返回的ProcessResult对象''' global X_CNC_REQUEST_ID, X_CNC_LOCATION, X_CNC_CNAME requestId = ret.getheader(X_CNC_REQUEST_ID) location = ret.getheader(X_CNC_LOCATION) cname = ret.getheader(X_CNC_CNAME) msg = util.getReturnXmlMsg(ret) return ProcessResult(ret.status, msg, xCncRequestId=requestId, location=location, cname=cname)
def xmlToFailure(ret): msg = util.getReturnXmlMsg(ret) return ProcessResult(ret.status, ret.reason + ":" + msg)
def getHitReportXmlToDefaultFailure(ret): msg = util.getReturnXmlMsg(ret) return HitProcessResult(ret.status, ret.reason + ":" + msg)