(file) Return to WsmWriter.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / WsmServer

  1 martin 1.5 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.6 //
  3 martin 1.5 // Licensed to The Open Group (TOG) under one or more contributor license
  4            // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5            // this work for additional information regarding copyright ownership.
  6            // Each contributor licenses this file to you under the OpenPegasus Open
  7            // Source License; you may not use this file except in compliance with the
  8            // License.
  9 martin 1.6 //
 10 martin 1.5 // Permission is hereby granted, free of charge, to any person obtaining a
 11            // copy of this software and associated documentation files (the "Software"),
 12            // to deal in the Software without restriction, including without limitation
 13            // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14            // and/or sell copies of the Software, and to permit persons to whom the
 15            // Software is furnished to do so, subject to the following conditions:
 16 martin 1.6 //
 17 martin 1.5 // The above copyright notice and this permission notice shall be included
 18            // in all copies or substantial portions of the Software.
 19 martin 1.6 //
 20 martin 1.5 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.6 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.5 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23            // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24            // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25            // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26            // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.6 //
 28 martin 1.5 //////////////////////////////////////////////////////////////////////////
 29 kumpf  1.2 //
 30            //%////////////////////////////////////////////////////////////////////////////
 31            
 32            #ifndef Pegasus_WsmWriter_h
 33            #define Pegasus_WsmWriter_h
 34            
 35            #include <iostream>
 36            #include <Pegasus/Common/Config.h>
 37            #include <Pegasus/Common/InternalException.h>
 38            #include <Pegasus/Common/ArrayInternal.h>
 39            #include <Pegasus/Common/String.h>
 40            #include <Pegasus/Common/ContentLanguageList.h>
 41            #include <Pegasus/Common/Message.h>
 42            #include <Pegasus/Common/Buffer.h>
 43            #include <Pegasus/Common/StrLit.h>
 44            #include <Pegasus/Common/XmlGenerator.h>
 45            #include <Pegasus/WsmServer/WsmUtils.h>
 46            #include <Pegasus/WsmServer/WsmInstance.h>
 47            #include <Pegasus/WsmServer/WsmProperty.h>
 48            #include <Pegasus/WsmServer/WsmValue.h>
 49            #include <Pegasus/WsmServer/WsmFault.h>
 50 kumpf  1.2 #include <Pegasus/WsmServer/WsmEndpointReference.h>
 51 anusha.kandepu 1.9 #include <Pegasus/Common/HTTPMessage.h>
 52                    #include <Pegasus/Client/ClientAuthenticator.h>
 53 kumpf          1.2 
 54                    PEGASUS_NAMESPACE_BEGIN
 55                    
 56                    class PEGASUS_WSMSERVER_LINKAGE WsmWriter : public XmlGenerator
 57                    {
 58                    public:
 59                    
 60 kumpf          1.4     static void appendSoapFaultHeaders(
 61 kumpf          1.7         Buffer& out,
 62 kumpf          1.2         const SoapNotUnderstoodFault& fault,
 63 kumpf          1.4         const String& action,
 64 kumpf          1.2         const String& messageId,
 65 kumpf          1.4         const String& relatesTo);
 66                        static void appendSoapFaultBody(
 67 kumpf          1.7         Buffer& out,
 68 kumpf          1.4         const SoapNotUnderstoodFault& fault);
 69 kumpf          1.2 
 70 kumpf          1.4     static void appendWsmFaultBody(
 71                            Buffer& out,
 72                            const WsmFault& fault);
 73 kumpf          1.2 
 74                        static Buffer formatHttpErrorRspMessage(
 75                            const String& status,
 76                            const String& cimError = String::EMPTY,
 77                            const String& errorDetail = String::EMPTY);
 78                    
 79                        static void appendInstanceElement(
 80 mike           1.8         Buffer& out,
 81                            const String& resourceUri,
 82                            WsmInstance& instance,
 83                            const char* ns,
 84                            Boolean isEmbedded);
 85                    
 86                         static void appendPropertyElement(
 87                            Buffer& out,
 88                            const String& resourceUri,
 89                            WsmProperty& property,
 90                            const char* ns);
 91                    
 92 kumpf          1.2     static void appendEPRElement(
 93                            Buffer& out, const WsmEndpointReference& epr);
 94                        static void appendStringElement(
 95                            Buffer& out, const String& str);
 96                    
 97                        static void appendStartTag(
 98                            Buffer& out,
 99                            WsmNamespaces::Type nsType,
100                            const StrLit& tagName,
101                            const char* attrName = 0,
102                            const String& attrValue = String::EMPTY);
103                        static void appendEndTag(
104                            Buffer& out,
105                            WsmNamespaces::Type nsType,
106                            const StrLit& tagName);
107 kumpf          1.4     static void appendEmptyTag(
108                            Buffer& out,
109                            WsmNamespaces::Type nsType,
110                            const StrLit& tagName);
111 kumpf          1.2     static void appendTagValue(
112                            Buffer& out,
113                            WsmNamespaces::Type nsType,
114                            const StrLit& tagName,
115                            const String& value,
116                            const char* attrName = 0,
117                            const String& attrValue = String::EMPTY);
118                    
119 kumpf          1.4     static void appendHTTPResponseHeader(
120 kumpf          1.2         Buffer& out,
121                            const String& action,
122                            HttpMethod httpMethod,
123 mike           1.8         Boolean omitXMLProcessingInstruction,
124 kumpf          1.2         const ContentLanguageList& contentLanguages,
125                            Boolean isFault,
126                            Uint32 contentLength = 0);
127                    
128 kumpf          1.4     static void appendSoapEnvelopeStart(
129 kumpf          1.2         Buffer& out,
130                            const ContentLanguageList& contentLanguages = ContentLanguageList());
131 kumpf          1.4     static void appendSoapEnvelopeEnd(Buffer& out);
132                        static void appendSoapHeaderStart(Buffer& out);
133                        static void appendSoapHeaderEnd(Buffer& out);
134                        static void appendSoapBodyStart(Buffer& out);
135                        static void appendSoapBodyEnd(Buffer& out);
136 kumpf          1.2 
137 kumpf          1.4     static void appendSoapHeader(
138 kumpf          1.2         Buffer& out,
139                            const String& action,
140                            const String& messageId,
141 anusha.kandepu 1.9         const String& relatesTo,
142 anusha.kandepu 1.10         const String& toAddress="",
143                             const String& replyTo="",
144                             const Boolean& ackRequired=false);
145 kumpf          1.4  
146 mike           1.8      static void appendInvokeOutputElement(
147                             Buffer& out,
148                             const String& resourceUri,
149                             const String& className,
150                             const String& methodName,
151                             WsmInstance& instance,
152                             const char* ns);
153 anusha.kandepu 1.9      
154                        static Buffer appendHTTPRequestHeader( XmlParser& parser,
155                                 const String& hostName,
156                                 Boolean useMPost,
157                                 Boolean useHTTP11,
158                                 Buffer& content,
159                                 Buffer& httpHeaders,
160                                 const String& destination);
161                         
162                         static void addAuthHeader(
163                             HTTPMessage*& httpMessage,
164                             AutoPtr<ClientAuthenticator>& authenticator);
165 mike           1.8  
166 kumpf          1.4  private:
167                     
168                         WsmWriter();
169 kumpf          1.2  };
170                     
171                     PEGASUS_NAMESPACE_END
172                     
173                     #endif /* Pegasus_WsmWriter_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2