Commit 2d5e5de2 authored by Gozutok, Recep's avatar Gozutok, Recep
Browse files

Upload New File

parent 553e9ba6
#include "soapCentralSystemServiceSoapProxy.h" // include the proxy declarations
#include "CentralSystemServiceSoap.nsmap" // include the XML namespace mappings
#include <ctime>
int main() {
CentralSystemServiceSoapProxy service;
ns1__AuthorizeRequest req;
ns1__AuthorizeResponse res;
SOAP_ENV__Header rec;
rec.ns1__chargeBoxIdentity = "CP1234";
rec.wsa5__MessageID = "file:///home/rgozutok/Belgeler/Thread/CentralSystemServiceSoap.Authorize.req.xml";
rec.wsa5__To = "http://130.149.159.42:9000/soap/CS?wsdl";
rec.wsa5__Action = "/Authorize";
service.soap_header(
rec.ns1__chargeBoxIdentity,
rec.wsa5__MessageID,
rec.wsa5__RelatesTo,
rec.wsa5__From,
rec.wsa5__ReplyTo,
rec.wsa5__FaultTo,
rec.wsa5__To,
rec.wsa5__Action,
rec.chan__ChannelInstance);
req.idTag;
double result=service.Authorize( &req, res);
if (result == SOAP_OK) {
std::cout<<"Yes the binding is working..."<< std::endl;
if (res.idTagInfo->status==0)
std::cout<<"Authorization is Accepted..."<<std::endl;
if (res.idTagInfo->status==1)
std::cout<<"Authorization is Blocked..."<<std::endl;
if (res.idTagInfo->status==2)
std::cout<<"Authorization is Expired..."<<std::endl;
if (res.idTagInfo->status==3)
std::cout<<"Authorization is Invalid..."<<std::endl;
if (res.idTagInfo->status==4)
std::cout<<"Authorization is ConcurrentTx..."<<std::endl;
}
tm *ltm = localtime(res.idTagInfo->expiryDate);
std::cout << "Date: "<< ltm->tm_mday << "/" << 1 + ltm->tm_mon << "/" << 1900 + ltm->tm_year << std::endl;
std::cout << "Time: "<< ltm->tm_hour << ":" << ltm->tm_min << ":" << 1 + ltm->tm_sec << std::endl;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment