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