You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ro...@apache.org on 2004/06/28 13:42:37 UTC

cvs commit: ws-axis/c/tests/client/soapHeader/test1/rpc TestClient.cpp

roshan      2004/06/28 04:42:37

  Modified:    c/tests/client/httpHeader/test1/rpc TestClient.cpp
               c/tests/client/soapHeader/test1/rpc TestClient.cpp
  Log:
  added try catch blocks
  
  Revision  Changes    Path
  1.2       +11 -2     ws-axis/c/tests/client/httpHeader/test1/rpc/TestClient.cpp
  
  Index: TestClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/httpHeader/test1/rpc/TestClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestClient.cpp	26 Jun 2004 14:08:18 -0000	1.1
  +++ TestClient.cpp	28 Jun 2004 11:42:37 -0000	1.2
  @@ -80,12 +80,21 @@
       ws.deleteTrasportProperty("Accept-Language");
   
       //now the request should not have these removed headers
  -
  +    try
  +    {
       if (0 == strcmp(ws.echoString("hello world"), "hello world"))
           printf("successful\n");
       else
           printf("failed\n");
  -
  +    }
  +    catch(AxisException& e)
  +    {
  +        printf("%s\n", e.what());
  +    }
  +    catch(...)
  +    {
  +        printf("unknown exception\n");
  +    }
   
       printf("HTTP Header test end\n");
       return 0;
  
  
  
  1.2       +23 -1     ws-axis/c/tests/client/soapHeader/test1/rpc/TestClient.cpp
  
  Index: TestClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/client/soapHeader/test1/rpc/TestClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestClient.cpp	24 Jun 2004 07:45:02 -0000	1.1
  +++ TestClient.cpp	28 Jun 2004 11:42:37 -0000	1.2
  @@ -20,7 +20,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - * @author Roshan Weerasuriya (roshan@opensource.lk, roshan@jkcsworld.com)
  + * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
    */
   
   #include <string>
  @@ -92,10 +92,21 @@
       printf("Sending Requests to end point %s \n\n", endpoint);
       printf("invoking echoString...\n");
       //testing echoString 
  +    try 
  +    {
       if (0 == strcmp(ws.echoString("hello world"), "hello world"))
   	printf("successful\n");
       else
   	printf("failed\n");
  +    }
  +    catch (AxisException& e)
  +    {
  +        printf("%s\n", e.what());
  +    }
  +    catch(...)
  +    {
  +        printf("Unknown exception\n");
  +    }
   
       //test removing SOAP header block using pointer
       IHeaderBlock *header = NULL;
  @@ -103,10 +114,21 @@
       ws.deleteSOAPHeaderBlock(header);
       //now the request should have no SOAP headers
   
  +    try
  +    {
       if (0 == strcmp(ws.echoString("hello world"), "hello world"))
           printf("successful\n");
       else
           printf("failed\n");
  +    }
  +    catch (AxisException& e)
  +    {
  +        printf("%s\n", e.what());
  +    }
  +    catch(...)
  +    {
  +	printf("Unknown exception\n");
  +    }
   
   
       printf("Soap Header test end\n");