[cwscore-commit] CVS update: MODIFIED: source, Makefile.am ...
Joe Bester
commit at globus.org
Wed May 10 14:22:23 CDT 2006
User: bester
Date: 06/05/10 14:22:23
Modified: c/core/source Tag: query_resource_properties_impl_branch
Makefile.am wsnt_TopicExpressionType_deserialize.c
Added: c/core/source Tag: query_resource_properties_impl_branch
TopicExpression_types.wsdl
notif_ConcreteTopicExpressionType_deserialize.c
Log:
Initial semi-working XPATH integration with QueryResourceProperties (some
trouble serializing XPATH queries currently)
Added support for topic hierarchies for notification producer.
Added support for the Concrete topic expression dialect.
Revision Changes Path
No revision
No revision
1.31.34.2 +31 -6 wsrf/c/core/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/core/source/Makefile.am,v
retrieving revision 1.31.34.1
retrieving revision 1.31.34.2
diff -u -b -r1.31.34.1 -r1.31.34.2
--- Makefile.am 24 Apr 2006 14:23:47 -0000 1.31.34.1
+++ Makefile.am 10 May 2006 19:22:22 -0000 1.31.34.2
@@ -10,8 +10,11 @@
CGEN=$(GLOBUS_LOCATION)/bin/globus-wsrf-cgen \
-nf wsnt_TopicExpressionType_deserialize \
- -nf wsnt_TopicExpressionType_deserialize_pointer
-
+ -nf wsnt_TopicExpressionType_deserialize_pointer \
+ -nf wsnt_TopicExpressionType_serialize \
+ -nf notif_ConcreteTopicExpressionType_serialize \
+ -nf notif_ConcreteTopicExpressionType_deserialize \
+ -P http://www.globus.org/2006/05/Notification=notif_
WSA_S= \
wsa_AttributedQName.c \
wsa_AttributedURI.c \
@@ -765,6 +768,7 @@
wsnt_UseNotify.h
WSTOP_S = \
+ wstop_messageTypesType.c \
wstop_ConcreteTopicPathExpression.c \
wstop_Documentation.c \
wstop_ExtensibleDocumented.c \
@@ -777,6 +781,7 @@
wstop_TopicType_choice.c
WSTOP_H = \
+ wstop_messageTypesType.h \
wstop_ConcreteTopicPathExpression.h \
wstop_Documentation_array.h \
wstop_Documentation.h \
@@ -793,6 +798,15 @@
wstop_TopicType_choice.h \
wstop_TopicType.h
+TOPICEXPR_S = \
+ notif_ConcreteTopicExpressionType.c \
+ notif_SimpleTopicExpressionType.c
+
+TOPICEXPR_H = \
+ notif_ConcreteTopicExpressionType_array.h \
+ notif_ConcreteTopicExpressionType.h \
+ notif_SimpleTopicExpressionType.h
+
WSRL_S= \
wsrl_DestroyResponseType.c \
wsrl_DestroyType.c \
@@ -1160,12 +1174,20 @@
$(GLOBUS_LOCATION)/share/schema/core/notification/subscription_manager_service.wsdl; \
fi
+$(TOPICEXPR_S) $(TOPICEXPR_H):
+ if test ! -f $(top_srcdir)/$@; then \
+ $(CGEN) \
+ -np -ns -gg \
+ $(top_srcdir)/TopicExpression_types.wsdl; \
+ fi
+
GENFILES=$(WSA_S) $(WSA_H) $(DS_S) $(DS_H) $(WSU_S) $(WSU_H) \
$(WSP_S) $(WSP_H) \
$(WSSEU_S) $(WSSEU_H) $(WSC_S) $(WSC_H) $(WSBF_S) $(WSBF_H) \
$(WSNT_S) $(WSNT_H) $(WSTOP_S) $(WSTOP_H) $(WSRL_S) $(WSRL_H) \
$(WSRP_S) $(WSRP_H) $(WSSG_S) $(WSSG_H) \
- $(WSSE_S) $(WSSE_H) $(WST_S) $(WST_H)
+ $(WSSE_S) $(WSSE_H) $(WST_S) $(WST_H) \
+ $(TOPICEXPR_S) $(TOPICEXPR_H)
NOTIFICATION_CONSUMER_GENFILES= \
$(NCST_H) $(NCS_H) $(NCST_S) $(NCSC_S)
@@ -1250,10 +1272,12 @@
libglobus_wsbf_bindings___GLOBUS_FLAVOR_NAME__la_LDFLAGS=$(GPT_LDFLAGS)
nodist_libglobus_wsnt_bindings___GLOBUS_FLAVOR_NAME__la_SOURCES=\
- $(WSNT_S) $(WSNT_H)
+ $(WSNT_S) $(WSNT_H) $(TOPICEXPR_H) $(TOPICEXPR_S)
libglobus_wsnt_bindings___GLOBUS_FLAVOR_NAME__la_SOURCES=\
- wsnt_TopicExpressionType_deserialize.c
+ wsnt_TopicExpressionType_deserialize.c \
+ wsnt_TopicExpressionType_serialize.c \
+ notif_ConcreteTopicExpressionType_deserialize.c
libglobus_wsnt_bindings___GLOBUS_FLAVOR_NAME__la_LIBADD=$(GPT_LIB_LINKS)
libglobus_wsnt_bindings___GLOBUS_FLAVOR_NAME__la_LDFLAGS=$(GPT_LDFLAGS)
@@ -1298,7 +1322,8 @@
$(WSA_H) $(WSA_H) $(DS_H) $(WSU_H) \
$(WSP_H) $(WST_H) $(WSSE_H) \
$(WSSEU_H) $(WSC_H) $(WSBF_H) $(WSNT_H) \
- $(WSTOP_H) $(WSRL_H) $(WSRP_H) $(WSSG_H)
+ $(WSTOP_H) $(WSRL_H) $(WSRP_H) $(WSSG_H) \
+ $(TOPICEXPR_H)
nodist_flavorincludedir = $(flavorincludedir)
nodist_flavorinclude_HEADERS= \
1.6.2.1 +37 -69 wsrf/c/core/source/wsnt_TopicExpressionType_deserialize.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: wsnt_TopicExpressionType_deserialize.c
===================================================================
RCS file: /home/globdev/CVS/globus-packages/wsrf/c/core/source/wsnt_TopicExpressionType_deserialize.c,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -b -r1.6 -r1.6.2.1
--- wsnt_TopicExpressionType_deserialize.c 19 Jan 2006 05:58:20 -0000 1.6
+++ wsnt_TopicExpressionType_deserialize.c 10 May 2006 19:22:23 -0000 1.6.2.1
@@ -23,6 +23,7 @@
#include "globus_soap_message.h"
#include "globus_xsd_type_info.h"
#include "wsnt_TopicExpressionType.h"
+#include "notif_ConcreteTopicExpressionType.h"
globus_result_t
wsnt_TopicExpressionType_deserialize(
@@ -74,34 +75,22 @@
}
}
+ xsd_any_init(&instance->any);
+
if (result == GLOBUS_SUCCESS && !strcmp(*(instance->_Dialect),
"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple"))
{
- subelement.local = "any";
- subelement.Namespace = NULL;
-
- xsd_QName_init(&tmp_qname);
+ instance->any->any_info = &xsd_QName_contents_info;
- result = xsd_QName_deserialize_contents(
- &subelement,
- tmp_qname,
- message_handle,
- 0);
- if(result != GLOBUS_SUCCESS)
+ }
+ else if (result == GLOBUS_SUCCESS && !strcmp((*instance->_Dialect),
+ "http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Concrete"))
{
- result = GlobusSoapMessageErrorDeserializeFailed(
- result,
- (&subelement));
- goto exit;
+ instance->any->any_info = ¬if_ConcreteTopicExpressionType_contents_info;
}
- xsd_any_init(&instance->any);
- instance->any->value = tmp_qname;
- instance->any->any_info = &xsd_QName_info;
- }
- else
- {
- xsd_any_init(&instance->any);
+ subelement.local = "any";
+ subelement.Namespace = NULL;
result = xsd_any_deserialize(
NULL,
@@ -115,7 +104,6 @@
(&subelement));
goto exit;
}
- }
if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
{
@@ -205,33 +193,15 @@
}
+ xsd_any_init(&instance->any);
+ subelement.local = "any";
+ subelement.Namespace = NULL;
if (result == GLOBUS_SUCCESS && !strcmp(*(instance->_Dialect),
"http://docs.oasis-open.org/wsn/2004/06/TopicExpression/Simple"))
{
- subelement.local = "any";
- subelement.Namespace = NULL;
-
- xsd_QName_init(&tmp_qname);
+ instance->any->any_info = &xsd_QName_contents_info;
- result = xsd_QName_deserialize_contents(
- &subelement,
- tmp_qname,
- message_handle,
- 0);
- if(result != GLOBUS_SUCCESS)
- {
- result = GlobusSoapMessageErrorDeserializeFailed(
- result,
- (&subelement));
- goto exit;
- }
- xsd_any_init(&instance->any);
- instance->any->value = tmp_qname;
- instance->any->any_info = &xsd_QName_info;
}
- else
- {
- xsd_any_init(&instance->any);
result = xsd_any_deserialize(
NULL,
@@ -245,8 +215,6 @@
(&subelement));
goto exit;
}
- }
-
result = globus_soap_message_deserialize_element_end(
message_handle,
No revision
No revision
1.1.2.1 +43 -0 wsrf/c/core/source/Attic/TopicExpression_types.wsdl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TopicExpression_types.wsdl
===================================================================
RCS file: TopicExpression_types.wsdl
diff -N TopicExpression_types.wsdl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ TopicExpression_types.wsdl 10 May 2006 19:22:23 -0000 1.1.2.1
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<definitions name="Notification"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ targetNamespace="http://www.globus.org/2006/05/Notification">
+
+ <types>
+ <schema
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.globus.org/2006/05/Notification"
+ elementFormDefault="qualified" attributeFormDefault="unqualified">
+
+ <complexType name="ConcreteTopicExpressionType">
+ <sequence>
+ <element name="Root" type="xsd:QName"/>
+ <element name="Path" type="xsd:NCName"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <simpleType name="SimpleTopicExpressionType">
+ <restriction base="xsd:QName"/>
+ </simpleType>
+ </schema>
+ </types>
+ </definitions>
1.1.2.1 +385 -0 wsrf/c/core/source/Attic/notif_ConcreteTopicExpressionType_deserialize.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: notif_ConcreteTopicExpressionType_deserialize.c
===================================================================
RCS file: notif_ConcreteTopicExpressionType_deserialize.c
diff -N notif_ConcreteTopicExpressionType_deserialize.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ notif_ConcreteTopicExpressionType_deserialize.c 10 May 2006 19:22:23 -0000 1.1.2.1
@@ -0,0 +1,385 @@
+/*
+ * 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.
+ */
+
+
+/*
+ * This file is automatically generated by the Globus WSDLtoC converter
+ */
+
+#include "xsd_QName.h"
+#include "globus_soap_message.h"
+#include "globus_xsd_type_info.h"
+#include "notif_ConcreteTopicExpressionType.h"
+
+globus_result_t
+notif_ConcreteTopicExpressionType_serialize(
+ const xsd_QName * element_qname,
+ const notif_ConcreteTopicExpressionType * instance,
+ globus_soap_message_handle_t message_handle,
+ globus_xsd_element_options_t options)
+{
+ globus_result_t result = GLOBUS_SUCCESS;
+ xsd_QName subelement;
+ globus_list_t * any_attr_keys = NULL;
+ globus_list_t * any_attr_keys_iterator = NULL;
+ xsd_QName * type_attr = NULL;
+
+ char * prefix = NULL;
+ int prefix_created;
+ int define_prefix = 0;
+ int i;
+ int save_options = options;
+
+ GlobusFuncName(notif_ConcreteTopicExpressionType_serialize);
+ GlobusSoapMessageDebugEnter();
+
+
+ if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
+ {
+ /* serialize notif_ConcreteTopicExpressionType element */
+ result = globus_soap_message_element_ns_set(
+ message_handle,
+ element_qname,
+ element_qname->Namespace,
+ &options);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+
+ if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle)))
+ {
+ result = globus_soap_message_attribute_ns_set(
+ message_handle,
+ element_qname,
+ "http://www.w3.org/2001/XMLSchema-instance",
+ &options);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+ }
+
+ if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle))
+ {
+
+ result = globus_soap_message_attribute_ns_set(
+ message_handle,
+ element_qname,
+ notif_ConcreteTopicExpressionType_qname.Namespace,
+ &options);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+ }
+
+ result = globus_soap_message_serialize_element(
+ message_handle,
+ element_qname,
+ options,
+ ¬if_ConcreteTopicExpressionType_qname);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+
+ if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle))
+ {
+ xsd_QName_init(&type_attr);
+
+ type_attr->local = globus_libc_strdup("type");
+ type_attr->Namespace = globus_libc_strdup(XSI_NS);
+ }
+
+
+ /* serialize namespaces */
+ result = globus_soap_message_element_ns_add(
+ message_handle,
+ element_qname,
+ element_qname->Namespace,
+ &options);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+
+ if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle)))
+ {
+ result = globus_soap_message_attribute_ns_add(
+ message_handle,
+ element_qname,
+ "http://www.w3.org/2001/XMLSchema-instance",
+ &options);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+ }
+ if ((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle))
+ {
+
+ result = globus_soap_message_attribute_ns_add(
+ message_handle,
+ element_qname,
+ notif_ConcreteTopicExpressionType_qname.Namespace,
+ &options);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+ }
+
+ /* serialize attributes */
+
+ if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle))
+ {
+ result = globus_soap_message_serialize_QName_attribute(
+ message_handle,
+ type_attr,
+ ¬if_ConcreteTopicExpressionType_qname);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+ }
+
+
+ }
+
+ if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
+ {
+ result = globus_soap_message_serialize_element_begin_close(
+ message_handle, element_qname);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+ }
+ options &= ~GLOBUS_XSD_ELEMENT_CONTENTS_ONLY;
+
+
+ /* serialize contents of type */
+
+ subelement.local = "Root";
+ subelement.Namespace = "http://www.globus.org/2006/05/Notification";
+
+ result = xsd_QName_serialize_contents(
+ &subelement,
+ &instance->Root,
+ message_handle,
+ options & (~GLOBUS_XSD_ELEMENT_SET_DEFAULT_NS));
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, &xsd_QName_qname);
+ goto exit;
+ }
+
+ for (i = 0; i < instance->Path.length; i++)
+ {
+ const xsd_string delim = "/";
+
+ subelement.local = "Path";
+ subelement.Namespace = "http://www.globus.org/2006/05/Notification";
+
+ result = xsd_string_serialize_contents(
+ &subelement,
+ &delim,
+ message_handle,
+ 0);
+
+ result = xsd_NCName_serialize_contents(
+ &subelement,
+ &instance->Path.elements[i],
+ message_handle,
+ 0);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, &xsd_NCName_qname);
+ goto exit;
+ }
+ }
+
+ options = save_options;
+
+ if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
+ {
+ /* add end element */
+ result = globus_soap_message_serialize_element_end(
+ message_handle,
+ element_qname,
+ options,
+ ¬if_ConcreteTopicExpressionType_qname);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorSerializeFailed(
+ result, NULL, element_qname);
+ goto exit;
+ }
+
+ globus_soap_message_element_ns_remove(
+ message_handle,
+ element_qname->Namespace,
+ &options);
+
+ /* remove namespace/prefix mappings for these types */
+
+ if(((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle)))
+ {
+ globus_soap_message_attribute_ns_remove(
+ message_handle,
+ "http://www.w3.org/2001/XMLSchema-instance",
+ &options);
+ }
+ if((options & GLOBUS_XSD_ELEMENT_TYPE_ATTR) &&
+ !globus_soap_message_serialize_is_c14n_subset(message_handle))
+ {
+ globus_soap_message_attribute_ns_remove(
+ message_handle,
+ notif_ConcreteTopicExpressionType_qname.Namespace,
+ &options);
+ }
+
+ }
+
+ exit:
+ if (type_attr)
+ {
+ xsd_QName_destroy(type_attr);
+ }
+
+
+ if(any_attr_keys)
+ {
+ globus_list_free(any_attr_keys);
+ }
+
+ GlobusSoapMessageDebugExit();
+ return result;
+}
+
+globus_result_t
+notif_ConcreteTopicExpressionType_deserialize(
+ const xsd_QName * element_qname,
+ notif_ConcreteTopicExpressionType * instance,
+ globus_soap_message_handle_t message_handle,
+ globus_xsd_element_options_t options)
+{
+ globus_result_t result = GLOBUS_SUCCESS;
+ xsd_anyURI namespace;
+ xsd_NCName_array path;
+
+ GlobusFuncName(notif_ConcreteTopicExpressionType_deserialize);
+ GlobusSoapMessageDebugEnter();
+
+ if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
+ {
+ result = globus_soap_message_deserialize_element(
+ message_handle, element_qname);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorDeserializeFailed(
+ result, element_qname);
+ goto exit;
+ }
+
+
+ result = globus_soap_message_deserialize_element_begin_close(
+ message_handle);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorDeserializeFailed(
+ result, element_qname);
+ goto fail_deserialize;
+ }
+ }
+
+ result = globus_soap_message_deserialize_concrete_path(
+ message_handle,
+ &instance->Root.Namespace,
+ &instance->Path);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorDeserializeFailed(
+ result,
+ &xsd_QName_qname);
+ goto fail_deserialize;
+ }
+
+ instance->Root.local = instance->Path.elements[0];
+ memmove(instance->Path.elements,
+ instance->Path.elements+1,
+ sizeof(xsd_NCName) * (instance->Path.length-1));
+ instance->Path.length--;
+
+ if(!(options & GLOBUS_XSD_ELEMENT_CONTENTS_ONLY))
+ {
+ result = globus_soap_message_deserialize_element_end(
+ message_handle,
+ element_qname);
+ if(result != GLOBUS_SUCCESS)
+ {
+ result = GlobusSoapMessageErrorDeserializeFailed(
+ result, element_qname);
+ goto fail_deserialize;
+ }
+ }
+
+ goto exit;
+
+ fail_deserialize:
+ xsd_NCName_array_destroy_contents(
+ &instance->Path);
+
+ Path_destroy_array:
+ xsd_QName_destroy_contents(
+ &instance->Root);
+
+ Root_destroy:
+
+
+ exit:
+
+ GlobusSoapMessageDebugExit();
+ return result;
+}
More information about the cwscore-commit
mailing list