1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
/*
* XML Security Library (http://www.aleksey.com/xmlsec).
*
* Simple SOAP messages parsing/creation.
*
* This is free software; see Copyright file in the source
* distribution for preciese wording.
*
* Copyright (C) 2002-2017 Aleksey Sanin <aleksey@aleksey.com>
*/
#ifndef __XMLSEC_SOAP_H__
#define __XMLSEC_SOAP_H__
#ifndef XMLSEC_NO_SOAP
#include <libxml/tree.h>
#include <xmlsec/xmlsec.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/***********************************************************************
*
* SOAP 1.1
*
**********************************************************************/
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11CreateEnvelope (xmlDocPtr doc);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11EnsureHeader (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddBodyEntry (xmlNodePtr envNode,
xmlNodePtr entryNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11AddFaultEntry (xmlNodePtr envNode,
const xmlChar* faultCodeHref,
const xmlChar* faultCodeLocalPart,
const xmlChar* faultString,
const xmlChar* faultActor);
XMLSEC_DEPRECATED XMLSEC_EXPORT int xmlSecSoap11CheckEnvelope (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetHeader (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBody (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlSecSize xmlSecSoap11GetBodyEntriesNumber(xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetBodyEntry (xmlNodePtr envNode,
xmlSecSize pos);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap11GetFaultEntry (xmlNodePtr envNode);
/***********************************************************************
*
* SOAP 1.2
*
**********************************************************************/
/**
* xmlSecSoap12FaultCode:
* @xmlSecSoap12FaultCodeUnknown: The fault code is not available.
* @xmlSecSoap12FaultCodeVersionMismatch: The faulting node found an
* invalid element information
* item instead of the expected
* Envelope element information item.
* @xmlSecSoap12FaultCodeMustUnderstand: An immediate child element
* information item of the SOAP
* Header element information item
* targeted at the faulting node
* that was not understood by the
* faulting node contained a SOAP
* mustUnderstand attribute
* information item with a value of "true"
* @xmlSecSoap12FaultCodeDataEncodingUnknown: A SOAP header block or SOAP
* body child element information
* item targeted at the faulting
* SOAP node is scoped with a data
* encoding that the faulting node
* does not support.
* @xmlSecSoap12FaultCodeSender: The message was incorrectly
* formed or did not contain the
* appropriate information in order
* to succeed.
* @xmlSecSoap12FaultCodeReceiver: The message could not be processed
* for reasons attributable to the
* processing of the message rather
* than to the contents of the
* message itself.
*
* The values of the <Value> child element information item of the
* <Code> element information item (http://www.w3.org/TR/2003/REC-soap12-part1-20030624/#faultcodes).
*/
typedef enum {
xmlSecSoap12FaultCodeUnknown = 0,
xmlSecSoap12FaultCodeVersionMismatch,
xmlSecSoap12FaultCodeMustUnderstand,
xmlSecSoap12FaultCodeDataEncodingUnknown,
xmlSecSoap12FaultCodeSender,
xmlSecSoap12FaultCodeReceiver
} xmlSecSoap12FaultCode;
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12CreateEnvelope (xmlDocPtr doc);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12EnsureHeader (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddBodyEntry (xmlNodePtr envNode,
xmlNodePtr entryNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultEntry (xmlNodePtr envNode,
xmlSecSoap12FaultCode faultCode,
const xmlChar* faultReasonText,
const xmlChar* faultReasonLang,
const xmlChar* faultNodeURI,
const xmlChar* faultRole);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultSubcode (xmlNodePtr faultNode,
const xmlChar* subCodeHref,
const xmlChar* subCodeName);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultReasonText (xmlNodePtr faultNode,
const xmlChar* faultReasonText,
const xmlChar* faultReasonLang);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12AddFaultDetailEntry (xmlNodePtr faultNode,
xmlNodePtr detailEntryNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT int xmlSecSoap12CheckEnvelope (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetHeader (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBody (xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlSecSize xmlSecSoap12GetBodyEntriesNumber(xmlNodePtr envNode);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetBodyEntry (xmlNodePtr envNode,
xmlSecSize pos);
XMLSEC_DEPRECATED XMLSEC_EXPORT xmlNodePtr xmlSecSoap12GetFaultEntry (xmlNodePtr envNode);
#endif /* XMLSEC_NO_SOAP */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __XMLSEC_SOAP_H__ */
|