public void setFaultResponse(int errCode, String errDescr) { setStatusCode(HTTPStatus.INTERNAL_SERVER_ERROR); Node bodyNode = getBodyNode(); Node faultNode = createFaultResponseNode(errCode, errDescr); bodyNode.addNode(faultNode); Node envNode = getEnvelopeNode(); setContent(envNode); }
private Node getUPnPErrorNode() { Node detailNode = getFaultDetailNode(); if (detailNode == null) return null; return detailNode.getNodeEndsWith(SOAP.UPNP_ERROR); }
public UPnPStatus getControlStatus() { return getControlResponse().getUPnPError(); }
public UPnPStatus getUPnPError() { int code = 0; String desc = ""; code = getUPnPErrorCode(); desc = getUPnPErrorDescription(); upnpErr.setCode(code); upnpErr.setDescription(desc); return upnpErr; }
private Node getUPnPErrorCodeNode() { Node errorNode = getUPnPErrorNode(); if (errorNode == null) return null; return errorNode.getNodeEndsWith(SOAP.ERROR_CODE); }
public int getUPnPErrorCode() { Node errorCodeNode = getUPnPErrorCodeNode(); if (errorCodeNode == null) return -1; String errorCodeStr = errorCodeNode.getValue(); try { return Integer.parseInt(errorCodeStr); } catch (Exception e) { return -1; } }
private Node createFaultResponseNode(int errCode) { return createFaultResponseNode(errCode, UPnPStatus.code2String(errCode)); }
public String getUPnPErrorDescription() { Node errorDescNode = getUPnPErrorDescriptionNode(); if (errorDescNode == null) return ""; return errorDescNode.getValue(); }
public UPnPStatus getUPnPError() { int code = 0; String desc = ""; code = getUPnPErrorCode(); desc = getUPnPErrorDescription(); upnpErr.setCode(code); upnpErr.setDescription(desc); return upnpErr; }
private Node getUPnPErrorDescriptionNode() { Node errorNode = getUPnPErrorNode(); if (errorNode == null) return null; return errorNode.getNodeEndsWith(SOAP.ERROR_DESCRIPTION); }
public int getUPnPErrorCode() { Node errorCodeNode = getUPnPErrorCodeNode(); if (errorCodeNode == null) return -1; String errorCodeStr = errorCodeNode.getValue(); try { return Integer.parseInt(errorCodeStr); } catch (Exception e) { return -1; } }
private Node createFaultResponseNode(int errCode) { return createFaultResponseNode(errCode, UPnPStatus.code2String(errCode)); }
public String getUPnPErrorDescription() { Node errorDescNode = getUPnPErrorDescriptionNode(); if (errorDescNode == null) return ""; return errorDescNode.getValue(); }
public void setFaultResponse(int errCode, String errDescr) { setStatusCode(HTTPStatus.INTERNAL_SERVER_ERROR); Node bodyNode = getBodyNode(); Node faultNode = createFaultResponseNode(errCode, errDescr); bodyNode.addNode(faultNode); Node envNode = getEnvelopeNode(); setContent(envNode); }
public UPnPStatus getUPnPError() { int code = 0; String desc = ""; code = getUPnPErrorCode(); desc = getUPnPErrorDescription(); upnpErr.setCode(code); upnpErr.setDescription(desc); return upnpErr; }
private Node getUPnPErrorDescriptionNode() { Node errorNode = getUPnPErrorNode(); if (errorNode == null) return null; return errorNode.getNodeEndsWith(SOAP.ERROR_DESCRIPTION); }
public UPnPStatus getControlStatus() { return getControlResponse().getUPnPError(); }
public int getUPnPErrorCode() { Node errorCodeNode = getUPnPErrorCodeNode(); if (errorCodeNode == null) return -1; String errorCodeStr = errorCodeNode.getValue(); try { return Integer.parseInt(errorCodeStr); } catch (Exception e) { return -1; } }
private Node createFaultResponseNode(int errCode) { return createFaultResponseNode(errCode, UPnPStatus.code2String(errCode)); }
private Node getUPnPErrorNode() { Node detailNode = getFaultDetailNode(); if (detailNode == null) return null; return detailNode.getNodeEndsWith(SOAP.UPNP_ERROR); }