websrv_pub/web_service_connection_api/tsrc/WsStarMessageHandlerTester/inc/WsStarMessageHandlerTester.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef WSSTARMESSAGEHANDLERTESTER_H
       
    27 #define WSSTARMESSAGEHANDLERTESTER_H
       
    28 
       
    29 //  INCLUDES
       
    30 #include <StifLogger.h>
       
    31 #include <TestScripterInternal.h>
       
    32 #include <StifTestModule.h>
       
    33 #include <TestclassAssert.h>
       
    34 
       
    35 // CONSTANTS
       
    36 //const ?type ?constant_var = ?constant;
       
    37 
       
    38 // MACROS
       
    39 //#define ?macro ?macro_def
       
    40 #define TEST_CLASS_VERSION_MAJOR 0
       
    41 #define TEST_CLASS_VERSION_MINOR 0
       
    42 #define TEST_CLASS_VERSION_BUILD 0
       
    43 
       
    44 //  EXTERNAL INCLUDES
       
    45 #include "wsstarmessagecontext.h"
       
    46 #include "wsstarhandlercontext.h"
       
    47 #include "wsstartrustclient.h"
       
    48 #include <SenXmlReader.h>
       
    49 #include "msencontext.h"
       
    50 #include "senmessagehandler.h"
       
    51 #include "wsstaraddressinghandler.h"
       
    52 #include "wsstarenveloperhandler.h"
       
    53 #include "wsstarcredentialcollectorhandler.h"
       
    54 #include "wsstarpassporthandler.h"
       
    55 #include "wsstarsecurityhandler.h"
       
    56 #include <e32def.h>
       
    57 //  INTERNAL INCLUDES
       
    58 
       
    59 _LIT8(KFaultMessage12,"<S:Envelope xmlns:S=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"><S:Body><S:Fault><S:Code><S:Value>S:Receiver</S:Value><S:Subcode><S:Value>wsa:EndpointUnavailable</S:Value></S:Subcode></S:Code><S:Detail><wsa:RetryAfter>500</wsa:RetryAfter></S:Detail></S:Fault></S:Body></S:Envelope>");
       
    60 _LIT8(KFaultMessage11,"<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"><S:Header><wsa:ReplyTo>replyTo</wsa:ReplyTo></S:Header><S:Body><S:Fault><faultcode>wsa:MessageInformationHeaderRequired</faultcode></S:Fault></S:Body></S:Envelope>");
       
    61 _LIT8(KFaultMessage11_1,"<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"><S:Header><wsa:FaultTo>faultTo</wsa:FaultTo></S:Header><S:Body><S:Fault><faultcode>wsa:InvalidMessageInformationHeader</faultcode></S:Fault></S:Body></S:Envelope>");
       
    62 _LIT8(KFaultMessage11_2,"<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"><S:Body><S:Fault><faultcode>wsa:DestinationUnreachable</faultcode></S:Fault></S:Body></S:Envelope>");
       
    63 _LIT8(KFaultMessage11_3,"<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\"><S:Body><S:Fault><faultcode>wsa:ActionNotSupported</faultcode></S:Fault></S:Body></S:Envelope>");
       
    64 // Logging path
       
    65 _LIT( KWsStarMessageHandlerTesterLogPath, "\\logs\\testframework\\WsStarMessageHandlerTester\\" ); 
       
    66 // Log file
       
    67 _LIT( KWsStarMessageHandlerTesterLogFile, "WsStarMessageHandlerTester.txt" ); 
       
    68 _LIT( KWsStarMessageHandlerTesterLogFileWithTitle, "WsStarMessageHandlerTester_[%S].txt" );
       
    69 
       
    70 // FUNCTION PROTOTYPES
       
    71 //?type ?function_name(?arg_list);
       
    72 
       
    73 // FORWARD DECLARATIONS
       
    74 //class ?FORWARD_CLASSNAME;
       
    75 class CWsStarMessageHandlerTester;
       
    76 
       
    77 // DATA TYPES
       
    78 typedef TInt (CWsStarMessageHandlerTester::* TestFunction)(CStifItemParser&);
       
    79 
       
    80 // CLASS DECLARATION
       
    81 
       
    82 /**
       
    83 *  CWsStarMessageHandlerTester test class for STIF Test Framework TestScripter.
       
    84 *  ?other_description_lines
       
    85 *
       
    86 *  @lib ?library
       
    87 *  @since ?Series60_version
       
    88 */
       
    89 NONSHARABLE_CLASS(CWsStarMessageHandlerTester) : public CScriptBase
       
    90     {
       
    91     public:  // Constructors and destructor
       
    92 
       
    93         /**
       
    94         * Two-phased constructor.
       
    95         */
       
    96         static CWsStarMessageHandlerTester* NewL( CTestModuleIf& aTestModuleIf );
       
    97 
       
    98         /**
       
    99         * Destructor.
       
   100         */
       
   101         virtual ~CWsStarMessageHandlerTester();
       
   102 
       
   103     public: // New functions
       
   104 
       
   105         /**
       
   106         * ?member_description.
       
   107         * @since ?Series60_version
       
   108         * @param ?arg1 ?description
       
   109         * @return ?description
       
   110         */
       
   111         //?type ?member_function( ?type ?arg1 );
       
   112 
       
   113     public: // Functions from base classes
       
   114 
       
   115         /**
       
   116         * From CScriptBase Runs a script line.
       
   117         * @since ?Series60_version
       
   118         * @param aItem Script line containing method name and parameters
       
   119         * @return Symbian OS error code
       
   120         */
       
   121         virtual TInt RunMethodL( CStifItemParser& aItem );
       
   122 
       
   123     protected:  // New functions
       
   124 
       
   125         /**
       
   126         * ?member_description.
       
   127         * @since ?Series60_version
       
   128         * @param ?arg1 ?description
       
   129         * @return ?description
       
   130         */
       
   131         //?type ?member_function( ?type ?arg1 );
       
   132 
       
   133     protected:  // Functions from base classes
       
   134 
       
   135         /**
       
   136         * From ?base_class ?member_description
       
   137         */
       
   138         //?type ?member_function();
       
   139 
       
   140     private:
       
   141 
       
   142         /**
       
   143         * C++ default constructor.
       
   144         */
       
   145         CWsStarMessageHandlerTester( CTestModuleIf& aTestModuleIf );
       
   146 
       
   147         /**
       
   148         * By default Symbian 2nd phase constructor is private.
       
   149         */
       
   150         void ConstructL();
       
   151 
       
   152         // Prohibit copy constructor if not deriving from CBase.
       
   153         // ?classname( const ?classname& );
       
   154         // Prohibit assigment operator if not deriving from CBase.
       
   155         // ?classname& operator=( const ?classname& );
       
   156 
       
   157         /**
       
   158         * Frees all resources allocated from test methods.
       
   159         * @since ?Series60_version
       
   160         */
       
   161         void Delete();
       
   162 
       
   163         /**
       
   164         * Test methods are listed below. 
       
   165         */
       
   166 
       
   167 
       
   168          void SetupL();
       
   169 
       
   170          void SetupAddressingL();
       
   171 
       
   172          void SetupEnveloperL();
       
   173 
       
   174          void SetupCredentialCollectorL();
       
   175 
       
   176          void SetupPassportL();
       
   177 
       
   178          void SetupSecurityL();
       
   179                         
       
   180          void Teardown();
       
   181         
       
   182 //addressing
       
   183          TInt MT_CWSStarAddressingHandler_NewLL();
       
   184         
       
   185          TInt MT_CWSStarAddressingHandler_InvokeL1L();
       
   186 
       
   187          TInt MT_CWSStarAddressingHandler_InvokeL2L();
       
   188 
       
   189          TInt MT_CWSStarAddressingHandler_InvokeL3L();
       
   190 
       
   191          TInt MT_CWSStarAddressingHandler_InvokeL4L();
       
   192 
       
   193          TInt MT_CWSStarAddressingHandler_InvokeL5L();
       
   194 
       
   195          TInt MT_CWSStarAddressingHandler_InvokeL6L();
       
   196         
       
   197          TInt MT_CWSStarAddressingHandler_DirectionL();
       
   198         
       
   199          TInt MT_CWSStarAddressingHandler_PhaseL();
       
   200         
       
   201          TInt MT_CWSStarAddressingHandler_InitLL();
       
   202         
       
   203 //enveloper
       
   204          TInt MT_CWSStarEnveloperHandler_NewLL();
       
   205         
       
   206          TInt MT_CWSStarEnveloperHandler_InvokeL1L();
       
   207 
       
   208          TInt MT_CWSStarEnveloperHandler_InvokeL2L();
       
   209 
       
   210          TInt MT_CWSStarEnveloperHandler_DirectionL();
       
   211         
       
   212          TInt MT_CWSStarEnveloperHandler_PhaseL();
       
   213         
       
   214          TInt MT_CWSStarEnveloperHandler_InitLL();
       
   215 
       
   216 //credential collector
       
   217          TInt MT_CWSStarCredentialCollectorHandler_NewLL();
       
   218         
       
   219          TInt MT_CWSStarCredentialCollectorHandler_InvokeL1L();
       
   220 
       
   221          TInt MT_CWSStarCredentialCollectorHandler_InvokeL2L();
       
   222 
       
   223          TInt MT_CWSStarCredentialCollectorHandler_InvokeL3L();
       
   224 
       
   225          TInt MT_CWSStarCredentialCollectorHandler_DirectionL();
       
   226         
       
   227          TInt MT_CWSStarCredentialCollectorHandler_PhaseL();
       
   228         
       
   229          TInt MT_CWSStarCredentialCollectorHandler_InitLL();
       
   230 
       
   231 //passport        
       
   232          TInt MT_CWSStarPassportHandler_NewLL();
       
   233         
       
   234          TInt MT_CWSStarPassportHandler_InvokeL1L();
       
   235 
       
   236          TInt MT_CWSStarPassportHandler_InvokeL2L();
       
   237 
       
   238          TInt MT_CWSStarPassportHandler_DirectionL();
       
   239         
       
   240          TInt MT_CWSStarPassportHandler_PhaseL();
       
   241         
       
   242          TInt MT_CWSStarPassportHandler_InitLL();
       
   243 
       
   244 //security        
       
   245          TInt MT_CWSStarSecurityHandler_NewLL();
       
   246         
       
   247          TInt MT_CWSStarSecurityHandler_InvokeL1L();
       
   248 
       
   249          TInt MT_CWSStarSecurityHandler_InvokeL2L();
       
   250 
       
   251          TInt MT_CWSStarSecurityHandler_DirectionL();
       
   252         
       
   253          TInt MT_CWSStarSecurityHandler_PhaseL();
       
   254         
       
   255          TInt MT_CWSStarSecurityHandler_InitLL();
       
   256         /**
       
   257          * Method used to log version of test class
       
   258          */
       
   259         void SendTestClassVersion();
       
   260         
       
   261 
       
   262     private:    // Data
       
   263         CWSStarMessageContext* iMessageContextOut;
       
   264         CWSStarMessageContext* iMessageContextIn;
       
   265         CSenXmlReader* iParser;
       
   266         RFileLogger* iLogger;
       
   267         CSenMessageHandler* iHandler; 
       
   268         CWSStarHandlerContext* iHandlerCtx;
       
   269         RPointerArray<HBufC8> iSignedParts;
       
   270         
       
   271 
       
   272 
       
   273 
       
   274     };
       
   275 
       
   276 #endif      // WSSTARMESSAGEHANDLERTESTER_H
       
   277 
       
   278 // End of File