~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/net/clientesoapintegracion.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-05-02 08:09:26 UTC
  • Revision ID: james.westby@ubuntu.com-20110502080926-bql5wep49c7hg91t
Tags: upstream-2.4.1.1
ImportĀ upstreamĀ versionĀ 2.4.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  
 
3
 *  $Id: clientesoapintegracion.h 3066 2010-12-21 10:10:14Z carlos $
 
4
 *  Ginkgo CADx Project
 
5
 *
 
6
 *  Copyright 2008-10 MetaEmotion S.L. All rights reserved.
 
7
 *  http://ginkgo-cadx.com
 
8
 *
 
9
 *  This file is licensed under LGPL v3 license.
 
10
 *  See License.txt for details
 
11
 *
 
12
 *
 
13
 */
 
14
#pragma once
 
15
#include <ostream>
 
16
#include <string>
 
17
 
 
18
class wxString;
 
19
 
 
20
namespace GIL {
 
21
        namespace GnkNetwork {
 
22
                namespace GnkSOAP {
 
23
                        class ClienteSOAPException : public std::exception {
 
24
                        public:
 
25
                                ClienteSOAPException(const std::string& msg, bool fatal = true) throw()
 
26
                                {
 
27
                                        this->cause = msg;
 
28
                                        this->fatal = fatal;
 
29
                                }
 
30
                                ~ClienteSOAPException() throw()
 
31
                                {
 
32
                                }
 
33
 
 
34
                                const std::string& GetCause() const {
 
35
                                        return cause;
 
36
                                }
 
37
 
 
38
                                bool IsFatal()  const {
 
39
                                        return fatal;
 
40
                                }
 
41
 
 
42
                                operator const std::string () const;
 
43
 
 
44
                                friend std::ostream& operator<<(std::ostream& out, const ClienteSOAPException& ex)
 
45
                                {
 
46
                                        out << (const std::string&) ex;
 
47
                                        return out;
 
48
                                }
 
49
 
 
50
                                friend std::ostream& operator<<(std::ostream& out, const ClienteSOAPException* ex)
 
51
                                {
 
52
                                        if (ex != NULL) {
 
53
                                                out << *ex;
 
54
                                        }
 
55
                                        else {
 
56
                                                out << "(NULL)";
 
57
                                        }
 
58
                                        return out;
 
59
                                }
 
60
 
 
61
                        protected:
 
62
                                std::string cause;
 
63
                                bool fatal;
 
64
                        };
 
65
 
 
66
 
 
67
                        class ClienteSOAPIntegracion
 
68
                        {
 
69
                                ClienteSOAPIntegracion();
 
70
                                ~ClienteSOAPIntegracion();
 
71
 
 
72
                        public:
 
73
 
 
74
                                static std::string GetXMLPeticion(const std::string& xmlTicket);
 
75
 
 
76
                                static void ParseURL(const std::string url,std::string& protocolo, std::string& host, int& puerto, std::string& path);
 
77
                        protected:
 
78
                                static std::string ConstruirPeticionSOAP(const std::string& ticket);
 
79
                                static std::string ParsearSOAPRespuesta(const std::string& respuesta);
 
80
                                static bool CompararNombreIgnorandoNamespace(const wxString& nombre,const wxString& comparacion);
 
81
 
 
82
                        };
 
83
                };
 
84
        };
 
85
};