Initial commit

master
Josef Rokos 8 years ago
commit 47b89cfa61

@ -0,0 +1,4 @@
TEMPLATE = subdirs
SUBDIRS += libEet \
eetsend

73
eetsend/.gitignore vendored

@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

@ -0,0 +1,19 @@
QT += core
QT -= gui
CONFIG += c++11
TARGET = eetsend
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../libEet/release/ -lEetCpp
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../libEet/debug/ -lEetCpp
else:unix: LIBS += -L$$OUT_PWD/../libEet/ -lEetCpp
INCLUDEPATH += $$PWD/../libEet
DEPENDPATH += $$PWD/../libEet

@ -0,0 +1,23 @@
#include <QCoreApplication>
#include <eetcpp.h>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
EetRequest request;
request.setCelkTrzba(1);
request.setCerpZuct(2);
request.setCestSluz(3);
request.setIdPokl("id pokladny");
request.setIdProvoz("id provoz");
request.setDicPopl("CZ1234567");
request.setCelkTrzba(100);
EetSender sender;
sender.sendRequest(&request);
return a.exec();
}

@ -0,0 +1,6 @@
#include "eetcpp.h"
EetCpp::EetCpp()
{
}

@ -0,0 +1,16 @@
#ifndef EETCPP_H
#define EETCPP_H
#include "eetcpp_global.h"
#include "eetrequest.h"
#include "eetsender.h"
class EETCPPSHARED_EXPORT EetCpp
{
public:
EetCpp();
};
#endif // EETCPP_H

@ -0,0 +1,12 @@
#ifndef EETCPP_GLOBAL_H
#define EETCPP_GLOBAL_H
#include <QtCore/qglobal.h>
#if defined(EETCPP_LIBRARY)
# define EETCPPSHARED_EXPORT Q_DECL_EXPORT
#else
# define EETCPPSHARED_EXPORT Q_DECL_IMPORT
#endif
#endif // EETCPP_GLOBAL_H

@ -0,0 +1,404 @@
#include "eetrequest.h"
EetRequest::EetRequest(QObject *parent) : QObject(parent)
{
m_prvniZaslani = true;
m_produkcni = false;
m_rezim = STANDARD;
}
QDateTime EetRequest::datOdesl() const
{
return m_datOdesl;
}
void EetRequest::setDatOdesl(const QDateTime &datOdesl)
{
m_datOdesl = datOdesl;
}
QString EetRequest::datOdeslStr() const
{
return m_datOdesl.toTimeSpec(Qt::OffsetFromUTC).toString(Qt::ISODate);
}
QTimeZone EetRequest::datOdeslZone() const
{
return m_datOdeslZone;
}
void EetRequest::setDatOdeslZone(const QTimeZone &datOdeslZone)
{
m_datOdeslZone = datOdeslZone;
}
bool EetRequest::prvniZaslani() const
{
return m_prvniZaslani;
}
void EetRequest::setPrvniZaslani(bool prvniZaslani)
{
m_prvniZaslani = prvniZaslani;
}
QString EetRequest::prvniZaslaniStr() const
{
return m_prvniZaslani ? "true" : "false";
}
QUuid EetRequest::uuidZpravy() const
{
return m_uuidZpravy;
}
void EetRequest::setUuidZpravy(const QUuid &uuidZpravy)
{
m_uuidZpravy = uuidZpravy;
}
QString EetRequest::uuidZpravyStr() const
{
QString ret = m_uuidZpravy.toString();
ret = ret.replace(0, 1, "");
ret = ret.replace(ret.size() - 1, 1, "");
return ret;
}
bool EetRequest::produkcni() const
{
return m_produkcni;
}
void EetRequest::setProdukcni(bool produkcni)
{
m_produkcni = produkcni;
}
QString EetRequest::produkcniStr() const
{
return m_produkcni ? "true" : "false";
}
QString EetRequest::dicPopl() const
{
return m_dicPopl.isNull() ? NULL_VAL : QString(*m_dicPopl.data());
}
void EetRequest::setDicPopl(const QString &dicPopl)
{
m_dicPopl = QSharedPointer<QString>(new QString(dicPopl));
}
QString EetRequest::dicPoverujiciho() const
{
return m_dicPoverujiciho.isNull() ? NULL_VAL : QString(*m_dicPoverujiciho.data());
}
void EetRequest::setDicPoverujiciho(const QString &dicPoverujiciho)
{
m_dicPoverujiciho = QSharedPointer<QString>(new QString(dicPoverujiciho));
}
QString EetRequest::idProvoz() const
{
return m_idProvoz;
}
void EetRequest::setIdProvoz(const QString &idProvoz)
{
m_idProvoz = idProvoz;
}
QString EetRequest::idPokl() const
{
return m_idPokl;
}
void EetRequest::setIdPokl(const QString &idPokl)
{
m_idPokl = idPokl;
}
QString EetRequest::poradCis() const
{
return m_poradCis;
}
void EetRequest::setPoradCis(const QString &poradCis)
{
m_poradCis = poradCis;
}
QDateTime EetRequest::datTrzby() const
{
return m_datTrzby;
}
void EetRequest::setDatTrzby(const QDateTime &datTrzby)
{
m_datTrzby = datTrzby;
}
QString EetRequest::datTrzbyStr() const
{
return m_datTrzby.toTimeSpec(Qt::OffsetFromUTC).toString(Qt::ISODate);
}
QTimeZone EetRequest::datTrzbyZone() const
{
return m_datTrzbyZone;
}
void EetRequest::setDatTrzbyZone(const QTimeZone &datTrzbyZone)
{
m_datTrzbyZone = datTrzbyZone;
}
double EetRequest::celkTrzba() const
{
return m_celkTrzba.isNull() ? 0 : *m_celkTrzba.data();
}
void EetRequest::setCelkTrzba(double celkTrzba)
{
m_celkTrzba = QSharedPointer<double>(new double);
*m_celkTrzba.data() = celkTrzba;
}
QString EetRequest::celkTrzbaStr() const
{
return m_celkTrzba.isNull() ? NULL_VAL : QString::number(*m_celkTrzba.data(), 'f', 2);
}
double EetRequest::zaklNepodlDph() const
{
return m_zaklNepodlDph.isNull() ? 0 : *m_zaklNepodlDph.data();
}
void EetRequest::setZaklNepodlDph(double zaklNepodlDph)
{
m_zaklNepodlDph = QSharedPointer<double>(new double);
*m_zaklNepodlDph.data() = zaklNepodlDph;
}
QString EetRequest::zaklNepodlDphStr() const
{
return m_zaklNepodlDph.isNull() ? NULL_VAL : QString::number(*m_zaklNepodlDph.data(), 'f', 2);
}
double EetRequest::zaklDan1() const
{
return m_zaklDan1.isNull() ? 0 : *m_zaklDan1.data();
}
void EetRequest::setZaklDan1(double zaklDan1)
{
m_zaklDan1 = QSharedPointer<double>(new double);
*m_zaklDan1.data() = zaklDan1;
}
QString EetRequest::zaklDan1Str() const
{
return m_zaklDan1.isNull() ? NULL_VAL : QString::number(*m_zaklDan1.data(), 'f', 2);
}
double EetRequest::dan1() const
{
return m_dan1.isNull() ? 0 : *m_dan1.data();
}
void EetRequest::setDan1(double dan1)
{
m_dan1 = QSharedPointer<double>(new double);
*m_dan1.data() = dan1;
}
QString EetRequest::dan1Str() const
{
return m_dan1.isNull() ? NULL_VAL : QString::number(*m_dan1.data(), 'f', 2);
}
double EetRequest::zaklDan2() const
{
return m_zaklDan2.isNull() ? 0 : *m_zaklDan2.data();
}
void EetRequest::setZaklDan2(double zaklDan2)
{
m_zaklDan2 = QSharedPointer<double>(new double);
*m_zaklDan2.data() = zaklDan2;
}
QString EetRequest::zaklDan2Str() const
{
return m_zaklDan2.isNull() ? NULL_VAL : QString::number(*m_zaklDan2.data(), 'f', 2);
}
double EetRequest::dan2() const
{
return m_dan2.isNull() ? 0 : *m_dan2.data();
}
void EetRequest::setDan2(double dan2)
{
m_dan2 = QSharedPointer<double>(new double);
*m_dan2.data() = dan2;
}
QString EetRequest::dan2Str() const
{
return m_dan2.isNull() ? NULL_VAL : QString::number(*m_dan2.data(), 'f', 2);
}
double EetRequest::zaklDan3() const
{
return m_zaklDan3.isNull() ? 0 : *m_zaklDan3.data();
}
void EetRequest::setZaklDan3(double zaklDan3)
{
m_zaklDan3 = QSharedPointer<double>(new double);
*m_zaklDan3.data() = zaklDan3;
}
QString EetRequest::zaklDan3Str() const
{
return m_zaklDan3.isNull() ? NULL_VAL : QString::number(*m_zaklDan3.data(), 'f', 2);
}
QString EetRequest::dan3Str() const
{
return m_dan3.isNull() ? NULL_VAL : QString::number(*m_dan3.data(), 'f', 2);
}
double EetRequest::dan3() const
{
return m_dan3.isNull() ? 0 : *m_dan3.data();
}
void EetRequest::setDan3(double dan3)
{
m_dan3 = QSharedPointer<double>(new double);
*m_dan3.data() = dan3;
}
double EetRequest::cestSluz() const
{
return m_cestSluz.isNull() ? 0 : *m_cestSluz.data();
}
void EetRequest::setCestSluz(double cestSluz)
{
m_cestSluz = QSharedPointer<double>(new double);
*m_cestSluz.data() = cestSluz;
}
QString EetRequest::cestSluzStr() const
{
return m_cestSluz.isNull() ? NULL_VAL : QString::number(*m_cestSluz.data(), 'f', 2);
}
double EetRequest::pouzitZboz1() const
{
return m_pouzitZboz1.isNull() ? 0 : *m_pouzitZboz1.data();
}
void EetRequest::setPouzitZboz1(double pouzitZboz1)
{
m_pouzitZboz1 = QSharedPointer<double>(new double);
*m_pouzitZboz1.data() = pouzitZboz1;
}
QString EetRequest::pouzitZboz1Str() const
{
return m_pouzitZboz1.isNull() ? NULL_VAL : QString::number(*m_pouzitZboz1.data(), 'f', 2);
}
double EetRequest::pouzitZboz2() const
{
return m_pouzitZboz2.isNull() ? 0 : *m_pouzitZboz2.data();
}
void EetRequest::setPouzitZboz2(double pouzitZboz2)
{
m_pouzitZboz2 = QSharedPointer<double>(new double);
*m_pouzitZboz2.data() = pouzitZboz2;
}
QString EetRequest::pouzitZboz2Str() const
{
return m_pouzitZboz2.isNull() ? NULL_VAL : QString::number(*m_pouzitZboz2.data(), 'f', 2);
}
double EetRequest::pouzitZboz3() const
{
return m_pouzitZboz3.isNull() ? 0 : *m_pouzitZboz3.data();
}
void EetRequest::setPouzitZboz3(double pouzitZboz3)
{
m_pouzitZboz3 = QSharedPointer<double>(new double);
*m_pouzitZboz3.data() = pouzitZboz3;
}
QString EetRequest::pouzitZboz3Str() const
{
return m_pouzitZboz3.isNull() ? NULL_VAL : QString::number(*m_pouzitZboz3.data(), 'f', 2);
}
double EetRequest::urcenoCerpZuct() const
{
return m_urcenoCerpZuct.isNull() ? 0 : *m_urcenoCerpZuct.data();
}
void EetRequest::setUrcenoCerpZuct(double urcenoCerpZuct)
{
m_urcenoCerpZuct = QSharedPointer<double>(new double);
*m_urcenoCerpZuct.data() = urcenoCerpZuct;
}
QString EetRequest::urcenoCerpZuctStr() const
{
return m_urcenoCerpZuct.isNull() ? NULL_VAL : QString::number(*m_urcenoCerpZuct.data(), 'f', 2);
}
double EetRequest::cerpZuct() const
{
return m_cerpZuct.isNull() ? 0 : *m_cerpZuct.data();
}
void EetRequest::setCerpZuct(double cerpZuct)
{
m_cerpZuct = QSharedPointer<double>(new double);
*m_cerpZuct.data() = cerpZuct;
}
QString EetRequest::cerpZuctStr() const
{
return m_cerpZuct.isNull() ? NULL_VAL : QString::number(*m_cerpZuct.data(), 'f', 2);
}
EetRequest::EetRezim EetRequest::rezim() const
{
return m_rezim;
}
void EetRequest::setRezim(const EetRequest::EetRezim &rezim)
{
m_rezim = rezim;
}
QString EetRequest::rezimStr() const
{
switch (m_rezim) {
case ZJEDNODUSENY:
return "1";
case STANDARD:
return "0";
default:
return "0";
}
}

@ -0,0 +1,186 @@
#ifndef EETREQUEST_H
#define EETREQUEST_H
#include <QString>
#include <QDate>
#include <QUuid>
#include <QTimeZone>
#include <QSharedPointer>
#include "eetcpp_global.h"
#define NULL_VAL "__NULL__"
class EETCPPSHARED_EXPORT EetRequest : public QObject
{
Q_OBJECT
Q_PROPERTY(QString dat_odesl READ datOdeslStr)
Q_PROPERTY(QString prvni_zaslani READ prvniZaslaniStr)
Q_PROPERTY(QString uuid_zpravy READ uuidZpravyStr)
Q_PROPERTY(QString produkcni READ produkcniStr)
Q_PROPERTY(QString dic_popl READ dicPopl)
Q_PROPERTY(QString dic_poverujiciho READ dicPoverujiciho)
Q_PROPERTY(QString id_provoz READ idProvoz)
Q_PROPERTY(QString id_pokl READ idPokl)
Q_PROPERTY(QString porad_cis READ poradCis)
Q_PROPERTY(QString dat_trzby READ datTrzbyStr)
Q_PROPERTY(QString celk_trzba READ celkTrzbaStr)
Q_PROPERTY(QString zakl_nepodl_dph READ zaklNepodlDphStr)
Q_PROPERTY(QString zakl_dan1 READ zaklDan1Str)
Q_PROPERTY(QString zakl_dan2 READ zaklDan2Str)
Q_PROPERTY(QString zakl_dan3 READ zaklDan3Str)
Q_PROPERTY(QString dan1 READ dan1Str)
Q_PROPERTY(QString dan2 READ dan2Str)
Q_PROPERTY(QString dan3 READ dan3Str)
Q_PROPERTY(QString cest_sluz READ cestSluzStr)
Q_PROPERTY(QString pouzit_zboz1 READ pouzitZboz1Str)
Q_PROPERTY(QString pouzit_zboz2 READ pouzitZboz2Str)
Q_PROPERTY(QString pouzit_zboz3 READ pouzitZboz3Str)
Q_PROPERTY(QString urceno_cerp_zuct READ urcenoCerpZuctStr)
Q_PROPERTY(QString cerp_zuct READ cerpZuctStr)
Q_PROPERTY(QString rezim READ rezimStr)
public:
explicit EetRequest(QObject *parent = 0);
enum EetRezim {
ZJEDNODUSENY = 0,
STANDARD
};
QDateTime datOdesl() const;
void setDatOdesl(const QDateTime &datOdesl);
QString datOdeslStr() const;
QTimeZone datOdeslZone() const;
void setDatOdeslZone(const QTimeZone &datOdeslZone);
QString datOdeslZoneStr() const;
bool prvniZaslani() const;
void setPrvniZaslani(bool prvniZaslani);
QString prvniZaslaniStr() const;
QUuid uuidZpravy() const;
void setUuidZpravy(const QUuid &uuidZpravy);
QString uuidZpravyStr() const;
bool produkcni() const;
void setProdukcni(bool produkcni);
QString produkcniStr() const;
QString dicPopl() const;
void setDicPopl(const QString &dicPopl);
QString dicPoverujiciho() const;
void setDicPoverujiciho(const QString &dicPoverujiciho);
QString idProvoz() const;
void setIdProvoz(const QString &idProvoz);
QString idPokl() const;
void setIdPokl(const QString &idPokl);
QString poradCis() const;
void setPoradCis(const QString &poradCis);
QDateTime datTrzby() const;
void setDatTrzby(const QDateTime &datTrzby);
QString datTrzbyStr() const;
QTimeZone datTrzbyZone() const;
void setDatTrzbyZone(const QTimeZone &datTrzbyZone);
double celkTrzba() const;
void setCelkTrzba(double celkTrzba);
QString celkTrzbaStr() const;
double zaklNepodlDph() const;
void setZaklNepodlDph(double zaklNepodlDph);
QString zaklNepodlDphStr() const;
double zaklDan1() const;
void setZaklDan1(double zaklDan1);
QString zaklDan1Str() const;
double dan1() const;
void setDan1(double dan1);
QString dan1Str() const;
double zaklDan2() const;
void setZaklDan2(double zaklDan2);
QString zaklDan2Str() const;
double dan2() const;
void setDan2(double dan2);
QString dan2Str() const;
double zaklDan3() const;
void setZaklDan3(double zaklDan3);
QString zaklDan3Str() const;
double dan3() const;
void setDan3(double dan3);
QString dan3Str() const;
double cestSluz() const;
void setCestSluz(double cestSluz);
QString cestSluzStr() const;
double pouzitZboz1() const;
void setPouzitZboz1(double pouzitZboz1);
QString pouzitZboz1Str() const;
double pouzitZboz2() const;
void setPouzitZboz2(double pouzitZboz2);
QString pouzitZboz2Str() const;
double pouzitZboz3() const;
void setPouzitZboz3(double pouzitZboz3);
QString pouzitZboz3Str() const;
double urcenoCerpZuct() const;
void setUrcenoCerpZuct(double urcenoCerpZuct);
QString urcenoCerpZuctStr() const;
double cerpZuct() const;
void setCerpZuct(double cerpZuct);
QString cerpZuctStr() const;
EetRezim rezim() const;
void setRezim(const EetRezim &rezim);
QString rezimStr() const;
private:
QDateTime m_datOdesl;
QTimeZone m_datOdeslZone;
bool m_prvniZaslani;
QUuid m_uuidZpravy;
bool m_produkcni;
QSharedPointer<QString> m_dicPopl;
QSharedPointer<QString> m_dicPoverujiciho;
QString m_idProvoz;
QString m_idPokl;
QString m_poradCis;
QDateTime m_datTrzby;
QTimeZone m_datTrzbyZone;
QSharedPointer<double> m_celkTrzba;
QSharedPointer<double> m_zaklNepodlDph;
QSharedPointer<double> m_zaklDan1;
QSharedPointer<double> m_dan1;
QSharedPointer<double> m_zaklDan2;
QSharedPointer<double> m_dan2;
QSharedPointer<double> m_zaklDan3;
QSharedPointer<double> m_dan3;
QSharedPointer<double> m_cestSluz;
QSharedPointer<double> m_pouzitZboz1;
QSharedPointer<double> m_pouzitZboz2;
QSharedPointer<double> m_pouzitZboz3;
QSharedPointer<double> m_urcenoCerpZuct;
QSharedPointer<double> m_cerpZuct;
EetRezim m_rezim;
signals:
public slots:
};
#endif // EETREQUEST_H

@ -0,0 +1,16 @@
#include "eetsender.h"
#include <QDebug>
EetSender::EetSender(QObject *parent) : QObject(parent)
{
}
void EetSender::sendRequest(EetRequest *request)
{
EetTemplate tempBody(BODY_TEMPLATE);
QString strBody = tempBody.fillTemplate(request);
qDebug() << strBody;
}

@ -0,0 +1,23 @@
#ifndef EETSENDER_H
#define EETSENDER_H
#include <QObject>
#include "eetcpp_global.h"
#include "eetrequest.h"
#include "eettemplate.h"
class EETCPPSHARED_EXPORT EetSender : public QObject
{
Q_OBJECT
public:
explicit EetSender(QObject *parent = 0);
void sendRequest(EetRequest *request);
signals:
public slots:
};
#endif // EETSENDER_H

@ -0,0 +1,80 @@
#include "eettemplate.h"
#include <QFile>
#include <QTextStream>
EetTemplate::EetTemplate(QObject *parent) : QObject(parent)
{
}
EetTemplate::EetTemplate(const QString &tmp, QObject *parent) : QObject(parent)
{
QFile tmpFile(tmp);
tmpFile.open(QFile::ReadOnly | QFile::Text);
QTextStream stream(&tmpFile);
m_template = stream.readAll();
}
QString EetTemplate::fillTemplate(EetRequest *request)
{
return fillTemplateInternal(request, nullptr);
}
QString EetTemplate::fillTemplate(QMap<QString, QString> map)
{
return fillTemplateInternal(nullptr, &map);
}
QString EetTemplate::fillTemplateInternal(EetRequest *request, QMap<QString, QString> *map)
{
QString ret;
QString phStart;
if (request != nullptr)
{
phStart = "@{";
}
else
{
phStart = "${";
}
for (int i = 0; i < m_template.size(); i++)
{
QChar c = m_template[i];
if (!m_template.mid(i).startsWith(phStart))
{
ret += c;
continue;
}
int p = m_template.indexOf("}", i + 2);
if (p < 0)
{
return ret;
}
QString var = m_template.mid(i + 2, p - i - 2);
QString value;
if (request != nullptr)
{
value = request->property(var.toStdString().c_str()).toString();
}
else
{
value = map->value(var, NULL_VAL);
}
if (value != NULL_VAL)
{
QString attrib = QString("%1=\"%2\"").arg(var, value);
ret += attrib;
}
i = p;
}
return ret;
}

@ -0,0 +1,33 @@
#ifndef EETTEMPLATE_H
#define EETTEMPLATE_H
#include <QObject>
#include <QString>
#include <QMap>
#include "eetrequest.h"
#define BODY_TEMPLATE ":/res/template_body.txt"
#define REQUEST_TEMPLATE ":/res/template_request.txt"
#define SIGNATURE_TEMPLATE ":/res/template_signature.txt"
class EetTemplate : public QObject
{
Q_OBJECT
public:
explicit EetTemplate(QObject *parent = 0);
EetTemplate(const QString &tmp, QObject *parent = 0);
QString fillTemplate(EetRequest *request);
QString fillTemplate(QMap<QString, QString> map);
signals:
public slots:
private:
QString m_template;
QString fillTemplateInternal(EetRequest *request, QMap<QString, QString> *map);
};
#endif // EETTEMPLATE_H

@ -0,0 +1,33 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-07T15:25:00
#
#-------------------------------------------------
QT += network xml
QT -= gui
TARGET = EetCpp
TEMPLATE = lib
DEFINES += EETCPP_LIBRARY
SOURCES += eetcpp.cpp \
eetrequest.cpp \
eettemplate.cpp \
eetsender.cpp
HEADERS += eetcpp.h\
eetcpp_global.h \
eetrequest.h \
eettemplate.h \
eetsender.h
unix {
target.path = /usr/lib
INSTALLS += target
}
RESOURCES += \
resource.qrc

@ -0,0 +1,10 @@
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="TheBody" xml:id="TheBody">
<eet:Trzba xmlns:eet="http://fs.mfcr.cz/eet/schema/v3">
<eet:Hlavicka @{dat_odesl} @{overeni} @{prvni_zaslani} @{uuid_zpravy}></eet:Hlavicka>
<eet:Data @{celk_trzba} @{cerp_zuct} @{cest_sluz} @{dan1} @{dan2} @{dan3} @{dat_trzby} @{dic_popl} @{dic_poverujiciho} @{id_pokl} @{id_provoz} @{porad_cis} @{pouzit_zboz1} @{pouzit_zboz2} @{pouzit_zboz3} @{rezim} @{urceno_cerp_zuct} @{zakl_dan1} @{zakl_dan2} @{zakl_dan3} @{zakl_nepodl_dph}></eet:Data>
<eet:KontrolniKody>
<eet:pkp cipher="RSA2048" digest="SHA256" encoding="base64">${pkp}</eet:pkp>
<eet:bkp digest="SHA1" encoding="base16">${bkp}</eet:bkp>
</eet:KontrolniKody>
</eet:Trzba>
</soap:Body>

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
soap:mustUnderstand="1">
<wsse:BinarySecurityToken
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="TheCert">${certb64}</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="TheSignature">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"/>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference URI="#TheBody">
<ds:Transforms>
<ds:Transform Algorithm='http://www.w3.org/2001/10/xml-exc-c14n#'/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>${digest}</ds:DigestValue><!--computed by xmldig engine -->
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>${signature}</ds:SignatureValue><!--computed by xmldig engine -->
<ds:KeyInfo Id="TheKeyInfo">
<wsse:SecurityTokenReference wsu:Id="TheSecurityTokenReference">
<wsse:Reference URI="#TheCert" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</SOAP-ENV:Header>
${soap:Body}
</soap:Envelope>

@ -0,0 +1,13 @@
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="soap"></ec:InclusiveNamespaces>
</ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></ds:SignatureMethod>
<ds:Reference URI="#TheBody">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod>
<ds:DigestValue>${digest}</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>

@ -0,0 +1,7 @@
<RCC>
<qresource prefix="/">
<file>res/template_body.txt</file>
<file>res/template_request.txt</file>
<file>res/template_signature.txt</file>
</qresource>
</RCC>
Loading…
Cancel
Save