1 #ifndef __ISDS_VALIDATOR_H__
2 #define __ISDS_VALIDATOR_H__
11 SERVICE_DB_MANIPULATION
14 /* Get ISDS status info from ISDS @response XML document.
15 * Be ware that different request families return differently encoded status
16 * (e.g. dmStatus, dbStatus)
17 * @context is ISDS context
18 * @service is ISDS web service identifier
19 * @response is ISDS response document
20 * @code is automatically allocated status code of the response
21 * @message is automatically allocated status message. Returned NULL means no
22 * message was delivered by server. Use NULL if you don't care.
23 * @refnumber is automatically reallocated request serial number assigned by
24 * ISDS. Returned *NULL means no number was delivered by server.
25 * Use NULL if you don't care. */
26 isds_error
isds_response_status(struct isds_ctx
*context
,
27 const isds_service service
, xmlDocPtr response
,
28 xmlChar
**code
, xmlChar
**message
, xmlChar
**refnumber
);
30 /* Send @request to ISDS and return ISDS @response as XML document.
31 * Be ware the @response can be invalid (in sense of XML Schema).
32 * (And it is because current ISDS server does not follow its own
33 * specification. Please appology my government, its herd of imcompetent
35 * @context is ISDS session context,
36 * @service identifies ISDS web service
37 * @request is tree with ISDS message, can be NULL
38 * @response is automatically allocated response from server as XML Document
39 * @raw_response is automatically allocated bitstream with response body. Use
40 * NULL if you don't care
41 * @raw_response_length is size of @raw_response in bytes
42 * In case of error, @response and @raw_response will be dealocated.
44 isds_error
isds(struct isds_ctx
*context
, const isds_service service
,
45 const xmlNodePtr request
, xmlDocPtr
*response
,
46 void **raw_response
, size_t *raw_response_length
);
48 /* Walk through list of isds_documents and check for their types and
50 * @context is session context
51 * @documents is list of isds_document to check
52 * @returns IE_SUCCESS if structure is valid, otherwise context' message will
53 * be filled with explanation of found problem. */
54 isds_error
check_documents_hierarchy(struct isds_ctx
*context
,
55 const struct isds_list
*documents
);
57 /* Check for message ID length
58 * @context is session context
59 * @message_id checked message ID
60 * @return IE_SUCCESS or appropriate error code and fill context' message */
61 isds_error
validate_message_id_length(struct isds_ctx
*context
,
62 const xmlChar
*message_id
);
64 /* Send @request to Czech POINT conversion deposit and return response
66 * @context is Czech POINT session context,
67 * @request is tree with deposit message, can be NULL
68 * @response is automatically allocated response from server as XML Document
69 * In case of error, @response will be dealocated.
71 isds_error
czpdeposit(struct isds_ctx
*context
,
72 const xmlNodePtr request
, xmlDocPtr
*response
);