gSOAP, Pthreads-Win32, OpenSSLを使ったSOAS C/Sアプリ開発

Similar documents
JavaとVisual Basicを使ったWebサービスの実装

TravelXMLを利用した Webサービス実証実験デモ

PowerPoint プレゼンテーション

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

9iAS_DEV.PDF

Web SOAP Internet Web REST SOAP REST 3 REST SOAP 4

はじめに

講座計画書サンプル

Oracle9i JDeveloperによるWebサービスの構築

FileMaker Server Getting Started Guide

Testing XML Performance

目次 第 1 章はじめに... 3 第 2 章ネットワーク設定 DNS の設定 アウトバウンド HTTPS 接続の許可 アウトバウンド SMTP/POP 接続の許可... 4 第 3 章 JDK への追加ライブラリインストール


<4D F736F F D20566F F6E658C6791D FE382C582CC4A D834F E F8F4390B394C52E646F63>

28th Embarcadero Developer Camp

untitled

TopLink È... 3 TopLink...5 TopLink åø... 6 TopLink å Workbench O/R ~... 8 Workbench À ~... 8 Foundation Library å... 8 TopL

Web 1 p.2 1 Servlet Servlet Web Web Web Apache Web Servlet JSP Web Apache Tomcat Jetty Apache Tomcat, Jetty Java JDK, Eclipse

II 1 p.1 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway Interface Web HTML Web Web CGI CGI CGI Perl, PHP C JavaScript Web CGI HTML 1.2 Servlet Java

Oracle Application Server 10g Release 3(10.1.3)Oracle HTTP Serverの概要

wpEnterpriseSvr.doc

FileMaker Server 16 インストールおよび構成ガイド

,. OpenXM... :. Simplify. OX-RFC-104 (OoHG).. knoppix/math. Contributed software..

FileMaker Server 15 入門ガイド

Web STEPS Web Web Form Cookie HTTP STEPS Web

サイボウズ Office8 API マニュアル API 概要 第 1 版 サイボウズ株式会社

FileMaker Server 8 Advanced Web Publishing Installation Guide

WS-I Basic Profile 1.0 の概説

WS-I Basic Profile 1.0 の概説

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f


FileMaker Server Getting Started Guide

Delphi XE 機能評価ガイド

untitled

, : GUI Web Java 2.1 GUI GUI GUI 2 y = x y = x y = x

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f

FileMaker ODBC and JDBC Guide

untitled

MySQLにおけるシステム運用時のポイント

BC4J...4 BC4J Association JSP BC4J JSP OC4J

intra-mart Web for SellSide ver /03/31 Oracle MS-SQL Server IBM DB2 MS-SQL Server IBM DB2 Client Side JavaScript Server Side JavaScript URL -

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

SAML

untitled

Microsoft Word - migrateto10g2.doc

IT Web NEC Corporation

FileMaker 16 ODBC と JDBC ガイド

untitled

retool_ _intro.indd

FileMaker ODBC と JDBC ガイド

untitled

FileMaker Server Getting Started Guide

FileMaker Server Getting Started Guide

untitled

untitled

untitled

Copyright XML 2005,2006 All rights reserved. XML Consortium Web Web Web Web Web Web Web


データベース認識Webサービス

untitled

FileMaker Server 9 Getting Started Guide

Java Platform Debugger Architecture Apache JServ Oracle JVM JPDA JVM Tomcat Oracle JVM... 7

橡PervasiveSQL2000ReviewersGuide.PDF

u302.book

Microsoft Word - jpluginmanual.doc

Windows2000 Edge Components V Edge Components V Java Edge Components

はじめに

概要

Web Tomcat MapDataManager i

eDeveloper

Adobe LiveCycle Workbench 11 のインストール

FileMaker 15 ODBC と JDBC ガイド

Windows Web Windows Windows WinSock

概要


biz-Stream v4 各種機能別動作環境一覧表

XMLアクセス機能説明書


FileMaker Server 9 Getting Started Guide

FileMaker ODBC and JDBC Guide

Oracle Application Server 10gリリース2( )Oracle HTTP Serverの概要

intra-mart ver /10/31 1. / intra-mart 3.2 AND intra-mart (JavaMail ) ( )

未踏成果報告会-fix.key

実行形式の作成と構成管理 2012 年 7 月 8 日 海谷治彦 1

Microsoft Word - 430_15_Developing_Stored_Procedure.doc

installtk.ps

ISPv30インストールガイド

Oracle Forms Services R6i

XISによる効率良いシステム開発のポイント

7th CodeGear Developer Camp

QuickTest Professional対応環境表

2

untitled

UCP Web サービスの使用

Web2.0 LL Framework Ruby on Rails / TurboGears / CakePHP Atlas Web2.0 XML Selenium / JMeter 3 Ajax Web 2.0 UI Ruby on Rails Web 2. ASP.NET AJAX,

IT / KPI IT WF(XOML),BPEL WSDL XSD IT XSD WSDL BPEL XOML XML

新・明解Java入門

nopcommerce Adobe Flash ( 1 ) 1 nopcommerce 2.2 ( [5, p.3-4] )

Windows Macintosh 18 Java Windows 21 Java Macintosh

file:///D|/C言語の擬似クラス.txt

Transcription:

gsoap, Pthreads-Win32, OpenSSL SOAP C/S Developer Tools Group 1973 TurboC++2nd JBuilder ML,C++Builder ML,Delphi ML,C# ML,CORBA ML http://mixi.jp/show_friend.pl?id=208738 Java http://www.javareading.com/bof/ 2

SOAP, WSDL, / IDL2WSDL IDL WSDL gsoap + Web CGI SOAP gsoap + Pthreads-Win32 CGI gsoap + Pthreads-Win32 + OpenSSL SOAP over SSL Delphi SSL 3 SOAP

C/S 1 BDE etc GUI TCP/IP RDBMS 2 - SOAP TCP/IP GUI SOAP over SOAP RDBMS HTTP TCP/IP 5 SOAP XML HTTP Y = obj.foo(x); X HTTP return Y; SOAP Y HTTP SOAP 6

WSDL Web Services Description Language Web WSDL / /.. WSDL Y = obj.foo(x); SOAP (A) SOAP (B) return Y; SOAP (A) SOAP (B) 7 SOAP Apache + CGI CGI Apache Tomcat + Apache Axis( ) + Tomcat xxx.class Axis IIS + ASP.NET + IIS ASP.NET.NET8

IDL2WSDL WSDL WSDL XML WSDL WSDL WSDL Demo.wsdl <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions targetnamespace="http://tempuri.org" xmlns:impl="http://tempuri.org" xmlns:intf="http://tempuri.org" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:tns1="http://corba.omg.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="http://tempuri.org"> <import namespace="http://corba.omg.org"/> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complextype name="employee"> <sequence> <element name="id" type="xsd:int"/> <element name="data" nillable="true" type="soapenc:string"/> </sequence> </complextype> <complextype name="nosuchemployee"> <complexcontent> <extension base="tns1:userexception"> <sequence> <element name="reason" nillable="true" type="soapenc:string"/> </sequence> </extension> </complexcontent> </complextype> </schema> <schema xmlns="http://www.w3.org/2001/xmlschema" targetnamespace="http://corba.omg.org"> <import namespace="http://tempuri.org"/> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complextype abstract="true" name="userexception"> <sequence/> </complextype> </schema> </wsdl:types> <wsdl:message name="findbyprimarykeyrequest"> <wsdl:part name="in0" type="xsd:int"/> </wsdl:message> <wsdl:message name="findbyprimarykeyresponse"> <wsdl:part name="findbyprimarykeyreturn" type="impl:employee"/> </wsdl:message> <wsdl:message name="nosuchemployee"> <wsdl:part name="fault" type="impl:nosuchemployee"/> </wsdl:message> <wsdl:porttype name="employeemanager"> <wsdl:operation name="findbyprimarykey" parameterorder="in0"> 10

IDL IDL Interface Definition Language ( ) IDL WSDL module Demo { struct Employee { Demo.idl long id; wstring data; }; exception NoSuchEmployee { wstring reason; }; interface EmployeeManager { : Employee findbyprimarykey(in long id) raises(nosuchemployee); }; }; : 11 IDL WSDL Borland VisiBroker 7.0 IDL WSDL JDK Java Development Kit Apache Axis Java2WSDL Web Services Description Language for Java Toolkit WSDL4J JavaMail API Apache Axis JavaBeans Activation Framework JAF Apache Axis 12

IDL WSDL IDL idlj.java javac.class Java2WSDL WSDL 13 IDL WSDL JDK http://java.sun.com/j2se/1.4.2/download.html idlj, javac, java Apache Axis 1.4 http://ftp.kddilabs.jp/infosystems/apache/ws/axis/1_4/axis-bin-1_4.zip lib.jar JavaMail API 1.4 http://java.sun.com/products/javamail/downloads/index.html mail.jar JavaBeans Activation Framework 1.0.2 http://java.sun.com/products/archive/javabeans/jaf102.html activation.jar 14

IDL WSDL JDKbin PATH IDL Demo.idl idlj Demo.idl Java c: >idlj Demo.idl findbyprimarykey(int id) Demo.EmployeeManagerOperations Demo EmployeeManagerOperations.java c: >javac Demo EmployeeManagerOperations.java Demo EmployeeManagerOperations.class 15 IDL WSDL Apache Axis Java2WSDL CLASSPATH + Axis lib jar + JavaMail API + JAF c: >set CLASSPATH=.;C: axis-1_4 lib axis.jar;c: axis-1_4 lib axis- ant.jar;c: axis-1_4 lib commons-discovery-0.2.jar;c: axis- 1_4 lib commons-logging-1.0.4.jar;c: axis-1_4 lib jaxrpc.jar;c: axis- 1_4 lib log4j-1.2.8.jar;c: axis-1_4 lib saaj.jar;c: axis-1_4 lib wsdl4j- 1.5.1.jar;C: axis-1_4 lib mail.jar;c: axis-1_4 lib activation.jar Java2WSDL Java WSDL c: >java org.apache.axis.wsdl.java2wsdl -o Demo.wsdl -n http://tempuri.org -l https://localhost:18081 -s EmployeeManager -b EmployeeManagerSoapBinding -P EmployeeManager Demo.EmployeeManagerOperations 16

IDL WSDL Java2WSDL -o WSDL : Demo.wsdl -n WSDL XMLnamespace : http://tempuri.org -l Web URL : https://localhost:18081 WSDL Java : Demo.EmployeeManagerOperations 17 gsoap CGI + Web

gsoap WSDL Web gsoap 5 C/C++ SOAP MPL1.1 Windows, UNIX,MacOSX stdsoap2.cpp,stdsoap2.h!! URL: http://www.cs.fsu.edu/~engelen/soap.html WSDL C/C++ / CGI SSL OpenSSL 19 gsoap C++ SourceForge gsoap 2.7.9 http://jaist.dl.sourceforge.net/sourceforge/gsoap2/gsoap_ win32_2.7.9.zip char* std::wstring <gsoap_dir> typemap.dat # xsd string = char* char* xsd string = std::wstring std::wstring SOAP_ENC string = std::wstring std::wstring Turbo C++ Explorer http://www.borland.com/downloads/download_turbo.html 20

CGI VCL gsoap wsdl2h WSDL Demo.wsdl C Demo.h c: >wsdl2h -t <gsoap_dir> typemap.dat -o Demo.h Demo.wsdl gsoap soapcpp2 Demo.h.cpp,.h c: >soapcpp2 -S -L -I <gsoap_dir> import Demo.h WSDL soapc.cpp wsdl2h ( ) soapserver.cpp soaph.h EmployeeManagerSoapBinding.nsmap soapcpp2 SOAP soapc.cpp soapserver.cpp stdsoap2.cpp gsoap SOAP CGI(.EXE) 21 CGI main Web CGI gsoap : : new delete 22

CGI Apache2.0.x CGI CGI CPPServer.exe <Apache_Dir> cgi-bin C cc3270mt.dll IE Web Web SOAP 23 SOAP gsoap

VCL gsoap wsdl2h WSDL Demo.wsdl C Demo.h c: >wsdl2h -t <gsoap_dir> typemap.dat -o Demo.h Demo.wsdl gsoap soapcpp2 Demo.h.cpp,.h c: >soapcpp2 -C -L -I <gsoap_dir> import Demo.h soapc.cpp WSDL soapclient.cpp soapemployeemanagersoapbindingproxy.h wsdl2h ( ) EmployeeManagerSoapBinding.nsmap soapcpp2 soapc.cpp soapclient.cpp SOAP stdsoap2.cpp gsoap SOAP 25 main Web Web : Web : (99) 26

Web WSDL soapemployeemanagersoapbindingproxy.h Web : service->endpoint = "http://localhost/cgi-bin/cppserver.exe"; (ns1 Employee) std::wstring (int) Delphi/BCBGUI WideString 27 POSIX Threads

gsoap SOAP gsoapcgi SOAP Apache Web gsoap.exe SOAP 1 Windows Win32 API CreateThread_beginthread UNIX POSIX Threads Pthreads pthread_create 29 WindowsPOSIX Threads Pthreads Win32 API gsoap C/C++ Win32 API POSIX Threads Win32 API Pthreads-Win32 http://sourceware.org/pthreads-win32/ LGPL 30

Pthreads-Win32 2.7.0 ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-7-0-release.exe c: pthreads2.7.0 TASM32 c: pthreads2.7.0 pthreads.2 config.h c: pthreads2.7.0 pthreads.2 c: >make -fbmakefile Bmakefile c: pthreads2.7.0 pthreads.2 DLL pthreadbc2.dll pthreadbc2.lib 31 CGI SOAP main localhost80 SOAP SOAP 32

CGI SOAP ns1 findbyprimarykey SOAP c: pthreads2.7.0 pthreads.2 pthreadbc2.lib 33 SOAP SOAP SOAP CPPServer.exe C cc3270mt.dll Pthreads-Win32DLL pthreadbc2.dll Web URL : service->endpoint = "http://localhost/"; gsoap SOAP soap_bind 34

SSL OpenSSL SOAP gsoap SSL OpenSSL gsoap stdsoap2.cpp, stdsoap2.h SSL OpenSSL SOAP #ifdef WITH_OPENSSL #endif WITH_OPENSSL define OpenSSL OpenSSL http://www.openssl.org/ Apache BSD 36

OpenSSL OpenSSL http://www.openssl.org/source/openssl-0.9.8d.tar.gz make Perl OpenSSL make c: >ms bcb4.bat c: >make fbcb.mak (.h) <OpenSSL_dir> inc32 (.exe) (.lib) <OpenSSL_dir> out32 37 SOAP main OpenSSL OpenSSL SSL SSL18081 38

SOAP main SSL OpenSSL 39 SOAP OpenSSL OpenSSL OpenSSL gsoap Windows Win32 API Win32 UNIX PThreads PThreads PThreads 40

SOAP OpenSSL 41 SOAP OpenSSL Win32PThreads pthead_self Win32 API 42

SSL server.pem openssl PEM 43 SSL dh512.pem gsoapsoap_ssl_server_context dh512.pem NULL DHE RSA 44

SOAP WITH_OPENSSL <OpenSSL> inc32 OpenSSL libeay32.lib ssleay32.lib SOAP.exe server.pem dh512.pem DHE 45 SOAP SSL SOAP CPPServer.exe C cc3270mt.dll Pthreads-Win32DLL pthreadbc2.dll OpenSSL.EXE IE Web Web URL https://localhost:18081/ SOAP SOAP 46

SSL OpenSSL SOAP SOAP main OpenSSL SSL OpenSSL 48

SOAP OpenSSL SOAP Web URL SSL : service->endpoint = "https://localhost:18081/"; WITH_OPENSSL <OpenSSL> inc32 OpenSSL libeay32.lib ssleay32.lib SOAP SOAP cacert.pem SOAP.exe 49 SOAP OpenSSL.EXE Ethereal SSL TLS_DHE_RSA_WITH_AES_256_CBC_SHA 50

gsoapopenssl gsoapsoapcpp2 / soapc.cpp Web C++ 1 2 51 gsoapopenssl gsoap stdsoap2.cpp OpenSSL OpenSSL 52

DelphiVCLSOAP gsoap SSL SOAP Delphi VCL SOAP QualityCentral#10823 http://qc.borland.com/wc/qcmain.aspx?d=10823 IE cacert.pem OK 54

Thank you