axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r492391 - in /webservices/axis2/trunk/c: axiom/include/ axiom/src/om/ axiom/src/parser/libxml2/ axiom/test/om/ util/include/ util/src/
Date Thu, 04 Jan 2007 02:57:42 GMT
Author: samisa
Date: Wed Jan  3 18:57:38 2007
New Revision: 492391

URL: http://svn.apache.org/viewvc?view=rev&rev=492391
Log:
Added axiom data source to strem the serialized XML representation with adb rather than building
the whole OM tree

Added:
    webservices/axis2/trunk/c/axiom/include/axiom_data_source.h   (with props)
    webservices/axis2/trunk/c/axiom/src/om/om_data_source.c
Modified:
    webservices/axis2/trunk/c/axiom/include/axiom.h
    webservices/axis2/trunk/c/axiom/include/axiom_node.h
    webservices/axis2/trunk/c/axiom/include/axiom_xml_writer.h
    webservices/axis2/trunk/c/axiom/src/om/Makefile.am
    webservices/axis2/trunk/c/axiom/src/om/om_node.c
    webservices/axis2/trunk/c/axiom/src/om/om_output.c
    webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
    webservices/axis2/trunk/c/axiom/test/om/test_om.c
    webservices/axis2/trunk/c/util/include/axis2_error.h
    webservices/axis2/trunk/c/util/include/axis2_stream.h
    webservices/axis2/trunk/c/util/src/error.c
    webservices/axis2/trunk/c/util/src/stream.c

Modified: webservices/axis2/trunk/c/axiom/include/axiom.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom.h?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom.h Wed Jan  3 18:57:38 2007
@@ -33,6 +33,7 @@
 #include <axiom_processing_instruction.h>
 #include <axiom_stax_builder.h>
 #include <axiom_text.h>
+#include <axiom_data_source.h>
 #include <axiom_xml_reader.h>
 #include <axiom_xml_writer.h>
 

Added: webservices/axis2/trunk/c/axiom/include/axiom_data_source.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_data_source.h?view=auto&rev=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_data_source.h (added)
+++ webservices/axis2/trunk/c/axiom/include/axiom_data_source.h Wed Jan  3 18:57:38 2007
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIOM_DATA_SOURCE_H
+#define AXIOM_DATA_SOURCE_H
+
+/**
+ * @file axiom_data_source.h
+ * @brief Axis2 AXIOM XML data_source
+ */
+
+#include <axis2_env.h>
+#include <axiom_node.h>
+#include <axiom_output.h>
+#include <axis2_stream.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    struct axiom_data_source;
+
+/**
+ * @defgroup axiom_data_source data_source
+ * @ingroup axiom_om
+ * @{
+ */
+
+
+  /** 
+    * \brief data_source struct
+    * Handles the XML data_source in OM
+    */
+    typedef struct axiom_data_source
+    {
+        /** Reference count */
+        unsigned int ref;
+    } axiom_data_source_t;
+
+
+  /**
+    * Creates a new data_source struct
+    * @param env Environment. MUST  NOT be NULL, .
+    * @param parent parent of the new node. Optinal, can be NULL. 
+    *          The parent element must be of type AXIOM_ELEMENT
+    * @param value Text value. Optinal, can be NULL.
+    * @param comment_node This is an out parameter.  cannot be NULL.
+    *                       Returns the node corresponding to the data_source struct created.
+    *                       Node type will be set to AXIOM_DATA_SOURCE    
+    * @return pointer to newly created data_source struct 
+    */
+    AXIS2_EXTERN axiom_data_source_t * AXIS2_CALL 
+    axiom_data_source_create (const axis2_env_t *env,
+                          axiom_node_t *parent,
+                          axiom_node_t ** node);
+                          
+  /**
+    * Free an axiom_data_source struct
+    * @param env environment.  MUST NOT be NULL.
+    * @param om_data_source pointer to om data_source struct to be freed.
+    * @return satus of the op. AXIS2_SUCCESS on success
+    *         AXIS2_FAILURE on error.
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_data_source_free (struct axiom_data_source *om_data_source,
+           const axis2_env_t *env);
+
+  /**
+    * Serialize op
+    * @param env environment.  MUST NOT be NULL.
+    * @param om_data_source pointer to om data_source struct to be serialized.
+    * @param om_output AXIOM output handler to be used in serializing.
+    * @return satus of the op. AXIS2_SUCCESS on success,
+    *            AXIS2_FAILURE on error
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL 
+    axiom_data_source_serialize (struct axiom_data_source *om_data_source,
+                const axis2_env_t *env,
+                axiom_output_t *om_output);
+   /**
+    *  set the data_source value
+    * @param om_data_source om_data_source struct
+    * @param env environment , MUST NOT be NULL.
+    * @param value data_source 
+    * @return status of the op. AXIS2_SUCCESS on success,
+    *           AXIS2_FAILURE on error.                                                
+    */                                                
+    AXIS2_EXTERN axis2_stream_t * AXIS2_CALL 
+    axiom_data_source_get_stream(struct axiom_data_source *om_data_source,
+               const axis2_env_t *env);
+    
+        
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIOM_DATA_SOURCE_H */

Propchange: webservices/axis2/trunk/c/axiom/include/axiom_data_source.h
------------------------------------------------------------------------------
    svn:executable = *

Modified: webservices/axis2/trunk/c/axiom/include/axiom_node.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_node.h?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_node.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_node.h Wed Jan  3 18:57:38 2007
@@ -77,7 +77,9 @@
         /** AXIOM processing instruction type */
         AXIOM_PROCESSING_INSTRUCTION,
         /** AXIOM text type */
-        AXIOM_TEXT
+        AXIOM_TEXT,
+        /** AXIOM data source, represent a serialized XML fragment with a stream */
+        AXIOM_DATA_SOURCE
     } axiom_types_t;
 
   /** 

Modified: webservices/axis2/trunk/c/axiom/include/axiom_xml_writer.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_xml_writer.h?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_xml_writer.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_xml_writer.h Wed Jan  3 18:57:38 2007
@@ -425,18 +425,23 @@
          *               AXIS2_FAILURE on error.
          */
         axis2_status_t (AXIS2_CALL *
-      write_encoded)(axiom_xml_writer_t *writer,
+        write_encoded)(axiom_xml_writer_t *writer,
                        const axis2_env_t *env,
                        axis2_char_t *text,
                        int in_attr);
                                                  
         void* (AXIS2_CALL *
-      get_xml)(axiom_xml_writer_t *writer,
+        get_xml)(axiom_xml_writer_t *writer,
                  const axis2_env_t *env);                                               
 
 
         int (AXIS2_CALL *
-      get_type)(axiom_xml_writer_t *writer,
-                 const axis2_env_t *env);                                               
 
+        get_type)(axiom_xml_writer_t *writer,
+                 const axis2_env_t *env);   
+
+        axis2_status_t (AXIS2_CALL *
+        write_raw)(axiom_xml_writer_t *writer,
+                   const axis2_env_t *env,
+                   axis2_char_t *content);
     };
 
 /** 
@@ -577,6 +582,9 @@
 
 #define AXIOM_XML_WRITER_GET_TYPE(writer, env) \
         ((writer)->ops->get_type(writer, env)) 
+
+#define AXIOM_XML_WRITER_WRITE_RAW(writer, env, content) \
+        ((writer)->ops->write_raw(writer, env, content)) 
 
 /** @} */
 

Modified: webservices/axis2/trunk/c/axiom/src/om/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/Makefile.am?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/Makefile.am (original)
+++ webservices/axis2/trunk/c/axiom/src/om/Makefile.am Wed Jan  3 18:57:38 2007
@@ -3,6 +3,7 @@
                         om_document.c \
                         om_node.c \
                         om_text.c \
+                        om_data_source.c \
                         om_comment.c \
                         om_element.c \
                         om_output.c \

Added: webservices/axis2/trunk/c/axiom/src/om/om_data_source.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_data_source.c?view=auto&rev=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_data_source.c (added)
+++ webservices/axis2/trunk/c/axiom/src/om/om_data_source.c Wed Jan  3 18:57:38 2007
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axiom_data_source.h>
+#include <axiom_output.h>
+#include <axis2_string.h>
+#include "axiom_node_internal.h"
+#include <axiom_xml_writer.h>
+#include <axiom_output.h>
+#include <axiom_attribute.h>
+#include <axiom_namespace.h>
+#include <axis2_base64.h>
+
+
+/********************* axiom_data_source_impl_struct ***************/
+
+typedef struct axiom_data_source_impl_t
+{
+    axiom_data_source_t om_data_source;
+    /** stream holding serialized XML string */
+    axis2_stream_t *stream;
+}
+axiom_data_source_impl_t;
+
+
+/*********************** Macro ***********************************/
+
+#define AXIS2_INTF_TO_IMPL(data_source) ((axiom_data_source_impl_t*)data_source)
+
+/*****************************************************************/
+
+
+AXIS2_EXTERN axiom_data_source_t* AXIS2_CALL
+axiom_data_source_create(const axis2_env_t *env,
+        axiom_node_t * parent,
+        axiom_node_t **node)
+{
+
+    axiom_data_source_impl_t *om_data_source = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, node, NULL);
+
+    *node = axiom_node_create(env);
+
+    if (!(*node))
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    om_data_source = (axiom_data_source_impl_t *) AXIS2_MALLOC(env->allocator,
+            sizeof(axiom_data_source_impl_t));
+    if (!om_data_source)
+    {
+        AXIS2_FREE(env->allocator, *node);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    axiom_node_set_data_element((*node), env, om_data_source);
+    axiom_node_set_node_type((*node), env, AXIOM_DATA_SOURCE);
+    axiom_node_set_complete((*node), env, AXIS2_FALSE);
+
+
+    om_data_source->stream = NULL;
+    
+    om_data_source->stream = axis2_stream_create_basic(env);
+    if (!(om_data_source->stream))
+    {
+        AXIS2_FREE(env->allocator, *node);
+        AXIS2_FREE(env->allocator, om_data_source);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    if (parent && AXIOM_NODE_GET_NODE_TYPE(parent, env) == AXIOM_ELEMENT)
+    {
+        AXIOM_NODE_ADD_CHILD(parent, env, (*node));
+    }
+
+    om_data_source->om_data_source.ref = 0;
+
+    return &(om_data_source->om_data_source);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_data_source_free(axiom_data_source_t * om_data_source,
+        const axis2_env_t *env)
+{
+    axiom_data_source_impl_t *data_source_impl = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    data_source_impl = AXIS2_INTF_TO_IMPL(om_data_source);
+    if (data_source_impl->stream)
+    {
+        AXIS2_STREAM_FREE(data_source_impl->stream, env);
+        data_source_impl->stream = NULL;
+    }
+
+    AXIS2_FREE(env->allocator, data_source_impl);
+
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_data_source_serialize(axiom_data_source_t *om_data_source,
+        const axis2_env_t *env,
+        axiom_output_t *om_output)
+{
+    int status = AXIS2_SUCCESS;
+    axis2_char_t *data = NULL;
+    axiom_data_source_impl_t *om_data_source_impl = NULL;
+
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
+    om_data_source_impl = AXIS2_INTF_TO_IMPL(om_data_source);
+
+    /*TODO: write null terminator char to stream */
+    data = axis2_stream_get_buffer(om_data_source_impl->stream, env);
+    if (data)
+    {
+        status = axiom_output_write(om_output, env,
+                AXIOM_DATA_SOURCE, 1, data);
+    }
+    return status;
+}
+
+AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
+axiom_data_source_get_stream(axiom_data_source_t *om_data_source,
+        const axis2_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return AXIS2_INTF_TO_IMPL(om_data_source)->stream;
+}

Modified: webservices/axis2/trunk/c/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_node.c?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_node.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_node.c Wed Jan  3 18:57:38 2007
@@ -387,6 +387,17 @@
         if (status != AXIS2_SUCCESS)
             return status;
     }
+    else if (node_impl->node_type == AXIOM_DATA_SOURCE)
+    {
+        if (node_impl->data_element)
+        {
+            status = axiom_data_source_serialize(
+                        (axiom_text_t*)(node_impl->data_element),
+                        env, om_output);
+        }
+        if (status != AXIS2_SUCCESS)
+            return status;
+    }
     else if (node_impl->node_type == AXIOM_TEXT)
     {
         if (node_impl->data_element)
@@ -740,5 +751,3 @@
     AXIOM_OUTPUT_FREE(om_output, env);
     return xml;
 }
-
-

Modified: webservices/axis2/trunk/c/axiom/src/om/om_output.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_output.c?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_output.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_output.c Wed Jan  3 18:57:38 2007
@@ -544,6 +544,12 @@
                     args_list[2]);
         }
     }
+    else if (type == AXIOM_DATA_SOURCE)
+    {
+        status = AXIOM_XML_WRITER_WRITE_RAW(om_output_impl->xml_writer,
+                env,
+                args_list[0]); 
+    }
     else if (type == AXIOM_ATTRIBUTE)
     {
         if (no_of_args == 2)

Modified: webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c (original)
+++ webservices/axis2/trunk/c/axiom/src/parser/libxml2/libxml2_writer_wrapper.c Wed Jan  3
18:57:38 2007
@@ -281,6 +281,12 @@
 axis2_libxml2_writer_wrapper_get_type(
     axiom_xml_writer_t *writer,
     const axis2_env_t *env);
+    
+axis2_status_t AXIS2_CALL
+axis2_libxml2_writer_wrapper_write_raw(
+    axiom_xml_writer_t *writer,
+    const axis2_env_t *env,
+    axis2_char_t *content);
 
 /*********************** static functions ************************************/
 static axis2_status_t
@@ -608,6 +614,8 @@
         axis2_libxml2_writer_wrapper_get_xml;
     writer->ops->get_type =
         axis2_libxml2_writer_wrapper_get_type;
+    writer->ops->write_raw =
+        axis2_libxml2_writer_wrapper_write_raw;
 }
 
 
@@ -1831,4 +1839,26 @@
         }
     }
     return NULL;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_libxml2_writer_wrapper_write_raw(axiom_xml_writer_t *writer,
+        const axis2_env_t *env,
+        axis2_char_t *content)
+{
+    axis2_libxml2_writer_wrapper_impl_t *writer_impl = NULL;
+    int status = 0;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, content, AXIS2_FAILURE);
+
+    writer_impl = AXIS2_INTF_TO_IMPL(writer);
+    status = xmlTextWriterWriteRaw(writer_impl->xml_writer, BAD_CAST content);
+    if (status < 0)
+    {
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_WRITING_DATA_SOURCE, AXIS2_FAILURE);
+
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/axiom/test/om/test_om.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/test/om/test_om.c?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/axiom/test/om/test_om.c (original)
+++ webservices/axis2/trunk/c/axiom/test/om/test_om.c Wed Jan  3 18:57:38 2007
@@ -20,6 +20,7 @@
 #include <axiom_node.h>
 #include <axiom_element.h>
 #include <axiom_text.h>
+#include <axiom_data_source.h>
 #include <axis2_stream.h>
 #include <axis2_log_default.h>
 #include <axis2_error_default.h>
@@ -209,6 +210,8 @@
                 NULL;
     axiom_node_t *node1 = NULL, *node2 = NULL, *node3 = NULL, *node4 =
                 NULL, *node5 = NULL, *node6 = NULL;
+    axiom_data_source_t *data_source = NULL;
+    axis2_stream_t *stream = NULL;
     axiom_attribute_t *attr1 = NULL, *attr2 = NULL;
     axiom_namespace_t *ns1 = NULL, *ns2 = NULL;
     axiom_text_t *text1 = NULL;
@@ -247,6 +250,13 @@
 
     AXIOM_ELEMENT_ADD_ATTRIBUTE(ele4, environment, attr2, node6);
 
+    data_source = axiom_data_source_create(environment, node1, &node6);
+    stream = axiom_data_source_get_stream(data_source, environment);
+    if (stream)
+    {
+        AXIS2_STREAM_WRITE(stream, environment, "<this xmlns:axiom=\"http://ws.apache.org/axis2/c/om\">is
a test</this>", 
+            axis2_strlen("<this xmlns:axiom=\"http://ws.apache.org/axis2/c/om\">is
a test</this>"));
+    }
 
     /* serializing stuff */
     writer = axiom_xml_writer_create_for_memory(environment, NULL, AXIS2_TRUE, 0,

Modified: webservices/axis2/trunk/c/util/include/axis2_error.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_error.h?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_error.h Wed Jan  3 18:57:38 2007
@@ -424,6 +424,8 @@
         AXIS2_ERROR_WRITING_ATTRIBUTE_WITH_NAMESPACE_PREFIX,
         /** error in writing comment */
         AXIS2_ERROR_WRITING_COMMENT,
+        /** error in writing data source*/
+        AXIS2_ERROR_WRITING_DATA_SOURCE,
         /** error in writing default namespace */
         AXIS2_ERROR_WRITING_DEFAULT_NAMESPACE,
         /** error in writing dtd */

Modified: webservices/axis2/trunk/c/util/include/axis2_stream.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_stream.h?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_stream.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_stream.h Wed Jan  3 18:57:38 2007
@@ -30,7 +30,7 @@
 typedef struct axis2_stream axis2_stream_t;
 typedef struct axis2_stream_ops axis2_stream_ops_t;
 
-#define AXIS2_STREAM_DEFAULT_BUF_SIZE 512
+#define AXIS2_STREAM_DEFAULT_BUF_SIZE 2048
 /**
  * @defgroup axis2_stream stream
  * @ingroup axis2_util 
@@ -132,7 +132,8 @@
 /** \brief Constructor for creating an in memory stream
   * @return axis2_stream (in memory)
   */
-AXIS2_EXTERN axis2_stream_t *AXIS2_CALL axis2_stream_create_basic (const axis2_env_t *env);
+AXIS2_EXTERN axis2_stream_t * AXIS2_CALL 
+axis2_stream_create_basic (const axis2_env_t *env);
 
 /** \brief Constructor for creating a file stream
   * @param valid file pointer (opened file)
@@ -156,6 +157,13 @@
 AXIS2_EXTERN axis2_status_t AXIS2_CALL 
 axis2_stream_free_void_arg (void *stream,
                             const axis2_env_t *env);
+
+/**
+ * Gets the buffer
+ */
+AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+axis2_stream_get_buffer (const axis2_stream_t *stream, 
+                         const axis2_env_t *env);
 
 #define AXIS2_STREAM_FREE(stream, env) ((stream->ops)->free_fn(stream, env))
 

Modified: webservices/axis2/trunk/c/util/src/error.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/error.c?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/util/src/error.c (original)
+++ webservices/axis2/trunk/c/util/src/error.c Wed Jan  3 18:57:38 2007
@@ -365,6 +365,8 @@
         "error in writing attribute with namespace prefix";
     axis2_error_messages[AXIS2_ERROR_WRITING_COMMENT] =
         "error in writing comment";
+    axis2_error_messages[AXIS2_ERROR_WRITING_DATA_SOURCE] =
+        "error in writing data source";
     axis2_error_messages[AXIS2_ERROR_WRITING_DEFAULT_NAMESPACE] =
         "error in writing default namespace";
     axis2_error_messages[AXIS2_ERROR_WRITING_DTD] =

Modified: webservices/axis2/trunk/c/util/src/stream.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/stream.c?view=diff&rev=492391&r1=492390&r2=492391
==============================================================================
--- webservices/axis2/trunk/c/util/src/stream.c (original)
+++ webservices/axis2/trunk/c/util/src/stream.c Wed Jan  3 18:57:38 2007
@@ -336,6 +336,14 @@
     return -1;
 }
 
+AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+axis2_stream_get_buffer (const axis2_stream_t *stream, 
+                         const axis2_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    return AXIS2_INTF_TO_IMPL(stream)->buffer;
+
+}
 
 /********************* End of Basic Stream Operations *************************/
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message