You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2008/09/09 10:08:15 UTC
svn commit: r693396 - in /webservices/axis2/trunk/c/neethi: ./ include/ src/
src/rmpolicy/ test/policies/
Author: manjula
Date: Tue Sep 9 01:08:12 2008
New Revision: 693396
URL: http://svn.apache.org/viewvc?rev=693396&view=rev
Log:
Adding RMPolicy and mtom policy.
Added:
webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion.h
webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion_builder.h
webservices/axis2/trunk/c/neethi/include/neethi_mtom_assertion_checker.h
webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c
webservices/axis2/trunk/c/neethi/src/rmpolicy/
webservices/axis2/trunk/c/neethi/src/rmpolicy/Makefile.am
webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion.c
webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion_builder.c
webservices/axis2/trunk/c/neethi/test/policies/rm-1.0.xml
webservices/axis2/trunk/c/neethi/test/policies/rm-1.1.xml
Modified:
webservices/axis2/trunk/c/neethi/configure.ac
webservices/axis2/trunk/c/neethi/include/neethi_assertion.h
webservices/axis2/trunk/c/neethi/include/neethi_assertion_builder.h
webservices/axis2/trunk/c/neethi/include/neethi_constants.h
webservices/axis2/trunk/c/neethi/src/Makefile.am
webservices/axis2/trunk/c/neethi/src/assertion_builder.c
Modified: webservices/axis2/trunk/c/neethi/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/configure.ac?rev=693396&r1=693395&r2=693396&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/configure.ac (original)
+++ webservices/axis2/trunk/c/neethi/configure.ac Tue Sep 9 01:08:12 2008
@@ -67,7 +67,8 @@
src/secpolicy/Makefile \
src/secpolicy/model/Makefile \
src/secpolicy/builder/Makefile \
- test/Makefile \
+ src/rmpolicy/Makefile \
+ test/Makefile
])
AC_OUTPUT
Added: webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion.h?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion.h (added)
+++ webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion.h Tue Sep 9 01:08:12 2008
@@ -0,0 +1,250 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef AXIS2_RM_ASSERTION_H
+#define AXIS2_RM_ASSERTION_H
+
+/** @defgroup axis2_rm_assertion
+ * @ingroup axis2_rm_assertion
+ * @{
+ */
+
+#include <neethi_includes.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct axis2_rm_assertion_t axis2_rm_assertion_t;
+
+
+ AXIS2_EXTERN axis2_rm_assertion_t *AXIS2_CALL
+ axis2_rm_assertion_create(
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN void AXIS2_CALL
+ axis2_rm_assertion_free(
+ axis2_rm_assertion_t * rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_sequence_str(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_sequence_str(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_sequence_str);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_sequence_transport_security(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_sequence_transport_security(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_sequence_transport_security);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_exactly_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_exactly_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_exactly_once);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_atleast_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_atleast_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_atleast_once);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_atmost_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_atmost_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_atmost_once);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_inorder(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_inorder(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_inorder);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_inactivity_timeout(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_inactivity_timeout(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* inactivity_timeout);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_retrans_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_retrans_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* retrans_interval);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_ack_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_ack_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* ack_interval);
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ axis2_rm_assertion_get_is_exp_backoff(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_is_exp_backoff(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_exp_backoff);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_storage_mgr(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_storage_mgr(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* storage_mgr);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_message_types_to_drop(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_message_types_to_drop(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* message_types_to_drop);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_max_retrans_count(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_max_retrans_count(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* max_retrans_count);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_sender_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_sender_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* sender_sleep_time);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_invoker_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_invoker_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* invoker_sleep_time);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_polling_wait_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_polling_wait_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* polling_wait_time);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_terminate_delay(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_terminate_delay(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* terminate_delay);
+
+ AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+ axis2_rm_assertion_get_sandesha2_db(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_rm_assertion_set_sandesha2_db(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* sandesha2_db);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Added: webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion_builder.h?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion_builder.h (added)
+++ webservices/axis2/trunk/c/neethi/include/axis2_rm_assertion_builder.h Tue Sep 9 01:08:12 2008
@@ -0,0 +1,46 @@
+
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * 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 AXIS2_RM_ASSERTION_BUILDER_H
+#define AXIS2_RM_ASSERTION_BUILDER_H
+
+/** @defgroup axis2_rm_assertion_builder
+ * @ingroup axis2_rm_assertion_builder
+ * @{
+ */
+
+#include <neethi_constants.h>
+#include <axis2_rm_assertion.h>
+#include <neethi_assertion.h>
+#include <neethi_includes.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL
+ axis2_rm_assertion_builder_build(
+ const axutil_env_t *env,
+ axiom_node_t *rm_assertion_node,
+ axiom_element_t *rm_assertion_ele);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Modified: webservices/axis2/trunk/c/neethi/include/neethi_assertion.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/neethi_assertion.h?rev=693396&r1=693395&r2=693396&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/neethi_assertion.h (original)
+++ webservices/axis2/trunk/c/neethi/include/neethi_assertion.h Tue Sep 9 01:08:12 2008
@@ -99,6 +99,8 @@
ASSERTION_TYPE_REQUIRE_CLIENT_ENTROPY,
ASSERTION_TYPE_REQUIRE_SERVER_ENTROPHY,
ASSERTION_TYPE_MUST_SUPPORT_ISSUED_TOKENS,
+ ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION,
+ ASSERTION_TYPE_RM_ASSERTION,
ASSERTION_TYPE_UNKNOWN
} neethi_assertion_type_t;
Modified: webservices/axis2/trunk/c/neethi/include/neethi_assertion_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/neethi_assertion_builder.h?rev=693396&r1=693395&r2=693396&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/neethi_assertion_builder.h (original)
+++ webservices/axis2/trunk/c/neethi/include/neethi_assertion_builder.h Tue Sep 9 01:08:12 2008
@@ -27,6 +27,7 @@
#include <rp_property.h>
#include <neethi_assertion.h>
#include <rp_builders.h>
+#include <axis2_rm_assertion_builder.h>
#ifdef __cplusplus
extern "C"
Modified: webservices/axis2/trunk/c/neethi/include/neethi_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/neethi_constants.h?rev=693396&r1=693395&r2=693396&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/neethi_constants.h (original)
+++ webservices/axis2/trunk/c/neethi/include/neethi_constants.h Tue Sep 9 01:08:12 2008
@@ -31,6 +31,43 @@
#define NEETHI_ID "Id"
#define NEETHI_WSU_NS_PREFIX "wsu"
#define NEETHI_NAME "Name"
+#define AXIS2_OPTIMIZED_MIME_SERIALIZATION "OptimizedMimeSerialization"
+#define AXIS2_MTOM_POLICY_NS "http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"
+#define AXIS2_RM_POLICY_10_NS "http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+#define AXIS2_RM_POLICY_11_NS "http://docs.oasis-open.org/ws-rx/wsrmp/200702"
+#define AXIS2_SANDESHA2_NS "http://ws.apache.org/sandesha2/c/policy"
+
+/* Reliable messaging related constatnts */
+
+/* RMPolicy 1.0 */
+
+#define AXIS2_RM_RMASSERTION "RMAssertion"
+#define AXIS2_RM_INACTIVITY_TIMEOUT "InactivityTimeout"
+#define AXIS2_RM_BASE_RETRANSMISSION_INTERVAL "BaseRetransmissionInterval"
+#define AXIS2_RM_EXPONENTIAL_BACK_OFF "ExponentialBackoff"
+#define AXIS2_RM_ACKNOWLEDGEMENT_INTERVAL "AcknowledgementInterval"
+
+/* RM policy 1.1 */
+
+#define AXIS2_RM_SEQUENCE_STR "SequenceSTR"
+#define AXIS2_RM_SEQUENCE_TRANSPORT_SECURITY "SequenceTransportSecurity"
+#define AXIS2_RM_DELIVERY_ASSURANCE "DeliveryAssurance"
+#define AXIS2_RM_EXACTLY_ONCE "ExactlyOnce"
+#define AXIS2_RM_AT_LEAST_ONCE "AtLeastOnce"
+#define AXIS2_RM_AT_MOST_ONCE "AtMostOnce"
+#define AXIS2_RM_IN_ORDER "InOrder"
+
+/* Sandesha2/C specific */
+
+#define AXIS2_RM_SANDESHA2_DB "sandesha2_db"
+#define AXIS2_RM_STORAGE_MANAGER "StorageManager"
+#define AXIS2_RM_MESSAGE_TYPES_TO_DROP "MessageTypesToDrop"
+#define AXIS2_RM_MAX_RETRANS_COUNT "MaxRetransCount"
+#define AXIS2_RM_SENDER_SLEEP_TIME "SenderSleepTime"
+#define AXIS2_RM_INVOKER_SLEEP_TIME "InvokerSleepTime"
+#define AXIS2_RM_POLLING_WAIT_TIME "PollingWaitTime"
+#define AXIS2_RM_TERMINATE_DELAY "TerminateDelay"
+
/**
* @file neethi_constants.h
Added: webservices/axis2/trunk/c/neethi/include/neethi_mtom_assertion_checker.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/neethi_mtom_assertion_checker.h?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/neethi_mtom_assertion_checker.h (added)
+++ webservices/axis2/trunk/c/neethi/include/neethi_mtom_assertion_checker.h Tue Sep 9 01:08:12 2008
@@ -0,0 +1,43 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef NEETHI_MTOM_ASSERTION_CHECKER_H
+#define NEETHI_MTOM_ASSERTION_CHECKER_H
+
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <neethi_policy.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ neethi_is_mtom_required(
+ const axutil_env_t *env,
+ neethi_policy_t *policy);
+
+
+ /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Modified: webservices/axis2/trunk/c/neethi/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/Makefile.am?rev=693396&r1=693395&r2=693396&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/neethi/src/Makefile.am Tue Sep 9 01:08:12 2008
@@ -1,4 +1,4 @@
-SUBDIRS = secpolicy
+SUBDIRS = secpolicy rmpolicy
lib_LTLIBRARIES=libneethi.la
libneethi_la_SOURCES= all.c \
@@ -10,12 +10,14 @@
reference.c \
registry.c \
assertion_builder.c \
+ mtom_assertion_checker.c \
util.c
libneethi_la_LIBADD = ../../axiom/src/om/libaxis2_axiom.la \
../../util/src/libaxutil.la \
secpolicy/builder/librp_builder.la \
- secpolicy/model/librp_model.la
+ secpolicy/model/librp_model.la \
+ rmpolicy/librm_policy.la
#libneethi_LIBADD=$(top_builddir)/src/core/description/libaxis2_description.la \
# $(top_builddir)/src/core/receivers/libaxis2_receivers.la \
Modified: webservices/axis2/trunk/c/neethi/src/assertion_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/assertion_builder.c?rev=693396&r1=693395&r2=693396&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/assertion_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/assertion_builder.c Tue Sep 9 01:08:12 2008
@@ -486,6 +486,24 @@
return rp_rampart_config_builder_build(env, node, element);
}
}
+ else if(!axutil_strcmp(ns, AXIS2_MTOM_POLICY_NS))
+ {
+ if(!axutil_strcmp(localname, AXIS2_OPTIMIZED_MIME_SERIALIZATION))
+ {
+ neethi_assertion_t *assertion = NULL;
+ assertion = neethi_assertion_create(env);
+ neethi_assertion_set_value(assertion, env, NULL, ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION) ;
+ return assertion;
+ }
+ }
+ else if((!axutil_strcmp(ns, AXIS2_RM_POLICY_10_NS))||
+ (!axutil_strcmp(ns, AXIS2_RM_POLICY_11_NS)))
+ {
+ if(!axutil_strcmp(localname, AXIS2_RM_RMASSERTION))
+ {
+ return axis2_rm_assertion_builder_build(env, node, element);
+ }
+ }
/* This assertion cannot be processed */
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NEETHI_UNKNOWN_ASSERTION, AXIS2_FAILURE);
Added: webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c (added)
+++ webservices/axis2/trunk/c/neethi/src/mtom_assertion_checker.c Tue Sep 9 01:08:12 2008
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <neethi_operator.h>
+#include <neethi_exactlyone.h>
+#include <neethi_all.h>
+#include <neethi_engine.h>
+#include <neethi_assertion.h>
+#include <neethi_mtom_assertion_checker.h>
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+neethi_is_mtom_required(
+ const axutil_env_t *env,
+ neethi_policy_t *policy)
+{
+ axutil_array_list_t *alternatives = NULL;
+ neethi_operator_t *component = NULL;
+ neethi_all_t *all = NULL;
+ axutil_array_list_t *arraylist = NULL;
+ neethi_policy_t *normalized_policy = NULL;
+ neethi_operator_t *operator = NULL;
+ neethi_assertion_t *assertion = NULL;
+ neethi_assertion_type_t type;
+ void *value = NULL;
+ int i = 0;
+
+ normalized_policy = neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
+
+ if(normalized_policy)
+ {
+ alternatives = neethi_policy_get_alternatives(normalized_policy, env);
+ }
+
+ component =
+ (neethi_operator_t *) axutil_array_list_get(alternatives, env, 0);
+ all = (neethi_all_t *) neethi_operator_get_value(component, env);
+
+ arraylist = neethi_all_get_policy_components(all, env);
+
+ for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+ {
+ operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
+ i);
+ assertion =
+ (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+ value = neethi_assertion_get_value(assertion, env);
+ type = neethi_assertion_get_type(assertion, env);
+
+ /*if (value)
+ {*/
+ if (type == ASSERTION_TYPE_OPTIMIZED_MIME_SERIALIZATION)
+ {
+ neethi_policy_free(normalized_policy, env);
+ normalized_policy = NULL;
+ return AXIS2_TRUE;
+ }
+ /*}*/
+ }
+ neethi_policy_free(normalized_policy, env);
+ normalized_policy = NULL;
+
+ return AXIS2_FALSE;
+}
Added: webservices/axis2/trunk/c/neethi/src/rmpolicy/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/rmpolicy/Makefile.am?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/rmpolicy/Makefile.am (added)
+++ webservices/axis2/trunk/c/neethi/src/rmpolicy/Makefile.am Tue Sep 9 01:08:12 2008
@@ -0,0 +1,13 @@
+TESTS =
+
+noinst_LTLIBRARIES = librm_policy.la
+
+librm_policy_la_SOURCES = rm_assertion.c rm_assertion_builder.c
+
+librm_policy_la_LIBADD = ../../../util/src/libaxutil.la
+
+INCLUDES = -I$(top_builddir)/include \
+ -I ../../include \
+ -I ../../../util/include \
+ -I ../../../axiom/include \
+ -I ../../../include
Added: webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion.c?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion.c (added)
+++ webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion.c Tue Sep 9 01:08:12 2008
@@ -0,0 +1,537 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_rm_assertion.h>
+
+struct axis2_rm_assertion_t
+{
+ /* RM Policy 1.1 assertions */
+ axis2_bool_t is_sequence_str;
+ axis2_bool_t is_sequence_transport_security;
+ axis2_bool_t is_exactly_once;
+ axis2_bool_t is_atleast_once;
+ axis2_bool_t is_atmost_once;
+ axis2_bool_t is_inorder;
+
+ /* RM Policy 1.0 assertions */
+ axis2_char_t *inactivity_timeout;
+ axis2_char_t *retrans_interval;
+ axis2_char_t *ack_interval;
+ axis2_bool_t is_exp_backoff;
+
+ /* Sandesha2 specific assrtions */
+ axis2_char_t *storage_mgr;
+ axis2_char_t *message_types_to_drop;
+ axis2_char_t *max_retrans_count;
+ axis2_char_t *sender_sleep_time;
+ axis2_char_t *invoker_sleep_time;
+ axis2_char_t *polling_wait_time;
+ axis2_char_t *terminate_delay;
+ axis2_char_t *sandesha2_db;
+};
+
+AXIS2_EXTERN axis2_rm_assertion_t *AXIS2_CALL
+axis2_rm_assertion_create(
+ const axutil_env_t * env)
+{
+ axis2_rm_assertion_t *rm_assertion;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ rm_assertion = (axis2_rm_assertion_t *) AXIS2_MALLOC(env->allocator,
+ sizeof(axis2_rm_assertion_t));
+
+ if (rm_assertion == NULL)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ rm_assertion->is_sequence_str = AXIS2_FALSE;
+ rm_assertion->is_sequence_transport_security = AXIS2_FALSE;
+ rm_assertion->is_exactly_once = AXIS2_TRUE;
+ rm_assertion->is_atleast_once = AXIS2_FALSE;
+ rm_assertion->is_atmost_once = AXIS2_FALSE;
+ rm_assertion->is_inorder = AXIS2_TRUE;
+
+ /* RM Policy 1.0 assertions */
+ rm_assertion->inactivity_timeout = NULL;
+ rm_assertion->retrans_interval = NULL;
+ rm_assertion->ack_interval = NULL;
+ rm_assertion->is_exp_backoff = AXIS2_FALSE;
+
+ /* Sandesha2 specific assrtions */
+ rm_assertion->storage_mgr = NULL;
+ rm_assertion->message_types_to_drop = NULL;
+ rm_assertion->max_retrans_count = NULL;
+ rm_assertion->sender_sleep_time = NULL;
+ rm_assertion->invoker_sleep_time = NULL;
+ rm_assertion->polling_wait_time = NULL;
+ rm_assertion->terminate_delay = NULL;
+ rm_assertion->sandesha2_db = NULL;
+
+ return rm_assertion;
+}
+
+AXIS2_EXTERN void AXIS2_CALL
+axis2_rm_assertion_free(
+ axis2_rm_assertion_t * rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ if(rm_assertion)
+ {
+ AXIS2_FREE(env->allocator, rm_assertion);
+ rm_assertion = NULL;
+ }
+
+ return;
+}
+
+/* Implementations.
+ * Following functions are getters and setters
+ * for rm_assertion struct */
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_sequence_str(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_sequence_str;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_sequence_str(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_sequence_str)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_sequence_str = is_sequence_str;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_sequence_transport_security(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_sequence_transport_security;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_sequence_transport_security(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_sequence_transport_security)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_sequence_transport_security =
+ is_sequence_transport_security;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_exactly_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_exactly_once;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_exactly_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_exactly_once)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_exactly_once = is_exactly_once;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_atleast_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_atleast_once;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_atleast_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_atleast_once)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_atleast_once = is_atleast_once;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_atmost_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_atmost_once;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_atmost_once(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_atmost_once)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_atmost_once = is_atmost_once;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_inorder(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_inorder;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_inorder(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_inorder)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_inorder = is_inorder;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_inactivity_timeout(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->inactivity_timeout;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_inactivity_timeout(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* inactivity_timeout)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->inactivity_timeout = inactivity_timeout;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_retrans_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->retrans_interval;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_retrans_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* retrans_interval)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->retrans_interval = retrans_interval;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_ack_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->ack_interval;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_ack_interval(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* ack_interval)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->ack_interval = ack_interval;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_rm_assertion_get_is_exp_backoff(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->is_exp_backoff;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_is_exp_backoff(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_bool_t is_exp_backoff)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->is_exp_backoff = is_exp_backoff;
+
+ return AXIS2_SUCCESS;
+}
+
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_storage_mgr(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->storage_mgr;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_storage_mgr(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* storage_mgr)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->storage_mgr = storage_mgr;
+
+ return AXIS2_SUCCESS;
+}
+
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_message_types_to_drop(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->message_types_to_drop;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_message_types_to_drop(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* message_types_to_drop)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->message_types_to_drop = message_types_to_drop;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_max_retrans_count(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->max_retrans_count;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_max_retrans_count(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* max_retrans_count)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->max_retrans_count = max_retrans_count;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_sender_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->sender_sleep_time;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_sender_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* sender_sleep_time)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->sender_sleep_time = sender_sleep_time;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_invoker_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->invoker_sleep_time;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_invoker_sleep_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* invoker_sleep_time)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->invoker_sleep_time = invoker_sleep_time;
+
+ return AXIS2_SUCCESS;
+}
+
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_polling_wait_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->polling_wait_time;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_polling_wait_time(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* polling_wait_time)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->polling_wait_time = polling_wait_time;
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_terminate_delay(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->terminate_delay;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_terminate_delay(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* terminate_delay)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->terminate_delay = terminate_delay;
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+axis2_rm_assertion_get_sandesha2_db(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ return rm_assertion->sandesha2_db;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_rm_assertion_set_sandesha2_db(
+ axis2_rm_assertion_t *rm_assertion,
+ const axutil_env_t * env,
+ axis2_char_t* sandesha2_db)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ rm_assertion->sandesha2_db = sandesha2_db;
+
+ return AXIS2_SUCCESS;
+}
Added: webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion_builder.c?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion_builder.c (added)
+++ webservices/axis2/trunk/c/neethi/src/rmpolicy/rm_assertion_builder.c Tue Sep 9 01:08:12 2008
@@ -0,0 +1,564 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <axis2_rm_assertion_builder.h>
+
+/*private functions*/
+
+
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_process_sandesha2_assertions(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *node,
+ axiom_element_t *element);
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_populate_for_10(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *rm_assertion_node,
+ axiom_element_t *rm_assertion_element);
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_populate_for_11(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *rm_assertion_node,
+ axiom_element_t *rm_assertion_element);
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_process_delivery_assuarance(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *da_node,
+ axiom_element_t *da_element);
+
+
+
+/* This functions retrives a rm_assertion axiom_node
+ * which may be 1.0 or 1.1 and return a rm_assertion
+ * struct */
+
+
+AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL
+axis2_rm_assertion_builder_build(
+ const axutil_env_t *env,
+ axiom_node_t *rm_assertion_node,
+ axiom_element_t *rm_assertion_ele)
+{
+ axis2_rm_assertion_t *rm_assertion = NULL;
+ axis2_status_t status = AXIS2_SUCCESS;
+ axiom_children_iterator_t *children_iter = NULL;
+ neethi_assertion_t *assertion = NULL;
+ axis2_char_t *ns = NULL;
+ axutil_qname_t *node_qname = NULL;
+
+ node_qname = axiom_element_get_qname(rm_assertion_ele, env, rm_assertion_node);
+ if(!node_qname)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get qname from element");
+ return AXIS2_FAILURE;
+ }
+
+ ns = axutil_qname_get_uri(node_qname, env);
+ if(!ns)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get namespace from element.");
+ return AXIS2_FAILURE;
+ }
+
+ rm_assertion = axis2_rm_assertion_create(env);
+ if (!rm_assertion)
+ {
+ return NULL;
+ }
+
+ /* First we check whether this is in 1.0 or 1.1
+ * namespace. Then we called the appropriate builder */
+
+ if(!axutil_strcmp(ns, AXIS2_RM_POLICY_10_NS))
+ {
+ status = axis2_rm_assertion_builder_populate_for_10(env, rm_assertion,
+ rm_assertion_node, rm_assertion_ele);
+ }
+ else if(!axutil_strcmp(ns, AXIS2_RM_POLICY_11_NS))
+ {
+ status = axis2_rm_assertion_builder_populate_for_11(env, rm_assertion,
+ rm_assertion_node, rm_assertion_ele);
+ }
+
+ if(status == AXIS2_FAILURE)
+ {
+ axis2_rm_assertion_free(rm_assertion, env);
+ rm_assertion = NULL;
+ return NULL;
+ }
+
+ children_iter = axiom_element_get_children(rm_assertion_ele, env, rm_assertion_node);
+ if (children_iter)
+ {
+ while (axiom_children_iterator_has_next(children_iter, env))
+ {
+ axiom_node_t *node = NULL;
+ axiom_element_t *ele = NULL;
+ axis2_char_t *local_name = NULL;
+ axutil_qname_t *node_qname = NULL;
+
+ node = axiom_children_iterator_next(children_iter, env);
+ if (node)
+ {
+ if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)
+ {
+ ele =
+ (axiom_element_t *) axiom_node_get_data_element(node,
+ env);
+ node_qname = axiom_element_get_qname(ele, env, node);
+ if(!node_qname)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get qname from element %s.", local_name);
+ return AXIS2_FAILURE;
+ }
+ ns = axutil_qname_get_uri(node_qname, env);
+ if(!ns)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get namespace from element %s.", local_name);
+ return AXIS2_FAILURE;
+ }
+ if(!axutil_strcmp(ns, AXIS2_SANDESHA2_NS))
+ {
+ status = axis2_rm_assertion_builder_process_sandesha2_assertions(
+ env, rm_assertion, node, ele);
+ if(status == AXIS2_FAILURE)
+ {
+ axis2_rm_assertion_free(rm_assertion, env);
+ rm_assertion = NULL;
+ return NULL;
+ }
+ }
+ }
+ }
+ }
+ }
+ assertion =
+ neethi_assertion_create_with_args(env, (AXIS2_FREE_VOID_ARG)axis2_rm_assertion_free,
+ rm_assertion,
+ ASSERTION_TYPE_RM_ASSERTION);
+ return assertion;
+}
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_populate_for_10(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *rm_assertion_node,
+ axiom_element_t *rm_assertion_element)
+{
+ axiom_children_iterator_t *children_iter = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ /* In rm 1.0 it is just child elements which inside
+ * rm_assertion contains all the properties. */
+
+
+ children_iter = axiom_element_get_children(rm_assertion_element,
+ env, rm_assertion_node);
+ if (children_iter)
+ {
+ while (axiom_children_iterator_has_next(children_iter, env))
+ {
+ axiom_node_t *node = NULL;
+ axiom_element_t *ele = NULL;
+ axis2_char_t *local_name = NULL;
+ node = axiom_children_iterator_next(children_iter, env);
+ if (node)
+ {
+ if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)
+ {
+ ele =
+ (axiom_element_t *) axiom_node_get_data_element(node,
+ env);
+ if (ele)
+ {
+ axutil_qname_t *node_qname = NULL;
+ axis2_char_t *ns = NULL;
+ node_qname = axiom_element_get_qname(ele, env, node);
+ if(!node)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get qname from element");
+ return AXIS2_FAILURE;
+ }
+
+ ns = axutil_qname_get_uri(node_qname, env);
+ if(!ns)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get namespace from element.");
+ return AXIS2_FAILURE;
+ }
+
+ if(axutil_strcmp(ns, AXIS2_RM_POLICY_10_NS))
+ {
+ continue;
+ }
+
+ local_name = axiom_element_get_localname(ele, env);
+ if (local_name)
+ {
+
+ if(!axutil_strcmp(local_name, AXIS2_RM_INACTIVITY_TIMEOUT))
+ {
+ axis2_char_t *inactivity_timeout = NULL;
+ axutil_qname_t *qname =NULL;
+
+ qname = axutil_qname_create(env, "Milliseconds", NULL, NULL);
+
+ inactivity_timeout = axiom_element_get_attribute_value(ele, env, qname);
+ if(qname)
+ {
+ axutil_qname_free(qname, env);
+ qname = NULL;
+ }
+ status = axis2_rm_assertion_set_inactivity_timeout(
+ rm_assertion, env, inactivity_timeout);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_BASE_RETRANSMISSION_INTERVAL))
+ {
+ axis2_char_t *rti = NULL;
+ axutil_qname_t *qname =NULL;
+ qname = axutil_qname_create(env, "Milliseconds", NULL, NULL);
+
+ rti = axiom_element_get_attribute_value(ele, env, qname);
+ if(qname)
+ {
+ axutil_qname_free(qname, env);
+ qname = NULL;
+ }
+ status = axis2_rm_assertion_set_retrans_interval(
+ rm_assertion, env, rti);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_EXPONENTIAL_BACK_OFF))
+ {
+ status = axis2_rm_assertion_set_is_exp_backoff(rm_assertion, env, AXIS2_TRUE);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_ACKNOWLEDGEMENT_INTERVAL))
+ {
+ axis2_char_t *ack_interval = NULL;
+ axutil_qname_t *qname =NULL;
+
+ qname = axutil_qname_create(env, "Milliseconds", NULL, NULL);
+
+ ack_interval = axiom_element_get_attribute_value(ele, env, qname);
+ if(qname)
+ {
+ axutil_qname_free(qname, env);
+ qname = NULL;
+ }
+ status = axis2_rm_assertion_set_ack_interval(
+ rm_assertion, env, ack_interval);
+ }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Unknown Assertion %s ", local_name);
+ return AXIS2_FAILURE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return status;
+}
+
+/* In rm 1.1 rm_assertion contains a policy element as
+ * a child element. We are not creating a policy object
+ * for policy element. Becasue then the processing become
+ * complex.So we just parse the axiom model */
+
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_populate_for_11(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *rm_assertion_node,
+ axiom_element_t *rm_assertion_element)
+{
+ axiom_children_iterator_t *children_iter = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+ axiom_node_t *child_node = NULL;
+ axiom_element_t *child_element = NULL;
+
+
+ child_node = axiom_node_get_first_element(rm_assertion_node, env);
+ if (child_node)
+ {
+ child_element =
+ (axiom_element_t *) axiom_node_get_data_element(child_node, env);
+ if (child_element)
+ {
+ children_iter = axiom_element_get_children(child_element,
+ env, child_node);
+ if (children_iter)
+ {
+ while (axiom_children_iterator_has_next(children_iter, env))
+ {
+ axiom_node_t *node = NULL;
+ axiom_element_t *ele = NULL;
+ axis2_char_t *local_name = NULL;
+ node = axiom_children_iterator_next(children_iter, env);
+ if (node)
+ {
+ if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)
+ {
+ ele =
+ (axiom_element_t *) axiom_node_get_data_element(node,
+ env);
+ if (ele)
+ {
+ axutil_qname_t *node_qname = NULL;
+ axis2_char_t *ns = NULL;
+ node_qname = axiom_element_get_qname(ele, env, node);
+ if(!node)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get qname from element");
+ return AXIS2_FAILURE;
+ }
+
+ ns = axutil_qname_get_uri(node_qname, env);
+ if(!ns)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Cannot get namespace from element.");
+ return AXIS2_FAILURE;
+ }
+
+ if(axutil_strcmp(ns, AXIS2_RM_POLICY_11_NS))
+ {
+ continue;
+ }
+ local_name = axiom_element_get_localname(ele, env);
+ if (local_name)
+ {
+ if(!axutil_strcmp(local_name, AXIS2_RM_SEQUENCE_STR))
+ {
+ status = axis2_rm_assertion_set_is_sequence_str(rm_assertion, env, AXIS2_TRUE);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_SEQUENCE_TRANSPORT_SECURITY))
+ {
+ status = axis2_rm_assertion_set_is_sequence_transport_security(rm_assertion, env, AXIS2_TRUE);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_DELIVERY_ASSURANCE))
+ {
+ status = axis2_rm_assertion_builder_process_delivery_assuarance(
+ env, rm_assertion, node, ele);
+ }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Unknown Assertion %s ", local_name);
+ return AXIS2_FAILURE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return status;
+}
+
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_process_delivery_assuarance(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *da_node,
+ axiom_element_t *da_element)
+{
+ axiom_children_iterator_t *children_iter = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+ axiom_node_t *child_node = NULL;
+ axiom_element_t *child_element = NULL;
+
+ child_node = axiom_node_get_first_element(da_node, env);
+ if (child_node)
+ {
+ child_element =
+ (axiom_element_t *) axiom_node_get_data_element(child_node, env);
+ if (child_element)
+ {
+ children_iter = axiom_element_get_children(child_element,
+ env, child_node);
+ if (children_iter)
+ {
+ while (axiom_children_iterator_has_next(children_iter, env))
+ {
+ axiom_node_t *node = NULL;
+ axiom_element_t *ele = NULL;
+ axis2_char_t *local_name = NULL;
+ node = axiom_children_iterator_next(children_iter, env);
+ if (node)
+ {
+ if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)
+ {
+ ele =
+ (axiom_element_t *) axiom_node_get_data_element(node,
+ env);
+ if (ele)
+ {
+ local_name = axiom_element_get_localname(ele, env);
+ if (local_name)
+ {
+ if(!axutil_strcmp(local_name, AXIS2_RM_EXACTLY_ONCE))
+ {
+ status = axis2_rm_assertion_set_is_exactly_once(rm_assertion, env, AXIS2_TRUE);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_AT_LEAST_ONCE))
+ {
+ status = axis2_rm_assertion_set_is_atleast_once(rm_assertion, env, AXIS2_TRUE);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_AT_MOST_ONCE))
+ {
+ status = axis2_rm_assertion_set_is_atmost_once(rm_assertion, env, AXIS2_TRUE);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_IN_ORDER))
+ {
+ status = axis2_rm_assertion_set_is_inorder(rm_assertion, env, AXIS2_TRUE); }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Unknown Assertion %s ", local_name);
+ return AXIS2_FAILURE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return status;
+}
+
+
+
+static axis2_status_t AXIS2_CALL
+axis2_rm_assertion_builder_process_sandesha2_assertions(
+ const axutil_env_t *env,
+ axis2_rm_assertion_t *rm_assertion,
+ axiom_node_t *node,
+ axiom_element_t *element)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+ axis2_char_t *local_name = NULL;
+
+ if (element)
+ {
+ local_name = axiom_element_get_localname(element, env);
+ if (local_name)
+ {
+ if(!axutil_strcmp(local_name, AXIS2_RM_BASE_RETRANSMISSION_INTERVAL))
+ {
+ axis2_char_t *rti = NULL;
+ rti = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_retrans_interval(rm_assertion, env, rti);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_INACTIVITY_TIMEOUT))
+ {
+ axis2_char_t *inactivity_timeout = NULL;
+ inactivity_timeout = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_inactivity_timeout(rm_assertion, env, inactivity_timeout);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_ACKNOWLEDGEMENT_INTERVAL))
+ {
+ axis2_char_t *ack_interval = NULL;
+ ack_interval = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_ack_interval(rm_assertion, env, ack_interval);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_STORAGE_MANAGER))
+ {
+ axis2_char_t *storage_mgr = NULL;
+ storage_mgr = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_storage_mgr(rm_assertion, env, storage_mgr);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_SANDESHA2_DB))
+ {
+ axis2_char_t *sandesha2_db = NULL;
+ sandesha2_db = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_sandesha2_db(rm_assertion, env, sandesha2_db);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_MESSAGE_TYPES_TO_DROP))
+ {
+ axis2_char_t *message_types_to_drop = NULL;
+ message_types_to_drop = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_message_types_to_drop(rm_assertion, env, message_types_to_drop);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_MAX_RETRANS_COUNT))
+ {
+ axis2_char_t *retrans_count = NULL;
+ retrans_count = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_max_retrans_count(rm_assertion, env, retrans_count);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_SENDER_SLEEP_TIME))
+ {
+ axis2_char_t *sender_sleep_time = NULL;
+ sender_sleep_time = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_sender_sleep_time(rm_assertion, env, sender_sleep_time);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_INVOKER_SLEEP_TIME))
+ {
+ axis2_char_t *invoker_sleep_time = NULL;
+ invoker_sleep_time = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_invoker_sleep_time(rm_assertion, env, invoker_sleep_time);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_POLLING_WAIT_TIME))
+ {
+ axis2_char_t *polling_wait_time = NULL;
+ polling_wait_time = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_polling_wait_time(rm_assertion, env, polling_wait_time);
+ }
+ else if(!axutil_strcmp(local_name, AXIS2_RM_TERMINATE_DELAY))
+ {
+ axis2_char_t *terminate_delay = NULL;
+ terminate_delay = axiom_element_get_text(element, env, node);
+ return axis2_rm_assertion_set_terminate_delay(rm_assertion, env, terminate_delay);
+ }
+ else
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[neethi] Unknown Assertion %s ", local_name);
+ return AXIS2_FAILURE;
+ }
+ }
+ }
+ return status;
+}
+
+
Added: webservices/axis2/trunk/c/neethi/test/policies/rm-1.0.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/test/policies/rm-1.0.xml?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/test/policies/rm-1.0.xml (added)
+++ webservices/axis2/trunk/c/neethi/test/policies/rm-1.0.xml Tue Sep 9 01:08:12 2008
@@ -0,0 +1,21 @@
+<wsp:Policy wsu:Id="RmPolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" xmlns:sanc="http://ws.apache.org/sandesha2/c/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsrm:RMAssertion>
+ <wsrm:InactivityTimeout Milliseconds="600000"/>
+ <wsrm:AcknowledgementInterval Milliseconds="200"/>
+ <wsrm:BaseRetransmissionInterval Milliseconds="300"/>
+ <wsrm:ExponentialBackoff/>
+ <sanc:sandesha2_db>/tmp/sandesha2_db</sanc:sandesha2_db>
+ <sanc:InactivityTimeout>64</sanc:InactivityTimeout>
+ <sanc:StorageManager>persistent</sanc:StorageManager>
+ <sanc:MessageTypesToDrop>none</sanc:MessageTypesToDrop>
+ <sanc:MaxRetransCount>10</sanc:MaxRetransCount>
+ <sanc:SenderSleepTime>1</sanc:SenderSleepTime><!--In seconds-->
+ <sanc:InvokerSleepTime>1</sanc:InvokerSleepTime>
+ <sanc:PollingWaitTime>4</sanc:PollingWaitTime>
+ <sanc:TerminateDelay>4</sanc:TerminateDelay>
+ </wsrm:RMAssertion>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
Added: webservices/axis2/trunk/c/neethi/test/policies/rm-1.1.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/test/policies/rm-1.1.xml?rev=693396&view=auto
==============================================================================
--- webservices/axis2/trunk/c/neethi/test/policies/rm-1.1.xml (added)
+++ webservices/axis2/trunk/c/neethi/test/policies/rm-1.1.xml Tue Sep 9 01:08:12 2008
@@ -0,0 +1,27 @@
+<wsp:Policy wsu:Id="RmPolicy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702" xmlns:sanc="http://ws.apache.org/sandesha2/c/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsrmp:RMAssertion>
+ <wsp:Policy>
+ <wsrmp:DeliveryAssurance>
+ <wsp:Policy>
+ <wsrmp:ExactlyOnce/>
+ <wsrmp:InOrder/>
+ </wsp:Policy>
+ </wsrmp:DeliveryAssurance>
+ </wsp:Policy>
+ <sanc:InactivityTimeout>600000</sanc:InactivityTimeout>
+ <sanc:AcknowledgementInterval>200</sanc:AcknowledgementInterval>
+ <sanc:BaseRetransmissionInterval>300</sanc:BaseRetransmissionInterval>
+ <sanc:sandesha2_db>/tmp/sandesha2_db</sanc:sandesha2_db>
+ <sanc:StorageManager>persistent</sanc:StorageManager>
+ <sanc:MessageTypesToDrop>none</sanc:MessageTypesToDrop>
+ <sanc:MaxRetransCount>10</sanc:MaxRetransCount>
+ <sanc:SenderSleepTime>1</sanc:SenderSleepTime><!--In seconds-->
+ <sanc:InvokerSleepTime>1</sanc:InvokerSleepTime>
+ <sanc:PollingWaitTime>4</sanc:PollingWaitTime>
+ <sanc:TerminateDelay>4</sanc:TerminateDelay>
+ </wsrmp:RMAssertion>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>