[cwscore-commit] CVS update: MODIFIED: source, globus_i_soap_message.h, globus_soap_message.h, globus_soap_message_deserialize.c

Joe Bester commit at globus.org
Thu May 18 10:20:21 CDT 2006


, globus_soap_message_handle.c
, globus_soap_message_handle.h
, globus_soap_message_serialize.c
, globus_soap_message_transport.c
, globus_soap_message_utils.h
, globus_xsd_type_registry.c ...

  User: bester  
  Date: 06/05/18 10:20:21

  Modified:    c/message/source Makefile.am globus_i_service_engine.h
                        globus_i_soap_message.h globus_service_engine.c
                        globus_soap_message.h globus_soap_message_attrs.h
                        globus_soap_message_deserialize.c
                        globus_soap_message_handle.c
                        globus_soap_message_handle.h
                        globus_soap_message_serialize.c
                        globus_soap_message_transport.c
                        globus_soap_message_utils.h
                        globus_xsd_type_registry.c xsd_any.c xsd_any.h
  Added:       c/message/source xsd_token.c xsd_token.h
  Log:
  Merge of XPath expression handling in core wsrf providers for subscriptions
  and resource property queries from query_resource_properties_impl_branch
  (More or less from memory):
      Leak fixes throughout C WS Core
      Added bindings for core wsrf service wsdls (easier to write generic wsrf
      clients)
      Improved doc and implementation of some soap message handle attrs
      New test cases for wsrp:QueryResourceProperties and wsnt:Subscribe which
      exercise some of the new XPath code
      Got rid of some unneeded mallocs in the deserializer.
      Improved error message from ws-Addressing handler
  
  Revision  Changes    Path
  1.29      +2 -0      wsrf/c/message/source/Makefile.am
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/Makefile.am,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- Makefile.am	7 Apr 2006 19:05:35 -0000	1.28
  +++ Makefile.am	18 May 2006 15:20:20 -0000	1.29
  @@ -44,6 +44,7 @@
   	xsd_NCName.h \
   	xsd_short.h \
   	xsd_string.h \
  +	xsd_token.h \
   	xsd_time.h \
   	xsd_unsignedByte.h \
   	xsd_unsignedInt.h \
  @@ -107,6 +108,7 @@
   	xsd_NCName.c \
   	xsd_short.c \
   	xsd_string.c \
  +	xsd_token.c \
   	xsd_time.c \
   	xsd_unsignedByte.c \
   	xsd_unsignedInt.c \
  
  
  
  1.17      +1 -0      wsrf/c/message/source/globus_i_service_engine.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_i_service_engine.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_i_service_engine.h,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- globus_i_service_engine.h	7 Apr 2006 19:05:35 -0000	1.16
  +++ globus_i_service_engine.h	18 May 2006 15:20:20 -0000	1.17
  @@ -477,6 +477,7 @@
       char *                              contact;
       globus_xsd_type_registry_t          registry;
       globus_soap_message_attr_t          attrs;
  +    globus_bool_t                       https;
   } globus_i_service_engine_t;
   
   globus_result_t
  
  
  
  1.23      +1 -0      wsrf/c/message/source/globus_i_soap_message.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_i_soap_message.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_i_soap_message.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- globus_i_soap_message.h	19 Jan 2006 05:58:31 -0000	1.22
  +++ globus_i_soap_message.h	18 May 2006 15:20:20 -0000	1.23
  @@ -52,6 +52,7 @@
   {
       globus_xio_handle_t                 xio_handle;
       xmlTextReaderPtr                    reader;
  +    xmlDocPtr                           doc_to_free;
       globus_hashtable_t                  mustUnderstand_hash;
       xmlTextWriterPtr                    writer;
       int                                 buffer_eof;
  
  
  
  1.65      +44 -16    wsrf/c/message/source/globus_service_engine.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_service_engine.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_service_engine.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -b -r1.64 -r1.65
  --- globus_service_engine.c	7 Apr 2006 19:05:35 -0000	1.64
  +++ globus_service_engine.c	18 May 2006 15:20:20 -0000	1.65
  @@ -23,6 +23,7 @@
   #include "globus_xio_tcp_driver.h"
   #include "globus_xio_http.h"
   #include "globus_xio_buffer.h"
  +#include "globus_xio_gsi.h"
   #include "version.h"
   #include "globus_flavor.h"
   #include "libxml/uri.h"
  @@ -522,6 +523,7 @@
   
       if(enable_https)
       {
  +        engine->https = GLOBUS_TRUE;
           result = globus_i_soap_message_setup_transport_security(
               engine->attrs,
               server_attr);
  @@ -917,6 +919,32 @@
       GlobusServiceEngineLock(callback_handle->engine);
       if(result == GLOBUS_SUCCESS)
       {
  +        if (callback_handle->engine->https)
  +        {
  +            gss_name_t                  peer_name = NULL;
  +
  +            /* Set Security attribute related to our peer */
  +            result = globus_xio_handle_cntl(
  +                    handle,
  +                    globus_i_soap_message_gsi_driver,
  +                    GLOBUS_XIO_GSI_GET_PEER_NAME,
  +                    &peer_name);
  +
  +            if (result != GLOBUS_SUCCESS)
  +            {
  +                goto cleanup;
  +            }
  +            result = globus_soap_message_handle_set_attr(
  +                callback_handle->message,
  +                GLOBUS_SOAP_MESSAGE_PEER_IDENTITY_KEY,
  +                NULL,
  +                NULL,
  +                (void *) peer_name);
  +            if (result != GLOBUS_SUCCESS)
  +            {
  +                goto cleanup;
  +            }
  +        }
           result = globus_xio_register_read(handle,
                   buffer,
                   0,
  @@ -926,6 +954,7 @@
                   callback_handle);
       }
   
  +cleanup:
       if (result != GLOBUS_SUCCESS)
       {
           globus_soap_message_handle_destroy(callback_handle->message);
  @@ -1713,7 +1742,6 @@
               callback_handle->message, operation_name);
           if(result != GLOBUS_SUCCESS)
           {
  -            xsd_QName_destroy(operation_name);
               goto error_send_fault;
           }
   
  @@ -1725,7 +1753,6 @@
               operation_name);
           if(result != GLOBUS_SUCCESS)
           {
  -            xsd_QName_destroy(operation_name);
               goto error_send_fault;
           }
   
  @@ -1787,6 +1814,7 @@
           service_desc = NULL;
           globus_extension_release(ext);
   
  +        xsd_QName_destroy(operation_name);
           break;
   
       case GLOBUS_L_SERVICE_ENGINE_REQUEST_INVOKE_HANDLERS:
  @@ -2370,6 +2398,10 @@
           globus_extension_release(ext);
       }
   
  +    if (operation_name)
  +    {
  +        xsd_QName_destroy(operation_name);
  +    }
       if(result != GLOBUS_SUCCESS)
       {
           char *                          error_str;
  @@ -3067,7 +3099,7 @@
       char *                              service_path;
       globus_service_descriptor_t *       service_desc = NULL;
       globus_extension_handle_t           ext;
  -    char *                              service_path_copy;
  +    globus_bool_t                       free_service_path = GLOBUS_TRUE;
   
       uriref = uri;
       while (*uriref == '/')
  @@ -3091,14 +3123,6 @@
       {
           int                             res;
   
  -        service_path_copy = globus_libc_strdup(service_path);
  -
  -        if (service_path_copy == NULL)
  -        {
  -            result = GlobusSoapMessageErrorOutOfMemory;
  -
  -            goto out;
  -        }
           res = globus_extension_activate(service_path);
   
           if(res != GLOBUS_SUCCESS)
  @@ -3116,12 +3140,13 @@
               }
   
               result = GlobusServiceEngineErrorServiceLoadFailed(uri, tmp_err);
  -            goto free_service_path_copy_out;
  +            goto free_service_path_out;
           }
   
           globus_mutex_lock(&globus_l_service_engine_extensions_mutex);
           globus_list_insert(&globus_l_service_engine_extensions,
  -                           service_path_copy);
  +                           service_path);
  +        free_service_path = GLOBUS_FALSE;
           globus_mutex_unlock(&globus_l_service_engine_extensions_mutex);
   
           service_desc = globus_extension_lookup(
  @@ -3172,7 +3197,7 @@
   remove_extension_from_list_out:
           globus_mutex_lock(&globus_l_service_engine_extensions_mutex);
           tmp = globus_list_search(globus_l_service_engine_extensions,
  -                           service_path_copy);
  +                           service_path);
   
           if (tmp != NULL)
           {
  @@ -3180,8 +3205,11 @@
           }
           globus_mutex_unlock(&globus_l_service_engine_extensions_mutex);
           globus_extension_deactivate(service_path);
  -free_service_path_copy_out:
  -        free(service_path_copy);
  +    }
  +free_service_path_out:
  +    if (result != GLOBUS_SUCCESS || free_service_path)
  +    {
  +        free(service_path);
       }
   out:
       *service_desc_p = service_desc;
  
  
  
  1.29      +38 -6     wsrf/c/message/source/globus_soap_message.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message.h,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- globus_soap_message.h	19 Jan 2006 05:58:31 -0000	1.28
  +++ globus_soap_message.h	18 May 2006 15:20:20 -0000	1.29
  @@ -22,6 +22,8 @@
   #include "libxml/xmlreader.h"
   #include "libxml/xmlwriter.h"
   #include "xsd_QName.h"
  +#include "xsd_string.h"
  +#include "xsd_NCName.h"
   
   #include "globus_soap_message_handle.h"
   #include "globus_soap_message_utils.h"
  @@ -70,12 +72,6 @@
       const char *                        Namespace,
       int *                               created);
   
  -char *
  -globus_soap_message_serialize_lookup_prefix(
  -    globus_soap_message_handle_t        handle,
  -    const char *                        Namespace,
  -    int *                               created);
  -
   globus_result_t
   globus_soap_message_element_ns_set(
       globus_soap_message_handle_t        handle,
  @@ -137,6 +133,29 @@
       globus_xsd_element_options_t *      options);
   
   globus_result_t
  +globus_soap_message_serialize_ns_set_prefix(
  +    globus_soap_message_handle_t        handle,
  +    const xsd_QName *                   element_qname,
  +    const char *                        Namespace,
  +    const char *                        prefix,
  +    globus_xsd_element_options_t *      options);
  +
  +globus_result_t
  +globus_soap_message_serialize_ns_add_prefix(
  +    globus_soap_message_handle_t        handle,
  +    const xsd_QName *                   element_qname,
  +    const char *                        Namespace,
  +    const char *                        prefix,
  +    globus_xsd_element_options_t *      options);
  +
  +void
  +globus_soap_message_serialize_ns_remove_prefix(
  +    globus_soap_message_handle_t        handle,
  +    const char *                        Namespace,
  +    const char *                        prefix,
  +    globus_xsd_element_options_t *      options);
  +
  +globus_result_t
   globus_soap_message_serialize_envelope(
       globus_soap_message_handle_t        handle);
   
  @@ -228,6 +247,7 @@
   #include "xsd_short.h"
   #include "xsd_string.h"
   #include "xsd_time.h"
  +#include "xsd_token.h"
   #include "xsd_unsignedByte.h"
   #include "xsd_unsignedInt.h"
   #include "xsd_unsignedLong.h"
  @@ -783,6 +803,18 @@
       globus_soap_message_handle_t        handle,
       const char *                        mark);
   
  +
  +globus_result_t
  +globus_soap_message_deserialize_concrete_path(
  +    globus_soap_message_handle_t        handle,
  +    xsd_anyURI *                        namespace,
  +    xsd_NCName_array *                  path);
  +
  +globus_result_t
  +globus_soap_message_deserialize_get_prefixes(
  +    globus_soap_message_handle_t        handle,
  +    xsd_string_array *                  namespace_prefixes);
  +
   globus_result_t
   globus_soap_message_get_handler_chain(
       globus_soap_message_handle_t        handle,
  
  
  
  1.15      +47 -3     wsrf/c/message/source/globus_soap_message_attrs.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_attrs.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_attrs.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- globus_soap_message_attrs.h	13 Feb 2006 22:18:38 -0000	1.14
  +++ globus_soap_message_attrs.h	18 May 2006 15:20:20 -0000	1.15
  @@ -75,6 +75,13 @@
    */
   #define GLOBUS_SOAP_MESSAGE_USER_CREDENTIAL_KEY \
           "GLOBUS_SOAP_MESSAGE_USER_CREDENTIAL"
  +/**
  + * Message protection mode
  + * @ingroup globus_soap_message_attrs
  + * @hideinitializer
  + *
  + * This attribute is of type <code>globus_soap_message_auth_protection_level_t</code>.
  + */
   #define GLOBUS_SOAP_MESSAGE_AUTH_PROTECTION_KEY \
           "GLOBUS_SOAP_MESSAGE_AUTH_PROTECTION"
   #define GLOBUS_SOAP_MESSAGE_AUTHZ_METHOD_KEY \
  @@ -83,15 +90,52 @@
           "GLOBUS_SOAP_MESSAGE_AUTHZ_TARGET_NAME"
   #define GLOBUS_SOAP_MESSAGE_TIMEOUT_KEY \
           "GLOBUS_SOAP_MESSAGE_TIMEOUT"
  +/**
  + * Anonymous authentication
  + * @ingroup globus_soap_message_attrs
  + * @hideinitializer
  + *
  + * This attribute is of type <code>globus_bool_t</code>. The default, if this attribute
  + * is not present, or its value is GLOBUS_FALSE, is to use the current user's security
  + * credentials when authenticating with the service. If set to GLOBUS_TRUE,
  + * then anonymous authentication will be used.
  + */
   #define GLOBUS_SOAP_MESSAGE_AUTH_ANONYMOUS_KEY \
           "GLOBUS_SOAP_MESSAGE_AUTH_ANONYMOUS"
  +/**
  + * Connection close
  + * @ingroup globus_soap_message_attrs
  + * @hideinitializer
  + *
  + * This attribute is of type <code>char *</code>. If not present, or its value
  + * is not "close", then persistent TCP connections will be used on a message
  + * handle. If its value is "close", then the TCP connection will be closed after
  + * the HTTP request/reply protocol has completed for a SOAP message.
  + *
  + */
   #define GLOBUS_SOAP_MESSAGE_CONNECTION_KEY \
           "GLOBUS_SOAP_MESSAGE_CONNECTION"
  -#define GLOBUS_HANDLER_TRIGGER_ELEMENT_KEY \
  -        "GLOBUS_HANDLER_TRIGGER_ELEMENT_KEY"
  +/**
  + * Verbose errors
  + * @ingroup globus_soap_message_attrs
  + * @hideinitializer
  + *
  + * This attribute is of type <code>int</code>. If not present, or its value is zero, then
  + * constant error results indicating the failure type will be returned when a parsing
  + * error occurs. Otherwise, detailed error objects will be created.
  + *
  + */
   #define GLOBUS_SOAP_MESSAGE_VERBOSE_ERRORS_KEY \
           "GLOBUS_SOAP_MESSAGE_VERBOSE_ERRORS_KEY"
  -
  +/**
  + * Peer Identity
  + * @ingroup globus_soap_message_attrs
  + * @hideinitializer
  + *
  + * This attribute is of type <code>gss_name_t</code>
  + */
  +#define GLOBUS_SOAP_MESSAGE_PEER_IDENTITY_KEY \
  +        "GLOBUS_SOAP_MESSAGE_PEER_IDENTITY_KEY"
   /**
    * Authentication method types
    * @ingroup globus_soap_message_attrs
  
  
  
  1.55      +302 -144  wsrf/c/message/source/globus_soap_message_deserialize.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_deserialize.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_deserialize.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -b -r1.54 -r1.55
  --- globus_soap_message_deserialize.c	19 Jan 2006 05:58:31 -0000	1.54
  +++ globus_soap_message_deserialize.c	18 May 2006 15:20:20 -0000	1.55
  @@ -65,7 +65,7 @@
   static
   xmlChar *
   globus_l_soap_message_numeric_content(
  -    xmlChar *                           content,
  +    const xmlChar *                     content,
       globus_bool_t                       negative_ok);
   
   static
  @@ -170,14 +170,14 @@
       const xmlChar *                     qname_string,
       globus_list_t **                    qnames)
   {
  -    xmlChar *                           tmpstr;
  -    xmlChar *                           newstr;
  +    char *                              tmpstr;
  +    char *                              newstr;
       int                                 start_token;
       int                                 end_token;
       char *                              token;
       globus_fifo_t                       qname_fifo;
   
  -    newstr = globus_libc_strdup(qname_string);
  +    newstr = globus_libc_strdup((const char *) qname_string);
       globus_fifo_init(&qname_fifo);
       tmpstr = newstr;
       do
  @@ -254,7 +254,7 @@
       globus_soap_message_handle_t        handle)
   {
       globus_result_t                     result = GLOBUS_SUCCESS;
  -    char *                              idval = NULL;
  +    xmlChar *                           idval = NULL;
       GlobusFuncName(globus_i_soap_message_deserialize_next_element);
       xmlReaderTypes                      type = XML_READER_TYPE_NONE;
       
  @@ -338,11 +338,11 @@
   
           if((idval = xmlTextReaderGetAttribute(
                   handle->reader, 
  -                "Id")) != NULL)
  +                (xmlChar *) "Id")) != NULL)
           {
               result = globus_soap_message_deserialize_mark(
                   handle,
  -                idval);
  +                (char *) idval);
               if(result != GLOBUS_SUCCESS)
               {
                   result = GlobusSoapMessageErrorSettingId(
  @@ -380,13 +380,15 @@
               const xmlChar *             qname_local;
   
               tmp.Namespace = (char *)
  -                    xmlTextReaderConstNamespaceUri(handle->reader);
  +                    xmlTextReaderConstString(handle->reader,
  +                            xmlTextReaderConstNamespaceUri(handle->reader));
               tmp.local = (char *)
  -                    xmlTextReaderConstLocalName(handle->reader);
  +                    xmlTextReaderConstString(handle->reader,
  +                        xmlTextReaderConstLocalName(handle->reader));
               qname_ns = xmlTextReaderConstString(handle->reader,
  -                    qname->Namespace);
  +                    (xmlChar *) qname->Namespace);
               qname_local = xmlTextReaderConstString(handle->reader,
  -                    qname->local);
  +                    (xmlChar *) qname->local);
               if (qname_ns != (xmlChar *) tmp.Namespace ||
                   qname_local != (xmlChar *) tmp.local)
               {
  @@ -475,9 +477,9 @@
                   GLOBUS_SOAP_MESSAGE_CALLOUT_END);
           }
                       
  -        if((idval = xmlTextReaderGetAttribute(
  +        if((idval = (char *) xmlTextReaderGetAttribute(
                   handle->reader, 
  -                "Id")) != NULL)
  +                (xmlChar *) "Id")) != NULL)
           {
               char * end_idval = 
               globus_common_create_string("%s-end", idval);
  @@ -645,7 +647,7 @@
           goto exit;
       }
   
  -    soap_env = xmlTextReaderConstString(handle->reader, SOAP_ENV);
  +    soap_env = xmlTextReaderConstString(handle->reader, (xmlChar *) SOAP_ENV);
       local = xmlTextReaderConstLocalName(handle->reader);
       if(soap_env != local)
       {
  @@ -724,7 +726,7 @@
           goto exit;
       }
       
  -    soap_header = xmlTextReaderConstString(handle->reader, SOAP_HEADER);
  +    soap_header = xmlTextReaderConstString(handle->reader, (xmlChar *) SOAP_HEADER);
       local = xmlTextReaderConstLocalName(handle->reader);
       if(soap_header != local)
       {
  @@ -868,7 +870,7 @@
           goto exit;
       }
   
  -    soap_body = xmlTextReaderConstString(handle->reader, SOAP_BODY);
  +    soap_body = xmlTextReaderConstString(handle->reader, (xmlChar *) SOAP_BODY);
       local = xmlTextReaderConstLocalName(handle->reader);
       if(soap_body != local)
       {
  @@ -922,7 +924,7 @@
           goto exit;
       }
   
  -    soap_fault = xmlTextReaderConstString(handle->reader, SOAP_FAULT);
  +    soap_fault = xmlTextReaderConstString(handle->reader, (xmlChar *) SOAP_FAULT);
       local = xmlTextReaderConstLocalName(handle->reader);
       if(soap_fault != local)
       {
  @@ -933,13 +935,13 @@
       globus_soap_message_fault_init(&fault);
   
       faultcode_name = xmlTextReaderConstString(
  -        handle->reader, SOAP_FAULTCODE);
  +        handle->reader, (xmlChar *) SOAP_FAULTCODE);
       faultactor_name = xmlTextReaderConstString(
  -        handle->reader, SOAP_FAULTACTOR);
  +        handle->reader, (xmlChar *) SOAP_FAULTACTOR);
       faultstring_name = xmlTextReaderConstString(
  -        handle->reader, SOAP_FAULTSTRING);
  +        handle->reader, (xmlChar *) SOAP_FAULTSTRING);
       detail_name = xmlTextReaderConstString(
  -        handle->reader, SOAP_FAULT_DETAIL);
  +        handle->reader, (xmlChar *) SOAP_FAULT_DETAIL);
   
       while(result == GLOBUS_SUCCESS)
       {
  @@ -970,8 +972,7 @@
                   goto exit;
               }
   
  -            fault->faultcode = 
  -            xmlTextReaderValue(handle->reader);
  +            fault->faultcode = (char *) xmlTextReaderValue(handle->reader);
           }
           else if(element_name == faultstring_name)
           {
  @@ -983,8 +984,7 @@
                   goto exit;
               }
   
  -            fault->faultstring = 
  -            xmlTextReaderValue(handle->reader);
  +            fault->faultstring = (char *) xmlTextReaderValue(handle->reader);
           }
           else if(element_name == faultactor_name)
           {
  @@ -996,8 +996,7 @@
                   goto exit;
               }
   
  -            fault->faultactor = 
  -            xmlTextReaderValue(handle->reader);
  +            fault->faultactor = (char *) xmlTextReaderValue(handle->reader);
           }
           else if(element_name == detail_name)
           {
  @@ -1114,9 +1113,9 @@
   
       nil_value = xmlTextReaderGetAttributeNs(
           handle->reader, 
  -        XSI_NIL,
  -        XSI_NS);
  -    if(nil_value && !(xmlStrcmp(nil_value, "true")))
  +        (xmlChar *) XSI_NIL,
  +        (xmlChar *) XSI_NS);
  +    if(nil_value && !(xmlStrcmp(nil_value, (xmlChar *) "true")))
       {
           xmlFree(nil_value);
           return GLOBUS_TRUE;
  @@ -1159,8 +1158,8 @@
           goto exit;
       }
   
  -    qname->local = xmlTextReaderLocalName(handle->reader);
  -    qname->Namespace = xmlTextReaderNamespaceUri(handle->reader);
  +    qname->local = (char *) xmlTextReaderLocalName(handle->reader);
  +    qname->Namespace = (char *) xmlTextReaderNamespaceUri(handle->reader);
   
    exit:
   
  @@ -1214,7 +1213,7 @@
   
       if(qname)
       {
  -        element = xmlTextReaderConstString(handle->reader, qname->local);
  +        element = xmlTextReaderConstString(handle->reader, (xmlChar *) qname->local);
           local = xmlTextReaderConstString(
               handle->reader, xmlTextReaderConstLocalName(handle->reader));
           if(element != local)
  @@ -1236,7 +1235,7 @@
           }
           
           element_ns = xmlTextReaderConstString(
  -            handle->reader, qname->Namespace);
  +            handle->reader, (xmlChar *) qname->Namespace);
           local_ns = xmlTextReaderConstString(
               handle->reader, xmlTextReaderConstNamespaceUri(handle->reader));
           if(local_ns && element_ns != local_ns)
  @@ -1283,7 +1282,11 @@
       if(constval)
       {
   	*str = globus_l_soap_message_my_strtok(
  -	    constval, strlen(constval), &start_token, &end_token, "\n\t ");
  +	    (char *) constval,
  +            strlen((char *) constval),
  +            &start_token,
  +            &end_token,
  +            "\n\t ");
   	if (*str == NULL)
   	{
   	    result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -1340,18 +1343,20 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
  -        *str = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +        *str = (char *) xmlTextReaderGetAttributeNs(
  +            handle->reader,
  +            (xmlChar *) attr_name->local,
  +            (xmlChar *) attr_name->Namespace);
       }
       else
       {
  -        *str = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +        *str = (char *) xmlTextReaderGetAttribute(
  +            handle->reader, (xmlChar *) attr_name->local);
       }
       if(!*str)
       {
  @@ -1373,7 +1378,7 @@
       globus_soap_message_handle_t        handle,
       xsd_string_array *                  inst)
   {
  -    const xmlChar *                     tmp_value = NULL;
  +    const char *                        tmp_value = NULL;
       char *                              newstr;
       char *                              tmpstr;
       char *                              token;
  @@ -1391,7 +1396,7 @@
           goto exit;
       }
       
  -    tmp_value = xmlTextReaderConstValue(handle->reader);
  +    tmp_value = (char *) xmlTextReaderConstValue(handle->reader);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -1447,18 +1452,20 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_qname->Namespace);
  +        handle->reader, (xmlChar *) attr_qname->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns  && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_qname->local, attr_qname->Namespace);
  +            handle->reader,
  +            (xmlChar *) attr_qname->local,
  +            (xmlChar *) attr_qname->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_qname->local);
  +            handle->reader, (xmlChar *) attr_qname->local);
       }
   
       if(!tmp_value)
  @@ -1473,7 +1480,7 @@
           goto exit;
       }
   
  -    newstr = globus_libc_strdup(tmp_value);
  +    newstr = globus_libc_strdup((char *) tmp_value);
       tmpstr = newstr;
       token = globus_l_soap_message_my_strtok(
           tmpstr, strlen(tmpstr), &start_token, &end_token, "\n\t ");
  @@ -1523,18 +1530,20 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader,
  +            (xmlChar *) attr_name->local,
  +            (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
   
       if(!tmp_value)
  @@ -1589,18 +1598,21 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader,
  +            (xmlChar *) attr_name->local,
  +            (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader,
  +            (xmlChar *) attr_name->local);
       }
       if(!tmp_value)
       {
  @@ -1661,18 +1673,20 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader, 
  +            (xmlChar *) attr_name->local,
  +            (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
       if(!tmp_value)
       {
  @@ -1726,18 +1740,20 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader,
  +            (xmlChar *) attr_name->local,
  +            (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
       if(!tmp_value)
       {
  @@ -1764,6 +1780,7 @@
               &xsd_int_qname, tmp_start);
           goto exit;
       }
  +    free(tmp_start);
       
    exit:
   
  @@ -1775,6 +1792,7 @@
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_int_attribute() */
   
   globus_result_t
   globus_soap_message_deserialize_integer_attribute(
  @@ -1791,7 +1809,7 @@
       GlobusSoapMessageDebugEnter();
   
       tmp_value = xmlTextReaderGetAttributeNs(
  -        handle->reader, attr_name->local, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->local, (xmlChar *) attr_name->Namespace);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -1799,7 +1817,7 @@
           goto exit;
       }
   
  -    tmp_start = globus_l_soap_message_numeric_content(
  +    tmp_start = (char *) globus_l_soap_message_numeric_content(
               tmp_value,
               GLOBUS_TRUE);
   
  @@ -1816,6 +1834,7 @@
               &xsd_integer_qname, tmp_start);
           goto exit;
       }
  +    free(tmp_start);
       
    exit:
   
  @@ -1831,6 +1850,7 @@
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_integer_attribute() */
   
   globus_result_t
   globus_soap_message_deserialize_long_attribute(
  @@ -1847,18 +1867,20 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader,
  +            (xmlChar *) attr_name->local,
  +            (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
       if(!tmp_value)
       {
  @@ -1878,7 +1900,7 @@
           goto exit;
       }
   
  -    *val = strtoll(tmp_value, NULL, 0);
  +    *val = strtoll((char *) tmp_value, NULL, 0);
       if(*val == INT64_MAX || *val == INT64_MIN)
       {
           if(errno == ERANGE)
  @@ -1888,6 +1910,7 @@
               goto exit;
           }
       }
  +    free(tmp_start);
       
    exit:
       
  @@ -1899,6 +1922,7 @@
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_long_attribute() */
   
   globus_result_t
   globus_soap_message_deserialize_float_attribute(
  @@ -1914,18 +1938,18 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader, (xmlChar *) attr_name->local, (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
       if(!tmp_value)
       {
  @@ -1935,7 +1959,7 @@
           goto exit;
       }
   
  -    *val = (float) strtod(tmp_value, NULL);
  +    *val = (float) strtod((char *) tmp_value, NULL);
   
    exit:
       
  @@ -1962,7 +1986,7 @@
       GlobusSoapMessageDebugEnter();
   
       tmp_value = xmlTextReaderGetAttributeNs(
  -        handle->reader, attr_qname->local, attr_qname->Namespace);
  +        handle->reader, (xmlChar *) attr_qname->local, (xmlChar *) attr_qname->Namespace);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -1970,7 +1994,7 @@
           goto exit;
       }
   
  -    length = strlen(tmp_value);
  +    length = strlen((char *) tmp_value);
   
       val->length = (int)ceil((length * 3) / 4) + 1;
       val->value = globus_malloc(val->length);
  @@ -1983,7 +2007,7 @@
       if(xmlBase64Decode(
           tmp_value, 
   	(unsigned long *)&length, 
  -	val->value, 
  +	(xmlChar *) val->value, 
   	(unsigned long *)&val->length) < 0)
       {
   	result = GlobusSoapMessageErrorDeserializeContentFailed(
  @@ -2029,7 +2053,7 @@
           goto exit;
       }
   
  -    if(!xmlStrcmp(tmp_value, "false"))
  +    if(!xmlStrcmp(tmp_value, (xmlChar *) "false"))
       {
           *val = 0;
       }
  @@ -2059,18 +2083,18 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns  && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader, (xmlChar *) attr_name->local, (xmlChar *) attr_name->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
       if(!tmp_value)
       {
  @@ -2080,7 +2104,7 @@
           goto exit;
       }
       
  -    if(!xmlStrcmp(tmp_value, "false"))
  +    if(!xmlStrcmp(tmp_value, (xmlChar *) "false"))
       {
           *val = 0;
       }
  @@ -2349,7 +2373,7 @@
           goto exit;
       }
   
  -    *val = (float) strtod(tmp_value, NULL);
  +    *val = (float) strtod((char *) tmp_value, NULL);
   
    exit:
   
  @@ -2384,7 +2408,7 @@
           goto exit;
       }
   
  -    *val = strtod(tmp_value, NULL);
  +    *val = strtod((char *) tmp_value, NULL);
   
    exit:
   
  @@ -2397,7 +2421,7 @@
       globus_soap_message_handle_t        handle,
       xsd_int *                           val)
   {
  -    xmlChar *                           tmp_value;
  +    const xmlChar *                     tmp_value;
       xmlChar *                           tmp_start;
       globus_result_t                     result = GLOBUS_SUCCESS;
   
  @@ -2414,7 +2438,7 @@
           goto exit;
       }
       
  -    tmp_value = xmlTextReaderValue(handle->reader);
  +    tmp_value = xmlTextReaderConstValue(handle->reader);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -2440,23 +2464,21 @@
               &xsd_int_qname, tmp_value);
           goto exit;
       }
  +    free(tmp_start);
           
    exit:
  -    if (tmp_value != NULL)
  -    {
  -        xmlFree(tmp_value);
  -    }
   
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_int() */
   
   globus_result_t
   globus_soap_message_deserialize_short(
       globus_soap_message_handle_t        handle,
       xsd_short *                         val)
   {
  -    xmlChar *                           tmp_value = NULL;
  +    const xmlChar *                     tmp_value = NULL;
       xmlChar *                           tmp_start;
       globus_result_t                     result = GLOBUS_SUCCESS;
       long                                tmp_long = 0;
  @@ -2500,16 +2522,13 @@
       }
   
       *val = (xsd_short) tmp_long;
  +    free(tmp_start);
   
    exit:
  -    if (tmp_value)
  -    {
  -        xmlFree(tmp_value);
  -    }
  -
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_short() */
   
   
   globus_result_t
  @@ -2517,7 +2536,7 @@
       globus_soap_message_handle_t        handle,
       xsd_long *                          val)
   {
  -    xmlChar *                           tmp_value;
  +    const xmlChar *                     tmp_value;
       xmlChar *                           tmp_start;
       globus_result_t                     result = GLOBUS_SUCCESS;
   
  @@ -2532,7 +2551,7 @@
           goto exit;
       }
       
  -    tmp_value = xmlTextReaderValue(handle->reader);
  +    tmp_value = xmlTextReaderConstValue(handle->reader);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -2549,7 +2568,7 @@
           goto exit;
       }
   
  -    *val = strtoll(tmp_value, NULL, 0);
  +    *val = strtoll((char *) tmp_value, NULL, 0);
       if(*val == INT64_MAX || *val == INT64_MIN)
       {
           if(errno == ERANGE)
  @@ -2559,16 +2578,14 @@
               goto exit;
           }
       }
  +    free(tmp_start);
   
    exit:
  -    if (tmp_value != NULL)
  -    {
  -        xmlFree(tmp_value);
  -    }
   
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_long() */
   
   
   globus_result_t
  @@ -2592,7 +2609,7 @@
       globus_soap_message_handle_t        handle,
       xsd_integer *                       val)
   {
  -    xmlChar *                           tmp_value = NULL;
  +    const xmlChar *                     tmp_value = NULL;
       char *                              tmp_start;
       int                                 rc;
       globus_result_t                     result = GLOBUS_SUCCESS;
  @@ -2608,14 +2625,14 @@
           goto exit;
       }
       
  -    tmp_value = xmlTextReaderValue(handle->reader);
  +    tmp_value = xmlTextReaderConstValue(handle->reader);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
               GLOBUS_SUCCESS, &xsd_integer_qname);
           goto exit;
       }
  -    tmp_start = globus_l_soap_message_numeric_content(
  +    tmp_start = (char *) globus_l_soap_message_numeric_content(
               tmp_value,
               GLOBUS_TRUE);
       if(tmp_start == NULL)
  @@ -2632,12 +2649,9 @@
               &xsd_integer_qname, tmp_value);
           goto exit;
       }
  +    free(tmp_start);
   
    exit:
  -    if (tmp_value)
  -    {
  -        xmlFree(tmp_value);
  -    }
   
       GlobusSoapMessageDebugExit();
       return result;
  @@ -2671,7 +2685,7 @@
           goto exit;
       }
   
  -    sscanf(tmp_value, "%hd", &sval);
  +    sscanf((char *) tmp_value, "%hd", &sval);
       *val = (char) sval;
   
    exit:
  @@ -2708,7 +2722,7 @@
           goto exit;
       }
   
  -    if(sscanf(tmp_value, "%hu", &sval) == 0)
  +    if(sscanf((char *) tmp_value, "%hu", &sval) == 0)
       {
           result = GlobusSoapMessageErrorDeserializeContentFailed(
               &xsd_unsignedByte_qname, tmp_value);
  @@ -2750,7 +2764,7 @@
           goto exit;
       }
   
  -    *val = strtoull(tmp_value, NULL, 0);
  +    *val = strtoull((char *) tmp_value, NULL, 0);
       if(*val == UINT64_MAX)
       {
           result = GlobusSoapMessageErrorDeserializeContentFailed(
  @@ -2769,7 +2783,7 @@
       globus_soap_message_handle_t        handle,
       xsd_unsignedInt *                   val)
   {
  -    xmlChar *                           tmp_value;
  +    const xmlChar *                     tmp_value;
       xmlChar *                           tmp_start;
       globus_result_t                     result = GLOBUS_SUCCESS;
   
  @@ -2784,7 +2798,7 @@
           goto exit;
       }
       
  -    tmp_value = xmlTextReaderValue(handle->reader);
  +    tmp_value = xmlTextReaderConstValue(handle->reader);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -2801,27 +2815,28 @@
           goto exit;
       }
   
  -    *val = strtoul(tmp_value, NULL, 0);
  +    *val = strtoul((char *) tmp_value, NULL, 0);
       if(*val == UINT32_MAX)
       {
           result = GlobusSoapMessageErrorDeserializeContentFailed(
               &xsd_unsignedInt_qname, tmp_value);
           goto exit;
       }
  +    free(tmp_start);
   
    exit:
   
       GlobusSoapMessageDebugExit();
       return result;
   }  
  -    
  +/* globus_soap_message_deserialize_unsignedInt() */
   
   globus_result_t
   globus_soap_message_deserialize_unsignedShort(
       globus_soap_message_handle_t        handle,
       xsd_unsignedShort *                 val)
   {
  -    xmlChar *                           tmp_value = NULL;
  +    const xmlChar *                     tmp_value = NULL;
       xmlChar *                           tmp_start;
       globus_result_t                     result = GLOBUS_SUCCESS;
       long                                tmp_long;
  @@ -2837,7 +2852,7 @@
           goto exit;
       }
       
  -    tmp_value = xmlTextReaderValue(handle->reader);
  +    tmp_value = xmlTextReaderConstValue(handle->reader);
       if(!tmp_value)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -2865,16 +2880,14 @@
       }
   
       *val = (xsd_unsignedShort) tmp_long;
  +    free(tmp_start);
   
    exit:
  -    if (tmp_value)
  -    {
  -        xmlFree(tmp_value);
  -    }
   
       GlobusSoapMessageDebugExit();
       return result;
   }
  +/* globus_soap_message_deserialize_unsignedShort() */
       
   globus_result_t
   globus_soap_message_deserialize_base64Binary(
  @@ -2904,7 +2917,7 @@
           goto exit;
       }
       
  -    length = strlen(tmp_value);
  +    length = strlen((char *) tmp_value);
   
       val->length = (int)ceil((length * 3) / 4) + 1;
       val->value = globus_malloc(val->length);
  @@ -2917,7 +2930,7 @@
       if(xmlBase64Decode(
   	tmp_value, 
   	(unsigned long *)&length, 
  -	val->value, 
  +	(xmlChar *) val->value, 
   	(unsigned long *)&val->length) < 0)
       {
   	result = GlobusSoapMessageErrorDeserializeContentFailed(
  @@ -2971,7 +2984,7 @@
           goto exit;
       }
   
  -    val->value = globus_libc_strdup(schema_val->value.hex.str);
  +    val->value = globus_libc_strdup((char *) schema_val->value.hex.str);
       val->length = schema_val->value.hex.total;
   
       xmlSchemaFreeValue(schema_val);
  @@ -2989,7 +3002,7 @@
   {
       xmlChar *                           prefix;
       const xmlChar *                     tmp_value;
  -    char *                              token;
  +    xmlChar *                           token;
       globus_result_t                     result = GLOBUS_SUCCESS;
       int                                 start_token;
       int                                 end_token;
  @@ -3012,8 +3025,8 @@
               result, &xsd_QName_qname);
           goto exit;
       }
  -    token = globus_l_soap_message_my_strtok(
  -        tmp_value, strlen(tmp_value), &start_token, &end_token, "\n\t ");
  +    token = (xmlChar *) globus_l_soap_message_my_strtok(
  +        (char *) tmp_value, strlen((char *) tmp_value), &start_token, &end_token, "\n\t ");
       if (token == NULL)
       {
           result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -3021,10 +3034,10 @@
           goto exit;
       }
   
  -    val->local = xmlSplitQName2(token, &prefix);
  +    val->local = (char *) xmlSplitQName2(token, &prefix);
       if(val->local && prefix)
       {
  -        val->Namespace = xmlTextReaderLookupNamespace(handle->reader, prefix);
  +        val->Namespace = (char *) xmlTextReaderLookupNamespace(handle->reader, prefix);
           xmlFree(prefix);
       }
       else if (val->local)
  @@ -3033,7 +3046,7 @@
       }
       else
       {
  -        val->local = globus_libc_strdup(tmp_value);
  +        val->local = globus_libc_strdup((char *) tmp_value);
       }
   
       free(token);
  @@ -3060,19 +3073,19 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_name->Namespace);
  +        handle->reader, (xmlChar *) attr_name->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       /* is it the default or a null namespace? */
       if((attr_ns != local_ns) && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           str = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_name->local, attr_name->Namespace);
  +            handle->reader, (xmlChar *) attr_name->local, (xmlChar *) attr_name->Namespace);
       }
       else
       {
           str = xmlTextReaderGetAttribute(
  -            handle->reader, attr_name->local);
  +            handle->reader, (xmlChar *) attr_name->local);
       }
   
       if((str == NULL || (*str == '\0')))
  @@ -3084,16 +3097,20 @@
       }
       else
       {
  -        val->local = xmlSplitQName2(str, &prefix);
  +        val->local = (char *) xmlSplitQName2(str, &prefix);
           if(prefix)
           {
  -            val->Namespace = xmlTextReaderLookupNamespace(
  +            val->Namespace = (char *) xmlTextReaderLookupNamespace(
                   handle->reader, prefix);
               xmlFree(prefix);
           }
           else
           {
               val->Namespace = NULL;
  +            if (val->local == NULL)
  +            {
  +                val->local = globus_libc_strdup((char *) str);
  +            }
           }
       }
   
  @@ -3146,8 +3163,8 @@
   
           val = xsd_QName_array_push(inst);
           
  -        val->local = xmlSplitQName2(str, &prefix);
  -        val->Namespace = xmlTextReaderLookupNamespace(
  +        val->local = (char *) xmlSplitQName2((xmlChar *) str, &prefix);
  +        val->Namespace = (char *) xmlTextReaderLookupNamespace(
               handle->reader, prefix);
   
           globus_free(str);
  @@ -3170,7 +3187,7 @@
   {
       const xmlChar *                     attr_ns = NULL;
       const xmlChar *                     local_ns = NULL;
  -    char *                              tmp_value;
  +    xmlChar *                           tmp_value;
       globus_list_t *                     qnames = NULL;
       globus_list_t *                     qnlist = NULL;
       globus_result_t                     result = GLOBUS_SUCCESS;
  @@ -3178,18 +3195,18 @@
       GlobusSoapMessageDebugEnter();
   
       attr_ns = xmlTextReaderConstString(
  -        handle->reader, attr_qname->Namespace);
  +        handle->reader, (xmlChar *) attr_qname->Namespace);
       local_ns = xmlTextReaderConstNamespaceUri(handle->reader);
   
       if(attr_ns != local_ns  && (attr_ns != NULL) && (*attr_ns != '\0'))
       {
           tmp_value = xmlTextReaderGetAttributeNs(
  -            handle->reader, attr_qname->local, attr_qname->Namespace);
  +            handle->reader, (xmlChar *) attr_qname->local, (xmlChar *) attr_qname->Namespace);
       }
       else
       {
           tmp_value = xmlTextReaderGetAttribute(
  -            handle->reader, attr_qname->local);
  +            handle->reader, (xmlChar *) attr_qname->local);
       }
   
       if((!tmp_value) || !(*tmp_value))
  @@ -3203,14 +3220,14 @@
       qnlist = qnames;
       while(!globus_list_empty(qnlist))
       {
  -        char *                          str = globus_list_first(qnlist);
  +        xmlChar *                       str = globus_list_first(qnlist);
           xmlChar *                       prefix = NULL;
           xsd_QName *                     val;
   
           val = xsd_QName_array_push(inst);
           
  -        val->local = xmlSplitQName2(str, &prefix);
  -        val->Namespace = xmlTextReaderLookupNamespace(
  +        val->local = (char *) xmlSplitQName2(str, &prefix);
  +        val->Namespace = (char *) xmlTextReaderLookupNamespace(
               handle->reader, prefix);
   
           qnlist = globus_list_rest(qnlist);
  @@ -3258,17 +3275,92 @@
       return result;
   }
   
  +globus_result_t
  +globus_soap_message_deserialize_concrete_path(
  +    globus_soap_message_handle_t        handle,
  +    xsd_anyURI *                        namespace,
  +    xsd_NCName_array *                  path)
  +{
  +    xmlChar *                           prefix;
  +    const char *                        tmp_value;
  +    xmlChar *                           token;
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    int                                 start_token;
  +    int                                 end_token;
  +    xmlChar *                           val;
  +    xsd_NCName *                        el;
  +
  +    GlobusFuncName(globus_soap_message_deserialize_concrete_path);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = globus_i_soap_message_deserialize_next_content(handle);
  +    if(result != GLOBUS_SUCCESS)
  +    {
  +        result = GlobusSoapMessageErrorDeserializeFailed(
  +            result, &xsd_QName_qname);
  +        goto exit;
  +    }
  +    
  +    tmp_value = (const char *) xmlTextReaderConstValue(handle->reader);
  +    if(!tmp_value)
  +    {
  +        result = GlobusSoapMessageErrorDeserializeFailed(
  +            result, &xsd_QName_qname);
  +        goto exit;
  +    }
  +    token = (xmlChar *) globus_l_soap_message_my_strtok(
  +        tmp_value,
  +        strlen(tmp_value), &start_token, &end_token, "\n\t /");
  +    if (token == NULL)
  +    {
  +        result = GlobusSoapMessageErrorDeserializeFailed(
  +            result, &xsd_QName_qname);
  +        goto exit;
  +    }
  +
  +    val = xmlSplitQName2(token, &prefix);
  +    el = xsd_NCName_array_push(path);
  +    *el = (xsd_NCName) val;
  +    if(prefix)
  +    {
  +        *namespace = (xsd_anyURI) xmlTextReaderLookupNamespace(handle->reader, prefix);
  +        xmlFree(prefix);
  +    }
  +    free(token);
  +    tmp_value += end_token;
  +
  +    do
  +    {
  +        token = (xmlChar *) globus_l_soap_message_my_strtok(
  +            tmp_value, strlen(tmp_value), &start_token, &end_token, "\n\t /");
  +        tmp_value += end_token;
  +
  +        if (token != NULL && strlen((char *) token) != 0)
  +        {
  +            el = xsd_NCName_array_push(path);
  +            *el = (xsd_NCName) token;
  +        }
  +    }
  +    while (token != NULL && end_token != -1);
  +
  + exit:
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +/* globus_soap_message_deserialize_concrete_path() */
  +
   static
   xmlChar *
   globus_l_soap_message_numeric_content(
  -    xmlChar *                           content,
  +    const xmlChar *                     content,
       globus_bool_t                       negative_ok)
   {
       xmlChar *                           tmp;
       xmlChar *                           tmp_start;
       xmlChar *                           tmp_end;
   
  -    tmp = globus_libc_strdup(content);
  +    tmp = (xmlChar *) globus_libc_strdup((char *) content);
       tmp_start = tmp;
   
       while(*tmp_start && isspace(*tmp_start))
  @@ -3283,6 +3375,7 @@
       if ((negative_ok ? (*tmp_start != '-') : 1)
               && !isdigit(*tmp_start))
       {
  +        free(tmp);
           return NULL;
       }
       tmp_end = tmp_start;
  @@ -3307,9 +3400,74 @@
       }
       if (*tmp_end)
       {
  +        free(tmp);
           /* garbage at end */
           return NULL;
       }
  -    return tmp_start;
  +    memmove(tmp, tmp_start, tmp_end-tmp_start);
  +    return tmp;
   }
   /* globus_l_soap_message_numeric_content() */
  +
  +globus_result_t
  +globus_soap_message_deserialize_get_prefixes(
  +    globus_soap_message_handle_t        handle,
  +    xsd_string_array *                  namespace_prefixes)
  +{
  +    xsd_string *                        new_string;
  +    xmlNsPtr *                          ns_list;
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    int                                 i;
  +    GlobusFuncName(globus_soap_message_get_prefixes);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = xsd_string_array_init_contents(namespace_prefixes);
  +
  +    if (result != GLOBUS_SUCCESS)
  +    {
  +        goto out;
  +    }
  +    handle->doc_to_free = xmlTextReaderCurrentDoc(handle->reader);
  +    ns_list = xmlGetNsList(
  +            handle->doc_to_free,
  +            xmlTextReaderCurrentNode(handle->reader));
  +
  +    if (ns_list != NULL)
  +    {
  +        for (i = 0; ns_list[i] != NULL; i++)
  +        {
  +            if (ns_list[i]->prefix != NULL)
  +            {
  +                new_string = xsd_string_array_push(namespace_prefixes);
  +
  +                if (new_string == NULL)
  +                {
  +                    result = GlobusSoapMessageErrorOutOfMemory;
  +
  +                    goto free_nslist;
  +                }
  +                *new_string = globus_common_create_string(
  +                        "%s=%s",
  +                        ns_list[i]->prefix,
  +                        ns_list[i]->href);
  +                if (*new_string == NULL)
  +                {
  +                    goto free_nslist;
  +                }
  +            }
  +        }
  +    }
  +
  +free_nslist:
  +    if (ns_list != NULL)
  +    {
  +        xmlFree(ns_list);
  +    }
  +    if (result != GLOBUS_SUCCESS)
  +    {
  +        xsd_string_array_destroy_contents(namespace_prefixes);
  +    }
  +out:
  +    return result;
  +}
  +/* globus_soap_message_deserialize_get_prefixes() */
  
  
  
  1.43      +57 -5     wsrf/c/message/source/globus_soap_message_handle.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_handle.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_handle.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -b -r1.42 -r1.43
  --- globus_soap_message_handle.c	19 Jan 2006 05:58:31 -0000	1.42
  +++ globus_soap_message_handle.c	18 May 2006 15:20:20 -0000	1.43
  @@ -118,16 +118,17 @@
               "Failed to initialize xmlReader");
           goto destroy_handle;
       }
  +    /* References the doc so that it lives beyond the lifetime of the handle */
       xmlTextReaderCurrentDoc(reader);
   
       (*new_handle)->reader = reader;
   
  -    goto exit;
  -
  +    if (result != GLOBUS_SUCCESS)
  +    {
    destroy_handle:
  -
       globus_soap_message_handle_destroy(*new_handle);
       *new_handle = NULL;
  +    }
   
    exit:
   
  @@ -261,6 +262,46 @@
   }
   
   globus_result_t
  +globus_soap_message_handle_init_to_dom(
  +    globus_soap_message_handle_t *      new_handle,
  +    xmlDocPtr *                         new_dom)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    xmlTextWriterPtr                    writer = NULL;
  +    GlobusFuncName(globus_soap_message_handle_init_to_dom);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = globus_soap_message_handle_init(new_handle, NULL);
  +    if(result != GLOBUS_SUCCESS)
  +    {
  +        goto exit;
  +    }
  +
  +    writer = xmlNewTextWriterDoc(new_dom, 0);
  +    if(!writer)
  +    {
  +        result = GlobusSoapMessageErrorInitFailed(
  +            "Failed to initialize xmlTextWriter");
  +        goto destroy_handle;
  +    }
  +
  +    (*new_handle)->writer = writer;
  +
  +    goto exit;
  +
  + destroy_handle:
  +
  +    globus_soap_message_handle_destroy(*new_handle);
  +    *new_handle = NULL;
  +
  + exit:
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +/* globus_soap_message_handle_init_to_dom() */
  +
  +globus_result_t
   globus_soap_message_handle_init_to_file(
       globus_soap_message_handle_t *      new_handle,
       const char *                        file_contact,
  @@ -375,6 +416,7 @@
       globus_soap_message_attr_init(
           &handle->attrs);
   
  +    handle->doc_to_free = NULL;
       handle->mustUnderstand_hash = NULL;
       
       globus_hashtable_init(&handle->nsprefix_table, 50,
  @@ -494,6 +536,11 @@
               xmlFreeTextReader(handle->reader);
               handle->reader = NULL;
           }
  +        if (handle->doc_to_free)
  +        {
  +            xmlFreeDoc(handle->doc_to_free);
  +            handle->doc_to_free = NULL;
  +        }
   
           handle->nsp_count = 0;
       }
  @@ -555,6 +602,11 @@
           {
               xmlFreeTextReader(handle->reader);
           }
  +        if (handle->doc_to_free)
  +        {
  +            xmlFreeDoc(handle->doc_to_free);
  +            handle->doc_to_free = NULL;
  +        }
   
           if(handle->callout_table)
           {
  
  
  
  1.20      +5 -0      wsrf/c/message/source/globus_soap_message_handle.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_handle.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_handle.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- globus_soap_message_handle.h	7 Apr 2006 19:05:35 -0000	1.19
  +++ globus_soap_message_handle.h	18 May 2006 15:20:20 -0000	1.20
  @@ -77,6 +77,11 @@
       const char *                        file_contact);
       
   globus_result_t
  +globus_soap_message_handle_init_to_dom(
  +    globus_soap_message_handle_t *      new_handle,
  +    xmlDocPtr *                         new_dom);
  +
  +globus_result_t
   globus_soap_message_handle_init_to_file(
       globus_soap_message_handle_t *      new_handle,
       const char *                        file_contact,
  
  
  
  1.36      +140 -6    wsrf/c/message/source/globus_soap_message_serialize.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_serialize.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_serialize.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -b -r1.35 -r1.36
  --- globus_soap_message_serialize.c	19 Jan 2006 05:58:31 -0000	1.35
  +++ globus_soap_message_serialize.c	18 May 2006 15:20:20 -0000	1.36
  @@ -42,17 +42,17 @@
   
   #define GLOBUS_I_SOAP_MESSAGE_NS_IS_DEFAULT(HANDLE, NS) \
       (HANDLE->c14n_subset ?                              \
  -     (((HANDLE->c14n_default_ns == NULL && !NS) ||      \
  +     ((HANDLE->c14n_default_ns == NULL && !NS) ||      \
          (HANDLE->c14n_default_ns &&                      \
  -        HANDLE->c14n_default_ns->ns == NS)) ? 1 : 0) :  \
  -     (((HANDLE->default_ns == NULL && !NS) ||           \
  +        HANDLE->c14n_default_ns->ns == NS)) :           \
  +      ((HANDLE->default_ns == NULL && !NS) ||           \
          (HANDLE->default_ns &&                           \
  -        HANDLE->default_ns->ns == NS)) ? 1 : 0))
  +        HANDLE->default_ns->ns == NS)))
   
   #define GLOBUS_I_SOAP_MESSAGE_NS_IS_NULL(HANDLE)        \
       (HANDLE->c14n_subset ?                              \
  -     ((HANDLE->c14n_default_ns->ns == NULL) ? 1 : 0) :  \
  -     ((HANDLE->default_ns->ns == NULL) ? 1 : 0))
  +     (HANDLE->c14n_default_ns->ns == NULL) :            \
  +     (HANDLE->default_ns->ns == NULL))
   
   #define GLOBUS_I_SOAP_MESSAGE_NS_SET_DEFAULT(HANDLE, NS)                \
       {                                                                   \
  @@ -252,6 +252,7 @@
                   HANDLE->dict,                                           \
                   (const xmlChar *) PREFIX,                               \
                   -1);                                                    \
  +        PREFIX_REF->ns = INTERN_NS;                                     \
           PREFIX_REF->prefix = INTERN_PREFIX;                             \
           PREFIX_REF->ref = 0;                                            \
                                                                           \
  @@ -335,6 +336,7 @@
   
   typedef struct globus_l_soap_message_prefix_ref_s
   {
  +    const xmlChar *                             ns;
       const xmlChar *                             prefix;
       int                                         ref;
   } globus_l_soap_message_prefix_ref_t;
  @@ -831,6 +833,138 @@
   
   
   globus_result_t
  +globus_soap_message_serialize_ns_set_prefix(
  +    globus_soap_message_handle_t        handle,
  +    const xsd_QName *                   element_qname,
  +    const char *                        Namespace,
  +    const char *                        prefix,
  +    globus_xsd_element_options_t *      options)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    xmlChar *                           pfx = NULL;
  +    GlobusFuncName(globus_soap_message_serialize_ns_set_prefix);
  +    GlobusSoapMessageDebugEnter();
  +
  +    if(Namespace)
  +    {
  +        /* First time we set a namespace for an element, we will call the
  +         * callouts for that element
  +         */
  +        if (handle->callout_state == GLOBUS_SOAP_MESSAGE_CALLOUT_NONE)
  +        {
  +            handle->callout_state = GLOBUS_SOAP_MESSAGE_CALLOUT_BEGIN;
  +            result = globus_soap_message_invoke_ns_callouts(
  +                    handle,
  +                    element_qname,
  +                    GLOBUS_SOAP_MESSAGE_CALLOUT_NS_SET,
  +                    options);
  +
  +            if (result != GLOBUS_SUCCESS)
  +            {
  +                result = GlobusSoapMessageErrorSerializeFailed(
  +                    result, NULL, element_qname);
  +                goto exit;
  +            }
  +        }
  +        GLOBUS_I_SOAP_MESSAGE_NSPREFIX_LOOKUP(
  +            handle, Namespace, pfx);
  +        if(!pfx)
  +        {
  +            GLOBUS_I_SOAP_MESSAGE_NSPREFIX_ADD(handle, Namespace, prefix);
  +        }
  +        else if (strcmp(prefix, pfx) != 0)
  +        {
  +            result = GlobusSoapMessageErrorSerializeNamespaceFailed(Namespace, prefix);
  +
  +            goto exit;
  +        }
  +    }
  +exit:
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +/* globus_soap_message_serialize_ns_set_prefix() */
  +
  +globus_result_t
  +globus_soap_message_serialize_ns_add_prefix(
  +    globus_soap_message_handle_t        handle,
  +    const xsd_QName *                   element_qname,
  +    const char *                        Namespace,
  +    const char *                        prefix,
  +    globus_xsd_element_options_t *      options)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    xmlChar *                           pfx = NULL;
  +    GlobusFuncName(globus_soap_message_subelement_ns_add);
  +    GlobusSoapMessageDebugEnter();
  +
  +    /* For first element or attribute ns we add, call the callout */
  +    if (handle->callout_state == GLOBUS_SOAP_MESSAGE_CALLOUT_NS_ADD)
  +    {
  +        handle->callout_state = GLOBUS_SOAP_MESSAGE_CALLOUT_ATTR;
  +        result = globus_soap_message_invoke_ns_callouts(
  +            handle,
  +            element_qname,
  +            GLOBUS_SOAP_MESSAGE_CALLOUT_NS_ADD,
  +            options);
  +        if(result != GLOBUS_SUCCESS)
  +        {
  +            result = GlobusSoapMessageErrorSerializeFailed(
  +                result, NULL, element_qname);
  +            goto exit;
  +        }
  +    }
  +    if(Namespace)
  +    {
  +        int refcount;
  +        GLOBUS_I_SOAP_MESSAGE_NSPREFIX_LOOKUP(
  +            handle, Namespace, pfx);
  +        GLOBUS_I_SOAP_MESSAGE_NSPREFIX_REFCOUNT(
  +            handle, Namespace, refcount);
  +        if(refcount == 0)
  +        {
  +            result = GLOBUS_I_SOAP_MESSAGE_DEFINE_PREFIX(
  +                handle, Namespace, prefix);
  +            if(result != GLOBUS_SUCCESS)
  +            {
  +                    goto exit;
  +            }
  +        }
  +        
  +        GLOBUS_I_SOAP_MESSAGE_REFINC(handle, Namespace);
  +    }
  +
  + exit:
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +/* globus_soap_message_serialize_ns_add_prefix() */
  +
  +void
  +globus_soap_message_serialize_ns_remove_prefix(
  +    globus_soap_message_handle_t        handle,
  +    const char *                        Namespace,
  +    const char *                        prefix,
  +    globus_xsd_element_options_t *      options)
  +{
  +    char *                              pfx;
  +
  +
  +    if(Namespace)
  +    {
  +        GLOBUS_I_SOAP_MESSAGE_NSPREFIX_LOOKUP(
  +                handle, Namespace, pfx);
  +        if (strcmp(prefix, pfx) == 0)
  +        {
  +            GLOBUS_I_SOAP_MESSAGE_REFDEC(handle, Namespace);
  +        }
  +    }
  +    return;
  +}
  +/* globus_soap_message_serialize_ns_remove_prefix() */
  +
  +globus_result_t
   globus_soap_message_serialize_envelope(
      globus_soap_message_handle_t         handle)
   {
  
  
  
  1.45      +31 -2     wsrf/c/message/source/globus_soap_message_transport.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_transport.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_transport.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -b -r1.44 -r1.45
  --- globus_soap_message_transport.c	19 Jan 2006 05:58:31 -0000	1.44
  +++ globus_soap_message_transport.c	18 May 2006 15:20:20 -0000	1.45
  @@ -508,6 +508,11 @@
               {
                   xmlFreeTextReader(callback_handle->message->reader);
               }
  +            if (callback_handle->message->doc_to_free != NULL)
  +            {
  +                xmlFreeDoc(callback_handle->message->doc_to_free);
  +                callback_handle->message->doc_to_free = NULL;
  +            }
               callback_handle->message->reader = xmlReaderForIO(
                   globus_l_soap_message_handle_libxml_io_read_callback,
                   globus_l_soap_message_handle_libxml_io_close_callback,
  @@ -1074,7 +1079,7 @@
   {
       char                                content_length_buffer[100];
       int                                 buffer_length;
  -    static char                         dummy_buffer[1];
  +    static unsigned char                dummy_buffer[1];
       globus_l_soap_message_callback_handle_t * callback_handle;
       globus_result_t                     result = GLOBUS_SUCCESS;
       globus_xio_data_descriptor_t        dd;
  @@ -1211,7 +1216,7 @@
       char                                content_length_buffer[100];
       char *                              connection;
       int                                 buffer_length;
  -    static char                         dummy_buffer[1];
  +    static unsigned char                dummy_buffer[1];
       globus_l_soap_message_callback_handle_t * callback_handle;
       globus_result_t                     result = GLOBUS_SUCCESS;
       GlobusFuncName(globus_soap_message_register_write_response);
  @@ -1524,6 +1529,11 @@
           xmlFreeTextReader(handle->reader);
       }
       handle->reader = NULL;
  +    if (handle->doc_to_free)
  +    {
  +        xmlFreeDoc(handle->doc_to_free);
  +        handle->doc_to_free = NULL;
  +    }
   
       callback_handle = globus_malloc(
           sizeof(globus_l_soap_message_close_callback_t));
  @@ -1560,6 +1570,11 @@
       {
           xmlFreeTextReader(handle->reader);
       }
  +    if (handle->doc_to_free)
  +    {
  +        xmlFreeDoc(handle->doc_to_free);
  +        handle->doc_to_free = NULL;
  +    }
   
       handle->buffer_eof = 0;
       
  @@ -1724,6 +1739,20 @@
           }
       }
   
  +    if (globus_soap_message_attr_get(attrs, GLOBUS_SOAP_MESSAGE_AUTH_ANONYMOUS_KEY))
  +    {
  +        result = globus_xio_attr_cntl(
  +                xio_attr,
  +                globus_i_soap_message_gsi_driver,
  +                GLOBUS_XIO_GSI_SET_ANON);
  +        if(result != GLOBUS_SUCCESS)
  +        {
  +            result = GlobusSoapMessageErrorFailedTransport(
  +                result, "Failed to set target name on gsi driver");
  +            goto exit;
  +        }
  +    }
  +
   exit:
   
       GlobusSoapMessageDebugExit();
  
  
  
  1.28      +2 -2      wsrf/c/message/source/globus_soap_message_utils.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_soap_message_utils.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_soap_message_utils.h,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- globus_soap_message_utils.h	19 Jan 2006 05:58:31 -0000	1.27
  +++ globus_soap_message_utils.h	18 May 2006 15:20:20 -0000	1.28
  @@ -182,8 +182,8 @@
               _globus_func_name,                                          \
               __LINE__,                                                   \
               "Serialization of namespace: %s:%s failed",                 \
  -            (ns ? (const char *)ns : ""),                               \
  -            (prefix ? (const char *)prefix : ""))
  +            (prefix ? (const char *)prefix : ""),                       \
  +            (ns ? (const char *)ns : ""))
   
   #define GLOBUS_SOAP_MESSAGE_ERROR_SERIALIZE_ELEMENT_END_FAILED_OBJECT( \
       causal_string) \
  
  
  
  1.13      +6 -0      wsrf/c/message/source/globus_xsd_type_registry.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: globus_xsd_type_registry.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/globus_xsd_type_registry.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- globus_xsd_type_registry.c	8 Mar 2006 21:26:02 -0000	1.12
  +++ globus_xsd_type_registry.c	18 May 2006 15:20:20 -0000	1.13
  @@ -556,6 +556,12 @@
           goto exit;
       }
   
  +    result = globus_xsd_type_registry_insert(registry, &xsd_token_info, NULL);
  +    if(result != GLOBUS_SUCCESS)
  +    {
  +        goto exit;
  +    }
  +
       result = globus_xsd_type_registry_insert(registry, &xsd_unsignedByte_info, NULL);
       if(result != GLOBUS_SUCCESS)
       {
  
  
  
  1.33      +35 -2     wsrf/c/message/source/xsd_any.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: xsd_any.c
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/xsd_any.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -b -r1.32 -r1.33
  --- xsd_any.c	19 Jan 2006 05:58:31 -0000	1.32
  +++ xsd_any.c	18 May 2006 15:20:20 -0000	1.33
  @@ -115,6 +115,8 @@
               xsd_QName_destroy(instance->element);
               instance->element = NULL;
           }
  +
  +        xsd_string_array_destroy_contents(&instance->namespaces);
       }
   
       GlobusSoapMessageDebugExit();
  @@ -154,6 +156,7 @@
                   }
               }
           }
  +        xsd_string_array_copy_contents(&dest->namespaces, &src->namespaces);
       }
   
   error:
  @@ -520,8 +523,11 @@
           if(GlobusSoapMessageStatusFailedWithTextCheck(result))
           {
               element_exists = 0;
  +            if (!instance->any_info)
  +            {
               instance->any_info = &globus_xml_buffer_contents_info;
           }
  +        }
           else if(!GlobusSoapMessageStatusCheck(result))
           {
               result = GlobusSoapMessageErrorDeserializeFailed(
  @@ -539,6 +545,15 @@
           globus_soap_message_deserialize_push_element(message_handle);
       }
   
  +    /* Deserialize current namespace prefixes into the any */
  +    result = globus_soap_message_deserialize_get_prefixes(
  +            message_handle,
  +            &instance->namespaces);
  +    if (result != GLOBUS_SUCCESS)
  +    {
  +        goto exit;
  +    }
  +
       GlobusSoapMessageDebugPrintf(
           GLOBUS_SOAP_MESSAGE_DEBUG_WILDCARDS, ("\n\nDeserializing xsd:any\n"));
   
  @@ -611,6 +626,11 @@
               result, instance->any_info->type);
           goto exit;
       }
  +    if (instance->any_info == &xsd_QName_info || 
  +        instance->any_info == &xsd_QName_contents_info)
  +    {
  +        xsd_string_array_destroy_contents(&instance->namespaces);
  +    }
   
    exit:
   
  @@ -653,7 +673,10 @@
              GlobusSoapMessageStatusFailedWithTextCheck(result))
           {
               element_exists = 0;
  +            if (!instance->any_info)
  +            {
               instance->any_info = &globus_xml_buffer_contents_info;
  +            }
               result = GLOBUS_SUCCESS;
           }
           else if(!GlobusSoapMessageStatusCheck(result))
  @@ -672,6 +695,11 @@
           element_exists = 1;
           globus_soap_message_deserialize_push_element(message_handle);
       }
  +    result = globus_soap_message_deserialize_get_prefixes(message_handle, &instance->namespaces);
  +    if (result != GLOBUS_SUCCESS)
  +    {
  +        goto exit;
  +    }
   
       GlobusSoapMessageDebugPrintf(
           GLOBUS_SOAP_MESSAGE_DEBUG_WILDCARDS, ("\n\nDeserializing xsd:any\n"));
  @@ -746,6 +774,11 @@
   
       *ip = instance;
   
  +    if (instance->any_info == &xsd_QName_info || 
  +        instance->any_info == &xsd_QName_contents_info)
  +    {
  +        xsd_string_array_destroy_contents(&instance->namespaces);
  +    }
    exit:
   
       if(result != GLOBUS_SUCCESS)
  
  
  
  1.5       +3 -0      wsrf/c/message/source/xsd_any.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: xsd_any.h
  ===================================================================
  RCS file: /home/globdev/CVS/globus-packages/wsrf/c/message/source/xsd_any.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- xsd_any.h	19 Jan 2006 05:58:31 -0000	1.4
  +++ xsd_any.h	18 May 2006 15:20:20 -0000	1.5
  @@ -24,6 +24,7 @@
   #include "xsd_QName.h"
   #include "globus_xsd_type_registry.h"
   #include "globus_xsd_type_info.h"
  +#include "xsd_string.h"
   
   typedef struct xsd_any_s 
   {
  @@ -31,6 +32,8 @@
       globus_xsd_type_info_t              any_info;
       xsd_QName *                         element;
       void *                              value;
  +    /* Array of prefix=namespace */
  +    xsd_string_array                    namespaces;
   } xsd_any;
   
   GLOBUS_XSD_DECLARE_TYPE_FUNCTIONS(xsd_any);
  
  
  
  1.2       +173 -0    wsrf/c/message/source/xsd_token.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: xsd_token.c
  ===================================================================
  RCS file: xsd_token.c
  diff -N xsd_token.c
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ xsd_token.c	18 May 2006 15:20:20 -0000	1.2
  @@ -0,0 +1,173 @@
  +/*
  + * Copyright 1999-2006 University of Chicago
  + * 
  + * Licensed 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 "globus_i_xsd.h"
  +#include "globus_i_xsd_type_info.h"
  +#include "globus_soap_message.h"
  +
  +GLOBUS_I_XSD_DEFINE_QNAME(xsd, token);
  +GLOBUS_I_XSD_DEFINE_TYPE_INFO(xsd_token);
  +GLOBUS_I_XSD_DEFINE_TYPE_FUNCTIONS(xsd_token);
  +GLOBUS_I_XSD_DEFINE_ATTR_FUNCTIONS(xsd_token, string);
  +GLOBUS_I_XSD_DEFINE_INIT_CONTENTS_GENERIC(xsd_token);
  +GLOBUS_I_XSD_DEFINE_LIST_FUNCTIONS(xsd_token, string);
  +GLOBUS_I_XSD_DEFINE_LIST_ATTR_FUNCTIONS(xsd_token, string);
  +
  +globus_result_t
  +xsd_token_copy_contents(
  +    xsd_token *                        dest,
  +    const xsd_token *                  src)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_copy_contents);
  +    GlobusSoapMessageDebugEnter();
  +    
  +    if(dest)
  +    {
  +        if(!src || !*src)
  +        {
  +            *dest = NULL;
  +        }
  +        else
  +        {
  +            *dest = globus_libc_strdup(*src);
  +            if(!*dest)
  +            {
  +                result = GlobusSoapMessageErrorOutOfMemory;
  +            }
  +        }
  +    }
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +
  +void
  +xsd_token_destroy_contents(
  +    xsd_token *                         instance)
  +{
  +    GlobusFuncName(xsd_token_destroy_contents);
  +    GlobusSoapMessageDebugEnter();
  +
  +    if(*instance)
  +    {
  +        free(*instance);
  +        *instance = NULL;
  +    }
  +
  +    GlobusSoapMessageDebugExit();
  +}
  +
  +globus_result_t
  +xsd_token_serialize_contents(
  +    const xsd_QName *                   element,
  +    const xsd_token *                   instance,
  +    globus_soap_message_handle_t        soap_message_handle,
  +    globus_xsd_element_options_t        options)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_serialize_contents);
  +    GlobusSoapMessageDebugEnter();
  +
  +    /* serialize contents of type */
  +    result = globus_soap_message_serialize_string(
  +        soap_message_handle, instance);
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +
  +globus_result_t
  +xsd_token_deserialize_contents(
  +    const xsd_QName *                   eqn,
  +    xsd_token *                         instance,
  +    globus_soap_message_handle_t        soap_message_handle,
  +    globus_xsd_element_options_t        options)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_deserialize_contents);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = globus_soap_message_deserialize_string(
  +        soap_message_handle, instance);
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +
  +globus_result_t
  +xsd_token_init_cstr(
  +    xsd_token **                        ip,
  +    char *                              str)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_init_cstr);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = xsd_token_init(ip);
  +    if(result == GLOBUS_SUCCESS)
  +    {
  +        **ip = str;
  +    }
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +
  +globus_result_t
  +xsd_token_init_contents_cstr(
  +    xsd_token *                         instance,
  +    char *                              str)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_init_contents_cstr);
  +    GlobusSoapMessageDebugEnter();
  +
  +    *instance = str;
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +
  +globus_result_t
  +xsd_token_copy_cstr(
  +    xsd_token **                        ip,
  +    const char *                        str)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_copy_cstr);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = xsd_token_copy(ip, (const xsd_token *) &str);
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  +
  +globus_result_t
  +xsd_token_copy_contents_cstr(
  +    xsd_token *                         instance,
  +    const char *                        str)
  +{
  +    globus_result_t                     result = GLOBUS_SUCCESS;
  +    GlobusFuncName(xsd_token_copy_cstr);
  +    GlobusSoapMessageDebugEnter();
  +
  +    result = xsd_token_copy_contents(instance, (const xsd_token *) &str);
  +
  +    GlobusSoapMessageDebugExit();
  +    return result;
  +}
  
  
  
  1.2       +61 -0     wsrf/c/message/source/xsd_token.h
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: xsd_token.h
  ===================================================================
  RCS file: xsd_token.h
  diff -N xsd_token.h
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ xsd_token.h	18 May 2006 15:20:20 -0000	1.2
  @@ -0,0 +1,61 @@
  +/*
  + * Copyright 1999-2006 University of Chicago
  + * 
  + * Licensed 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 _XSD_TOKEN_H_
  +#define _XSD_TOKEN_H_
  +
  +#include "globus_common.h"
  +
  +EXTERN_C_BEGIN
  +
  +typedef xsd_string                      xsd_token;
  +
  +#include "xsd_QName.h"
  +#include "globus_xsd_primitives.h"
  +
  +GLOBUS_XSD_DECLARE_TYPE_FUNCTIONS(xsd_token);
  +GLOBUS_XSD_DECLARE_ATTR_FUNCTIONS(xsd_token);
  +GLOBUS_XSD_DECLARE_LIST_FUNCTIONS(xsd_token);
  +
  +/* initializes xsd_token and assigns str.
  + * xsd_token now owns str
  + */
  +globus_result_t
  +xsd_token_init_cstr(
  +    xsd_token **                        ip,
  +    char *                              str);
  +
  +/* assigns str. xsd_token now owns str */
  +globus_result_t
  +xsd_token_init_contents_cstr(
  +    xsd_token *                         instance,
  +    char *                              str);
  +
  +/* initializes xsd_token and assigns duplicate of str */
  +globus_result_t
  +xsd_token_copy_cstr(
  +    xsd_token **                        ip,
  +    const char *                        str);
  +
  +/* assigns duplicate of str */
  +globus_result_t
  +xsd_token_copy_contents_cstr(
  +    xsd_token *                         instance,
  +    const char *                        str);
  +
  +EXTERN_C_END
  +
  +#endif /* _XSD_TOKEN_H_ */
  
  
  




More information about the cwscore-commit mailing list