Author: milinda
Date: Thu Feb  7 19:19:12 2008
New Revision: 619751

URL: http://svn.apache.org/viewvc?rev=619751&view=rev
Log:
Fixed some bugs in Trust sample.

Modified:
    webservices/rampart/trunk/c/samples/client/sts_client/client.c
    webservices/rampart/trunk/c/samples/server/saml_sts/issuer.c
    webservices/rampart/trunk/c/samples/server/saml_sts/saml_skeleton.c

Modified: webservices/rampart/trunk/c/samples/client/sts_client/client.c
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/client/sts_client/client.c?rev=619751&r1=619750&r2=619751&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/client/sts_client/client.c (original)
+++ webservices/rampart/trunk/c/samples/client/sts_client/client.c Thu Feb  7 
19:19:12 2008
@@ -32,11 +32,34 @@
 
     /* Set end point reference of echo service */
     address = "http://localhost:9090/axis2/services/saml_sts";;
-    client_home = "/home/milinda/Projects/axis2c/deploy/client_repo";
-    
+       
+       if(argc > 2)
+       {
+               address = argv[2];
+               client_home = argv[1];
+       }
+       else if(argc == 2)
+       {
+               client_home = argv[1];
+               printf("Client Home : %s\n", client_home);
+               if(!(axutil_strcmp(client_home, "-h")))
+               {
+                       printf("STS Client Usage:\n");
+                       printf("\t./sts_client [client home] [end point]\n");
+                       printf("\tUse ./sts_client -h for help\n");
+                       return -1;
+               }
+       }       
+       else if(argc < 2)
+       {
+               printf("Insufficient Arguments.\n");
+               printf("Use ./sts_client -h for help\n");
+               return -1;
+       }
+       
+
     file_name = "./client.xml";
     file_name2 = "./service.xml";
-    
/*http://131.107.72.15/Security_Federation_SecurityTokenService_Indigo/Asymmetric.svc*/
     
     sts_client = trust_sts_client_create(env);
    

Modified: webservices/rampart/trunk/c/samples/server/saml_sts/issuer.c
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/saml_sts/issuer.c?rev=619751&r1=619750&r2=619751&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/server/saml_sts/issuer.c (original)
+++ webservices/rampart/trunk/c/samples/server/saml_sts/issuer.c Thu Feb  7 
19:19:12 2008
@@ -47,11 +47,14 @@
        trust_rst_t *rst = NULL;        /*Created RST Context*/
        trust_rstr_t *rstr = NULL;      /*Used for Creating RSTR*/
     
-       rst = trust_context_get_rst(env, trust_ctx);
+       rst = trust_context_get_rst(trust_ctx, env);
        
 
     token_type = trust_rst_get_token_type(rst, env);
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sts] token type %s..!", 
token_type);
+       if(token_type)
+       AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sts] token type: %s !", 
token_type);
+       else
+               return NULL;
     
     if (axutil_strcmp(token_type, SAML_TOKEN))
     {

Modified: webservices/rampart/trunk/c/samples/server/saml_sts/saml_skeleton.c
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/saml_sts/saml_skeleton.c?rev=619751&r1=619750&r2=619751&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/server/saml_sts/saml_skeleton.c 
(original)
+++ webservices/rampart/trunk/c/samples/server/saml_sts/saml_skeleton.c Thu Feb 
 7 19:19:12 2008
@@ -112,10 +112,7 @@
        {
                printf("RST Processing Failed!\n");
        }
-
-               
-
-    
+       
     return axis2_saml_issuer_issue(env, trust_ctx);  
 }
 


Reply via email to