webservice_message.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2009 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Magnus Norddahl
00027 */
00028 
00031 
00032 #pragma once
00033 
00034 #include "../api_network.h"
00035 #include "../../Core/System/sharedptr.h"
00036 #include <vector>
00037 
00038 class CL_DomDocument;
00039 class CL_DomElement;
00040 class CL_DataBuffer;
00041 class CL_WebservicePart;
00042 class CL_WebserviceMessage_Impl;
00043 
00047 class CL_API_NETWORK CL_WebserviceMessage
00048 {
00051 
00052 public:
00053 
00058         CL_WebserviceMessage(const CL_StringRef &name, const CL_StringRef &target_namespace);
00059 
00063         CL_WebserviceMessage(const CL_DomDocument &doc);
00064 
00065         ~CL_WebserviceMessage();
00066 
00070 
00071 public:
00072 
00076         CL_DomDocument get_document() const;
00077 
00081         CL_DomElement get_message_element() const;
00082 
00086         CL_DomElement get_fault_element() const;
00087 
00091         CL_String get_name() const;
00092 
00096         CL_String get_target_namespace() const;
00097 
00103         CL_WebservicePart get_part(const CL_StringRef &name);
00104 
00111         CL_WebservicePart get_part_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name);
00112 
00118         CL_String get_string(const CL_StringRef &name);
00119 
00126         CL_String get_string_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name);
00127 
00133         int get_int(const CL_StringRef &name);
00134 
00141         int get_int_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name);
00142 
00148         double get_double(const CL_StringRef &name);
00149 
00156         double get_double_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name);
00157 
00163         CL_DataBuffer get_base64(const CL_StringRef &name);
00164 
00171         CL_DataBuffer get_base64_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name);
00172 
00176 
00177 public:
00179 
00180         CL_String create_qname(const CL_StringRef &name);
00181 
00187         CL_WebservicePart append_part(const CL_StringRef &name);
00188 
00195         CL_WebservicePart append_part_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name);
00196 
00203         CL_WebservicePart append_string(const CL_StringRef &name, const CL_StringRef &value);
00204 
00212         CL_WebservicePart append_string_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name, const CL_StringRef &value);
00213 
00220         CL_WebservicePart append_int(const CL_StringRef &name, int value);
00221 
00229         CL_WebservicePart append_int_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name, int value);
00230 
00237         CL_WebservicePart append_double(const CL_StringRef &name, double value);
00238 
00246         CL_WebservicePart append_double_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name, double value);
00247 
00254         CL_WebservicePart append_base64(const CL_StringRef &name, const CL_DataBuffer &value);
00255 
00263         CL_WebservicePart append_base64_ns(const CL_StringRef &namespace_uri, const CL_StringRef &name, const CL_DataBuffer &value);
00264 
00268 
00269 private:
00270         CL_SharedPtr<CL_WebserviceMessage_Impl> impl;
00272 };
00273 

Generated on Thu Dec 3 02:39:33 2009 for ClanLib by  doxygen 1.4.6