axiom_soap_envelope.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017  
00018  #ifndef AXIOM_SOAP_ENVELOPE_H
00019  #define AXIOM_SOAP_ENVELOPE_H
00020  
00026 #include <axis2_env.h>
00027 #include <axiom_node.h>
00028 #include <axiom_element.h>
00029 #include <axiom_namespace.h>
00030 #include <axis2_array_list.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036 
00037     typedef struct axiom_soap_envelope        axiom_soap_envelope_t;
00038     typedef struct axiom_soap_envelope_ops    axiom_soap_envelope_ops_t;
00039     
00040     struct axiom_soap_body;
00041     struct axiom_soap_header;
00042     struct axiom_soap_header_block;
00043     struct axiom_soap_builder;
00044     
00055     struct axiom_soap_envelope_ops
00056     {
00063         struct axiom_soap_header* (AXIS2_CALL *
00064       get_header)(axiom_soap_envelope_t *envelope,
00065                     const axis2_env_t *env);
00072         struct axiom_soap_body* (AXIS2_CALL *
00073       get_body)(axiom_soap_envelope_t *envelope,
00074                   const axis2_env_t *env);
00086         axis2_status_t (AXIS2_CALL *
00087       serialize)(axiom_soap_envelope_t *envelope,
00088                    const axis2_env_t *env,
00089                    axiom_output_t *om_output, 
00090                    axis2_bool_t cache);
00091       
00101         axis2_status_t (AXIS2_CALL *
00102       free_fn)(axiom_soap_envelope_t *envelope,
00103               const axis2_env_t *env);
00104            
00111         axiom_node_t* (AXIS2_CALL *
00112       get_base_node)(axiom_soap_envelope_t *envelope,
00113                        const axis2_env_t *env);
00114 
00115            
00121         int (AXIS2_CALL *
00122       get_soap_version)(axiom_soap_envelope_t *envelope,
00123                           const axis2_env_t *env);
00124                    
00130         axiom_namespace_t* (AXIS2_CALL *
00131       get_namespace)(axiom_soap_envelope_t *envelope,
00132                        const axis2_env_t *env);
00133 
00134         axis2_status_t (AXIS2_CALL *
00135         set_soap_version)(axiom_soap_envelope_t *envelope,
00136                           const axis2_env_t *env,
00137                           int soap_version);
00138      
00139     };
00140 
00145 struct axiom_soap_envelope
00146 {
00148   axiom_soap_envelope_ops_t *ops;
00149 };
00150 
00156 AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
00157 axiom_soap_envelope_create(const axis2_env_t *env, 
00158                      axiom_namespace_t *ns);
00159 
00170 AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
00171 axiom_soap_envelope_create_with_soap_version_prefix(const axis2_env_t *env,
00172                                                     int soap_version,
00173                                                     const axis2_char_t *prefix);                     
00174 
00175 AXIS2_EXTERN axiom_soap_envelope_t * AXIS2_CALL
00176 axiom_soap_envelope_create_default_soap_envelope(const axis2_env_t *env,
00177                                                  int soap_version);
00178  
00179 AXIS2_EXTERN axiom_soap_envelope_t * AXIS2_CALL
00180 axiom_soap_envelope_create_default_soap_fault_envelope(const axis2_env_t *env,
00181     const axis2_char_t *code_value, 
00182     const axis2_char_t *reason_text, 
00183     const int soap_version,
00184     axis2_array_list_t *sub_codes,
00185     axiom_node_t *detail_node);
00186 
00187 /******************** Macros **************************************************/
00188 
00189 #define AXIOM_SOAP_ENVELOPE_GET_HEADER(envelope, env) \
00190         ((envelope)->ops->get_header(envelope, env))
00191 
00192 #define AXIOM_SOAP_ENVELOPE_GET_BODY(envelope, env) \
00193         ((envelope)->ops->get_body(envelope, env))
00194 
00195 #define AXIOM_SOAP_ENVELOPE_SERIALIZE(envelope, env, om_output, cache) \
00196         ((envelope)->ops->serialize(envelope, env, om_output, cache))
00197         
00198 #define AXIOM_SOAP_ENVELOPE_FREE(envelope, env) \
00199         ((envelope)->ops->free_fn(envelope, env))
00200         
00201 #define AXIOM_SOAP_ENVELOPE_GET_BASE_NODE(envelope, env) \
00202         ((envelope)->ops->get_base_node(envelope, env))
00203 
00204 #define AXIOM_SOAP_ENVELOPE_GET_SOAP_VERSION(envelope, env) \
00205         ((envelope)->ops->get_soap_version(envelope, env))
00206 
00207 #define AXIOM_SOAP_ENVELOPE_GET_NAMESPACE(envelope, env) \
00208         ((envelope)->ops->get_namespace(envelope, env))
00209 
00210 #define AXIOM_SOAP_ENVELOPE_SET_SOAP_VERSION(envelope, env, soap_version) \
00211         ((envelope)->ops->set_soap_version(envelope, env, soap_version))
00212         
00213 
00216 #ifdef __cplusplus
00217 }
00218 #endif
00219 
00220 #endif /* AXIOM_SOAP_ENVELOPE_H */

Generated on Wed Dec 20 20:34:49 2006 for Axis2/C by  doxygen 1.5.1