You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by ma...@apache.org on 2007/06/25 06:13:05 UTC
svn commit: r550337 - in
/webservices/rampart/trunk/c/samples/client/sec_echo: Makefile.am echo.c
echo_helper.c
Author: manjula
Date: Sun Jun 24 21:13:04 2007
New Revision: 550337
URL: http://svn.apache.org/viewvc?view=rev&rev=550337
Log:
Removing echo_helper.c and using policy setting functions in svc_client.
Removed:
webservices/rampart/trunk/c/samples/client/sec_echo/echo_helper.c
Modified:
webservices/rampart/trunk/c/samples/client/sec_echo/Makefile.am
webservices/rampart/trunk/c/samples/client/sec_echo/echo.c
Modified: webservices/rampart/trunk/c/samples/client/sec_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sec_echo/Makefile.am?view=diff&rev=550337&r1=550336&r2=550337
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/Makefile.am (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/Makefile.am Sun Jun 24 21:13:04 2007
@@ -5,7 +5,7 @@
data_DATA= README.txt update_n_run.sh deploy_client_repo.sh
#samplesdir=$(prefix)/samples/client/echo
#samples_DATA=echo.c README.txt Makefile.am Makefile.in
-echo_SOURCES = echo.c echo_helper.c
+echo_SOURCES = echo.c
echo_LDADD = $(LDFLAGS) \
-L$(AXIS2C_HOME)/lib \
@@ -21,7 +21,7 @@
$(LIBXML2_LIBS)
INCLUDES = @AXIS2INC@ \
- -I$(AXIS2C_HOME)/include/neethi-0.1 \
+ -I$(AXIS2C_HOME)/include \
-I ../../../include
EXTRA_DIST = README.txt
Modified: webservices/rampart/trunk/c/samples/client/sec_echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sec_echo/echo.c?view=diff&rev=550337&r1=550336&r2=550337
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/echo.c (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/echo.c Sun Jun 24 21:13:04 2007
@@ -21,7 +21,8 @@
#include <axiom_soap.h>
#include <axis2_client.h>
#include <rampart_constants.h>
-#include "echo_helper.h"
+#include <neethi_util.h>
+#include <neethi_policy.h>
axiom_node_t *
build_om_payload_for_echo_svc(const axutil_env_t *env);
@@ -40,6 +41,8 @@
axis2_status_t status = AXIS2_FAILURE;
/* Set up the environment */
env = axutil_env_create_all("echo.log", AXIS2_LOG_LEVEL_TRACE);
+ neethi_policy_t *policy = NULL;
+ axis2_char_t *file_name = NULL;
/* Set end point reference of echo service */
address = "http://localhost:9090/axis2/services/echo";
@@ -111,7 +114,30 @@
/* Set service client options */
axis2_svc_client_set_options(svc_client, env, options);
- status = echo_helper_set_policy(svc_client, client_home, env);
+ /*status = echo_helper_set_policy(svc_client, client_home, env);*/
+
+ if(client_home)
+ {
+ file_name = axutil_stracat(env, client_home, "policy.xml" );
+ }
+ else
+ {
+ printf("Client Home not Specified\n");
+ printf("echo client invoke FAILED!\n");
+ return 0;
+ }
+
+
+ policy = neethi_util_create_policy_from_file(env, file_name);
+
+ if(!policy)
+ {
+ printf("Policy creation failed from the file.\n");
+ printf("echo client invoke FAILED!\n");
+ return 0;
+ }
+
+ status = axis2_svc_client_set_policy(svc_client, env, policy);
if(status == AXIS2_FAILURE)
{