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 sh...@apache.org on 2009/10/30 12:34:30 UTC
svn commit: r831270 - in /webservices/rampart/trunk/c: build/win32/
samples/client/ samples/client/issued_token/ samples/client/saml_echo/
samples/client/saml_protect/ samples/client/sec_echo/ samples/data/
samples/secpolicy/
Author: shankar
Date: Fri Oct 30 11:34:29 2009
New Revision: 831270
URL: http://svn.apache.org/viewvc?rev=831270&view=rev
Log:
Fix for RAMPARTC-138
Removing client_repo creation
Removed:
webservices/rampart/trunk/c/samples/client/deploy_client_repo.bat
webservices/rampart/trunk/c/samples/client/deploy_client_repo.sh
webservices/rampart/trunk/c/samples/data/client_axis2.xml
Modified:
webservices/rampart/trunk/c/build/win32/deploy_rampart.bat
webservices/rampart/trunk/c/samples/client/Makefile.am
webservices/rampart/trunk/c/samples/client/issued_token/echo.c
webservices/rampart/trunk/c/samples/client/saml_echo/echo.c
webservices/rampart/trunk/c/samples/client/saml_echo/update_n_run.bat
webservices/rampart/trunk/c/samples/client/saml_protect/echo.c
webservices/rampart/trunk/c/samples/client/saml_protect/update_n_run.bat
webservices/rampart/trunk/c/samples/client/sec_echo/echo.c
webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.bat
webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.sh
webservices/rampart/trunk/c/samples/data/Makefile.am
webservices/rampart/trunk/c/samples/secpolicy/deploy.bat
webservices/rampart/trunk/c/samples/secpolicy/deploy.sh
Modified: webservices/rampart/trunk/c/build/win32/deploy_rampart.bat
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/build/win32/deploy_rampart.bat?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/build/win32/deploy_rampart.bat (original)
+++ webservices/rampart/trunk/c/build/win32/deploy_rampart.bat Fri Oct 30 11:34:29 2009
@@ -10,10 +10,6 @@
xcopy .\services %AXIS2C_HOME%\services /E /I /Y /S
copy .\samples\src\rampartc\data\server_axis2.xml %AXIS2C_HOME%\axis2.xml
-cd .\samples\src\rampartc\client
-deploy_client_repo.bat
-cd ..\..\..\..\
-
echo -------------------------------------------------------------------------
echo Rampart deployed
echo -------------------------------------------------------------------------
Modified: webservices/rampart/trunk/c/samples/client/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/Makefile.am?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/Makefile.am (original)
+++ webservices/rampart/trunk/c/samples/client/Makefile.am Fri Oct 30 11:34:29 2009
@@ -1,3 +1,2 @@
TESTS =
SUBDIRS = sec_echo sts_client saml_echo issued_token saml_protect
-EXTRA_DIST = deploy_client_repo.bat deploy_client_repo.sh
Modified: webservices/rampart/trunk/c/samples/client/issued_token/echo.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/issued_token/echo.c?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/issued_token/echo.c (original)
+++ webservices/rampart/trunk/c/samples/client/issued_token/echo.c Fri Oct 30 11:34:29 2009
@@ -154,7 +154,7 @@
payload = build_om_payload_for_echo_svc(env);
/*If not engaged in the client's axis2.xml, uncomment this line*/
- /*axis2_svc_client_engage_module(svc_client, env, "rampart");*/
+ axis2_svc_client_engage_module(svc_client, env, "rampart");
/* Send request */
ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
Modified: webservices/rampart/trunk/c/samples/client/saml_echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/saml_echo/echo.c?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/saml_echo/echo.c (original)
+++ webservices/rampart/trunk/c/samples/client/saml_echo/echo.c Fri Oct 30 11:34:29 2009
@@ -151,7 +151,7 @@
payload = build_om_payload_for_echo_svc(env);
/*If not engaged in the client's axis2.xml, uncomment this line*/
- /*axis2_svc_client_engage_module(svc_client, env, "rampart");*/
+ axis2_svc_client_engage_module(svc_client, env, "rampart");
/* Send request */
ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
Modified: webservices/rampart/trunk/c/samples/client/saml_echo/update_n_run.bat
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/saml_echo/update_n_run.bat?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/saml_echo/update_n_run.bat (original)
+++ webservices/rampart/trunk/c/samples/client/saml_echo/update_n_run.bat Fri Oct 30 11:34:29 2009
@@ -1,10 +1,6 @@
@echo off
rem if your client repository is different, change the value.
-set CLIENT_REPO=%AXIS2C_HOME%\client_repo
-
-rem INSTALL MODULE to make sure that both server and client have the same module.
-echo "Copying latest module to client_repo"
-xcopy /E /Y /I "%AXIS2C_HOME%\modules\rampart" "%CLIENT_REPO%\modules\rampart"
+set CLIENT_REPO=%AXIS2C_HOME%
%AXIS2C_HOME%\samples\bin\rampartc\saml_echo.exe http://localhost:9090/axis2/services/sec_echo/echoString %CLIENT_REPO%
Modified: webservices/rampart/trunk/c/samples/client/saml_protect/echo.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/saml_protect/echo.c?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/saml_protect/echo.c (original)
+++ webservices/rampart/trunk/c/samples/client/saml_protect/echo.c Fri Oct 30 11:34:29 2009
@@ -184,7 +184,7 @@
payload = build_om_payload_for_echo_svc(env);
/*If not engaged in the client's axis2.xml, uncomment this line*/
- /*axis2_svc_client_engage_module(svc_client, env, "rampart");*/
+ axis2_svc_client_engage_module(svc_client, env, "rampart");
/* Send request */
ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
Modified: webservices/rampart/trunk/c/samples/client/saml_protect/update_n_run.bat
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/saml_protect/update_n_run.bat?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/saml_protect/update_n_run.bat (original)
+++ webservices/rampart/trunk/c/samples/client/saml_protect/update_n_run.bat Fri Oct 30 11:34:29 2009
@@ -1,10 +1,6 @@
@echo off
rem if your client repository is different, change the value.
-set CLIENT_REPO=%AXIS2C_HOME%\client_repo
-
-rem INSTALL MODULE to make sure that both server and client have the same module.
-echo "Copying latest module to client_repo"
-xcopy /E /Y /I "%AXIS2C_HOME%\modules\rampart" "%CLIENT_REPO%\modules\rampart"
+set CLIENT_REPO=%AXIS2C_HOME%
%AXIS2C_HOME%\samples\bin\rampartc\saml_protect_echo.exe http://localhost:9090/axis2/services/sec_echo/echoString %CLIENT_REPO%
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?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/echo.c (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/echo.c Fri Oct 30 11:34:29 2009
@@ -26,13 +26,16 @@
#include <axis2_addr.h>
axiom_node_t *
-build_om_payload_for_echo_svc(const axutil_env_t *env);
+build_om_payload_for_echo_svc(
+ const axutil_env_t *env);
axiom_node_t *
-build_om_payload_for_echo_svc_interop(const axutil_env_t *env);
+build_om_payload_for_echo_svc_interop(
+ const axutil_env_t *env);
-axiom_node_t *
-build_om_programatically_mtom(const axutil_env_t * env);
+axiom_node_t *
+build_om_programatically_mtom(
+ const axutil_env_t * env);
int
main(
@@ -158,7 +161,7 @@
/*axis2_options_set_enable_mtom(options, env, AXIS2_TRUE);*/
/*If not engaged in the client's axis2.xml, uncomment this line*/
- /*axis2_svc_client_engage_module(svc_client, env, "rampart");*/
+ axis2_svc_client_engage_module(svc_client, env, "rampart");
/* Send request */
ret_node = axis2_svc_client_send_receive(svc_client, env, payload);
@@ -218,7 +221,8 @@
/* build SOAP request message content using OM */
axiom_node_t *
-build_om_payload_for_echo_svc(const axutil_env_t *env)
+build_om_payload_for_echo_svc(
+ const axutil_env_t *env)
{
axiom_node_t *echo_om_node = NULL;
axiom_element_t* echo_om_ele = NULL;
@@ -229,23 +233,25 @@
ns1 = axiom_namespace_create(env, "http://ws.apache.org/rampart/c/samples", "ns1");
/*ns1 = axiom_namespace_create(env, "http://echo.services.wsas.wso2.org", "ns1");*/
- echo_om_ele = axiom_element_create(env, NULL, "echoIn", ns1, &echo_om_node);
-
+ echo_om_ele = axiom_element_create(env, NULL, "echoIn", ns1, &echo_om_node);
+
text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node);
axiom_element_set_text(text_om_ele, env, "Hello", text_om_node);
om_str = axiom_node_to_string(echo_om_node, env);
- if (om_str){
+ if(om_str)
+ {
printf("\nSending OM : %s\n", om_str);
AXIS2_FREE(env->allocator, om_str);
- om_str = NULL;
+ om_str = NULL;
}
return echo_om_node;
}
/* build SOAP request message content using OM (for java interop)*/
axiom_node_t *
-build_om_payload_for_echo_svc_interop(const axutil_env_t *env)
+build_om_payload_for_echo_svc_interop(
+ const axutil_env_t *env)
{
axiom_node_t *ping_request_om_node = NULL;
axiom_element_t* ping_request_om_ele = NULL;
@@ -259,82 +265,78 @@
ns0 = axiom_namespace_create(env, "http://InteropBaseAddress/interop", "ns0");
ns1 = axiom_namespace_create(env, "http://xmlsoap.org/Ping", "ns1");
- ping_request_om_ele = axiom_element_create(env, NULL, "PingRequest", ns0, &ping_request_om_node);
- ping_om_ele = axiom_element_create(env, ping_request_om_node, "Ping", ns1, &ping_om_node);
-
+ ping_request_om_ele
+ = axiom_element_create(env, NULL, "PingRequest", ns0, &ping_request_om_node);
+ ping_om_ele = axiom_element_create(env, ping_request_om_node, "Ping", ns1, &ping_om_node);
+
text_om_ele = axiom_element_create(env, ping_om_node, "scenario", ns1, &text_om_node);
axiom_element_set_text(text_om_ele, env, "scenario", text_om_node);
- text_om_node= NULL;
+ text_om_node = NULL;
text_om_ele = axiom_element_create(env, ping_om_node, "origin", ns1, &text_om_node);
axiom_element_set_text(text_om_ele, env, "origin", text_om_node);
- text_om_node= NULL;
+ text_om_node = NULL;
text_om_ele = axiom_element_create(env, ping_om_node, "text", ns1, &text_om_node);
axiom_element_set_text(text_om_ele, env, "text", text_om_node);
om_str = axiom_node_to_string(ping_request_om_node, env);
- if (om_str){
+ if(om_str)
+ {
printf("\nSending OM : %s\n", om_str);
AXIS2_FREE(env->allocator, om_str);
- om_str = NULL;
+ om_str = NULL;
}
return ping_request_om_node;
}
-/* build SOAP request message content using OM */
-axiom_node_t *
-build_om_programatically_mtom(
- const axutil_env_t * env)
-{
- axiom_node_t *mtom_om_node = NULL;
- axiom_element_t *mtom_om_ele = NULL;
- axiom_node_t *image_om_node = NULL;
- axiom_element_t *image_om_ele = NULL;
- axiom_node_t *file_om_node = NULL;
- axiom_element_t *file_om_ele = NULL;
- axiom_node_t *data_om_node = NULL;
- axiom_text_t *data_text = NULL;
- axiom_namespace_t *ns1 = NULL;
- axis2_char_t *om_str = NULL;
- const axis2_char_t *image_name = "E:/src/C/Axis2C/build/deploy/samples/bin/resources/axis2.jpg";
- const axis2_char_t *to_save_name = "test.jpg";
- axis2_bool_t optimized = AXIS2_TRUE;
-
- axiom_data_handler_t *data_handler = NULL;
-
- ns1 =
- axiom_namespace_create(env, "http://ws.apache.org/axis2/c/samples/mtom",
- "ns1");
- mtom_om_ele =
- axiom_element_create(env, NULL, "mtomSample", ns1, &mtom_om_node);
-
- file_om_ele =
- axiom_element_create(env, mtom_om_node, "fileName", ns1, &file_om_node);
- axiom_element_set_text(file_om_ele, env, to_save_name, file_om_node);
-
- image_om_ele =
- axiom_element_create(env, mtom_om_node, "image", ns1, &image_om_node);
-
- /* This is when we directly give file name */
-
- data_handler = axiom_data_handler_create(env, image_name, "image/jpeg");
-
- /* Uncomment following to set a callback instead of a file */
-
- /*data_handler = axiom_data_handler_create(env, NULL, "image/jpeg");
- axiom_data_handler_set_data_handler_type(data_handler, env, AXIOM_DATA_HANDLER_TYPE_CALLBACK);
- axiom_data_handler_set_user_param(data_handler, env, (void *)image_name);*/
-
- data_text =
- axiom_text_create_with_data_handler(env, image_om_node, data_handler,
- &data_om_node);
-
- axiom_text_set_optimize(data_text, env, optimized);
- /*axiom_text_set_is_swa(data_text, env, AXIS2_TRUE);*/
- om_str = axiom_node_to_string(mtom_om_node, env);
- if (om_str)
- {
- printf("%s", om_str);
- AXIS2_FREE(env->allocator, om_str);
- }
- return mtom_om_node;
-}
+/* build SOAP request message content using OM */
+axiom_node_t *
+build_om_programatically_mtom(
+ const axutil_env_t * env)
+{
+ axiom_node_t *mtom_om_node = NULL;
+ axiom_element_t *mtom_om_ele = NULL;
+ axiom_node_t *image_om_node = NULL;
+ axiom_element_t *image_om_ele = NULL;
+ axiom_node_t *file_om_node = NULL;
+ axiom_element_t *file_om_ele = NULL;
+ axiom_node_t *data_om_node = NULL;
+ axiom_text_t *data_text = NULL;
+ axiom_namespace_t *ns1 = NULL;
+ axis2_char_t *om_str = NULL;
+ const axis2_char_t *image_name = "E:/src/C/Axis2C/build/deploy/samples/bin/resources/axis2.jpg";
+ const axis2_char_t *to_save_name = "test.jpg";
+ axis2_bool_t optimized = AXIS2_TRUE;
+
+ axiom_data_handler_t *data_handler = NULL;
+
+ ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/c/samples/mtom", "ns1");
+ mtom_om_ele = axiom_element_create(env, NULL, "mtomSample", ns1, &mtom_om_node);
+
+ file_om_ele = axiom_element_create(env, mtom_om_node, "fileName", ns1, &file_om_node);
+ axiom_element_set_text(file_om_ele, env, to_save_name, file_om_node);
+
+ image_om_ele = axiom_element_create(env, mtom_om_node, "image", ns1, &image_om_node);
+
+ /* This is when we directly give file name */
+
+ data_handler = axiom_data_handler_create(env, image_name, "image/jpeg");
+
+ /* Uncomment following to set a callback instead of a file */
+
+ /*data_handler = axiom_data_handler_create(env, NULL, "image/jpeg");
+ axiom_data_handler_set_data_handler_type(data_handler, env, AXIOM_DATA_HANDLER_TYPE_CALLBACK);
+ axiom_data_handler_set_user_param(data_handler, env, (void *)image_name);*/
+
+ data_text
+ = axiom_text_create_with_data_handler(env, image_om_node, data_handler, &data_om_node);
+
+ axiom_text_set_optimize(data_text, env, optimized);
+ /*axiom_text_set_is_swa(data_text, env, AXIS2_TRUE);*/
+ om_str = axiom_node_to_string(mtom_om_node, env);
+ if(om_str)
+ {
+ printf("%s", om_str);
+ AXIS2_FREE(env->allocator, om_str);
+ }
+ return mtom_om_node;
+}
Modified: webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.bat
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.bat?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.bat (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.bat Fri Oct 30 11:34:29 2009
@@ -1,10 +1,6 @@
@echo off
rem if your client repository is different, change the value.
-set CLIENT_REPO=%AXIS2C_HOME%\client_repo
-
-rem INSTALL MODULE to make sure that both server and client have the same module.
-echo "Copying latest module to client_repo"
-xcopy /E /Y /I "%AXIS2C_HOME%\modules\rampart" "%CLIENT_REPO%\modules\rampart"
+set CLIENT_REPO=%AXIS2C_HOME%
%AXIS2C_HOME%\samples\bin\rampartc\sec_echo.exe http://localhost:9090/axis2/services/sec_echo %CLIENT_REPO%
Modified: webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.sh?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.sh (original)
+++ webservices/rampart/trunk/c/samples/client/sec_echo/update_n_run.sh Fri Oct 30 11:34:29 2009
@@ -1,10 +1,6 @@
#!/bin/bash
#If your client repository is different, change the value.
-CLIENT_REPO="$AXIS2C_HOME/client_repo"
-
-#INSTALL MODULE to make sure that both server and client have the same module.
-echo "Copying latest module to client_repo"
-cp -r $AXIS2C_HOME/modules/rampart $CLIENT_REPO/modules
+CLIENT_REPO="$AXIS2C_HOME"
#RUN
./sec_echo http://localhost:9090/axis2/services/sec_echo $CLIENT_REPO
Modified: webservices/rampart/trunk/c/samples/data/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/data/Makefile.am?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/data/Makefile.am (original)
+++ webservices/rampart/trunk/c/samples/data/Makefile.am Fri Oct 30 11:34:29 2009
@@ -1,3 +1,3 @@
resdir=$(prefix)/samples/src/rampartc/data
-res_DATA= passwords.txt server_axis2.xml client_axis2.xml
+res_DATA= passwords.txt server_axis2.xml
Modified: webservices/rampart/trunk/c/samples/secpolicy/deploy.bat
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/deploy.bat?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/deploy.bat (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/deploy.bat Fri Oct 30 11:34:29 2009
@@ -5,7 +5,7 @@
echo Deploying %scn%
echo Copying %scn%\client policy file
-deploy.js %scn%\client-policy.xml %AXIS2C_HOME%\client_repo\policy.xml
+deploy.js %scn%\client-policy.xml %AXIS2C_HOME%\policy.xml
echo Copying %scn%\services.xml
deploy.js %scn%\services.xml %AXIS2C_HOME%\services\sec_echo\services.xml
Modified: webservices/rampart/trunk/c/samples/secpolicy/deploy.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/deploy.sh?rev=831270&r1=831269&r2=831270&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/deploy.sh (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/deploy.sh Fri Oct 30 11:34:29 2009
@@ -6,7 +6,7 @@
fi
INST_DIR=$AXIS2C_HOME
-CLIENT_REPO="$INST_DIR/client_repo/"
+CLIENT_REPO="$INST_DIR/"
SERVICE_HOME="$INST_DIR/services/sec_echo"
#COPYING THE RELEVENT POLICY FILES TO CLIENT AND SERVER