30 #ifndef ONLY_LOCAL_PROXY
49 (
UINT8*)
"Internal Server Error",
50 (
UINT8*)
"Wrong format",
52 (
UINT8*)
"Key not found",
53 (
UINT8*)
"Bad Signature",
54 (
UINT8*)
"Bad request",
55 (
UINT8*)
"You refused to send an account certificate. I will close the connection.",
56 (
UINT8*)
"You refused to send a current balance. I will close the connection.",
57 (
UINT8*)
"You refused to send a cost confirmation. I will close the connection.",
58 (
UINT8*)
"Your account is empty.",
59 (
UINT8*)
"Cascade is too long",
60 (
UINT8*)
"Database error",
61 (
UINT8*)
"Insufficient balance",
62 (
UINT8*)
"No flatrate offered",
63 (
UINT8*)
"Invalid code",
64 (
UINT8*)
"Costconfirmation is not valid, possible attempt at doublespending!",
65 (
UINT8*)
"One or more price certificates are invalid!",
66 (
UINT8*)
"User is logged in more than once!",
67 (
UINT8*)
"No database record for this cost confirmation was found!",
68 (
UINT8*)
"Operation may have succeded, but this is not clear!",
69 (
UINT8*)
"Account is blocked!"
72 if (m_iErrorCode < 0 || m_iErrorCode >= 19)
74 UINT8 defaultMsg[] =
"Unknown Error";
81 strcpy((
char *)
m_strErrMsg, (
char *)errors[errorCode]);
122 XERCES_CPP_NAMESPACE::DOMDocument* doc =
parseDOMDocument(strXmlData,strlen((
char*)strXmlData));
126 DOMElement* elemRoot = doc->getDocumentElement();
146 UINT8 strGeneral[256];
147 UINT32 strGeneralLen = 256;
177 DOMElement* objectRootElem=NULL;
183 DOMElement* ccElem=NULL;
191 if (objectRootElem != NULL)
193 CAMsg::printMsg(LOG_INFO,
"XMLErrorMessage: appended object found...\n");
198 DOMElement* confirmedElem=NULL;
250 DOMElement* objectElem=NULL;
254 objectRoot->appendChild(objectElem);
255 elemRoot->appendChild(objectRoot);
SINT32 setDOMElementAttribute(DOMNode *pElem, const char *attrName, const char *value)
SINT32 getDOMElementValue(const DOMNode *const pElem, UINT8 *value, UINT32 *valuelen)
Returns the content of the text node(s) under elem as null-terminated C String.
SINT32 setDOMElementValue(DOMElement *pElem, SINT32 value)
XERCES_CPP_NAMESPACE::DOMDocument * parseDOMDocument(const UINT8 *const buff, UINT32 len)
Parses a buffer containing an XML document and returns this document.
DOMElement * createDOMElement(XERCES_CPP_NAMESPACE::DOMDocument *pOwnerDoc, const char *const name)
Creates a new DOMElement with the given name which belongs to the DOMDocument owernDoc.
SINT32 getDOMChildByName(const DOMNode *pNode, const char *const name, DOMElement *&child, bool deep)
SINT32 getDOMElementAttribute(const DOMNode *const elem, const char *attrName, UINT8 *value, UINT32 *len)
#define XML_ELEMENT_ERROR_MSG
struct __UINT64__t_ UINT64
Abstract base class for classes which can be converted to an XML structure.
virtual SINT32 toXmlElement(XERCES_CPP_NAMESPACE::DOMDocument *a_pDoc, DOMElement *&pElemRoot)=0
Creates the XML structure inside an existing DOM_Document, but does not append it to any node.
static SINT32 printMsg(UINT32 typ, const char *format,...)
Writes a given message to the log.
CAXMLErrorMessage(const UINT32 errorCode, UINT8 *message)
Creates an errorMessage object.
static const UINT32 ERR_ACCOUNT_EMPTY
static const UINT32 ERR_NO_ERROR_GIVEN
SINT32 setValues(DOMElement *elemRoot)
static const UINT32 ERR_OUTDATED_CC
SINT32 toXmlElement(XERCES_CPP_NAMESPACE::DOMDocument *a_doc, DOMElement *&elemRoot)
Creates the XML structure inside an existing DOM_Document, but does not append it to any node.
static UINT8 * dumpToString(const DOMNode *node, bool a_bAddNewLine)
Dumps the Node an returns a pointer to a null terminated string.
static SINT32 dumpToMem(const DOMNode *node, UINT8 *buff, UINT32 *size)
Dumps the node and all childs into buff.