SOAP-SVCLOG-Viewer 1.4
A friendly SOAP log messages viewer
mainwindow.h
1#ifndef MAINWINDOW_H
2#define MAINWINDOW_H
3
4#include <QMainWindow>
5#include <QMessageBox>
6#include <QFileDialog>
7#include <QListWidgetItem>
8#include <QVersionNumber>
9
10#include "FileRepair.h"
11#include "messages.h"
12#include "FileConverter.h"
13#include "FileParser.h"
14#include "FileSplitter.h"
15#include "BodyTextParser.h"
16#include "BodyTreeParser.h"
17#include "BodyTableParser.h"
18#include "BodyPrintableParser.h"
19
20QT_BEGIN_NAMESPACE
21namespace Ui { class MainWindow; }
22QT_END_NAMESPACE
23
28class MainWindow : public QMainWindow
29{
30 Q_OBJECT
31
32
33public:
34 MainWindow(QWidget *parent = nullptr);
36 void addListItem(std::string texte);
37
38 QVersionNumber version = QVersionNumber::fromString("1.4.0");
39 const int NOT_FOUND = -1;
40
41
42private slots:
43 // Barre de menu
44 void on_actionOpen_triggered();
45 void on_actionImport_triggered();
46 void on_actionSave_triggered();
47 void on_actionMark_triggered();
48 void on_actionSplit_triggered();
49 void on_actionRepair_triggered();
50 void on_actionConvert_triggered();
51 void on_actionQuit_triggered();
52 void on_actionInfos_triggered();
53 void on_actionAbout_triggered();
54 void on_actionHideService_triggered();
55 void on_actionHideNS_triggered();
56
57 void on_w_JumpButton_clicked();
58 void on_w_SearchNextButton_clicked();
59 void on_w_SearchActionButton_clicked();
60 void on_w_SearchBodyButton_clicked();
61 void on_w_ResetFilterButton_clicked();
62 void on_w_MessageList_itemSelectionChanged();
63 void on_w_MessageList_itemDoubleClicked(QListWidgetItem *item);
64 void on_tabWidget_currentChanged(int index);
65
66private:
67 void displayMessageHeader(bool isRequest);
68 void displayMessageBody(char* body, int tabIndex);
69 int circleFastCorrelatedJump(int startingPoint, Messages::Message* msg);
70 int circleGlobalCorrelatedJump(int startingPoint, Messages::Message* msg);
71
72
73 Ui::MainWindow *ui;
74 QPushButton *m_boutonDialogue;
75 QFont FontItal;
76 QFont FontGras;
77 QIcon arrowLeftIcon;
78 QIcon arrowRightIcon;
79 QVector<int> messagesSearchList;
80 bool searchDown = true;
81 int hiddenCorrelatedItem = NOT_FOUND;
82
83
84QString explicationRepair =
85 "Lors de l'enregistrement des traces SOAP avec l'activation des diagnostics, \
86 il arrive fréquemment que le fichier <b>web_messages.svclog</b> soit tronqué à la fin au milieu d'une section. \
87 <br/> La syntaxe XML n\'est alors pas respectée, et le fichier ne peut pas être ouvert via un éditeur XML standard. \
88 <br/> <b>WCF Repair</b> supprime la ligne tronquée, et referme les balises XML qui restaient pendantes. \
89 Il encapsule aussi l'ensemble dans une section &lt;root&gt;. \
90 <br/> Le fichier réparé <b>web_messages.repaired.xml</b> est alors facilement manipulable et éditable.";
91
92QString explicationConvert =
93 "<h3>Conversion to faster XML format</h3> \
94 <p>Le traitement des fichiers SVCLOG est parfois long, car ces fichiers sont verbeux. </p>\
95 <p>Les fichiers au format <b>faster</b> (<i>web_messages.faster.xml</i>) contiennent uniquement les informations utiles des messages SOA. \
96 Ils sont compatibles avec la présente application, et présentent de meilleurs performances. \
97 <br/> Ils restent éditables dans un éditeur XML standard. </p>";
98
99QString explicationSplitting =
100 "<h3>Splitting an SVCLOG file</h3> \
101 <p>SVCLOG files can be very huge...</p>\
102 <p>If they contain more than 30.000 messages, the application will not be able to display all the messages. <br/> \
103 In that case, we recommand to use the <i>Splitting</i> functionnality, which will split the SVCLOG file into several files \
104 of 20.000 messages each. </p>";
105
106QString messageInfos =
107 "<h2>SOAP SVCLOG Viewer</h2> \
108 <h3>Usage</h3> \
109 <p><b>SOAP SVCLOG Viewer</b> allows you to open a SOAP trace file (usually: <i>web_messages.svclog</i>) \
110 and see the content of the recorded messages, in a fast and convenient way.</p> \
111 <h3>Convert and Repair</h3> \
112 <p><b>Convert</b> and <b>Repair</b> are two similar functionalities: <br/><br/> \
113 <b>Convert</b> will generate an XML with lesser tags, and faster to process. <br/><br/> \
114 <b>Repair</b> is a binary process that will attempt to produce an XML, compatible with usual standards, \
115 by discarding truncated elements, removing i:nil and xsi:nil tags, and appending missing tag endings. <br/> \
116 </p> \
117 <h3>LF and CRLF</h3> \
118 <p>The <b>svclog</b> file is supposed to contain 1 line, and eventualy LF [0x0A] byte, if a <b>LineFeed</b> is present. <br/>\
119 The <b>XML</b> files may contain CR-LF [0x0D 0x0A] bytes, which is the standard CarriageReturn-LineFeed sequence for Windows.<br/> \
120 Your file may not contain <b>both LF and CRLF</b> delimiters, otherwise the application will not be able to parse the XML messages sucessfully.</p>";
121
122QString messageAbout =
123 "<h2>SOAP SVCLOG Viewer v" + version.toString() + "</h2>" +
124 "<p><b>SOAP SVCLOG Viewer</b> allows you to open a SOAP trace file <br/> \
125 (usually: <i>web_messages.svclog</i>) and to see the content of <br/> \
126 the recorded messages, in a fast and convenient way.</p> \
127 <p> Written by David de Lorenzo (2020-2026). </p> \
128 <p> <a href='http://www.sgt.eu'>http://www.sgt.eu</a></p> \
129 <p> This software uses Qt 6 (LGPL licence) <br/> and the Expat Library (MIT licence). </p>";
130
131
132};
133
134#endif // MAINWINDOW_H
const int NOT_FOUND
Constante.
Definition mainwindow.h:39
MainWindow(QWidget *parent=nullptr)
Cette fonction définit la fenêtre principale.
Definition mainwindow.cpp:9
void addListItem(std::string texte)
Ajoute un item à la liste des messages.
Definition mainwindow.cpp:27
QVersionNumber version
Numéro de version logiciel. A mettre aussi à jour dans le fichier .pro et Doxyfile.
Definition mainwindow.h:38
Structure descriptive d'un Message SOAP extrait du fichier SVCLOG.
Definition messages.h:53