summaryrefslogtreecommitdiffstats
path: root/neethi/test
diff options
context:
space:
mode:
Diffstat (limited to 'neethi/test')
-rw-r--r--neethi/test/Makefile.am14
-rw-r--r--neethi/test/main.c362
-rw-r--r--neethi/test/policies/1.5symmetric_binding_policy.xml75
-rw-r--r--neethi/test/policies/Policy-for-Endpoint-1A.xml12
-rw-r--r--neethi/test/policies/Policy-for-Endpoint-1B.xml12
-rw-r--r--neethi/test/policies/Policy-for-Endpoint-2A.xml12
-rw-r--r--neethi/test/policies/Policy-for-Endpoint-2B.xml12
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2B.xml10
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1A.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1B.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1A.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1B.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2A.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2B.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2A.xml11
-rw-r--r--neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2B.xml11
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2A.xml10
-rw-r--r--neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2B.xml10
-rw-r--r--neethi/test/policies/Policy-for-Service-1.xml9
-rw-r--r--neethi/test/policies/Policy-for-Service-2.xml9
-rw-r--r--neethi/test/policies/PolicyAttachments.wsdl448
-rw-r--r--neethi/test/policies/asymmetric_binding_policy.xml70
-rw-r--r--neethi/test/policies/rm-1.0.xml21
-rw-r--r--neethi/test/policies/rm-1.1.xml27
-rw-r--r--neethi/test/policies/symmetric_binding_policy.xml75
-rw-r--r--neethi/test/security_context_token/build.sh3
-rw-r--r--neethi/test/security_context_token/security_context_token_test.c54
-rw-r--r--neethi/test/test-policy.xml10
-rw-r--r--neethi/test/test-resources/different-level-policies.xml109
-rw-r--r--neethi/test/test-resources/echo-services.xml115
-rw-r--r--neethi/test/test-resources/message-services-sc.xml116
-rw-r--r--neethi/test/test-resources/services-1.xml51
-rw-r--r--neethi/test/test-resources/services-2.xml76
-rw-r--r--neethi/test/test-resources/services-3.xml88
-rw-r--r--neethi/test/test-resources/services-4.xml89
-rw-r--r--neethi/test/test-resources/services-5.xml89
-rw-r--r--neethi/test/test-resources/services-6.xml86
-rw-r--r--neethi/test/test-resources/services-7.xml89
-rw-r--r--neethi/test/test-resources/services-8.xml89
-rw-r--r--neethi/test/test-resources/services-9.xml87
-rw-r--r--neethi/test/test-resources/services-sc-1.xml176
-rw-r--r--neethi/test/test-resources/services-sc-2.xml186
-rw-r--r--neethi/test/test.c239
64 files changed, 3238 insertions, 0 deletions
diff --git a/neethi/test/Makefile.am b/neethi/test/Makefile.am
new file mode 100644
index 0000000..b7ace58
--- /dev/null
+++ b/neethi/test/Makefile.am
@@ -0,0 +1,14 @@
+TESTS =
+noinst_PROGRAMS = test
+
+test_SOURCES = test.c
+
+INCLUDES = -I$(top_builddir)/include \
+ -I ../../util/include \
+ -I ../../axiom/include \
+ -I ../../include
+
+test_LDADD = $(top_builddir)/src/libneethi.la \
+ ../../axiom/src/om/libaxis2_axiom.la \
+ ../../util/src/libaxutil.la \
+ ../src/libneethi.la
diff --git a/neethi/test/main.c b/neethi/test/main.c
new file mode 100644
index 0000000..53ec367
--- /dev/null
+++ b/neethi/test/main.c
@@ -0,0 +1,362 @@
+#include <axiom.h>
+#include <axutil_utils.h>
+#include <axutil_env.h>
+#include <axutil_log_default.h>
+#include <axutil_error_default.h>
+#include <stdio.h>
+#include <axiom_xml_reader.h>
+#include <neethi_engine.h>
+#include <axutil_hash.h>
+
+axis2_status_t AXIS2_CALL om_node_serialize(
+ axiom_node_t * node,
+ const axutil_env_t * env);
+
+/*axis2_status_t AXIS2_CALL
+load_policy_array(
+ axutil_array_list_t *arraylist,
+ axis2_char_t *file_name,
+ const axutil_env_t *env);
+*/
+axis2_status_t AXIS2_CALL load_policy_array(
+ axutil_array_list_t * arraylist,
+ axiom_node_t * root,
+ const axutil_env_t * env);
+
+axiom_node_t *return_policy_element(
+ axis2_char_t * name,
+ const axutil_env_t * env,
+ axis2_char_t * wsdl_name);
+
+axis2_char_t *get_policy_ref(
+ axiom_node_t * node,
+ const axutil_env_t * env);
+
+void get_all_policy(
+ axis2_char_t * element_name,
+ const axutil_env_t * env,
+ axutil_array_list_t * policy_node_list,
+ axis2_char_t * wsdl_name);
+
+neethi_policy_t *AXIS2_CALL merge_policylist(
+ axutil_array_list_t * arraylist,
+ const axutil_env_t * env);
+
+int
+main(
+ int argc,
+ char **argv)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+ int i = 0;
+ axutil_array_list_t *policy_list = NULL;
+ axutil_array_list_t *policy_node_list = NULL;
+ neethi_policy_t *resultant = NULL;
+ axutil_allocator_t *allocator = axutil_allocator_init(NULL);
+ axutil_error_t *error = axutil_error_create(allocator);
+ const axutil_env_t *env = axutil_env_create_with_error(allocator, error);
+
+ policy_list = axutil_array_list_create(env, 0);
+ policy_node_list = axutil_array_list_create(env, 0);
+
+ get_all_policy(argv[1], env, policy_node_list, argv[2]);
+
+ for (i = 0; i < axutil_array_list_size(policy_node_list, env); i++)
+ {
+ axiom_node_t *node = NULL;
+ node = (axiom_node_t *) axutil_array_list_get(policy_node_list, env, i);
+ status = load_policy_array(policy_list, node, env);
+ }
+
+ resultant = merge_policylist(policy_list, env);
+ if (!resultant)
+ {
+ printf("Error Merging\n");
+ return 0;
+ }
+ else
+ {
+ axiom_node_t *s_node = NULL;
+ axis2_char_t *buff = NULL;
+ s_node = neethi_engine_serialize(resultant, env);
+ if (!s_node)
+ {
+ printf("Serializing failed\n");
+ return 0;
+ }
+ buff = axiom_node_to_string(s_node, env);
+ printf("\n%s", buff);
+ }
+ printf("Successful\n");
+ return 0;
+
+}
+
+neethi_policy_t *AXIS2_CALL
+merge_policylist(
+ axutil_array_list_t * arraylist,
+ const axutil_env_t * env)
+{
+ int i = 0;
+ neethi_policy_t *policy = NULL;
+ neethi_policy_t *result = NULL;
+
+ result = (neethi_policy_t *) axutil_array_list_get(arraylist, env, 0);
+ result =
+ (neethi_policy_t *) neethi_engine_get_normalize(env, AXIS2_FALSE,
+ result);
+
+ for (i = 1; i < axutil_array_list_size(arraylist, env); i++)
+ {
+ policy = (neethi_policy_t *) axutil_array_list_get(arraylist, env, i);
+ policy =
+ (neethi_policy_t *) neethi_engine_get_normalize(env, AXIS2_FALSE,
+ policy);
+ result = (neethi_policy_t *) neethi_engine_merge(env, policy, result);
+ }
+ return result;
+}
+
+axis2_status_t AXIS2_CALL
+om_node_serialize(
+ axiom_node_t * node,
+ const axutil_env_t * env)
+{
+
+ axiom_output_t *om_output = NULL;
+ axiom_xml_writer_t *writer = NULL;
+ axis2_char_t *output_buffer = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0,
+ AXIS2_XML_PARSER_TYPE_BUFFER);
+ om_output = axiom_output_create(env, writer);
+
+ status = axiom_node_serialize(node, env, om_output);
+ if (status != AXIS2_SUCCESS)
+ {
+ printf("\naxiom_node_serialize failed\n");
+ return 0;
+ }
+ else
+ printf("\naxiom_node_serialize success\n");
+ /* end serializing stuff */
+
+ /*axiom_node_free_tree(node1, env); */
+ output_buffer = (axis2_char_t *) axiom_xml_writer_get_xml(writer, env);
+
+ printf("\nend test_om_serialize\n");
+
+}
+
+axis2_status_t AXIS2_CALL
+load_policy_array(
+ axutil_array_list_t * arraylist,
+ axiom_node_t * root,
+ const axutil_env_t * env)
+{
+
+ axiom_element_t *root_ele = NULL;
+
+ if (root)
+ {
+ if (axiom_node_get_node_type(root, env) == AXIOM_ELEMENT)
+ {
+ root_ele =
+ (axiom_element_t *) axiom_node_get_data_element(root, env);
+ if (root_ele)
+ {
+ neethi_policy_t *neethi_policy = NULL;
+ neethi_policy = neethi_engine_get_policy(env, root, root_ele);
+ if (!neethi_policy)
+ {
+ printf("Policy Creation fails\n");
+ return AXIS2_FAILURE;
+ }
+ axutil_array_list_add(arraylist, env, neethi_policy);
+ }
+ }
+ }
+ return AXIS2_SUCCESS;
+}
+
+axiom_node_t *
+return_policy_element(
+ axis2_char_t * name,
+ const axutil_env_t * env,
+ axis2_char_t * wsdl_name)
+{
+ axiom_element_t *ele1 = NULL,
+ *ele2 = NULL;
+ axiom_document_t *document = NULL;
+ axiom_node_t *node1 = NULL,
+ *node2 = NULL,
+ *policy_node = NULL;
+ axiom_namespace_t *ns = NULL;
+ axiom_xml_reader_t *reader = NULL;
+ axiom_stax_builder_t *builder = NULL;
+ char *buffer = NULL;
+ axiom_attribute_t *attr = NULL;
+ axis2_char_t *value = NULL;
+ axis2_char_t *val = NULL;
+ axutil_hash_t *attr_hash = NULL;
+ axis2_char_t *xml_output = NULL;
+ axutil_hash_index_t *hi;
+
+/*
+ f = fopen(wsdl_name, "r");
+ if (!f)
+ return NULL;
+
+ reader = axiom_xml_reader_create_for_io(env, read_input, NULL , NULL, NULL);
+*/
+ reader = axiom_xml_reader_create_for_file(env, wsdl_name, NULL);
+
+ if (!reader)
+ {
+ printf("ERROR CREATING PULLPARSER");
+ return NULL;
+ }
+
+ builder = axiom_stax_builder_create(env, reader);
+
+ if (!builder)
+ {
+ printf("ERROR CREATING PULL PARSER");
+ return NULL;
+ }
+
+ document = axiom_stax_builder_get_document(builder, env);
+ if (!document)
+ return NULL;
+
+ node1 = axiom_document_get_root_element(document, env);
+ if (!node1)
+ {
+ printf(" root element null ");
+ axiom_stax_builder_free(builder, env);
+ return NULL;
+ }
+
+ do
+ {
+ node2 = axiom_document_build_next(document, env);
+
+ if (!node2)
+ break;
+
+ if (axiom_node_get_node_type(node2, env) == AXIOM_ELEMENT)
+ {
+ ele2 = (axiom_element_t *) axiom_node_get_data_element(node2, env);
+ attr_hash = axiom_element_get_all_attributes(ele2, env);
+ if (attr_hash)
+ {
+ hi = axutil_hash_first(attr_hash, env);
+ axutil_hash_this(hi, NULL, NULL, &attr);
+
+ if (axutil_strcmp(axiom_attribute_get_value(attr, env), name) ==
+ 0)
+ {
+ policy_node = node2;
+ }
+ }
+ }
+ }
+ while (node2);
+ return policy_node;
+}
+
+axis2_char_t *
+get_policy_ref(
+ axiom_node_t * node,
+ const axutil_env_t * env)
+{
+ axiom_element_t *policy_element = NULL;
+ axiom_children_iterator_t *children_iter = NULL;
+ axiom_node_t *child_node = NULL;
+ axutil_qname_t *qname = NULL;
+ axis2_char_t *value = NULL;
+ axis2_char_t *val = NULL;
+ axiom_attribute_t *attr = NULL;
+
+ policy_element = (axiom_element_t *) axiom_node_get_data_element(node, env);
+ children_iter = axiom_element_get_children(policy_element, env, node);
+
+ while (axiom_children_iterator_has_next(children_iter, env))
+ {
+ child_node = axiom_children_iterator_next(children_iter, env);
+ if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+ {
+ policy_element =
+ (axiom_element_t *) axiom_node_get_data_element(child_node,
+ env);
+
+ if (axutil_strcmp
+ (axiom_element_get_localname(policy_element, env),
+ "PolicyReference") == 0)
+ {
+ qname = axutil_qname_create(env, "URI", NULL, NULL);
+ attr = axiom_element_get_attribute(policy_element, env, qname);
+
+ if (attr)
+ {
+ value = axiom_attribute_get_value(attr, env);
+ val = axutil_string_substring_starting_at(value, 1);
+ return val;
+ }
+ }
+ }
+ }
+ return NULL;
+}
+
+void
+get_all_policy(
+ axis2_char_t * element_name,
+ const axutil_env_t * env,
+ axutil_array_list_t * policy_node_list,
+ axis2_char_t * wsdl_name)
+{
+ axutil_hash_t *attr_hash = NULL;
+ axutil_hash_index_t *hi = NULL;
+ axiom_element_t *element = NULL;
+ axiom_attribute_t *attribute = NULL;
+ axis2_char_t *attribute_val = NULL;
+ axiom_node_t *parent_policy_node = NULL,
+ *parent_node = NULL;
+
+ parent_node = return_policy_element(element_name, env, wsdl_name);
+ if (!parent_node)
+ return;
+
+ parent_policy_node =
+ return_policy_element(get_policy_ref(parent_node, env), env, wsdl_name);
+ axutil_array_list_add(policy_node_list, env, parent_policy_node);
+
+ if (axiom_node_get_node_type(parent_node, env) == AXIOM_ELEMENT)
+ {
+ element =
+ (axiom_element_t *) axiom_node_get_data_element(parent_node, env);
+ attr_hash = axiom_element_get_all_attributes(element, env);
+ if (attr_hash)
+ {
+ hi = axutil_hash_next(env, axutil_hash_first(attr_hash, env));
+ do
+ {
+ if (hi)
+ {
+ axutil_hash_this(hi, NULL, NULL, &attribute);
+ attribute_val = axiom_attribute_get_value(attribute, env);
+ attribute_val = axutil_rindex(attribute_val, ':');
+ attribute_val =
+ axutil_string_substring_starting_at(attribute_val, 1);
+ get_all_policy(attribute_val, env, policy_node_list,
+ wsdl_name);
+ hi = axutil_hash_next(env, hi);
+ }
+ }
+ while (hi);
+ }
+ }
+ return;
+}
diff --git a/neethi/test/policies/1.5symmetric_binding_policy.xml b/neethi/test/policies/1.5symmetric_binding_policy.xml
new file mode 100644
index 0000000..b660ac9
--- /dev/null
+++ b/neethi/test/policies/1.5symmetric_binding_policy.xml
@@ -0,0 +1,75 @@
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:RequireThumbprintReference/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssUsernameToken10/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportIssuedTokens/>
+ <sp:RequireClientEntropy/>
+ <sp:RequireServerEntropy/>
+ </wsp:Policy>
+ </sp:Trust10>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ <sp:Header Namespace="http://www.w3.org/2005/08/addressing"/>
+ </sp:SignedParts>
+ <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+ <rampc:User>Alice</rampc:User>
+ <rampc:TimeToLive>360</rampc:TimeToLive>
+ <rampc:EncryptionUser>a</rampc:EncryptionUser>
+ <rampc:PasswordType>Digest</rampc:PasswordType>
+ <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+ <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/bob_cert.cert</rampc:ReceiverCertificate>
+ <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/alice_cert.cert</rampc:Certificate>
+ <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/alice_key.pem</rampc:PrivateKey>
+ </rampc:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Endpoint-1A.xml
new file mode 100644
index 0000000..ff1a54f
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Endpoint-1A.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion59 marker="59" />
+ <pa:Assertion22 marker="22" />
+ <pa:Assertion2 marker="2" />
+ <pa:Assertion1 marker="1" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Endpoint-1B.xml
new file mode 100644
index 0000000..4df87e6
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Endpoint-1B.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion60 marker="60" />
+ <pa:Assertion31 marker="31" />
+ <pa:Assertion2 marker="2" />
+ <pa:Assertion1 marker="1" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Endpoint-2A.xml
new file mode 100644
index 0000000..1517682
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Endpoint-2A.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion62 marker="62" />
+ <pa:Assertion40 marker="40" />
+ <pa:Assertion12 marker="12" />
+ <pa:Assertion1 marker="1" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Endpoint-2B.xml
new file mode 100644
index 0000000..359f4bb
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Endpoint-2B.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion63 marker="63" />
+ <pa:Assertion49 marker="49" />
+ <pa:Assertion12 marker="12" />
+ <pa:Assertion1 marker="1" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..de6cf40
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion24 marker="24" />
+ <pa:Assertion5 marker="5" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..c88dafa
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-1A-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion33 marker="33" />
+ <pa:Assertion5 marker="5" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..2885491
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion28 marker="28" />
+ <pa:Assertion9 marker="9" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..187a7b7
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-1B-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion37 marker="37" />
+ <pa:Assertion9 marker="9" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..60e9575
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion42 marker="42" />
+ <pa:Assertion15 marker="15" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..59cc4fa
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-2A-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion51 marker="51" />
+ <pa:Assertion15 marker="15" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..ee38033
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion46 marker="46" />
+ <pa:Assertion19 marker="19" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..883dcda
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Input-in-Operation-2B-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion55 marker="55" />
+ <pa:Assertion19 marker="19" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..dfccd95
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion23 marker="23" />
+ <pa:Assertion4 marker="4" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..f86c59d
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-1A-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion31 marker="31" />
+ <pa:Assertion4 marker="4" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..1f39527
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion27 marker="27" />
+ <pa:Assertion8 marker="8" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..180e72f
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-1B-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion36 marker="36" />
+ <pa:Assertion8 marker="8" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..07efde6
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion41 marker="41" />
+ <pa:Assertion14 marker="14" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..071fe79
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-2A-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion50 marker="50" />
+ <pa:Assertion14 marker="14" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..2356e7e
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion45 marker="45" />
+ <pa:Assertion18 marker="18" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..2a1787b
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Operation-2B-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion54 marker="54" />
+ <pa:Assertion18 marker="18" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..084aa48
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion26 marker="26" />
+ <pa:Assertion7 marker="7" />
+ <pa:Assertion3 marker="3" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..7873554
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-1A-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion35 marker="35" />
+ <pa:Assertion7 marker="7" />
+ <pa:Assertion3 marker="3" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..83acbfb
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion30 marker="30" />
+ <pa:Assertion11 marker="11" />
+ <pa:Assertion3 marker="3" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..238a6dc
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-1B-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion39 marker="39" />
+ <pa:Assertion11 marker="11" />
+ <pa:Assertion3 marker="3" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..df84817
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion44 marker="44" />
+ <pa:Assertion17 marker="17" />
+ <pa:Assertion13 marker="13" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..83c6448
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-2A-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion53 marker="53" />
+ <pa:Assertion17 marker="17" />
+ <pa:Assertion13 marker="13" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..e448339
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion48 marker="48" />
+ <pa:Assertion21 marker="21" />
+ <pa:Assertion13 marker="13" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..f0332c8
--- /dev/null
+++ b/neethi/test/policies/Policy-for-OutFault-in-Operation-2B-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion57 marker="57" />
+ <pa:Assertion21 marker="21" />
+ <pa:Assertion13 marker="13" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..7bb10e5
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion25 marker="25" />
+ <pa:Assertion6 marker="6" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..76493bb
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-1A-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion34 marker="34" />
+ <pa:Assertion6 marker="6" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1A.xml b/neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1A.xml
new file mode 100644
index 0000000..f4734e7
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion29 marker="29" />
+ <pa:Assertion10 marker="10" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1B.xml b/neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1B.xml
new file mode 100644
index 0000000..4bffd4e
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-1B-in-relation-to-Endpoint-1B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion38 marker="38" />
+ <pa:Assertion10 marker="10" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..3cdbe39
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion43 marker="43" />
+ <pa:Assertion16 marker="16" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..54be84f
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-2A-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion52 marker="52" />
+ <pa:Assertion16 marker="16" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2A.xml b/neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2A.xml
new file mode 100644
index 0000000..a891bfc
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2A.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion47 marker="47" />
+ <pa:Assertion20 marker="20" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2B.xml b/neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2B.xml
new file mode 100644
index 0000000..4dfc80a
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Output-in-Operation-2B-in-relation-to-Endpoint-2B.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion56 marker="56" />
+ <pa:Assertion20 marker="20" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Service-1.xml b/neethi/test/policies/Policy-for-Service-1.xml
new file mode 100644
index 0000000..a94a159
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Service-1.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion58 marker="58" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/Policy-for-Service-2.xml b/neethi/test/policies/Policy-for-Service-2.xml
new file mode 100644
index 0000000..b57b6cf
--- /dev/null
+++ b/neethi/test/policies/Policy-for-Service-2.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
+ xmlns:pa="http://ws-policy.example.com/assertion" >
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <pa:Assertion61 marker="61" />
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/PolicyAttachments.wsdl b/neethi/test/policies/PolicyAttachments.wsdl
new file mode 100644
index 0000000..acf07c1
--- /dev/null
+++ b/neethi/test/policies/PolicyAttachments.wsdl
@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Round 2 test cases for testing effective policy
+ computations for policies attached to WSDL 20 policy subjects.
+
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+
+ -->
+
+<wsdl20:description xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl20="http://www.w3.org/2006/01/wsdl"
+ xmlns:wsoap="http://www.w3.org/2006/01/wsdl/soap"
+ xmlns:wsp="http://www.w3.org/ns/ws-policy"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:pa="http://ws-policy.example.com/assertion"
+ xmlns:s="http://schema.example.com/test"
+ targetNamespace="http://ws-policy.example.com/test"
+ xmlns:tns="http://ws-policy.example.com/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd
+ http://www.w3.org/2006/01/wsdl http://www.w3.org/2006/03/wsdl/wsdl20.xsd
+ http://www.w3.org/2006/01/wsdl/soap http://www.w3.org/2006/03/wsdl/soap.xsd
+ http://www.w3.org/ns/ws-policy http://www.w3.org/2002/ws/policy/ns/ws-policy">
+
+ <wsp:Policy wsu:Id="Policy1">
+ <pa:Assertion1 marker="1"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy2">
+ <pa:Assertion2 marker="2"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy3">
+ <pa:Assertion3 marker="3"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy4">
+ <pa:Assertion4 marker="4"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy5">
+ <pa:Assertion5 marker="5"/>
+ <wsp:PolicyReference URI="#Policy2"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy6">
+ <pa:Assertion6 marker="6"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy7">
+ <pa:Assertion7 marker="7"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy8">
+ <pa:Assertion8 marker="8"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy9">
+ <pa:Assertion9 marker="9"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy10">
+ <pa:Assertion10 marker="10"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy11">
+ <pa:Assertion11 marker="11"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy12">
+ <pa:Assertion12 marker="12"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy13">
+ <pa:Assertion13 marker="13"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy14">
+ <pa:Assertion14 marker="14"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy15">
+ <pa:Assertion15 marker="15"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy16">
+ <pa:Assertion16 marker="16"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy17">
+ <pa:Assertion17 marker="17"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy18">
+ <pa:Assertion18 marker="18"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy19">
+ <pa:Assertion19 marker="19"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy20">
+ <pa:Assertion20 marker="20"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy21">
+ <pa:Assertion21 marker="21"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy22">
+ <pa:Assertion22 marker="22"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy23">
+ <pa:Assertion23 marker="23"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy24">
+ <pa:Assertion24 marker="24"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy25">
+ <pa:Assertion25 marker="25"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy26">
+ <pa:Assertion26 marker="26"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy27">
+ <pa:Assertion27 marker="27"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy28">
+ <pa:Assertion28 marker="28"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy29">
+ <pa:Assertion29 marker="29"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy30">
+ <pa:Assertion30 marker="30"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy31">
+ <pa:Assertion31 marker="31"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy32">
+ <pa:Assertion32 marker="32"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy33">
+ <pa:Assertion33 marker="33"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy34">
+ <pa:Assertion34 marker="34"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy35">
+ <pa:Assertion35 marker="35"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy36">
+ <pa:Assertion36 marker="36"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy37">
+ <pa:Assertion37 marker="37"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy38">
+ <pa:Assertion38 marker="38"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy39">
+ <pa:Assertion39 marker="39"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy40">
+ <pa:Assertion40 marker="40"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy41">
+ <pa:Assertion41 marker="41"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy42">
+ <pa:Assertion42 marker="42"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy43">
+ <pa:Assertion43 marker="43"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy44">
+ <pa:Assertion44 marker="44"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy45">
+ <pa:Assertion45 marker="45"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy46">
+ <pa:Assertion46 marker="46"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy47">
+ <pa:Assertion47 marker="47"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy48">
+ <pa:Assertion48 marker="48"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy49">
+ <pa:Assertion49 marker="49"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy50">
+ <pa:Assertion50 marker="50"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy51">
+ <pa:Assertion51 marker="51"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy52">
+ <pa:Assertion52 marker="52"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy53">
+ <pa:Assertion53 marker="53"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy54">
+ <pa:Assertion54 marker="54"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy55">
+ <pa:Assertion55 marker="55"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy56">
+ <pa:Assertion56 marker="56"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy57">
+ <pa:Assertion57 marker="57"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy58">
+ <pa:Assertion58 marker="58"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy59">
+ <pa:Assertion59 marker="59"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy60">
+ <pa:Assertion60 marker="60"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy61">
+ <pa:Assertion61 marker="61"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy62">
+ <pa:Assertion62 marker="62"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy63">
+ <pa:Assertion63 marker="63"/>
+ </wsp:Policy>
+
+ <wsdl20:types>
+ <xsd:schema elementFormDefault="qualified" targetNamespace="http://schema.example.com/test">
+ <xsd:element name="SimpleRequest">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="request" nillable="true" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SimpleResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="response" nillable="true" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SimpleFault">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="fault" nillable="true" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ </wsdl20:types>
+
+ <wsdl20:interface name="Base-Interface">
+ <wsp:PolicyReference URI="#Policy1"></wsp:PolicyReference>
+ </wsdl20:interface>
+
+ <wsdl20:interface name="Interface-1" extends="tns:Base-Interface">
+ <wsp:PolicyReference URI="#Policy2"></wsp:PolicyReference>
+ <wsdl20:fault name="Fault-1" element="s:SimpleFault">
+ <wsp:PolicyReference URI="#Policy3"></wsp:PolicyReference>
+ </wsdl20:fault>
+ <wsdl20:operation name="Operation-1A" pattern="http://www.w3.org/2006/01/wsdl/in-out">
+ <wsp:PolicyReference URI="#Policy4"></wsp:PolicyReference>
+ <wsdl20:input element="s:SimpleRequest">
+ <wsp:PolicyReference URI="#Policy5"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output element="s:SimpleResponse">
+ <wsp:PolicyReference URI="#Policy6"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-1">
+ <wsp:PolicyReference URI="#Policy7"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ <wsdl20:operation name="Operation-1B" pattern="http://www.w3.org/2006/01/wsdl/in-out">
+ <wsp:PolicyReference URI="#Policy8"></wsp:PolicyReference>
+ <wsdl20:input element="s:SimpleRequest">
+ <wsp:PolicyReference URI="#Policy9"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output element="s:SimpleResponse">
+ <wsp:PolicyReference URI="#Policy10"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-1">
+ <wsp:PolicyReference URI="#Policy11"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ </wsdl20:interface>
+
+ <wsdl20:interface name="Interface-2" extends="tns:Base-Interface">
+ <wsp:PolicyReference URI="#Policy12"></wsp:PolicyReference>
+ <wsdl20:fault name="Fault-2" element="s:SimpleFault">
+ <wsp:PolicyReference URI="#Policy13"></wsp:PolicyReference>
+ </wsdl20:fault>
+ <wsdl20:operation name="Operation-2A" pattern="http://www.w3.org/2006/01/wsdl/in-out">
+ <wsp:PolicyReference URI="#Policy14"></wsp:PolicyReference>
+ <wsdl20:input element="s:SimpleRequest">
+ <wsp:PolicyReference URI="#Policy15"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output element="s:SimpleResponse">
+ <wsp:PolicyReference URI="#Policy16"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-2">
+ <wsp:PolicyReference URI="#Policy17"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ <wsdl20:operation name="Operation-2B" pattern="http://www.w3.org/2006/01/wsdl/in-out">
+ <wsp:PolicyReference URI="#Policy18"></wsp:PolicyReference>
+ <wsdl20:input element="s:SimpleRequest">
+ <wsp:PolicyReference URI="#Policy19"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output element="s:SimpleResponse">
+ <wsp:PolicyReference URI="#Policy20"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-2">
+ <wsp:PolicyReference URI="#Policy21"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ </wsdl20:interface>
+
+ <wsdl20:binding name="Binding-1A" interface="tns:Interface-1"
+ type="http://www.w3.org/2006/01/wsdl/soap"
+ wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
+ <wsp:PolicyReference URI="#Policy22"></wsp:PolicyReference>
+ <wsdl20:operation ref="tns:Operation-1A">
+ <wsp:PolicyReference URI="#Policy23"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy24"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy25"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-1">
+ <wsp:PolicyReference URI="#Policy26"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ <wsdl20:operation ref="tns:Operation-1B">
+ <wsp:PolicyReference URI="#Policy27"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy28"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy29"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-1">
+ <wsp:PolicyReference URI="#Policy30"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ </wsdl20:binding>
+
+ <wsdl20:binding name="Binding-1B" interface="tns:Interface-1"
+ type="http://www.w3.org/2006/01/wsdl/soap"
+ wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
+ <wsp:PolicyReference URI="#Policy31"></wsp:PolicyReference>
+ <wsdl20:operation ref="tns:Operation-1A">
+ <wsp:PolicyReference URI="#Policy32"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy33"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy34"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-1">
+ <wsp:PolicyReference URI="#Policy35"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ <wsdl20:operation ref="tns:Operation-1B">
+ <wsp:PolicyReference URI="#Policy36"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy37"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy38"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-1">
+ <wsp:PolicyReference URI="#Policy39"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ </wsdl20:binding>
+
+ <wsdl20:binding name="Binding-2A" interface="tns:Interface-2"
+ type="http://www.w3.org/2006/01/wsdl/soap"
+ wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
+ <wsp:PolicyReference URI="#Policy40"></wsp:PolicyReference>
+ <wsdl20:operation ref="tns:Operation-2A">
+ <wsp:PolicyReference URI="#Policy41"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy42"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy43"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-2">
+ <wsp:PolicyReference URI="#Policy44"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ <wsdl20:operation ref="tns:Operation-2B">
+ <wsp:PolicyReference URI="#Policy45"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy46"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy47"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-2">
+ <wsp:PolicyReference URI="#Policy48"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ </wsdl20:binding>
+
+ <wsdl20:binding name="Binding-2B" interface="tns:Interface-2"
+ type="http://www.w3.org/2006/01/wsdl/soap"
+ wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/">
+ <wsp:PolicyReference URI="#Policy49"></wsp:PolicyReference>
+ <wsdl20:operation ref="tns:Operation-2A">
+ <wsp:PolicyReference URI="#Policy50"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy51"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy52"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-2">
+ <wsp:PolicyReference URI="#Policy53"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ <wsdl20:operation ref="tns:Operation-2B">
+ <wsp:PolicyReference URI="#Policy54"></wsp:PolicyReference>
+ <wsdl20:input>
+ <wsp:PolicyReference URI="#Policy55"></wsp:PolicyReference>
+ </wsdl20:input>
+ <wsdl20:output>
+ <wsp:PolicyReference URI="#Policy56"></wsp:PolicyReference>
+ </wsdl20:output>
+ <wsdl20:outfault ref="tns:Fault-2">
+ <wsp:PolicyReference URI="#Policy57"></wsp:PolicyReference>
+ </wsdl20:outfault>
+ </wsdl20:operation>
+ </wsdl20:binding>
+
+ <wsdl20:service name="Service-1" interface="tns:Interface-1">
+ <wsp:PolicyReference URI="#Policy58"></wsp:PolicyReference>
+ <wsdl20:endpoint name="Endpoint-1A" binding="Binding-1A">
+ <wsp:PolicyReference URI="#Policy59"></wsp:PolicyReference>
+ </wsdl20:endpoint>
+ <wsdl20:endpoint name="Endpoint-1B" binding="Binding-1B">
+ <wsp:PolicyReference URI="#Policy60"></wsp:PolicyReference>
+ </wsdl20:endpoint>
+ </wsdl20:service>
+
+ <wsdl20:service name="Service-2" interface="tns:Interface-2">
+ <wsp:PolicyReference URI="#Policy61"></wsp:PolicyReference>
+ <wsdl20:endpoint name="Endpoint-2A" binding="Binding-2A">
+ <wsp:PolicyReference URI="#Policy62"></wsp:PolicyReference>
+ </wsdl20:endpoint>
+ <wsdl20:endpoint name="Endpoint-2B" binding="Binding-2A">
+ <wsp:PolicyReference URI="#Policy63"></wsp:PolicyReference>
+ </wsdl20:endpoint>
+ </wsdl20:service>
+
+</wsdl20:description>
diff --git a/neethi/test/policies/asymmetric_binding_policy.xml b/neethi/test/policies/asymmetric_binding_policy.xml
new file mode 100644
index 0000000..da136af
--- /dev/null
+++ b/neethi/test/policies/asymmetric_binding_policy.xml
@@ -0,0 +1,70 @@
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256Rsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature/>
+ <sp:EncryptBeforeSigning/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefEmbeddedToken/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ <sp:Header Namespace="http://www.w3.org/2005/08/addressing"/>
+ </sp:SignedParts>
+ <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+ <rampc:User>Alice</rampc:User>
+ <rampc:TimeToLive>360</rampc:TimeToLive>
+ <rampc:EncryptionUser>a</rampc:EncryptionUser>
+ <rampc:PasswordType>Digest</rampc:PasswordType>
+ <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+ <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/bob_cert.cert</rampc:ReceiverCertificate>
+ <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/alice_cert.cert</rampc:Certificate>
+ <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/alice_key.pem</rampc:PrivateKey>
+ </rampc:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/policies/rm-1.0.xml b/neethi/test/policies/rm-1.0.xml
new file mode 100644
index 0000000..353e1ba
--- /dev/null
+++ b/neethi/test/policies/rm-1.0.xml
@@ -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>
diff --git a/neethi/test/policies/rm-1.1.xml b/neethi/test/policies/rm-1.1.xml
new file mode 100644
index 0000000..6c60dbc
--- /dev/null
+++ b/neethi/test/policies/rm-1.1.xml
@@ -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>
diff --git a/neethi/test/policies/symmetric_binding_policy.xml b/neethi/test/policies/symmetric_binding_policy.xml
new file mode 100644
index 0000000..3db3ed8
--- /dev/null
+++ b/neethi/test/policies/symmetric_binding_policy.xml
@@ -0,0 +1,75 @@
+<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:RequireThumbprintReference/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssUsernameToken10/>
+ </wsp:Policy>
+ </sp:UsernameToken>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportIssuedTokens/>
+ <sp:RequireClientEntropy/>
+ <sp:RequireServerEntropy/>
+ </wsp:Policy>
+ </sp:Trust10>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ <sp:Header Namespace="http://www.w3.org/2005/08/addressing"/>
+ </sp:SignedParts>
+ <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+ <rampc:User>Alice</rampc:User>
+ <rampc:TimeToLive>360</rampc:TimeToLive>
+ <rampc:EncryptionUser>a</rampc:EncryptionUser>
+ <rampc:PasswordType>Digest</rampc:PasswordType>
+ <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+ <rampc:ReceiverCertificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/bob_cert.cert</rampc:ReceiverCertificate>
+ <rampc:Certificate>AXIS2C_HOME/bin/samples/rampart/keys/ahome/alice_cert.cert</rampc:Certificate>
+ <rampc:PrivateKey>AXIS2C_HOME/bin/samples/rampart/keys/ahome/alice_key.pem</rampc:PrivateKey>
+ </rampc:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/neethi/test/security_context_token/build.sh b/neethi/test/security_context_token/build.sh
new file mode 100644
index 0000000..6a5714d
--- /dev/null
+++ b/neethi/test/security_context_token/build.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+gcc security_context_token_test.c ../../../util/test/util/create_env.c -Werror -g -I$AXIS2C_HOME/include/axis2-1.2 -L$AXIS2C_HOME/lib -lneethi -laxutil -laxis2_axiom -laxis2_parser -o security_context_token
diff --git a/neethi/test/security_context_token/security_context_token_test.c b/neethi/test/security_context_token/security_context_token_test.c
new file mode 100644
index 0000000..6f320f3
--- /dev/null
+++ b/neethi/test/security_context_token/security_context_token_test.c
@@ -0,0 +1,54 @@
+#include <rp_security_context_token.h>
+#include "../../../util/test/util/create_env.h"
+
+axutil_env_t *env = NULL;
+rp_security_context_token_t * security_context_token = NULL;
+axis2_char_t * inclusion = NULL ;
+axis2_status_t status = AXIS2_FAILURE ;
+axis2_bool_t derivedkeys ;
+axis2_bool_t require_external_uri_ref;
+axis2_bool_t sc10_security_context_token;
+
+/** @brief test options
+ * build a om from a client options
+ */
+
+axis2_status_t test_security_context_token(axutil_env_t *env)
+{
+ security_context_token = rp_security_context_token_create(env);
+ inclusion = rp_security_context_token_get_inclusion(security_context_token,env);
+ printf("%s\n",inclusion);
+ status = rp_security_context_token_set_inclusion(security_context_token,env,inclusion);
+ if (status == AXIS2_SUCCESS)
+ printf("rp security context token set is success\n");
+ derivedkeys = rp_security_context_token_get_derivedkeys(security_context_token,env);
+ status = rp_security_context_token_set_derivedkeys(security_context_token,env,derivedkeys);
+ if (status == AXIS2_SUCCESS)
+ printf("rp security token derivedkeys set is success\n");
+ require_external_uri_ref = rp_security_context_token_get_require_external_uri_ref(security_context_token,env);
+ status = rp_security_context_token_set_require_external_uri_ref(security_context_token,env,require_external_uri_ref);
+ if (status == AXIS2_SUCCESS)
+ printf("rp security require external uri set is success\n");
+ sc10_security_context_token = rp_security_context_token_get_sc10_security_context_token(security_context_token,env);
+ status = rp_security_context_token_set_sc10_security_context_token(security_context_token,env,sc10_security_context_token);
+ if (status == AXIS2_SUCCESS)
+ printf("rp security sc10 security token set is success\n");
+ rp_security_context_token_increment_ref(security_context_token,env);
+ rp_security_context_token_free(security_context_token,env);
+ return AXIS2_SUCCESS;
+}
+int main()
+{
+ int status = AXIS2_SUCCESS;
+ env = create_environment();
+ status = test_security_context_token(env);
+ if(status == AXIS2_FAILURE)
+ {
+ printf(" test failed");
+ }
+ axutil_env_free(env);
+ return 0;
+}
+
+
+
diff --git a/neethi/test/test-policy.xml b/neethi/test/test-policy.xml
new file mode 100644
index 0000000..8e44f90
--- /dev/null
+++ b/neethi/test/test-policy.xml
@@ -0,0 +1,10 @@
+<wsp:Policy wsu:Id="Policy1">
+ <pa:Assertion1 marker="1"/>
+</wsp:Policy>
+ <wsp:Policy wsu:Id="Policy2">
+ <pa:Assertion2 marker="2"/>
+ </wsp:Policy>
+ <wsp:Policy wsu:Id="Policy3">
+ <pa:Assertion3 marker="3"/>
+ </wsp:Policy>
+
diff --git a/neethi/test/test-resources/different-level-policies.xml b/neethi/test/test-resources/different-level-policies.xml
new file mode 100644
index 0000000..de5a707
--- /dev/null
+++ b/neethi/test/test-resources/different-level-policies.xml
@@ -0,0 +1,109 @@
+<service name="sec_echo">
+ <parameter name="ServiceClass" locked="xsd:false">sec_echo</parameter>
+
+ <description>
+ This is a testing service , to test the system is working or not
+ </description>
+ <module ref="rampart"/>
+ <operation name="echoString">
+ <parameter name="wsamapping">http://example.com/ws/2004/09/policy/Test/EchoRequest</parameter>
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ <!--message label="in">
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ </message-->
+ <!--message label="out">
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ </message-->
+ </operation>
+
+ <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256Rsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <!--sp:EncryptSignature/-->
+ <!--sp:EncryptBeforeSigning/-->
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefEmbeddedToken/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <!--sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts-->
+ <!--sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts-->
+ <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+ <rampc:User>Bob</rampc:User>
+ <rampc:TimeToLive>360</rampc:TimeToLive>
+ <rampc:EncryptionUser>b</rampc:EncryptionUser>
+ <rampc:PasswordType>Digest</rampc:PasswordType>
+ <rampc:PasswordCallbackClass>/home/manjula/axis2/c/deploy/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
+ <rampc:ReceiverCertificate>/home/manjula/axis2/c/deploy/bin/samples/rampart/keys/bhome/alice_cert.cert</rampc:ReceiverCertificate>
+ <rampc:Certificate>/home/manjula/axis2/c/deploy/bin/samples/rampart/keys/bhome/bob_cert.cert</rampc:Certificate>
+ <rampc:PrivateKey>/home/manjula/axis2/c/deploy/bin/samples/rampart/keys/bhome/bob_key.pem</rampc:PrivateKey>
+ </rampc:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
diff --git a/neethi/test/test-resources/echo-services.xml b/neethi/test/test-resources/echo-services.xml
new file mode 100644
index 0000000..c7fc88b
--- /dev/null
+++ b/neethi/test/test-resources/echo-services.xml
@@ -0,0 +1,115 @@
+<service name="echo">
+ <parameter name="ServiceClass" locked="xsd:false">echo</parameter>
+
+ <description>
+ This is a testing service , to test the system is working or not
+ </description>
+
+ <operation name="echoString">
+ <parameter name="wsamapping" >http://ws.apache.org/axis2/c/samples/echoString</parameter>
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ <message label="in">
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ </message>
+ <message label="out">
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ </message>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/message-services-sc.xml b/neethi/test/test-resources/message-services-sc.xml
new file mode 100644
index 0000000..2f293df
--- /dev/null
+++ b/neethi/test/test-resources/message-services-sc.xml
@@ -0,0 +1,116 @@
+<service name="SecureService3">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ <message label="in">
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ </message>
+ <message label="out">
+ <wsp:Policy wsu:Id="SigEncrMessage" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:Policy>
+ </message>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/services-1.xml b/neethi/test/test-resources/services-1.xml
new file mode 100644
index 0000000..4c727d3
--- /dev/null
+++ b/neethi/test/test-resources/services-1.xml
@@ -0,0 +1,51 @@
+<service name="SecureService1">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="UTOverTransport" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:TransportToken>
+ <wsp:Policy>
+ <sp:HttpsToken RequireClientCertificate="false"/>
+ </wsp:Policy>
+ </sp:TransportToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ </wsp:Policy>
+ </sp:TransportBinding>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/services-2.xml b/neethi/test/test-resources/services-2.xml
new file mode 100644
index 0000000..ec80dd5
--- /dev/null
+++ b/neethi/test/test-resources/services-2.xml
@@ -0,0 +1,76 @@
+<service name="SecureService2">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigOnly" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/services-3.xml b/neethi/test/test-resources/services-3.xml
new file mode 100644
index 0000000..3d1bf60
--- /dev/null
+++ b/neethi/test/test-resources/services-3.xml
@@ -0,0 +1,88 @@
+<service name="SecureService3">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/services-4.xml b/neethi/test/test-resources/services-4.xml
new file mode 100644
index 0000000..537164f
--- /dev/null
+++ b/neethi/test/test-resources/services-4.xml
@@ -0,0 +1,89 @@
+<service name="SecureService4">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+<wsp:Policy wsu:Id="EncrSig" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptBeforeSigning />
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/services-5.xml b/neethi/test/test-resources/services-5.xml
new file mode 100644
index 0000000..64fcecb
--- /dev/null
+++ b/neethi/test/test-resources/services-5.xml
@@ -0,0 +1,89 @@
+<service name="SecureService5">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrDK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+</service>
diff --git a/neethi/test/test-resources/services-6.xml b/neethi/test/test-resources/services-6.xml
new file mode 100644
index 0000000..ff37936
--- /dev/null
+++ b/neethi/test/test-resources/services-6.xml
@@ -0,0 +1,86 @@
+<service name="SecureService6">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
diff --git a/neethi/test/test-resources/services-7.xml b/neethi/test/test-resources/services-7.xml
new file mode 100644
index 0000000..b476623
--- /dev/null
+++ b/neethi/test/test-resources/services-7.xml
@@ -0,0 +1,89 @@
+<service name="SecureService7">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15DK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
diff --git a/neethi/test/test-resources/services-8.xml b/neethi/test/test-resources/services-8.xml
new file mode 100644
index 0000000..5e67653
--- /dev/null
+++ b/neethi/test/test-resources/services-8.xml
@@ -0,0 +1,89 @@
+<service name="SecureService8">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15DK" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>useReqSigCert</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
diff --git a/neethi/test/test-resources/services-9.xml b/neethi/test/test-resources/services-9.xml
new file mode 100644
index 0000000..fbf1eda
--- /dev/null
+++ b/neethi/test/test-resources/services-9.xml
@@ -0,0 +1,87 @@
+<service name="SecureService9">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature />
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>
diff --git a/neethi/test/test-resources/services-sc-1.xml b/neethi/test/test-resources/services-sc-1.xml
new file mode 100644
index 0000000..1bd254f
--- /dev/null
+++ b/neethi/test/test-resources/services-sc-1.xml
@@ -0,0 +1,176 @@
+<service name="SecureServiceSC1">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+ <module ref="rahas"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SecConvPolicy1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:BootstrapPolicy>
+ <wsp:Policy wsu:Id="SigEncrTripleDesRSA15" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sp:BootstrapPolicy>
+ </wsp:Policy>
+ </sp:SecureConversationToken>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic256/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Lax/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportIssuedTokens/>
+ <sp:RequireClientEntropy/>
+ <sp:RequireServerEntropy/>
+ </wsp:Policy>
+ </sp:Trust10>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>alice</ramp:user>
+ <ramp:encryptionUser>bob</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <parameter name="sct-issuer-config">
+ <sct-issuer-config>
+ <cryptoProperties>
+ <crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>
+ <property name="org.apache.ws.security.crypto.merlin.file">sts.jks</property>
+ <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>
+ </crypto>
+ </cryptoProperties>
+ <addRequestedAttachedRef />
+ <addRequestedUnattachedRef />
+
+ <!--
+ Key computation mechanism
+ 1 - Use Request Entropy
+ 2 - Provide Entropy
+ 3 - Use Own Key
+ -->
+ <keyComputation>3</keyComputation>
+
+ <!--
+ proofKeyType element is valid only if the keyComputation is set to 3
+ i.e. Use Own Key
+
+ Valid values are: EncryptedKey & BinarySecret
+ -->
+ <proofKeyType>BinarySecret</proofKeyType>
+ </sct-issuer-config>
+ </parameter>
+
+ <parameter name="token-canceler-config">
+ <token-canceler-config>
+ <!--<proofToken>EncryptedKey</proofToken>-->
+ <!--<cryptoProperties>sctIssuer.properties</cryptoProperties>-->
+ <!--<addRequestedAttachedRef />-->
+ </token-canceler-config>
+ </parameter>
+
+
+</service>
diff --git a/neethi/test/test-resources/services-sc-2.xml b/neethi/test/test-resources/services-sc-2.xml
new file mode 100644
index 0000000..2d0febe
--- /dev/null
+++ b/neethi/test/test-resources/services-sc-2.xml
@@ -0,0 +1,186 @@
+<service name="SecureServiceSC2">
+
+ <module ref="addressing"/>
+ <module ref="rampart"/>
+ <module ref="rahas"/>
+
+ <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+ <operation name="echo">
+ <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <actionMapping>urn:echo</actionMapping>
+ </operation>
+
+ <wsp:Policy wsu:Id="SecConvPolicy2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:BootstrapPolicy>
+ <wsp:Policy>
+ <sp:EncryptedParts>
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <sp:SymmetricBinding>
+ <wsp:Policy>
+ <sp:ProtectionToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:RequireDerivedKeys/>
+ <sp:RequireThumbprintReference/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128Rsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:EndorsingSupportingTokens>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:RequireThumbprintReference/>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:EndorsingSupportingTokens>
+ <sp:Wss11>
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ <sp:RequireSignatureConfirmation/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:Trust10>
+ <wsp:Policy>
+ <sp:MustSupportIssuedTokens/>
+ <sp:RequireClientEntropy/>
+ <sp:RequireServerEntropy/>
+ </wsp:Policy>
+ </sp:Trust10>
+ </wsp:Policy>
+ </sp:BootstrapPolicy>
+ </wsp:Policy>
+ </sp:SecureConversationToken>
+ </wsp:Policy>
+ </sp:ProtectionToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:Basic128Rsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:EncryptSignature/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:SymmetricBinding>
+ <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ <sp:MustSupportRefThumbprint/>
+ <sp:MustSupportRefEncryptedKey/>
+ </wsp:Policy>
+ </sp:Wss11>
+ <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportIssuedTokens/>
+ <sp:RequireClientEntropy/>
+ <sp:RequireServerEntropy/>
+ </wsp:Policy>
+ </sp:Trust10>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>bob</ramp:user>
+ <ramp:encryptionUser>alice</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">store.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+
+ <parameter name="sct-issuer-config">
+ <sct-issuer-config>
+ <cryptoProperties>
+ <crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>
+ <property name="org.apache.ws.security.crypto.merlin.file">sts.jks</property>
+ <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>
+ </crypto>
+ </cryptoProperties>
+ <addRequestedAttachedRef />
+ <addRequestedUnattachedRef />
+
+ <!--
+ Key computation mechanism
+ 1 - Use Request Entropy
+ 2 - Provide Entropy
+ 3 - Use Own Key
+ -->
+ <keyComputation>3</keyComputation>
+
+ <!--
+ proofKeyType element is valid only if the keyComputation is set to 3
+ i.e. Use Own Key
+
+ Valid values are: EncryptedKey & BinarySecret
+ -->
+ <proofKeyType>BinarySecret</proofKeyType>
+ </sct-issuer-config>
+ </parameter>
+
+ <parameter name="token-canceler-config">
+ <token-canceler-config>
+ <!--<proofToken>EncryptedKey</proofToken>-->
+ <!--<cryptoProperties>sctIssuer.properties</cryptoProperties>-->
+ <!--<addRequestedAttachedRef />-->
+ </token-canceler-config>
+ </parameter>
+
+
+</service>
diff --git a/neethi/test/test.c b/neethi/test/test.c
new file mode 100644
index 0000000..9585599
--- /dev/null
+++ b/neethi/test/test.c
@@ -0,0 +1,239 @@
+#include <axiom.h>
+#include <axutil_utils.h>
+#include <axutil_env.h>
+#include <axutil_log_default.h>
+#include <axutil_error_default.h>
+#include <stdio.h>
+#include <axiom_xml_reader.h>
+#include <neethi_engine.h>
+#include <axutil_array_list.h>
+
+axis2_status_t AXIS2_CALL om_node_serialize(
+ axiom_node_t * node,
+ const axutil_env_t * env);
+
+int
+main(
+ int argc,
+ char **argv)
+{
+ /*axutil_allocator_t *allocator = axutil_allocator_init(NULL);
+ axutil_error_t *error = axutil_error_create(allocator);
+ const axutil_env_t *env = axutil_env_create_with_error(allocator, error);*/
+ const axutil_env_t *env = NULL;
+ axiom_xml_reader_t *reader = NULL;
+ axiom_stax_builder_t *builder = NULL;
+ axiom_document_t *document = NULL;
+ axiom_node_t *root = NULL;
+ axiom_element_t *root_ele = NULL;
+
+ env = axutil_env_create_all("test.log", AXIS2_LOG_LEVEL_TRACE);
+
+ reader = axiom_xml_reader_create_for_file(env, argv[1], NULL);
+
+ if (!reader)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+ AXIS2_FAILURE);
+ printf("xml reader creation failed\n");
+ return 0;
+ }
+
+ builder = axiom_stax_builder_create(env, reader);
+ if (!builder)
+ {
+ axiom_xml_reader_free(reader, env);
+ printf("Builder creation failed\n");
+ return 0;
+ }
+ document = axiom_stax_builder_get_document(builder, env);
+ if (!document)
+ {
+ axiom_stax_builder_free(builder, env);
+ printf("Document creation failed\n");
+ return 0;
+ }
+
+ /*root = axiom_document_get_root_element(document, env); */
+ root = axiom_document_build_all(document, env);
+ if (!root)
+ {
+ axiom_stax_builder_free(builder, env);
+ return 0;
+ }
+
+ if (root)
+ {
+ if (axiom_node_get_node_type(root, env) == AXIOM_ELEMENT)
+ {
+ root_ele =
+ (axiom_element_t *) axiom_node_get_data_element(root, env);
+ if (root_ele)
+ {
+ neethi_policy_t *neethi_policy = NULL;
+ neethi_policy = neethi_engine_get_policy(env, root, root_ele);
+ if (!neethi_policy)
+ {
+ printf("Policy Creation fails\n");
+ return 0;
+ }
+
+ if(neethi_policy)
+ {
+ axis2_char_t *id = NULL;
+ axis2_char_t *name = NULL;
+
+ id = neethi_policy_get_id(neethi_policy, env);
+ if(id)
+ {
+ printf("Id is : %s\n", id);
+ }
+ name = neethi_policy_get_name(neethi_policy, env);
+ if(name)
+ {
+ printf("Name is : %s\n", name);
+ }
+ neethi_policy_free(neethi_policy, env);
+ neethi_policy = NULL;
+
+ printf("Successful \n");
+ }
+
+ /*else
+ {
+ axiom_node_t *s_node = NULL;
+ s_node = neethi_engine_serialize(neethi_policy, env);
+ if (!s_node)
+ {
+ printf("Serializing failed\n");
+ return 0;
+ }
+ if (om_node_serialize(s_node, env) != AXIS2_SUCCESS)
+ return 0;
+ }*/
+ }
+ }
+ }
+
+ if(builder)
+ {
+ axiom_stax_builder_free(builder, env);
+ builder = NULL;
+ }
+
+ axutil_env_free((axutil_env_t *)env);
+ env = NULL;
+
+ printf("Successful\n");
+ return 0;
+
+}
+
+axis2_status_t AXIS2_CALL
+om_node_serialize(
+ axiom_node_t * node,
+ const axutil_env_t * env)
+{
+
+ axiom_output_t *om_output = NULL;
+ axiom_xml_writer_t *writer = NULL;
+ axis2_char_t *output_buffer = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ writer = axiom_xml_writer_create_for_memory(env, NULL, AXIS2_TRUE, 0,
+ AXIS2_XML_PARSER_TYPE_BUFFER);
+ om_output = axiom_output_create(env, writer);
+
+ status = axiom_node_serialize(node, env, om_output);
+ if (status != AXIS2_SUCCESS)
+ {
+ printf("\naxiom_node_serialize failed\n");
+ return 0;
+ }
+ else
+ printf("\naxiom_node_serialize success\n");
+ /* end serializing stuff */
+
+ /*axiom_node_free_tree(node1, environment); */
+ output_buffer = (axis2_char_t *) axiom_xml_writer_get_xml(writer, env);
+
+ printf("\nend test_om_serialize\n");
+
+ return AXIS2_SUCCESS;
+
+}
+
+axutil_array_list_t *AXIS2_CALL
+load_policy_array(
+ int argc,
+ char **argv,
+ const axutil_env_t * env)
+{
+
+ axiom_xml_reader_t *reader = NULL;
+ axiom_stax_builder_t *builder = NULL;
+ axiom_document_t *document = NULL;
+ axiom_node_t *root = NULL;
+ axiom_element_t *root_ele = NULL;
+ int i = 0;
+ axutil_array_list_t *arraylist = NULL;
+
+ arraylist = axutil_array_list_create(env, 0);
+
+ for (i = 1; i < argc; i++)
+ {
+ reader = axiom_xml_reader_create_for_file(env, argv[i], NULL);
+
+ if (!reader)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
+ AXIS2_FAILURE);
+ printf("xml reader creation failed\n");
+ return NULL;
+ }
+
+ builder = axiom_stax_builder_create(env, reader);
+ if (!builder)
+ {
+ axiom_xml_reader_free(reader, env);
+ printf("Builder creation failed\n");
+ return NULL;
+ }
+ document = axiom_stax_builder_get_document(builder, env);
+ if (!document)
+ {
+ axiom_stax_builder_free(builder, env);
+ printf("Document creation failed\n");
+ return NULL;
+ }
+
+ /*root = axiom_document_get_root_element(document, env); */
+ root = axiom_document_build_all(document, env);
+ if (!root)
+ {
+ axiom_stax_builder_free(builder, env);
+ return NULL;
+ }
+ if (root)
+ {
+ if (axiom_node_get_node_type(root, env) == AXIOM_ELEMENT)
+ {
+ root_ele =
+ (axiom_element_t *) axiom_node_get_data_element(root, env);
+ if (root_ele)
+ {
+ neethi_policy_t *neethi_policy = NULL;
+ neethi_policy =
+ neethi_engine_get_policy(env, root, root_ele);
+ if (!neethi_policy)
+ {
+ printf("Policy Creation fails\n");
+ return NULL;
+ }
+ axutil_array_list_add(arraylist, env, neethi_policy);
+ }
+ }
+ }
+ }
+ return arraylist;
+}