Курсы английского
<<  BioUML – open source integrated platform for collaborative and reproducible research in systems biology Шаблон для филология  >>
C/C++ source code generation for EMS-WS
C/C++ source code generation for EMS-WS
Objectives
Objectives
Web service definition
Web service definition
WS means
WS means
WS stack
WS stack
EMS architecture
EMS architecture
EMS architecture
EMS architecture
EMS architecture
EMS architecture
C/C++ Web services clients
C/C++ Web services clients
Source code creation
Source code creation
Source code building
Source code building
C++ source code
C++ source code
C++ source code
C++ source code
C++ source code
C++ source code
C++ source code
C++ source code
C++ source code
C++ source code
Source code building
Source code building

Презентация на тему: «CC source code generation for EMS-WS». Автор: . Файл: «CC source code generation for EMS-WS.ppt». Размер zip-архива: 355 КБ.

CC source code generation for EMS-WS

содержание презентации «CC source code generation for EMS-WS.ppt»
СлайдТекст
1 C/C++ source code generation for EMS-WS

C/C++ source code generation for EMS-WS

Author Anton Gusev Location Russia, Protvino, IHEP

2 Objectives

Objectives

Web services overview EMS WS architecture SOAP/XML Web services in C/C++ C++ source code building for EMS WS client gSOAP means

3 Web service definition

Web service definition

Definition: A Web service is a software system identified by a URI, whose public interfaces and bindings are defined and described using XML. Its definition can be discovered by other software systems. These systems may then interact with the Web service in a manner prescribed by its definition, using XML based messages conveyed by Internet protocols.

4 WS means

WS means

What is WS? Application which allows remote procedure call over LAN/WAN WS is a messaging program system, messages are XML-based Why WS? Business WS-es are public, therefore business-partners may involve/export they business-process Easy money of WS using and deployment Using WS-es are platform independent Most popular transport protocols support (TCP/IP, HTTP, SMTP,...) Most popular program language support (Java, Python, C/C++, C#, Perl ant others) Succession of exist information systems Simple object access

5 WS stack

WS stack

WS stack

Application

Application (servlet)

rpcrouter

Web server

SOAP

SOAP

HTTP

HTTP

TCP/IP

TCP/IP

Infrastructure (Data link)

Infrastructure (Data link)

6 EMS architecture

EMS architecture

EMS – events producer is any PC Applications app(1) are any programs which produce log file(s) and some other system valuable information app(2) are produce system events in EMS event formate (EF) app(3) are convert log files of app(1) to EF app(2) and app(3) application provide EMS-events for EMS-WS EMS-events is XML document, SOAP enveloped.

7 EMS architecture

EMS architecture

relations between EMS producer and EMS-WS

WEB server includes EMS web service, which holds list of EMS-events in RAM EMS-ws receives events from producers and sends events to clients by requests

producer 1

producer N

HTML {SOAP XML[?]} network

8 EMS architecture

EMS architecture

EMS architecture

...

web-service EMS

producer 1

producer 2

EMS server

producer N

WEB-server

listener 1

? Response (set of EMS-events, xml-string)

Request ? (Expat expression)

9 C/C++ Web services clients

C/C++ Web services clients

SOAP/XML Web services clients in C/C++ What You Need WSDL file Generate by some SOAP tool Obtain from WS-provider SOAP engine installed Will translate wsdl file to c++ sources Provide SOAP-libraries for c++ C++ compiler installed For build WS-client application

SOAP Engine WSDL ? C++

C++ ? compiler

libs

libs

WSDL

Executable files

User’s project

10 Source code creation

Source code creation

C++ source code building for EMS WS client (1) EMS-WS WSDL file is available on http://140.109.98.130/axis/services/urn:EMS?wsdl Assumes gSOAP use as SOAP engine Use gcc as c++ compiler RH-Linux as OS Command line issue // 1. prepare directory for c++ project $mkdir csources // 2. download wsdl $wget http://140.109.98.130/axis/services/urn:EMS?wsdl

11 Source code building

Source code building

C++ source code building for EMS WS client (2) Command line issue // 3. Generate h-file of WS $wget 'http://140.109.98.130/axis/services/urn%3AEMS?wsdl‘ //4. Readable name for file $mv urn\:EMS\?wsdl EMS.wsdl //5. Obtain a header file from a WSDL document . The gSOAP 'wsdl2h' WSDL parser tool converts the WSDL $wsdl2h -o ems.h EMS.wsdl //6. The 'soapcpp2' compiler generates the skeleton routines and a WSDL description of the service $soapcpp2 -I ../gsoap-2.7/soapcpp2/ ems.h

12 C++ source code

C++ source code

C++ source code building for EMS WS client (3) Create the main.cpp file, which contents #include <string> #include <iostream> #include "soapEMSdemoPortSoapBindingProxy.h" #include "EMSdemoPortSoapBinding.nsmap“ using namespace std;

13 C++ source code

C++ source code

C++ source code building for EMS WS client (4) the main.cpp file content(2) int main(int argc, const char *argv[]) { int gSOAP_result = SOAP_EOM; string str_gSOAP_result = ""; ns1__getLatestEventResponse ltstEvRs; EMSdemoPortSoapBinding *EMS;

14 C++ source code

C++ source code

C++ source code building for EMS WS client (5) the main.cpp file content(3) EMS = new EMSdemoPortSoapBinding(); EMS->endpoint = "http://140.109.98.130:80/axis/services/urn:EMS"; EMS->soap->proxy_host= "proxy.ihep.su"; EMS->soap->proxy_port= 3128 gSOAP_result = EMS->ns1__getLatestEvent( ltstEvRs ); str_gSOAP_result= (gSOAP_result == SOAP_OK)? "Yes ": "No";

15 C++ source code

C++ source code

C++ source code building for EMS WS client (6) main.cpp file content(4) cout <<"\n Use endpoin:\t" << EMS->endpoint << "\n Use proxy:\t" << EMS->soap->proxy_host << ":" << EMS->soap->proxy_port <<"\n EMS->ns1__getLatestEvent( ltstEvRs ) responce:\n" << ltstEvRs.getLatestEventReturn <<"\n SOAP_OK - " << str_gSOAP_result <<"(" << gSOAP_result <<")\n";

16 C++ source code

C++ source code

C++ source code building for EMS WS client (7) main.cpp file content(5) if( EMS->soap->error ){ const char **s; if (!*soap_faultcode( EMS->soap )) soap_set_fault(EMS->soap); cerr << (*soap_faultcode(EMS->soap))<< "\n" << (*soap_faultstring(EMS->soap))<< "\n" ; s = soap_faultdetail( EMS->soap ); if (s && *s) cerr << "Detail: "<<(*s)<<"\n"; } return 0; }; // end of main function

17 Source code building

Source code building

C++ source code building for EMS WS client (8) Command line issue // 3. Compile c++ project $g++ -o emsclient main.cpp soapC.cpp soapClient.cpp -lgsoap //4. try launch executable file emsclient $./emsclient //5. issue example Use endpoin: http://140.109.98.130:80/axis/services/urn:EMS Use proxy: proxy.ihep.su:3128 EMS->ns1__getLatestEvent( ltstEvRs ) responce: <event><id>draco.ihep.su/1103785831/0</id><time>1103785831</time><type>activate</type><category>___</category><severity>10</severity><priority>10</priority><producer><netname>draco.ihep.su</netname><appname>emsclient</appname><sign>agusev</sign></producer><subject><netname>___</netname><service>___</service></subject><message><code>OO</code><body>___</body><help>___</help></message></event> SOAP_OK - Yes (0)

«CC source code generation for EMS-WS»
http://900igr.net/prezentacija/anglijskij-jazyk/cc-source-code-generation-for-ems-ws-235434.html
cсылка на страницу

Курсы английского

25 презентаций о курсах английского
Урок

Английский язык

29 тем
Слайды