|
1 /* |
|
2 * Copyright (c) 2004 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 #ifndef SEN_BASIC_WEB_SERVICE_SESSION_H |
|
26 #define SEN_BASIC_WEB_SERVICE_SESSION_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "senwebservicesession.h" |
|
30 #include "SenHttpTransportProperties.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class MSenServiceConsumer; |
|
34 class MServiceDescription; |
|
35 class CSenCredential; |
|
36 class CSenSoapMessage; |
|
37 |
|
38 // CONSTANTS |
|
39 _LIT8(KConsumerIdLocalname, "ConsumerID"); |
|
40 |
|
41 // CLASS DECLARATION |
|
42 class CSenBasicWebServiceSession : public CSenWebServiceSession |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 static CSenBasicWebServiceSession* NewL(MSIF& aFramework); |
|
46 static CSenBasicWebServiceSession* NewLC(MSIF& aFramework); |
|
47 |
|
48 virtual ~CSenBasicWebServiceSession(); |
|
49 |
|
50 virtual TInt InitializeFromL(MSenServiceDescription& aServiceDescription); |
|
51 |
|
52 virtual TInt SubmitL(const TDesC8& aMessage, |
|
53 const TDesC8& aTransportProperties, |
|
54 MSenRemoteServiceConsumer& aConsumer, |
|
55 HBufC8*& aResponse); |
|
56 |
|
57 virtual TInt SendL( const TDesC8& aMessage, |
|
58 const TDesC8& aTransportProperties, |
|
59 MSenRemoteServiceConsumer& aConsumer, |
|
60 TInt& aTxnId, |
|
61 HBufC8*& aRevalidationError ); |
|
62 |
|
63 virtual TInt SubmitSoapL(const TDesC8& aMessage, |
|
64 const TDesC8& aTransportProperties, |
|
65 MSenRemoteServiceConsumer& aConsumer, |
|
66 HBufC8*& aResponse); |
|
67 |
|
68 virtual TInt SendSoapL( const TDesC8& aMessage, |
|
69 const TDesC8& aTransportProperties, |
|
70 MSenRemoteServiceConsumer& aConsumer, |
|
71 TInt& aTxnId, |
|
72 HBufC8*& /*aRevalidationError */ ); |
|
73 virtual TInt HandleSoapFaultL(CSenSoapMessage* apSOAPMessage, |
|
74 const TInt aErrorCode, |
|
75 const TInt aTxnId, |
|
76 MSenRemoteServiceConsumer& aConsumer, |
|
77 MSenProperties* aResponseTransportProperties) ; |
|
78 virtual TInt HandleSoapFaultL(CSenSoapMessage* apSOAPMessage, |
|
79 HBufC8*& aResponse); |
|
80 |
|
81 virtual TInt ComputeStatusL(); |
|
82 /** |
|
83 * @see CSenWSDescription |
|
84 */ |
|
85 virtual TBool HasSuperClass( TDescriptionClassType aType ); |
|
86 |
|
87 protected: |
|
88 CSenBasicWebServiceSession(TDescriptionClassType aType, MSIF& aFramework); |
|
89 void ConstructL(); |
|
90 |
|
91 private: |
|
92 // NOTE: this is temporary method which MUST be removed when message context is made available in SendL/SubmitL |
|
93 TInt SetFrameworkPropertiesL(MSenTransport& aTransport); |
|
94 |
|
95 // Helper method, which allows sending of "unwrapped" descriptor (UTF-8 data) |
|
96 // in case of HTTP GET or DELETE. Otherwise, for example http query string |
|
97 // would be illegally "wrapped" inside SOAP body(!). |
|
98 TInt HttpMethodFromPropertiesL( const TDesC8& aProperties, CSenHttpTransportProperties::TSenHttpMethod& aMethod ); |
|
99 }; |
|
100 |
|
101 #endif // SEN_BASIC_WEB_SERVICE_SESSION_H |
|
102 |
|
103 // End of File |