axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kausha...@apache.org
Subject svn commit: r504438 - in /webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens: Makefile.am token_ds_reference.c token_transforms.c
Date Wed, 07 Feb 2007 05:26:47 GMT
Author: kaushalye
Date: Tue Feb  6 21:26:46 2007
New Revision: 504438

URL: http://svn.apache.org/viewvc?view=rev&rev=504438
Log:
Adding ds:Reference token 

Added:
    webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_ds_reference.c
Modified:
    webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am
    webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_transforms.c

Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am?view=diff&rev=504438&r1=504437&r2=504438
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/Makefile.am Tue Feb  6 21:26:46
2007
@@ -7,7 +7,7 @@
                         token_x509_issuer_name.c token_x509_serial_number.c token_security_token_reference.c
\
 						token_embedded.c token_reference.c token_signature_value.c token_signed_info.c \
 						token_c14n_method.c token_signature_method.c token_digest_method.c token_digest_value.c
\
-						token_transform.c token_transforms.c token_signature.c
+						token_transform.c token_transforms.c token_signature.c token_ds_reference.c
 
 liboxstokens_la_LIBADD  =../../../../util/src/libaxis2_util.la \
 			            ../../../../axiom/src/om/libaxis2_axiom.la 

Added: webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_ds_reference.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_ds_reference.c?view=auto&rev=504438
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_ds_reference.c (added)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_ds_reference.c Tue Feb  6
21:26:46 2007
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include <oxs_constants.h>
+#include <oxs_error.h>
+#include <oxs_token_ds_reference.h>
+#include <axiom_attribute.h>
+#include <axiom_element.h>
+
+
+AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+oxs_token_build_ds_reference_element(const axis2_env_t *env,
+        axiom_node_t *parent,
+        axis2_char_t *id,
+        axis2_char_t *uri,
+        axis2_char_t *type)
+{
+    axiom_node_t *ds_reference_node = NULL;
+    axiom_element_t *ds_reference_ele = NULL;
+    int ret;
+    axiom_namespace_t *ns_obj = NULL;
+
+    ns_obj = axiom_namespace_create(env, OXS_DSIG_NS,
+            OXS_DS);
+
+    ds_reference_ele = axiom_element_create(env, parent, OXS_NODE_REFERENCE, ns_obj, &ds_reference_node);
+    if (!ds_reference_ele)
+    {
+        oxs_error(env, ERROR_LOCATION,
+                OXS_ERROR_ELEMENT_FAILED, "Error creating ds:Reference element");
+        return NULL;
+    }
+
+    if(id){
+        axiom_attribute_t *id_attr = NULL;
+        id_attr =  axiom_attribute_create(env, OXS_ATTR_ID , id, NULL);
+        ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(ds_reference_ele, env, id_attr, ds_reference_node);
+    }
+
+    if(uri){
+        axiom_attribute_t *uri_attr = NULL;
+        uri_attr =  axiom_attribute_create(env, OXS_ATTR_URI , uri, NULL);
+        ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(ds_reference_ele, env, uri_attr, ds_reference_node);
+    }
+    
+    if(type){
+        axiom_attribute_t *type_attr = NULL;
+        type_attr =  axiom_attribute_create(env, OXS_ATTR_TYPE , type, NULL);
+        ret = AXIOM_ELEMENT_ADD_ATTRIBUTE(ds_reference_ele, env, type_attr, ds_reference_node);
+    }
+
+    return ds_reference_node;
+}
+
+

Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_transforms.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_transforms.c?view=diff&rev=504438&r1=504437&r2=504438
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_transforms.c (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/tokens/token_transforms.c Tue Feb  6 21:26:46
2007
@@ -24,8 +24,7 @@
 
 AXIS2_EXTERN axiom_node_t* AXIS2_CALL
 oxs_token_build_transforms_element(const axis2_env_t *env,
-        axiom_node_t *parent
-                                )
+        axiom_node_t *parent)
 {
     axiom_node_t *transforms_node = NULL;
     axiom_element_t *transforms_ele = NULL;
@@ -45,4 +44,5 @@
 
     return transforms_node;
 }
+
 



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


Mime
View raw message