00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIOM_SOAP_ENVELOPE_H
00018 #define AXIOM_SOAP_ENVELOPE_H
00019
00025 #include <axis2_env.h>
00026 #include <axiom_node.h>
00027 #include <axiom_element.h>
00028 #include <axiom_namespace.h>
00029 #include <axis2_array_list.h>
00030
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035
00036 typedef struct axiom_soap_envelope axiom_soap_envelope_t;
00037 typedef struct axiom_soap_envelope_ops axiom_soap_envelope_ops_t;
00038
00039 struct axiom_soap_body;
00040 struct axiom_soap_header;
00041 struct axiom_soap_header_block;
00042 struct axiom_soap_builder;
00043
00054 struct axiom_soap_envelope_ops
00055 {
00062 struct axiom_soap_header* (AXIS2_CALL *
00063 get_header)(axiom_soap_envelope_t *envelope,
00064 const axis2_env_t *env);
00071 struct axiom_soap_body* (AXIS2_CALL *
00072 get_body)(axiom_soap_envelope_t *envelope,
00073 const axis2_env_t *env);
00085 axis2_status_t (AXIS2_CALL *
00086 serialize)(axiom_soap_envelope_t *envelope,
00087 const axis2_env_t *env,
00088 axiom_output_t *om_output,
00089 axis2_bool_t cache);
00090
00100 axis2_status_t (AXIS2_CALL *
00101 free_fn)(axiom_soap_envelope_t *envelope,
00102 const axis2_env_t *env);
00103
00110 axiom_node_t* (AXIS2_CALL *
00111 get_base_node)(axiom_soap_envelope_t *envelope,
00112 const axis2_env_t *env);
00113
00114
00120 int (AXIS2_CALL *
00121 get_soap_version)(axiom_soap_envelope_t *envelope,
00122 const axis2_env_t *env);
00123
00129 axiom_namespace_t* (AXIS2_CALL *
00130 get_namespace)(axiom_soap_envelope_t *envelope,
00131 const axis2_env_t *env);
00132
00133 axis2_status_t (AXIS2_CALL *
00134 set_soap_version)(axiom_soap_envelope_t *envelope,
00135 const axis2_env_t *env,
00136 int soap_version);
00137
00138 };
00139
00144 struct axiom_soap_envelope
00145 {
00147 axiom_soap_envelope_ops_t *ops;
00148 };
00149
00155 AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
00156 axiom_soap_envelope_create(const axis2_env_t *env,
00157 axiom_namespace_t *ns);
00158
00169 AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
00170 axiom_soap_envelope_create_with_soap_version_prefix(const axis2_env_t *env,
00171 int soap_version,
00172 const axis2_char_t *prefix);
00173
00174 AXIS2_EXTERN axiom_soap_envelope_t * AXIS2_CALL
00175 axiom_soap_envelope_create_default_soap_envelope(const axis2_env_t *env,
00176 int soap_version);
00177
00178 AXIS2_EXTERN axiom_soap_envelope_t * AXIS2_CALL
00179 axiom_soap_envelope_create_default_soap_fault_envelope(const axis2_env_t *env,
00180 const axis2_char_t *code_value,
00181 const axis2_char_t *reason_text,
00182 const int soap_version,
00183 axis2_array_list_t *sub_codes,
00184 axiom_node_t *detail_node);
00185
00186
00187
00188 #define AXIOM_SOAP_ENVELOPE_GET_HEADER(envelope, env) \
00189 ((envelope)->ops->get_header(envelope, env))
00190
00191 #define AXIOM_SOAP_ENVELOPE_GET_BODY(envelope, env) \
00192 ((envelope)->ops->get_body(envelope, env))
00193
00194 #define AXIOM_SOAP_ENVELOPE_SERIALIZE(envelope, env, om_output, cache) \
00195 ((envelope)->ops->serialize(envelope, env, om_output, cache))
00196
00197 #define AXIOM_SOAP_ENVELOPE_FREE(envelope, env) \
00198 ((envelope)->ops->free_fn(envelope, env))
00199
00200 #define AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(envelope, env) \
00201 ((envelope)->ops->get_base_node(envelope, env))
00202
00203 #define AXIOM_SOAP_ENVELOPE_GET_SOAP_VERSION(envelope, env) \
00204 ((envelope)->ops->get_soap_version(envelope, env))
00205
00206 #define AXIOM_SOAP_ENVELOPE_GET_NAMESPACE(envelope, env) \
00207 ((envelope)->ops->get_namespace(envelope, env))
00208
00209 #define AXIOM_SOAP_ENVELOPE_SET_SOAP_VERSION(envelope, env, soap_version) \
00210 ((envelope)->ops->set_soap_version(envelope, env, soap_version))
00211
00212
00215 #ifdef __cplusplus
00216 }
00217 #endif
00218
00219 #endif