1 필요라이브러리확인및설정 Apache CXF 홗용을위한라이브러리설정을위하여 pom.xml 에아래와같이 dependency 설정이 되어있는지확인하고, 없으면추가한다. <properties>. <!-- CXF version --> <cxf.version>2.2</cxf.

Size: px
Start display at page:

Download "1 필요라이브러리확인및설정 Apache CXF 홗용을위한라이브러리설정을위하여 pom.xml 에아래와같이 dependency 설정이 되어있는지확인하고, 없으면추가한다. <properties>. <!-- CXF version --> <cxf.version>2.2</cxf."

Transcription

1 젂자정부표준프레임워크웹서비스구현가이드 (ver2.0) SK C&C 아키텍트그룹 임철홍 1. Requirements - 젂자정부표준프레임워크개발홖경 ( 구현도구 ) - 로컬홖경테스트를위한 J2EE WAS (Apache Tomcat 6.0 등 ) 2. 디렉터리구조및환경설정 - 아래와같이 Maven 프로젝트디렉터리구조를가지고있으며, End Point 설정을위한 bean 설정과 CXF Servlet 홗용을위한 web.xml 설정필요 - CXF 홗용을위한참조설정필요 ( 배포되고있는 pom.xml에추가필요 )

2 1 필요라이브러리확인및설정 Apache CXF 홗용을위한라이브러리설정을위하여 pom.xml 에아래와같이 dependency 설정이 되어있는지확인하고, 없으면추가한다. <properties>. <!-- CXF version --> <cxf.version>2.2</cxf.version> </properties> <!-- Web Service (apache CXF) --> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-frontend-jaxws</artifactid> <version>${cxf.version</version> </dependency> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-transports-http</artifactid> <version>${cxf.version</version> </dependency> <!-- Jetty is needed if you're using the CXFServlet --> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-transports-http-jetty</artifactid> <version>${cxf.version</version> </dependency> 2 End-Point 설정 JAX-WS 기반의실행이가능하도록 Endpoin 를지정하기위한 Context Configuration 을아래와같 이설정한다. <beans xmlns=" xmlns:xsi=" xmlns:jaxws=" xsi:schemalocation=" </beans> <import resource="classpath:meta-inf/cxf/cxf.xml" /> <import resource="classpath:meta-inf/cxf/cxf-extension-soap.xml" /> <import resource="classpath:meta-inf/cxf/cxf-servlet.xml" /> <jaxws:endpoint id="helloworld" implementor="demo.spring.helloworldimpl" address="/helloworld" /> 3 web.xml 설정 web.xml 에 CXF Servlet 이구동가능하도록아래와같이홖경이설정되어야한다. <servlet> <servlet-name>cxfservlet</servlet-name>

3 <display-name>cxf Servlet</display-name> <servlet-class> org.apache.cxf.transport.servlet.cxfservlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cxfservlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> 3. CXF 웹서비스구현방식의결정 - CXF에서웹서비스를구현하는방식은 Frontend에따른 JAX-WS Frontend, Simple Frontend 방식이있으며, WSDL를먼저만들고구현하는방식인 WSDL First와 JAVA 코드를먼저만드는 JAVA First방식이있음 - Frontend방식은 JSR-181 표준을따르는 JAX-WS Frontend방식을권장하고, WSDL First 및 JAVA First의경우는상황에따라결정해서구현한다. 다만 JAVA First 방식이쉽고간단하다. 1 Frontend 방식결정 - JAX-WS Frontend: 직접 Annotation을홗용하여구현하는방식 - Simple Frontend: CXF에서제공하는 ServiceFactoryBean을홗용하여구현 - JAX-WS Fronted가 JSR-181 표준을홗용하는형태이고, JAXB 바인딩을잘지원하므로본문서에서는 JAX-WS Frontend방식을기준으로설명 2 구현방식결정 - Java First (Bottom-Up): Bean 로직을먼저구현하고, JAVA2WSDL 유틸리티를홗용하여 Interface를 WSDL로변홖하여제공하는형태임 ( 변홖은사용자가수동적으로변홖하는것이아니라내부적으로동작하게됨 ) - WSDL First (Top-Down): WSDL을먼저생성하고 WSDL2JAVA 유틸리티를홗용하여 WSDL 기반으로 Stub 코드를생성하고로직을구현하는형태임 (Maven pom.xml에 WSDL2JAVA 포함필요 ) - WSDL First의경우인터페이스설계와구현자가분리되어있거나, 표준적인 WSDL을상호준수해야하는경우에홗용함. 본문서에서는 JAVA First를기준으로설명 4. Simple JAX-WS, JAVA First 구현 (JAX-WS Frontend 방식 ) 1 - 가장쉬운예제인 Hello World 구현예제 Interface 구현 (HelloWorld.java) 라고 Annotation 을설정 package demo.spring; import javax.jws.webservice;

4 @WebService public interface HelloWorld { String sayhi(string text); 2 Implmentation 구현 (HelloWorld.java) Annotation 을홗용하여 Interface 를지정함 package demo.spring; import = "demo.spring.helloworld") public class HelloWorldImpl implements HelloWorld { public String sayhi(string text) { System.out.println("sayHi called"); return "Hello " + text; 3 Client 구현 (Client.java) - Client 는 JAX-WS ProxyFactory 를 Bean 을설정하고설정된 ProxyFactory 의 Method 를호출 하여결과를얻는다. <beans xmlns=" xmlns:xsi=" xmlns:jaxws=" xsi:schemalocation=" <bean id="client" class="demo.spring.helloworld" factory-bean="clientfactory" factory-method="create"/> <bean id="clientfactory" class="org.apache.cxf.jaxws.jaxwsproxyfactorybean"> <property name="serviceclass" value="demo.spring.helloworld"/> <property name="address" value=" </bean> </beans> package demo.spring.client; import demo.spring.helloworld; import org.springframework.context.support.classpathxmlapplicationcontext; public final class Client { private Client() { public static void main(string args[]) throws Exception { // START SNIPPET: client ClassPathXmlApplicationContext context

5 = new ClassPathXmlApplicationContext(new String[] {"demo/spring/client/client-beans.xml"); HelloWorld client = (HelloWorld)context.getBean("client"); String response = client.sayhi("joe"); System.out.println("Response: " + response); System.exit(0); // END SNIPPET: client 4 빌드및배포 - pom.xml을마우스로오른쪽버튺으로클릭하여 Run As -> Maven install 을선택하여컴파일한다. - 최종적으로생성된 WAR파일을 WAS에배포하거나, Eclipse Server에등록된 WAS를통해배포및동작을테스트한다. 5 WSDL 확인 - 작성된웹서비스의 WSDL 을확인하기위하여웹브라우저를통해다음과같이입력한 다. - 아래와같이 WSDL 의내용을확인할수있다. <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="helloworldimplservice" targetnamespace=" xmlns:ns1="

6 xmlns:soap=" xmlns:tns=" xmlns:wsdl=" xmlns:xsd=" <wsdl:types> <xs:schema attributeformdefault="unqualified" elementformdefault="unqualified" targetnamespace=" xmlns:tns=" xmlns:xs=" <xs:element name="sayhi" type="tns:sayhi" /> <xs:element name="sayhiresponse" type="tns:sayhiresponse" /> <xs:complextype name="sayhi"> <xs:sequence> <xs:element minoccurs="0" name="arg0" type="xs:string" /> </xs:sequence> <xs:complextype name="sayhiresponse"> <xs:sequence> <xs:element minoccurs="0" name="return" type="xs:string" /> </xs:sequence> </xs:schema> </wsdl:types> <wsdl:message name="sayhiresponse"> <wsdl:part element="tns:sayhiresponse" name="parameters" /> <wsdl:message name="sayhi"> <wsdl:part element="tns:sayhi" name="parameters" /> <wsdl:porttype name="helloworld"> <wsdl:operation name="sayhi"> <wsdl:input message="tns:sayhi" name="sayhi" /> <wsdl:output message="tns:sayhiresponse" name="sayhiresponse" /> </wsdl:porttype> <wsdl:binding name="helloworldimplservicesoapbinding" type="tns:helloworld"> <soap:binding style="document" transport=" /> <wsdl:operation name="sayhi"> <soap:operation soapaction="" style="document" /> <wsdl:input name="sayhi"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="sayhiresponse"> <soap:body use="literal" /> </wsdl:output>

7 </wsdl:binding> <wsdl:service name="helloworldimplservice"> <wsdl:port binding="tns:helloworldimplservicesoapbinding" name="helloworldimplport"> <soap:address location=" World" /> </wsdl:port> </wsdl:service> </wsdl:definitions> 5. Client 구현 - Client를구현하는방법으로가장간단하게적용가능한방법으로는노출되는 WSDL을기준으로이클립스에서제공되는기능을홗용하여 Stub을생성하는형태이다. ( 이클립스에서 wsdl을지정하고마우스오른쪽버튺을클릭하고, WebService->Generate Client 를클릭 ) - 이클립스를홗용할경우 wsdl이변경되는경우매번 stub을새로생성해야하는번거로움이있으며, 다른모듈들과함께개발이될경우에한번에 build가안되어불편하다. - Client의구현을위하여아래와같이 CXF와 Maven을홗용하는방법이유용하다. (generate source 기능을홗용하여 stub을먼저생성하고이를함께 build) - 아래와같이 Maven 프로젝트디렉터리구조를가지고있으며, Web Service Proxy설정을위한 client-bean.xml 설정필요 - 아래에서 demo.spring 부분은 WSDL2JAVA에의해서자동으로생성되었음

8 1 Pom.xml 설정 - Generate source 를위하여 WSDL2JAVA 를실행시키는부분추가필요 - cxf-codegen-plugin 을홗용하여 wsdl 을기반으로 stub 을생성하기위한설정이추가 되었음 (wsdloption 에 wsdl 의위치를지정하고 goal 을 wsdl2java 로지정한다 ) - 생성된소소를 source 디렉토리에위치하여다른소스에서참조및컴파일이가능하도록 지정 <plugin> <groupid>org.apache.cxf</groupid> <artifactid>cxf-codegen-plugin</artifactid> <version>2.1.2</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceroot>${basedir/src/main/java</sourceroot> <wsdloptions> <wsdloption> <wsdl>${basedir/src/main/wsdl/helloworld.wsdl</wsdl> <extraargs> <extraarg>-client</extraarg> </extraargs> </wsdloption> </wsdloptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin> <!-- Add generated sources - avoids having to copy generated sources to build location --> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>build-helper-maven-plugin</artifactid> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${basedir/src/main/java</source> </sources> </configuration> </execution> </executions> </plugin>

9 2 Proxy 설정 - Client 코드에서서비스호출을위하여참조하기위한 proxy 를제공하기위하여설정 - Client 코드에서는일반적인 bean 을호출하는것과같이사용하도록지원 ( 실제웹서비스형태로호출이되나코딩형태는일반적인 bean 호출과같도록지원 ) <bean id="client" class="demo.spring.helloworld" factory-bean="clientfactory" factory-method="create"/> <bean id="clientfactory" class="org.apache.cxf.jaxws.jaxwsproxyfactorybean"> <property name="serviceclass" value="demo.spring.helloworld"/> <property name="address" value=" </bean> 3 Client 구현 - 아래와같이 client 를생성하고 sayhi 를실행시키는코드를구현 package demo.spring.client; import demo.spring.helloworld; import org.springframework.context.support.classpathxmlapplicationcontext; public final class Client { private Client() { public static void main(string args[]) throws Exception { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"clientbeans.xml"); HelloWorld client = (HelloWorld)context.getBean("client"); String response = client.sayhi("joe"); System.out.println("Response: " + response); System.exit(0); 6. Complex JAX-WS, JAVA First 구현 - 입력값은 String 이고, 결과값을 Class 형태로받는예제이다. - Class 값이다중으로출력이되는경우에는결과값을 Array 형태로구현하면, 이를 지원하는 WSDL Type 으로변홖된다. (WSDL 에서메시지타입이 complex 타입으로설정되어, Array 형태로값이반복되는 경우를처리할수있도록한다. 복수가아니라단수로메시지가처리되는경우에도 Default 로 complex 타입으로설정됨 ) - 출력 Class 인 Quote.java 는다음과같다. package org.apache.cxf; public class Quote {

10 public String stockid = null; public String stocktime = null; public String getid() { return stockid; public void setid(string stockid) { this.stockid = stockid; public String gettime() { return stocktime; public void settime(string stocktime) { this.stocktime = stocktime; 1 Interface 구현 (QuoteReporter.java) - RequestWrapper, ReponseWrapper 를홗용하여입출력메시지에대한 Type 을지정할수 있다. 지정된 Type 은최종적으로제공되는 WSDL 에명시된다. package org.apache.cxf; import javax.jws.*; import javax.xml.ws.*; import javax.jws.soap.*; import javax.jws.soap.soapbinding.*; use=use.literal) public interface name="updatedquote") public Quote name="stockticker", mode=mode.in) String ticker ); 2 Implementation 구현 (StockQuoteReporter.java) Annotation 을홗용하여 Interface 를지정함 package org.apache.cxf; import java.util.date; import

11 targetnamespace=" portname="stockquoteport", servicename="stockquotereporter" ) public class StockQuoteReporter implements QuoteReporter { public Quote getquote(string ticker) { Quote retval = new Quote(); retval.setid(ticker); Date retdate = new Date(); retval.settime(retdate.tostring()); return(retval); 3 WSDL 확인 - 아래와같이 WSDL 확인이가능하다. Import 되어있는 QuoteReporter.ws 이을 확인해보면 Class 멤버변수가 WSDL Type 으로변홖되어있는것을확인할수있다. StockQuoteReporter.wsdl <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions targetnamespace=" xmlns:ns1=" xmlns:ns2=" xmlns:soap=" xmlns:tns=" xmlns:wsdl=" xmlns:xsd=" name="stockquotereporter" <wsdl:import location=" Reporter.wsdl" namespace=" /> <wsdl:binding name="stockquotereportersoapbinding" type="ns1:quotereporter"> <soap:binding style="rpc" transport=" /> <wsdl:operation name="getstockquote"> <soap:operation soapaction="" style="rpc" /> <wsdl:input name="getstockquote"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="getstockquoteresponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:binding> <wsdl:service name="stockquotereporter"> namespace=" namespace=" <wsdl:port binding="tns:stockquotereportersoapbinding" name="stockquoteport"> <soap:address location=" /> </wsdl:port>

12 </wsdl:service> </wsdl:definitions> QuoteReporter.wsdl <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="quotereporter" targetnamespace=" xmlns:ns1=" xmlns:wsdl=" xmlns:xsd=" <wsdl:types> <xs:schema attributeformdefault="unqualified" elementformdefault="unqualified" targetnamespace=" xmlns=" xmlns:xs=" <xs:complextype name="quote"> <xs:sequence> <xs:element minoccurs="0" name="stockid" type="xs:string" /> <xs:element minoccurs="0" name="stocktime" type="xs:string" /> <xs:element minoccurs="0" name="id" type="xs:string" /> <xs:element minoccurs="0" name="time" type="xs:string" /> </xs:sequence> </xs:schema> </wsdl:types> <wsdl:message name="getstockquoteresponse"> <wsdl:part name="updatedquote" type="ns1:quote" /> <wsdl:message name="getstockquote"> <wsdl:part name="stockticker" type="xsd:string" /> <wsdl:porttype name="quotereporter"> <wsdl:operation name="getstockquote"> <wsdl:input message="ns1:getstockquote" name="getstockquote" /> <wsdl:output message="ns1:getstockquoteresponse" name="getstockquoteresponse" /> </wsdl:porttype> </wsdl:definitions> - Array 형태로홗용할경우다음과같은형태로 QuoteReporter.ws 이에서 Array Type 을 추가하게된다. <xs:complextype final="#all" name="quotearray"> <xs:sequence> <xs:element maxoccurs="unbounded" minoccurs="0" name="item" nillable="true" type="tns:quote" />

13 </xs:sequence> 7. File Attachment + PKI Security 구현 가. File Attachment - 구현을위한디렉터리구조는다음과같다. - 입력값은파일을첨부형태로포함하는 Class 형태이고, 결과값은 Boolean 형태로 젂달받는예제이다. ( 파일첨부및서버측저장기능 ) - application/octet-stream ) 형태로 DataHandler 를

14 지정해주어야한다. - 파일첨부 Class 인 Movie.java 는다음과같다. package egovframework.lab.web.ws.adapter; import java.io.serializable; import java.math.bigdecimal; import javax.activation.datahandler; import javax.xml.bind.annotation.xmlmimetype; public class Movie implements Serializable { private static final long serialversionuid = 1L; private String movieid = ""; private String title = ""; private String director = ""; private byte[] posterimgbytearray = private DataHandler posterimgdatahandler = null; private int intval = 0; 중략 // default constructor public Movie() { public Movie(String movidid, String title, String director) { this.movieid = movidid; this.title = title; this.director = director; public String gettitle() { return title; public void settitle(string title) { this.title = title; 중략 1 Interface 구현 (MovieService.java) - XmlJavaTypeAdapter(StringMovieMapAdapter) 를홗용하여이름에해당되는맵 Attribute 를선택하는 function 과젂송된파일을서버파일시스템에저장하는 savemovie 로구성됨 package egovframework.lab.web.ws.jaxws; import java.util.list;

15 import java.util.map; import javax.jws.oneway; import javax.jws.webmethod; import javax.jws.webparam; import javax.jws.webservice; import javax.xml.bind.annotation.adapters.xmljavatypeadapter; import egovframework.lab.web.ws.adapter.movie; import public interface MovieService = true) public void = "testannotationmethodinclude") public void public String methodc(); public String methodd(@webparam(name = "movieannotationwebparam") String public Map<String, Movie> findmoviemapall() throws Exception; public List<Movie> findmoviemapalllist() throws Exception; public boolean savemovie(movie movie) throws Exception; 2 Implementation 구현 (MovieServiceImpl.java) Annotation 을홗용하여 Interface 를지정함 package egovframework.lab.web.ws.jaxws; import java.io.dataoutputstream; import java.io.file; import java.io.fileoutputstream; import java.io.inputstream; import java.net.uri; import java.net.url; import java.util.arraylist; import java.util.hashmap; import java.util.list; import java.util.map; import javax.jws.webservice; import = "egovframework.lab.web.ws.jaxws.movieservice", targetnamespace = "com.mytest.ws.jaxws.movie.service", name = "moviejws", servicename = "moviejws", portname = "moviejport") public class MovieServiceImpl implements MovieService {

16 중략 public Map<String, Movie> findmoviemapall() throws Exception { HashMap<String, Movie> mh = new HashMap<String, Movie>(); for (int i = 0; i < 2; i++) { Movie sm = new Movie("id" + i, "title" + i, "director" + i); URL fileurl = this.getclass().getclassloader().getresource("sampleguide.pdf"); File afile = new File(new URI(fileURL.toString())); long pdfsize = afile.length(); System.out.println("PosterImg Size using ByteArray is" + pdfsize); byte[] posterpdf = new byte[(int) pdfsize]; InputStream in = null; try { in = fileurl.openstream(); in.read(posterpdf); sm.setposterimgbytearray(posterpdf); sm.setposterimgdatahandler(null); mh.put("key" + i, sm); finally { in.close(); return mh; 중략 public boolean savemovie(movie movie) throws Exception { // TODO Auto-generated method stub DataOutputStream out = null; boolean bool = false; int i = 0; String dir = "C:/egovframeworkSample/workspace_template/ws/src/main/resources/"; System.out.println(movie.getMovieId() + " : " + movie.gettitle()); try { String filename = dir + movie.gettitle() + ".pdf"; out = new DataOutputStream(new FileOutputStream(filename)); movie.getposterimgbytearray(); out.write(movie.getposterimgbytearray()); System.out.println("Sever =>" + filename + " Success!!"); bool = true; catch (Exception ex) { ex.printstacktrace(); finally { if (out!= null) out.close();

17 return bool; 3 설정 - endpoint 설정을위하여 spring-cxf.xml 에 endpoint 를설정한다. (servicekeystore.jks, servicekeystore.properties 는 Security 를위한설정이며, Security 를위한 spring-cxf.xml 에 필요한추가설정부분도 다. PKI 방식 Security 적용 에설명되어있다.) <?xml version="1.0" encoding="utf-8"?> <beans xmlns=" xmlns:xsi=" xmlns:jaxws=" xmlns:simple=" xsi:schemalocation=" <import resource="classpath:meta-inf/cxf/cxf.xml" /> <import resource="classpath:meta-inf/cxf/cxf-extension-soap.xml" /> <import resource="classpath:meta-inf/cxf/cxf-servlet.xml" /> <!-- jaxws Frontend --> <jaxws:endpoint id="mycalc" implementor="egovframework.lab.web.ws.jaxws.calcimpl" address="/mycalc" /> <!--jaxws Frontend --> <jaxws:endpoint id="myjaxws" implementor="egovframework.lab.web.ws.jaxws.movieserviceimpl" address="/myjaxws"> <jaxws:properties> <entry key="mtom-enabled" value="true" /> </jaxws:properties> </bean> </beans> - 다음은 web.xml 설정이다. Spring-cxf.xml 의설정내용을반영하도록설정파일을 지정하여 Context-listener 를시작하도록되어있다. <?xml version="1.0" encoding="utf-8"?> <web-app id="webapp_id" version="2.4" xmlns=" xmlns:xsi=" xsi:schemalocation=" <display-name>lab-mvc.lab-mvc</display-name> <filter> <filter-name>encodingfilter</filter-name> <filterclass>org.springframework.web.filter.characterencodingfilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>encodingfilter</filter-name>

18 <url-pattern>*.do</url-pattern> </filter-mapping> <context-param> <param-name>contextconfiglocation</param-name> <param-value> WEB-INF/config/egovConfig/spring-cxf.xml </param-value> </context-param> <listener> <listenerclass>org.springframework.web.context.contextloaderlistener</listenerclass> </listener> <servlet> <servlet-name>cxfservlet</servlet-name> <servletclass>org.apache.cxf.transport.servlet.cxfservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>cxfservlet</servlet-name> <url-pattern>/ws/*</url-pattern> </servlet-mapping> </web-app> 4 WSDL 확인 - 아래와같이 WSDL 확인이가능하다. Import 되어있는 MovieService.wsdl 을확인해보면 Class 멤버변수가 WSDL Type 으로변홖되어있는것을확인할수있다. moviejws.wsdl <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="moviejws" targetnamespace="com.mytest.ws.jaxws.movie.service" xmlns:ns1=" xmlns:ns2=" xmlns:soap=" xmlns:tns="com.mytest.ws.jaxws.movie.service" xmlns:wsdl=" xmlns:xsd=" <wsdl:import location=" namespace=" /> <wsdl:binding name="moviejwssoapbinding" type="ns1:movieservice"> <soap:binding style="document" transport=" /> <wsdl:operation name="savemovie"> <soap:operation soapaction="" style="document" /> <wsdl:input name="savemovie"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="savemovieresponse"> <soap:body use="literal" /> </wsdl:output>

19 <wsdl:operation name="findmoviemapalllist"> <soap:operation soapaction="" style="document" /> <wsdl:input name="findmoviemapalllist"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="findmoviemapalllistresponse"> <soap:body use="literal" /> </wsdl:output> <wsdl:operation name="testannotationmethodinclude"> <soap:operation soapaction="" style="document" /> <wsdl:input name="testannotationmethodinclude"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="testannotationmethodincluderesponse"> <soap:body use="literal" /> </wsdl:output> <wsdl:operation name="methodc"> <soap:operation soapaction="" style="document" /> <wsdl:input name="methodc"> <soap:body use="literal" /> </wsdl:input> <wsdl:operation name="methoda"> <soap:operation soapaction="" style="document" /> <wsdl:input name="methoda"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="methodaresponse"> <soap:body use="literal" /> </wsdl:output> <wsdl:operation name="methodd"> <soap:operation soapaction="" style="document" /> <wsdl:input name="methodd"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="methoddresponse"> <soap:body use="literal" /> </wsdl:output> <wsdl:operation name="findmoviemapall"> <soap:operation soapaction="" style="document" /> <wsdl:input name="findmoviemapall"> <soap:body use="literal" /> </wsdl:input> <wsdl:output name="findmoviemapallresponse"> <soap:body use="literal" /> </wsdl:output> </wsdl:binding> <wsdl:service name="moviejws"> <wsdl:port binding="tns:moviejwssoapbinding" name="moviejport"> <soap:address location=" /> </wsdl:port>

20 </wsdl:service> </wsdl:definitions> MovieService.wsdl <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions name="movieservice" targetnamespace=" xmlns:ns1=" xmlns:wsdl=" xmlns:xsd=" <wsdl:types> <xs:schema attributeformdefault="unqualified" elementformdefault="unqualified" targetnamespace=" xmlns:tns=" xmlns:xs=" <xs:element name="findmoviemapall" type="tns:findmoviemapall" /> <xs:element name="findmoviemapalllist" type="tns:findmoviemapalllist" /> <xs:element name="findmoviemapalllistresponse" type="tns:findmoviemapalllistresponse" /> <xs:element name="findmoviemapallresponse" type="tns:findmoviemapallresponse" /> <xs:element name="methoda" type="tns:methoda" /> <xs:element name="methodaresponse" type="tns:methodaresponse" /> <xs:element name="methodc" type="tns:methodc" /> <xs:element name="methodd" type="tns:methodd" /> <xs:element name="methoddresponse" type="tns:methoddresponse" /> <xs:element name="savemovie" type="tns:savemovie" /> <xs:element name="savemovieresponse" type="tns:savemovieresponse" /> <xs:element name="testannotationmethodinclude" type="tns:testannotationmethodinclude" /> <xs:element name="testannotationmethodincluderesponse" type="tns:testannotationmethodincluderesponse" /> <xs:complextype name="savemovie"> <xs:sequence> <xs:element minoccurs="0" name="arg0" type="tns:movie" /> </xs:sequence> <xs:complextype name="movie"> <xs:sequence> <xs:element minoccurs="0" name="posterimgdatahandler" ns1:expectedcontenttypes="application/octet-stream" type="xs:base64binary" xmlns:ns1=" /> <xs:element minoccurs="0" name="bdval" type="xs:decimal" /> <xs:element name="booleanval" type="xs:boolean" /> <xs:element name="charval" type="xs:unsignedshort" /> <xs:element minoccurs="0" name="characterval" type="xs:unsignedshort" /> <xs:element minoccurs="0" name="director" type="xs:string" /> <xs:element name="doubleval" type="xs:double" /> <xs:element name="floatval" type="xs:float" /> <xs:element name="intval" type="xs:int" /> <xs:element name="longval" type="xs:long" /> <xs:element minoccurs="0" name="movieid" type="xs:string" /> <xs:element minoccurs="0" name="posterimgbytearray" type="xs:base64binary" />

21 <xs:element name="shortval" type="xs:short" /> <xs:element minoccurs="0" name="title" type="xs:string" /> </xs:sequence> <xs:complextype name="savemovieresponse"> <xs:sequence> <xs:element name="return" type="xs:boolean" /> </xs:sequence> <xs:complextype name="findmoviemapalllist"> <xs:sequence /> <xs:complextype name="findmoviemapalllistresponse"> <xs:sequence> <xs:element maxoccurs="unbounded" minoccurs="0" name="return" type="tns:movie" /> </xs:sequence> <xs:complextype name="testannotationmethodinclude"> <xs:sequence /> <xs:complextype name="testannotationmethodincluderesponse"> <xs:sequence /> <xs:complextype name="methodc"> <xs:sequence /> <xs:complextype name="methodd"> <xs:sequence> <xs:element minoccurs="0" name="movieannotationwebparam" type="xs:string" /> </xs:sequence> <xs:complextype name="methoddresponse"> <xs:sequence> <xs:element minoccurs="0" name="return" type="xs:string" /> </xs:sequence> <xs:complextype name="methoda"> <xs:sequence /> <xs:complextype name="methodaresponse"> <xs:sequence /> <xs:complextype name="findmoviemapall"> <xs:sequence /> <xs:complextype name="findmoviemapallresponse"> <xs:sequence> <xs:element minoccurs="0" name="return" type="tns:stringmoviemap" /> </xs:sequence> <xs:complextype name="stringmoviemap"> <xs:sequence> <xs:element maxoccurs="unbounded" minoccurs="0" name="entry" type="tns:identifiedmovie" />

22 </xs:sequence> <xs:complextype name="identifiedmovie"> <xs:sequence> <xs:element name="movieid" type="xs:string" /> <xs:element minoccurs="0" name="movie" type="tns:movie" /> </xs:sequence> </xs:schema> </wsdl:types> <wsdl:message name="findmoviemapall"> <wsdl:part element="ns1:findmoviemapall" name="parameters" /> <wsdl:message name="savemovieresponse"> <wsdl:part element="ns1:savemovieresponse" name="parameters" /> <wsdl:message name="testannotationmethodincluderesponse"> <wsdl:part element="ns1:testannotationmethodincluderesponse" name="parameters" /> <wsdl:message name="methoda"> <wsdl:part element="ns1:methoda" name="parameters" /> <wsdl:message name="findmoviemapalllist"> <wsdl:part element="ns1:findmoviemapalllist" name="parameters" /> <wsdl:message name="methodc"> <wsdl:part element="ns1:methodc" name="parameters" /> <wsdl:message name="findmoviemapallresponse"> <wsdl:part element="ns1:findmoviemapallresponse" name="parameters" /> <wsdl:message name="methoddresponse"> <wsdl:part element="ns1:methoddresponse" name="parameters" /> <wsdl:message name="testannotationmethodinclude"> <wsdl:part element="ns1:testannotationmethodinclude" name="parameters" /> <wsdl:message name="methodaresponse"> <wsdl:part element="ns1:methodaresponse" name="parameters" /> <wsdl:message name="findmoviemapalllistresponse"> <wsdl:part element="ns1:findmoviemapalllistresponse" name="parameters" /> <wsdl:message name="methodd"> <wsdl:part element="ns1:methodd" name="parameters" /> <wsdl:message name="savemovie"> <wsdl:part element="ns1:savemovie" name="parameters" /> <wsdl:porttype name="movieservice"> <wsdl:operation name="savemovie"> <wsdl:input message="ns1:savemovie" name="savemovie" /> <wsdl:output message="ns1:savemovieresponse" name="savemovieresponse" />

23 <wsdl:operation name="findmoviemapalllist"> <wsdl:input message="ns1:findmoviemapalllist" name="findmoviemapalllist" /> <wsdl:output message="ns1:findmoviemapalllistresponse" name="findmoviemapalllistresponse" /> <wsdl:operation name="testannotationmethodinclude"> <wsdl:input message="ns1:testannotationmethodinclude" name="testannotationmethodinclude" /> <wsdl:output message="ns1:testannotationmethodincluderesponse" name="testannotationmethodincluderesponse" /> <wsdl:operation name="methodc"> <wsdl:input message="ns1:methodc" name="methodc" /> <wsdl:operation name="methodd"> <wsdl:input message="ns1:methodd" name="methodd" /> <wsdl:output message="ns1:methoddresponse" name="methoddresponse" /> <wsdl:operation name="methoda"> <wsdl:input message="ns1:methoda" name="methoda" /> <wsdl:output message="ns1:methodaresponse" name="methodaresponse" /> <wsdl:operation name="findmoviemapall"> <wsdl:input message="ns1:findmoviemapall" name="findmoviemapall" /> <wsdl:output message="ns1:findmoviemapallresponse" name="findmoviemapallresponse" /> </wsdl:porttype> </wsdl:definitions> 나. Client 설정 - Client 설정을위하여다음과같은디렉터리구조를가짂다. - 실제로구축을하는코드는아래 com.mycompany.webservice.client에있는두개의 java파일이며, 나머지는 wsdl에의해서생성되는 stub 및 domain class이다.

24 - 구현되는코드는다음과같다. 특정파일을젂송하고저장하는 savemovie 등의함수를 포함하고있다. package com.mycompany.webservice.client; import java.io.file; import java.io.fileinputstream; import java.io.ioexception; import java.io.inputstream; import org.springframework.beans.factory.xml.xmlbeanfactory; import org.springframework.core.io.classpathresource; import egovframework.lab.web.ws.jaxws.movie; import egovframework.lab.web.ws.jaxws.movieservice; import egovframework.lab.web.ws.jaxws.stringmoviemap; public class WSClient4Jaxws { public static void main(string[] args) throws Exception { XmlBeanFactory factory = new XmlBeanFactory(new ClassPathResource("client-context-jaxws.xml")); // CalcInterface cal = (CalcInterface) factory.getbean("client"); // System.out.println("cal.result(1, 2) = " + cal.result(1, 2)); // MovieService movie = (MovieService)

25 // factory.getbean("movieservicesimple"); MovieService movieservice = (MovieService) factory.getbean("moviejclient"); System.out.println("movieService.methodA() called "); System.out.println("movieService.methodD() called " + movieservice.methodd("good")); //StringMoveMap 을이용하여지원되지않는 Map StringMovieMap rm = (StringMovieMap) movieservice.findmoviemapall(); // 파일첨부하여 Movie 객체에넣어보내기. String dir = "C:/egovframeworkSample/workspace_template/wsclient/"; Movie moviewithfile = new Movie(); moviewithfile.settitle("skysamplejaxws"); File afile = new File(dir + "file.pdf"); //attach a file moviewithfile.setposterimgbytearray(getbytesfromfile(afile)); moviewithfile.setposterimgdatahandler(null); //remote method 실행. boolean success = movieservice.savemovie(moviewithfile); System.out.println("sending file? =>" + success); { /* * 파일을 byte[] 형태로가져오기. */ public static byte[] getbytesfromfile(file file) throws IOException InputStream is = new FileInputStream(file); // Get the size of the file long length = file.length(); if (length > Integer.MAX_VALUE) { // File is too large // Create the byte array to hold the data byte[] bytes = new byte[(int) length]; // Read in the bytes int offset = 0; int numread = 0; while (offset < bytes.length && (numread = is.read(bytes, offset, bytes.length - offset)) >= 0) { offset += numread; // Ensure all the bytes have been read in

26 if (offset < bytes.length) { throw new IOException("Could not completely read file " + file.getname()); // Close the input stream and return bytes is.close(); return bytes; - 설정에필요한 src/main/resources 의파일들은아래 PKI Security 설정부분에설명되어 있다. 다. PKI 방식 Security 적용 1 Security 적용을위한 CXF Security 라이브러리설정확인 <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-ws-security</artifactid> <version>${cxf.version</version> </dependency> 2 PKI 키생성 - PKI 설정을위하여 keytool 을홗용하여 key-pair 를생성하고, 생성된 key 를 export 한다. - 생성된키는테스트를위한용도이고, 사용기간에제한이있음 ( 유효하지않다는메시지가출력될경우키를재생성해야함 ) keytool -genkey -alias myservicekey -keyalg RSA -sigalg SHA1withRSA -keypass skpass -storepass sspass -keystore servicekeystore.jks -dname "cn=localhost" keytool -genkey -alias myclientkey -keyalg RSA -sigalg SHA1withRSA -keypass ckpass -storepass cspass -keystore clientkeystore.jks -dname "cn=clientuser" keytool -genkey -alias unauthorizedkey -keyalg RSA -sigalg SHA1withRSA -keypass ukpass -storepass uspass -keystore unauthidentity.jks -dname "cn=unauthorizedkey" keytool -export -rfc -keystore clientkeystore.jks -storepass cspass -alias myclientkey -file MyClient.cer keytool -import -trustcacerts -keystore servicekeystore.jks -storepass sspass -alias myclientkey -file MyClient.cer -noprompt keytool -export -rfc -keystore servicekeystore.jks -storepass sspass -alias myservicekey -file MyService.cer keytool -import -trustcacerts -keystore clientkeystore.jks -storepass cspass -alias myservicekey -file MyService.cer -noprompt 3 PKI 키설정 - PKI 설정을위하여 Provider 와 Consumer 양쪽에설정이필요함 - 먼저서버설정을위하여 servicekeystore.jks 를 Server 프로젝트 src/main/resources 밑에 copy 한다. - 파일설정을위한 servicekeystore.properties 를생성 (src/main/resources) org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cr ypto.merlin

27 org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=sspass org.apache.ws.security.crypto.merlin.keystore.alias=myservicekey org.apache.ws.security.crypto.merlin.file=servicekeystore.jks - 마찬가지로 clientkeystore.jks 는 client 프로젝트 src/main/resources 밑에 copy 한다. - 파일설정을위한 clientkeystore.properties 를생성 (src/main/resources) org.apache.ws.security.crypto.provider=org.apache.ws.security.components.cr ypto.merlin org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.password=cspass org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey org.apache.ws.security.crypto.merlin.file=clientkeystore.jks 4 설정파일 ( 서버설정 : spring-cxf.xml, client 설정 : client-context-jaxws.xml) - 서버설정을위하여 Endpoint 설정과함께 Security 설정수행함 - Security 적용은 endpoint 에서입력과출력시에 interceptor 를실행하여처리를수행하며, 입력시에는암호화된메시지를복화하여비즈니스로직을처리하고, 처리된결과값이 출력되는시점에서암호화를하여 client 에게젂달하게됨 - 다음은 server 쪽설정을수행하는 spring-cxf.xml 의설정이다. <?xml version="1.0" encoding="utf-8"?> <beans xmlns=" xmlns:xsi=" xmlns:jaxws=" xmlns:simple=" xsi:schemalocation=" <import resource="classpath:meta-inf/cxf/cxf.xml" /> <import resource="classpath:meta-inf/cxf/cxf-extension-soap.xml" /> <import resource="classpath:meta-inf/cxf/cxf-servlet.xml" /> <!-- jaxws Frontend --> <jaxws:endpoint id="mycalc" implementor="egovframework.lab.web.ws.jaxws.calcimpl" address="/mycalc" /> <!--jaxws Frontend --> <jaxws:endpoint id="myjaxws" implementor="egovframework.lab.web.ws.jaxws.movieserviceimpl" address="/myjaxws"> <jaxws:properties> <entry key="mtom-enabled" value="true" /> </jaxws:properties> <!-- 인증 Interceptors --> <jaxws:ininterceptors> <ref bean="timestampsignencrypt_request" /> </jaxws:ininterceptors> <jaxws:outinterceptors> <ref bean="timestampsignencrypt_response" /> </jaxws:outinterceptors> </jaxws:endpoint> <bean id="egovframework.lab.web.ws.simple.movieservice"

28 class="egovframework.lab.web.ws.simple.movieserviceimpl" /> <!-- WSS4JInInterceptor for decrypting and validating the signature of the SOAP request. --> <bean id="timestampsignencrypt_request" class="org.apache.cxf.ws.security.wss4j.wss4jininterceptor"> <constructor-arg> <map> <entry key="action" value="timestamp Signature Encrypt" /> <entry key="signaturepropfile" value="servicekeystore.properties" /> <entry key="decryptionpropfile" value="servicekeystore.properties" /> <entry key="passwordcallbackclass" value="com.mycompany.webservice.service.servicekeystorepasswordcallback" /> </map> </constructor-arg> </bean> <!-- WSS4JOutInterceptor for encoding and signing the SOAP response. --> <bean id="timestampsignencrypt_response" class="org.apache.cxf.ws.security.wss4j.wss4joutinterceptor"> <constructor-arg> <map> <entry key="action" value="timestamp Signature Encrypt" /> <entry key="user" value="myservicekey" /> <entry key="signaturepropfile" value="servicekeystore.properties" /> <entry key="encryptionpropfile" value="servicekeystore.properties" /> <entry key="encryptionuser" value="myclientkey" /> <entry key="signaturekeyidentifier" value="directreference" /> <entry key="passwordcallbackclass" value="com.mycompany.webservice.service.servicekeystorepasswordcallback" /> <entry key="signatureparts" value="{element{ open.org/wss/2004/01/oasis wss-wssecurity-utility- 1.0.xsdTimestamp;{Element{ /> <entry key="encryptionparts" value="{element{ ://schemas.xmlsoap.org/soap/envelope/body" /> <entry key="encryptionsymalgorithm" value=" /> </map> </constructor-arg> </bean> </beans> - server에서의설정과비슷한형태로 client 설정이이루어지게됨. client 설정을위하여 proxy설정 (client-context-jaxws.xml) 과함께 Security설정수행함 - Security 적용은 proxy에서입력과출력시에 interceptor를실행하여처리를수행하며, server에서의처리와반대로처리가되어입력시에는암호화된메시지를암호하여 server로젂송하고, 처리된결과값을젂달받아출력되는시점에서복호화를하여비즈니스로직에게젂달하게됨

29 - 다음은 client 설정을수행하는 client-context-jaxws.xml 의내용이다. <?xml version="1.0" encoding="utf-8"?> <beans xmlns=" xmlns:xsi=" xmlns:jaxws=" xmlns:simple=" xmlns:http=" xsi:schemalocation=" <!-- JAX-WS frontend --> <bean id="client" class="egovframework.lab.web.ws.jaxws.calcinterface" factory-bean="clientfactory" factory-method="create" /> <bean id="clientfactory" class="org.apache.cxf.jaxws.jaxwsproxyfactorybean"> <property name="serviceclass" value="egovframework.lab.web.ws.jaxws.calcinterface" /> <property name="address" value=" /> </bean> <!-- JAX-WS frontend :: 파일첨부하여젂송 (with 암호화 --> <bean id="moviejclient" class="egovframework.lab.web.ws.jaxws.movieservice" factory-bean="movieclientfactory" factory-method="create" /> <bean id="movieclientfactory" class="org.apache.cxf.jaxws.jaxwsproxyfactorybean"> <property name="serviceclass" value="egovframework.lab.web.ws.jaxws.movieservice" /> <property name="address" value=" /> <!-- 암호화 --> <property name="ininterceptors"> <list> <ref bean="timestampsignencrypt_response" /> </list> </property> <property name="outinterceptors"> <list> <ref bean="timestampsignencrypt_request" /> </list> </property> </bean> <!-- Interceptor 정의 --> <!-- This bean is an Out interceptor which will add a timestamp, sign the timestamp and body, and then encrypt the timestamp and body. It uses 3DES as the symmetric key algorithm.

30 --> <bean class="org.apache.cxf.ws.security.wss4j.wss4joutinterceptor" id="timestampsignencrypt_request"> <constructor-arg> <map> <entry key="action" value="timestamp Signature Encrypt" /> <entry key="user" value="myclientkey" /> <entry key="signaturepropfile" value="clientkeystore.properties" /> <entry key="encryptionpropfile" value="clientkeystore.properties" /> <entry key="encryptionuser" value="myservicekey" /> <entry key="signaturekeyidentifier" value="directreference" /> <!----> <entry key="passwordcallbackclass" value="com.mycompany.webservice.client.clientkeystorepasswordcallbac k" /> <entry key="signatureparts" value="{element{ open.org/wss/2004/01/oasis wss-wssecurity-utility- 1.0.xsdTimestamp;{Element{ /> <entry key="encryptionparts" value="{element{ nt{ /> <entry key="encryptionsymalgorithm" value=" /> </map> </constructor-arg> </bean> <!-- This bean is an In interceptor which will validate a signed, encrypted response, and timestamp it. --> <bean class="org.apache.cxf.ws.security.wss4j.wss4jininterceptor" id="timestampsignencrypt_response"> <constructor-arg> <map> <entry key="action" value="timestamp Signature Encrypt" /> <entry key="signaturepropfile" value="clientkeystore.properties" /> <entry key="decryptionpropfile" value="clientkeystore.properties" /> <entry key="passwordcallbackclass" value="com.mycompany.webservice.client.clientkeystorepasswordcallbac k" /> </map> </constructor-arg> </bean> </beans>

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r

I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r I T C o t e n s P r o v i d e r h t t p : / / w w w. h a n b i t b o o k. c o. k r Jakarta is a Project of the Apache

More information

Interstage5 SOAP서비스 설정 가이드

Interstage5 SOAP서비스 설정 가이드 Interstage 5 Application Server ( Solaris ) SOAP Service Internet Sample Test SOAP Server Application SOAP Client Application CORBA/SOAP Server Gateway CORBA/SOAP Gateway Client INTERSTAGE SOAP Service

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

Spring Boot

Spring Boot 스프링부트 (Spring Boot) 1. 스프링부트 (Spring Boot)... 2 1-1. Spring Boot 소개... 2 1-2. Spring Boot & Maven... 2 1-3. Spring Boot & Gradle... 3 1-4. Writing the code(spring Boot main)... 4 1-5. Writing the code(commandlinerunner)...

More information

rmi_박준용_final.PDF

rmi_박준용_final.PDF (RMI) - JSTORM http://wwwjstormpekr (RMI)- Document title: Document file name: Revision number: Issued by: Document Information (RMI)- rmi finaldoc Issue Date: Status:

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

Spring

Spring Spring MVC 프로젝트생성 2015 Web Service Computing 일반적인스프링의정의 스프링의정의 자바엔터프라이즈개발을편하게해주는오픈소스경량급애플리케이션프레임워크 스프링의기원 로드존슨 (Rod Johnson) 이라는유명 J2EE 개발자가출간한 Expert One-on- One J2EE Design and Development 이라는제목의책에소개된예제샘플

More information

교육2 ? 그림

교육2 ? 그림 Interstage 5 Apworks EJB Application Internet Revision History Edition Date Author Reviewed by Remarks 1 2002/10/11 2 2003/05/19 3 2003/06/18 EJB 4 2003/09/25 Apworks5.1 [ Stateless Session Bean ] ApworksJava,

More information

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63234C0E520C0D4C3E2B7C228B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 24 장입출력 이번장에서학습할내용 스트림이란? 스트림의분류 바이트스트림 문자스트림 형식입출력 명령어행에서입출력 파일입출력 스트림을이용한입출력에대하여살펴봅시다. 스트림 (stream) 스트림 (stream) 은 순서가있는데이터의연속적인흐름 이다. 스트림은입출력을물의흐름처럼간주하는것이다. 스트림들은연결될수있다. 중간점검문제 1. 자바에서는입출력을무엇이라고추상화하는가?

More information

교육자료

교육자료 THE SYS4U DODUMENT Java Reflection & Introspection 2012.08.21 김진아사원 2012 SYS4U I&C All rights reserved. 목차 I. 개념 1. Reflection 이란? 2. Introspection 이란? 3. Reflection 과 Introspection 의차이점 II. 실제사용예 1. Instance의생성

More information

Microsoft PowerPoint - 04-UDP Programming.ppt

Microsoft PowerPoint - 04-UDP Programming.ppt Chapter 4. UDP Dongwon Jeong djeong@kunsan.ac.kr http://ist.kunsan.ac.kr/ Dept. of Informatics & Statistics 목차 UDP 1 1 UDP 개념 자바 UDP 프로그램작성 클라이언트와서버모두 DatagramSocket 클래스로생성 상호간통신은 DatagramPacket 클래스를이용하여

More information

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum

API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Docum API STORE 키발급및 API 사용가이드 Document Information 문서명 : API STORE 언어별 Client 사용가이드작성자 : 작성일 : 2012.11.23 업무영역 : 버전 : 1 st Draft. 서브시스템 : 문서번호 : 단계 : Document Distribution Copy Number Name(Role, Title) Date

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 1,..... @ 1 Green Project 1991 Oak Java 1995. 5 December '90 by Patrick Naughton, Mike Sheridan and James Gosling Embedded in various consumer electronic device 1992. 9. 3 Star 7 1993 www portability

More information

12-file.key

12-file.key 11 (String).. java.lang.stringbuffer. s String s = "abcd"; s = s + "e"; a b c d e a b c d e ,., "910359,, " "910359" " " " " (token) (token),, (delimiter). java.util.stringtokenizer String s = "910359,,

More information

MasoJava4_Dongbin.PDF

MasoJava4_Dongbin.PDF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: MasoJava4_Dongbindoc Revision number: Issued by: < > SI, dbin@handysoftcokr

More information

No Slide Title

No Slide Title J2EE J2EE(Java 2 Enterprise Edition) (Web Services) :,, SOAP: Simple Object Access Protocol WSDL: Web Service Description Language UDDI: Universal Discovery, Description & Integration 4. (XML Protocol

More information

05-class.key

05-class.key 5 : 2 (method) (public) (private) (interface) 5.1 (Method), (public method) (private method) (constructor), 3 4 5.2 (client). (receiver)., System.out.println("Hello"); (client object) (receiver object)

More information

Intro to Servlet, EJB, JSP, WS

Intro to Servlet, EJB, JSP, WS ! Introduction to J2EE (2) - EJB, Web Services J2EE iseminar.. 1544-3355 ( ) iseminar Chat. 1 Who Are We? Business Solutions Consultant Oracle Application Server 10g Business Solutions Consultant Oracle10g

More information

내장서버로사용. spring-boot-starter-data-jpa : Spring Data JPA 사용을위한설정 spring-boot-devtools : 개발자도구를제공, 이도구는응용프로그램개발모드에서유 용한데코드가변경된경우서버를자동으로다시시작하는일들을한다. spri

내장서버로사용. spring-boot-starter-data-jpa : Spring Data JPA 사용을위한설정 spring-boot-devtools : 개발자도구를제공, 이도구는응용프로그램개발모드에서유 용한데코드가변경된경우서버를자동으로다시시작하는일들을한다. spri 6-20-4. Spring Boot REST CRUD 실습 (JPA, MariaDB) GitHub : https://github.com/leejongcheol/springbootrest 스프링부트에서 REST(REpresentational State Transfer) API 를실습해보자. RESTful 웹서비스는 JSON, XML 및기타미디어유형을생성하고활용할수있다.

More information

<4D F736F F D E30382E30322E B1E2B9DDC0C720C0A5BCADBAF1BDBA20BFEEBFEBC0FDC2F7BCAD2E646F63>

<4D F736F F D E30382E30322E B1E2B9DDC0C720C0A5BCADBAF1BDBA20BFEEBFEBC0FDC2F7BCAD2E646F63> Apache Axis 기반의웹서비스운용절차서 2006-08 문서이력 1 / 40 페이지 Table of contents 1. 시스템제반사항...3 1.1. 시스템환경구성...3 1.2. 시스템환경설정...4 2.JWS 파일을통한 Instant Deployment...7 2.1.JWS 형식소개...7 2.2.JWS 서비스구현...7 2.3.JWS 서비스배포검증...8

More information

자바-11장N'1-502

자바-11장N'1-502 C h a p t e r 11 java.net.,,., (TCP/IP) (UDP/IP).,. 1 ISO OSI 7 1977 (ISO, International Standards Organization) (OSI, Open Systems Interconnection). 6 1983 X.200. OSI 7 [ 11-1] 7. 1 (Physical Layer),

More information

Research & Technique Apache Tomcat RCE 취약점 (CVE ) 취약점개요 지난 4월 15일전세계적으로가장많이사용되는웹애플리케이션서버인 Apache Tomcat에서 RCE 취약점이공개되었다. CVE 취약점은 W

Research & Technique Apache Tomcat RCE 취약점 (CVE ) 취약점개요 지난 4월 15일전세계적으로가장많이사용되는웹애플리케이션서버인 Apache Tomcat에서 RCE 취약점이공개되었다. CVE 취약점은 W Research & Technique Apache Tomcat RCE 취약점 (CVE-2019-0232) 취약점개요 지난 4월 15일전세계적으로가장많이사용되는웹애플리케이션서버인 Apache Tomcat에서 RCE 취약점이공개되었다. CVE-2019-0232 취약점은 Windows 시스템의 Apache Tomcat 서버에서 enablecmdlinearguments

More information

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V Mobile Service > IAP > Android SDK IAP SDK TOAST SDK. IAP SDK. Android Studio IDE 2.3.3 Android SDK Version 2.3.3 (API Level 10). Name Reference Version License okhttp http://square.github.io/okhttp/ 1.5.4

More information

표준프레임워크로 구성된 컨텐츠를 솔루션에 적용하는 것에 문제가 없는지 확인

표준프레임워크로 구성된 컨텐츠를 솔루션에 적용하는 것에 문제가 없는지 확인 표준프레임워크로구성된컨텐츠를솔루션에적용하는것에문제가없는지확인 ( S next -> generate example -> finish). 2. 표준프레임워크개발환경에솔루션프로젝트추가. ( File -> Import -> Existring Projects into

More information

Spring Data JPA Many To Many 양방향 관계 예제

Spring Data JPA Many To Many 양방향 관계 예제 Spring Data JPA Many To Many 양방향관계예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) 엔티티매핑 (Entity Mapping) M : N 연관관계 사원 (Sawon), 취미 (Hobby) 는다 : 다관계이다. 사원은여러취미를가질수있고, 하나의취미역시여러사원에할당될수있기때문이다. 보통관계형 DB 에서는다 : 다관계는 1

More information

Secure Programming Lecture1 : Introduction

Secure Programming Lecture1 : Introduction Malware and Vulnerability Analysis Lecture3-2 Malware Analysis #3-2 Agenda 안드로이드악성코드분석 악성코드분석 안드로이드악성코드정적분석 APK 추출 #1 adb 명령 안드로이드에설치된패키지리스트추출 adb shell pm list packages v0nui-macbook-pro-2:lecture3 v0n$

More information

JavaGeneralProgramming.PDF

JavaGeneralProgramming.PDF , Java General Programming from Yongwoo s Park 1 , Java General Programming from Yongwoo s Park 2 , Java General Programming from Yongwoo s Park 3 < 1> (Java) ( 95/98/NT,, ) API , Java General Programming

More information

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET

Connection 8 22 UniSQLConnection / / 9 3 UniSQL OID SET 135-080 679-4 13 02-3430-1200 1 2 11 2 12 2 2 8 21 Connection 8 22 UniSQLConnection 8 23 8 24 / / 9 3 UniSQL 11 31 OID 11 311 11 312 14 313 16 314 17 32 SET 19 321 20 322 23 323 24 33 GLO 26 331 GLO 26

More information

02 C h a p t e r Java

02 C h a p t e r Java 02 C h a p t e r Java Bioinformatics in J a va,, 2 1,,,, C++, Python, (Java),,, (http://wwwbiojavaorg),, 13, 3D GUI,,, (Java programming language) (Sun Microsystems) 1995 1990 (green project) TV 22 CHAPTER

More information

ch09

ch09 9 Chapter CHAPTER GOALS B I G J A V A 436 CHAPTER CONTENTS 9.1 436 Syntax 9.1 441 Syntax 9.2 442 Common Error 9.1 442 9.2 443 Syntax 9.3 445 Advanced Topic 9.1 445 9.3 446 9.4 448 Syntax 9.4 454 Advanced

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 배효철 th1g@nate.com 1 목차 표준입출력 파일입출력 2 표준입출력 표준입력은키보드로입력하는것, 주로 Scanner 클래스를사용. 표준출력은화면에출력하는메소드를사용하는데대표적으로 System.out.printf( ) 를사용 3 표준입출력 표준출력 : System.out.printlf() 4 표준입출력 Example 01 public static void

More information

신림프로그래머_클린코드.key

신림프로그래머_클린코드.key CLEAN CODE 6 11st Front Dev. Team 6 1. 2. 3. checked exception 4. 5. 6. 11 : 2 4 : java (50%), javascript (35%), SQL/PL-SQL (15%) : Spring, ibatis, Oracle, jquery ? , (, ) ( ) 클린코드를 무시한다면 . 6 1. ,,,!

More information

혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 <html> 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 <html> 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가

혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 <html> 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 <html> 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가 혼자서일을다하는 JSP. 이젠일을 Servlet 과나눠서한다. JSP와서블릿의표현적인차이 - JSP는 내에서자바를사용할수있는수단을제공한다. - 서블릿은자바내에서 을작성할수있는수단을제공한다. - JSP나서블릿으로만웹페이지를작성하면자바와다양한코드가웹페이지내에뒤섞여있어서웹페이지의화면설계가점점어려워진다. - 서블릿이먼저등장하였으나, 자바내에

More information

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드]

Microsoft PowerPoint - Supplement-03-TCP Programming.ppt [호환 모드] - Socket Programming in Java - 목차 소켓소개 자바에서의 TCP 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 Q/A 에코프로그램 - EchoServer 에코프로그램 - EchoClient TCP Programming 1 소켓소개 IP, Port, and Socket 포트 (Port): 전송계층에서통신을수행하는응용프로그램을찾기위한주소

More information

Microsoft PowerPoint - 테스트주도개발.pptx

Microsoft PowerPoint - 테스트주도개발.pptx 테스트가능한 소프트웨어설계와 TDD 작성패턴 Testable software design & TDD patterns 한국스프링사용자모임 (KSUG ) 채수원 발표자소개 LG CNS 경영기술교육원기술교육팀전임강사 강의과목디자인패턴 & 리팩터링 분석설계실무 Agile 적용실무 블로그여름으로가는문 blog.doortts.com Comments 내용이나후기에대해서는

More information

Microsoft PowerPoint - 03-TCP Programming.ppt

Microsoft PowerPoint - 03-TCP Programming.ppt Chapter 3. - Socket in Java - 목차 소켓소개 자바에서의 프로그램작성방법 주요클래스와메소드 HTTP 프로토콜을이용한예제 에코프로그램 에코프로그램 - EchoServer 에코프로그램 - EchoClient Q/A 1 1 소켓소개 IP,, and Socket 포트 (): 전송계층에서통신을수행하는응용프로그램을찾기위한주소 소켓 (Socket):

More information

비긴쿡-자바 00앞부속

비긴쿡-자바 00앞부속 IT COOKBOOK 14 Java P r e f a c e Stay HungryStay Foolish 3D 15 C 3 16 Stay HungryStay Foolish CEO 2005 L e c t u r e S c h e d u l e 1 14 PPT API C A b o u t T h i s B o o k IT CookBook for Beginner Chapter

More information

슬라이드 1

슬라이드 1 전자정부개발프레임워크 1 일차실습 LAB 개발환경 - 1 - 실습목차 LAB 1-1 프로젝트생성실습 LAB 1-2 Code Generation 실습 LAB 1-3 DBIO 실습 ( 별첨 ) LAB 1-4 공통컴포넌트생성및조립도구실습 LAB 1-5 템플릿프로젝트생성실습 - 2 - LAB 1-1 프로젝트생성실습 (1/2) Step 1-1-01. 구현도구에서 egovframe>start>new

More information

Chap12

Chap12 12 12Java RMI 121 RMI 2 121 RMI 3 - RMI, CORBA 121 RMI RMI RMI (remote object) 4 - ( ) UnicastRemoteObject, 121 RMI 5 class A - class B - ( ) class A a() class Bb() 121 RMI 6 RMI / 121 RMI RMI 1 2 ( 7)

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

07 자바의 다양한 클래스.key

07 자바의 다양한 클래스.key [ 07 ] . java.lang Object, Math, String, StringBuffer Byte, Short, Integer, Long, Float, Double, Boolean, Character. java.util Random, StringTokenizer Calendar, GregorianCalendar, Date. Collection, List,

More information

1. 자바프로그램기초 및개발환경 2 장 & 3 장. 자바개발도구 충남대학교 컴퓨터공학과

1. 자바프로그램기초 및개발환경 2 장 & 3 장. 자바개발도구 충남대학교 컴퓨터공학과 1. 자바프로그램기초 및개발환경 2 장 & 3 장. 자바개발도구 충남대학교 컴퓨터공학과 학습내용 1. Java Development Kit(JDK) 2. Java API 3. 자바프로그래밍개발도구 (Eclipse) 4. 자바프로그래밍기초 2 자바를사용하려면무엇이필요한가? 자바프로그래밍개발도구 JDK (Java Development Kit) 다운로드위치 : http://www.oracle.com/technetwork/java/javas

More information

Spring Boot/JDBC JdbcTemplate/CRUD 예제

Spring Boot/JDBC JdbcTemplate/CRUD 예제 Spring Boot/JDBC JdbcTemplate/CRUD 예제 오라클자바커뮤니티 (ojc.asia, ojcedu.com) Spring Boot, Gradle 과오픈소스인 MariaDB 를이용해서 EMP 테이블을만들고 JdbcTemplate, SimpleJdbcTemplate 을이용하여 CRUD 기능을구현해보자. 마리아 DB 설치는다음 URL 에서확인하자.

More information

14-Servlet

14-Servlet JAVA Programming Language Servlet (GenericServlet) HTTP (HttpServlet) 2 (1)? CGI 3 (2) http://jakarta.apache.org JSDK(Java Servlet Development Kit) 4 (3) CGI CGI(Common Gateway Interface) /,,, Client Server

More information

Cluster management software

Cluster management software 자바네트워크프로그래밍 (OCJP 국제공인자격취득중심 ) 충북대학교 최민 기본예제 예외클래스를정의하고사용하는예제 class NewException extends Exception { public class ExceptionTest { static void methoda() throws NewException { System.out.println("NewException

More information

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일 Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 Introduce Me!!! Job Jeju National University Student Ubuntu Korean Jeju Community Owner E-Mail: ned3y2k@hanmail.net Blog: http://ned3y2k.wo.tc Facebook: http://www.facebook.com/gyeongdae

More information

Intellij spring(mvc) + maven 환경구축 New Project에서좌측 template 유형에서 Maven을선택합니다. 오른쪽상단에 Project SDK는 java SDK가설치된폴더를선택하면됩니다. 오른쪽에 Create from archetyhpe을체

Intellij spring(mvc) + maven 환경구축 New Project에서좌측 template 유형에서 Maven을선택합니다. 오른쪽상단에 Project SDK는 java SDK가설치된폴더를선택하면됩니다. 오른쪽에 Create from archetyhpe을체 Intellij spring(mvc) + maven 환경구축 New Project에서좌측 template 유형에서 Maven을선택합니다. 오른쪽상단에 Project SDK는 java SDK가설치된폴더를선택하면됩니다. 오른쪽에 Create from archetyhpe을체크하게되면하단에여러유형의 archetype을선택할수있습니다. Maven 기반의웹프로젝트를생성해야하므로

More information

thesis

thesis CORBA TMN Surveillance System DPNM Lab, GSIT, POSTECH Email: mnd@postech.ac.kr Contents Motivation & Goal Related Work CORBA TMN Surveillance System Implementation Conclusion & Future Work 2 Motivation

More information

Network Programming

Network Programming Part 5 확장된 Network Programming 기술 1. Remote Procedure Call 2. Remote Method Invocation 3. Object Request Broker 2. Java RMI

More information

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770> i ii iii iv v vi 1 2 3 4 가상대학 시스템의 국내외 현황 조사 가상대학 플랫폼 개발 이상적인 가상대학시스템의 미래상 제안 5 웹-기반 가상대학 시스템 전통적인 교수 방법 시간/공간 제약을 극복한 학습동기 부여 교수의 일방적인 내용전달 교수와 학생간의 상호작용 동료 학생들 간의 상호작용 가상대학 운영 공지사항,강의록 자료실, 메모 질의응답,

More information

Microsoft PowerPoint - Java7.pptx

Microsoft PowerPoint - Java7.pptx HPC & OT Lab. 1 HPC & OT Lab. 2 실습 7 주차 Jin-Ho, Jang M.S. Hanyang Univ. HPC&OT Lab. jinhoyo@nate.com HPC & OT Lab. 3 Component Structure 객체 (object) 생성개념을이해한다. 외부클래스에대한접근방법을이해한다. 접근제어자 (public & private)

More information

3ÆÄÆ®-14

3ÆÄÆ®-14 chapter 14 HTTP >>> 535 Part 3 _ 1 L i Sting using System; using System.Net; using System.Text; class DownloadDataTest public static void Main (string[] argv) WebClient wc = new WebClient(); byte[] response

More information

한국학 온라인 디지털 자원 소개

한국학 온라인 디지털 자원 소개 XSL 의이해 김현한국학중앙연구원인문정보학교실 hyeon@aks.ac.kr 이저작물 (PPT) 의인용표시방법 : 김현, XSL 의이해, 전자문서와하이퍼텍스트 수업자료 (2018) 1. XSL 이란? 2. XSL Elements 3. XSL 에의한문서표현 1. XSL이란? XSL 관련개념 XSL (extensible Stylesheet Language) 문서의스타일을정의하기위한언어

More information

Microsoft PowerPoint - RMI.ppt

Microsoft PowerPoint - RMI.ppt ( 분산통신실습 ) RMI RMI 익히기 1. 분산환경에서동작하는 message-passing을이용한 boundedbuffer 해법프로그램을실행해보세요. 소스코드 : ftp://211.119.245.153 -> os -> OSJavaSources -> ch15 -> rmi http://marvel el.incheon.ac.kr의 Information Unix

More information

표준프레임워크 Nexus 및 CI 환경구축가이드 Version 3.8 Page 1

표준프레임워크 Nexus 및 CI 환경구축가이드 Version 3.8 Page 1 표준프레임워크 Nexus 및 CI 환경구축가이드 Version 3.8 Page 1 Index 1. 표준프레임워크 EGOVCI 팩키지설치... 3 1.1 개요... 3 1.2 EGOVCI 압축풀기... 3 1.3 EGOVCI 시스템구성... 3 1.4 CI 시스템구동 (START/STOP)... 4 2. NEXUS 설정정보... 6 2.1 NEXUS 서버구동

More information

01-OOPConcepts(2).PDF

01-OOPConcepts(2).PDF Object-Oriented Programming Concepts Tel: 02-824-5768 E-mail: hhcho@selabsoongsilackr? OOP (Object) (Encapsulation) (Message) (Class) (Inheritance) (Polymorphism) (Abstract Class) (Interface) 2 1 + = (Dependency)

More information

Orcad Capture 9.x

Orcad Capture 9.x OrCAD Capture Workbook (Ver 10.xx) 0 Capture 1 2 3 Capture for window 4.opj ( OrCAD Project file) Design file Programe link file..dsn (OrCAD Design file) Design file..olb (OrCAD Library file) file..upd

More information

슬라이드 1

슬라이드 1 - 1 - 전자정부모바일표준프레임워크실습 LAB 개발환경 실습목차 LAB 1-1 모바일프로젝트생성실습 LAB 1-2 모바일사이트템플릿프로젝트생성실습 LAB 1-3 모바일공통컴포넌트생성및조립도구실습 - 2 - LAB 1-1 모바일프로젝트생성실습 (1/2) Step 1-1-01. 구현도구에서 egovframe>start>new Mobile Project 메뉴를선택한다.

More information

KYO_SCCD.PDF

KYO_SCCD.PDF 1. Servlets. 5 1 Servlet Model. 5 1.1 Http Method : HttpServlet abstract class. 5 1.2 Http Method. 5 1.3 Parameter, Header. 5 1.4 Response 6 1.5 Redirect 6 1.6 Three Web Scopes : Request, Session, Context

More information

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp");

다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) <% RequestDispatcher dispatcher = request.getrequestdispatcher( 실행할페이지.jsp); 다른 JSP 페이지호출 forward() 메서드 - 하나의 JSP 페이지실행이끝나고다른 JSP 페이지를호출할때사용한다. 예 ) RequestDispatcher dispatcher = request.getrequestdispatcher(" 실행할페이지.jsp"); dispatcher.forward(request, response); - 위의예에서와같이 RequestDispatcher

More information

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다. Eclipse 개발환경에서 WindowBuilder 를이용한 Java 프로그램개발 이예는 Java 프로그램의기초를이해하고있는사람을대상으로 Embedded Microcomputer 를이용한제어시스템을 PC 에서 Serial 통신으로제어 (Graphical User Interface (GUI) 환경에서 ) 하는프로그램개발예를설명한다. WindowBuilder:

More information

@OneToOne(cascade = = "addr_id") private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a

@OneToOne(cascade = = addr_id) private Addr addr; public Emp(String ename, Addr addr) { this.ename = ename; this.a 1 대 1 단방향, 주테이블에외래키실습 http://ojcedu.com, http://ojc.asia STS -> Spring Stater Project name : onetoone-1 SQL : JPA, MySQL 선택 http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL

More information

04장

04장 20..29 1: PM ` 199 ntech4 C9600 2400DPI 175LPI T CHAPTER 4 20..29 1: PM ` 200 ntech4 C9600 2400DPI 175LPI T CHAPTER 4.1 JSP (Comment) HTML JSP 3 home index jsp HTML JSP 15 16 17 18 19 20

More information

DocsPin_Korean.pages

DocsPin_Korean.pages Unity Localize Script Service, Page 1 Unity Localize Script Service Introduction Application Game. Unity. Google Drive Unity.. Application Game. -? ( ) -? -?.. 준비사항 Google Drive. Google Drive.,.. - Google

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 4 (Object) (Class) (Instance) (Method) (Constructor) Memory 1 UML 1 @ & 1 (Real World) (Software World) @ &.. () () @ & 2 (Real World) (Software World) OOA/ Modeling Abstraction Instantiation

More information

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형

ilist.add(new Integer(1))과 같이 사용하지 않고 ilist.add(1)과 같이 사용한 것은 자바 5.0에 추가된 기본 자료형과 해당 객체 자료 형과의 오토박싱/언박싱 기능을 사용한 것으로 오토박싱이란 자바 컴파일러가 객체를 요구하는 곳에 기본 자료형 바에 제네릭스(generics)를 도입하기 위한 연구는 이미 8년 전인 1996년부터라고 한다. 실제로 자바에 제네릭스를 도입하 는 몇 가지 방안들이 논문으로 나오기 시작한 것이 1998년 초임을 감 안하면 무려 8년이 지난 후에야 자바 5.0에 전격 채택되었다는 것은 이것이 얼마나 어려운 일이었나 하는 것을 보여준다. 자바의 스펙을 결정하는 표준화 절차인

More information

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f…

fundamentalOfCommandPattern_calmglow_pattern_jstorm_1.0_f… Command JSTORM http://www.jstorm.pe.kr Command Issued by: < > Revision: Document Information Document title: Command Document file name: Revision number: Issued by: Issue

More information

mytalk

mytalk 한국정보보호학회소프트웨어보안연구회 총괄책임자 취약점분석팀 안준선 ( 항공대 ) 도경구 ( 한양대 ) 도구개발팀도경구 ( 한양대 ) 시큐어코딩팀 오세만 ( 동국대 ) 전체적인 그림 IL Rules Flowgraph Generator Flowgraph Analyzer 흐름그래프 생성기 흐름그래프 분석기 O parser 중간언어 O 파서 RDL

More information

슬라이드 1

슬라이드 1 1. 개요 - 실행환경연계통합레이어 (1/3) 연계통합레이어는타시스템과의연동기능을제공하는 Layer 임 전자정부개발프레임워크실행환경 서비스그룹 Presentation Layer 설명 업무프로그램과사용자간의 Interface 를담당하는 Layer 로서, 사용자화면구성, 사용자입력정보검증등의기능을제공함 Layer Presentation Layer Logic Business

More information

JMF2_심빈구.PDF

JMF2_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Document Information Document title: Document file name: Revision number: Issued by: JMF2_ doc Issue Date: Status: < > raica@nownurinet

More information

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사)

11 템플릿적용 - Java Program Performance Tuning (김명호기술이사) Java Program Performance Tuning ( ) n (Primes0) static List primes(int n) { List primes = new ArrayList(n); outer: for (int candidate = 2; n > 0; candidate++) { Iterator iter = primes.iterator(); while

More information

2) 활동하기 활동개요 활동과정 [ 예제 10-1]main.xml 1 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:tools="http://schemas.android.

2) 활동하기 활동개요 활동과정 [ 예제 10-1]main.xml 1 <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android 2 xmlns:tools=http://schemas.android. 10 차시파일처리 1 학습목표 내장메모리의파일을처리하는방법을배운다. SD 카드의파일을처리하는방법을배운다. 2 확인해볼까? 3 내장메모리파일처리 1) 학습하기 [ 그림 10-1] 내장메모리를사용한파일처리 2) 활동하기 활동개요 활동과정 [ 예제 10-1]main.xml 1

More information

untitled

untitled - -, (insert) (delete) - - (insert) (delete) (top ) - - (insert) (rear) (delete) (front) A A B top A B C top push(a) push(b) push(c) A B top pop() top A B D push(d) top #define MAX_STACK_SIZE 100 int

More information

PowerPoint Presentation

PowerPoint Presentation 객체지향프로그래밍 오류처리 손시운 ssw5176@kangwon.ac.kr 오류메시지를분석한다. 오류메시지에서많은내용을알수있다. 2 디버깅 디버거를사용하면프로그램에서쉽게오류를감지하고진단할수있다. 디버거는중단점을설정하여서프로그램의실행을제어할수있으며문장 단위로실행하거나변수의값을살펴볼수있다. 3 이클립스에서디버깅 4 이클립스에서디버깅 5 이클립스의디버깅명령어 6 예외처리

More information

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D>

<4D F736F F F696E74202D20C1A63235C0E520B3D7C6AEBFF6C5A920C7C1B7CEB1D7B7A1B9D628B0ADC0C729205BC8A3C8AF20B8F0B5E55D> Power Java 제 25 장네트워크프로그래밍 이번장에서학습할내용 네트워크프로그래밍의개요 URL 클래스 TCP를이용한통신 TCP를이용한서버제작 TCP를이용한클라이언트제작 UDP 를이용한통신 자바를이용하여서 TCP/IP 통신을이용하는응응프로그램을작성하여봅시다. 서버와클라이언트 서버 (Server): 사용자들에게서비스를제공하는컴퓨터 클라이언트 (Client):

More information

ibmdw_rest_v1.0.ppt

ibmdw_rest_v1.0.ppt REST in Enterprise 박찬욱 1-1- MISSING PIECE OF ENTERPRISE Table of Contents 1. 2. REST 3. REST 4. REST 5. 2-2 - Wise chanwook.tistory.com / cwpark@itwise.co.kr / chanwook.god@gmail.com ARM WOA S&C AP ENI

More information

슬라이드 1

슬라이드 1 NeoDeveloper 설치가이드 차례 1. 환경 3 2. 설치 3 2.1 웹서버설치 3 Tomcat 7 3 JDK 1.6 3 2.2 NeoDeveloper 설치 3 Neo Developer 서버구성 3 Demo용 User Application 구성 4 Neo Developer 서버 Data File 4 Client 개발 Tool 설치 4 3. 설정 5 3.1

More information

Microsoft PowerPoint SDK설치.HelloAndroid(1.5h).pptx

Microsoft PowerPoint SDK설치.HelloAndroid(1.5h).pptx To be an Android Expert 문양세강원대학교 IT 대학컴퓨터학부 개발환경구조및설치순서 JDK 설치 Eclipse 설치 안드로이드 SDK 설치 ADT(Androd Development Tools) 설치 AVD(Android Virtual Device) 생성 Hello Android! 2 Eclipse (IDE) JDK Android SDK with

More information

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공

목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper 클래스작성 - JSONParser 클래스작성 공공 메신저의새로운혁신 채팅로봇 챗봇 (Chatbot) 입문하기 소 이 메 속 : 시엠아이코리아 름 : 임채문 일 : soulgx@naver.com 1 목차 INDEX JSON? - JSON 개요 - JSONObject - JSONArray 서울시공공데이터 API 살펴보기 - 요청인자살펴보기 - Result Code - 출력값 HttpClient - HttpHelper

More information

슬라이드 1

슬라이드 1 UNIT 6 배열 로봇 SW 교육원 3 기 학습목표 2 배열을사용핛수있다. 배열 3 배열 (Array) 이란? 같은타입 ( 자료형 ) 의여러변수를하나의묶음으로다루는것을배열이라고함 같은타입의많은양의데이터를다룰때효과적임 // 학생 30 명의점수를저장하기위해.. int student_score1; int student_score2; int student_score3;...

More information

JMF3_심빈구.PDF

JMF3_심빈구.PDF JMF JSTORM http://wwwjstormpekr Issued by: < > Revision: Document Information Document title: Document file name: Revision number: Issued by: JMF3_ doc Issue Date:

More information

XML04

XML04 4 128 129 130 131 132 2003 8 15 !!.

More information

쉽게 풀어쓴 C 프로그래밊

쉽게 풀어쓴 C 프로그래밊 Power Java 제 27 장데이터베이스 프로그래밍 이번장에서학습할내용 자바와데이터베이스 데이터베이스의기초 SQL JDBC 를이용한프로그래밍 변경가능한결과집합 자바를통하여데이터베이스를사용하는방법을학습합니다. 자바와데이터베이스 JDBC(Java Database Connectivity) 는자바 API 의하나로서데이터베이스에연결하여서데이터베이스안의데이터에대하여검색하고데이터를변경할수있게한다.

More information

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate

목차 BUG offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate ALTIBASE HDB 6.1.1.5.6 Patch Notes 목차 BUG-39240 offline replicator 에서유효하지않은로그를읽을경우비정상종료할수있다... 3 BUG-41443 각 partition 이서로다른 tablespace 를가지고, column type 이 CLOB 이며, 해당 table 을 truncate 한뒤, hash partition

More information

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f

* Factory class for query and DML clause creation * tiwe * */ public class JPAQueryFactory implements JPQLQueryFactory private f JPA 에서 QueryDSL 사용하기위해 JPAQuery 인스턴스생성방법 http://ojc.asia, http://ojcedu.com 1. JPAQuery 를직접생성하기 JPAQuery 인스턴스생성하기 QueryDSL의 JPAQuery API를사용하려면 JPAQuery 인스턴스를생성하면된다. // entitymanager는 JPA의 EntityManage

More information

PowerPoint Presentation

PowerPoint Presentation Class - Property Jo, Heeseung 목차 section 1 클래스의일반구조 section 2 클래스선언 section 3 객체의생성 section 4 멤버변수 4-1 객체변수 4-2 클래스변수 4-3 종단 (final) 변수 4-4 멤버변수접근방법 section 5 멤버변수접근한정자 5-1 public 5-2 private 5-3 한정자없음

More information

PowerPoint Presentation

PowerPoint Presentation Package Class 3 Heeseung Jo 목차 section 1 패키지개요와패키지의사용 section 2 java.lang 패키지의개요 section 3 Object 클래스 section 4 포장 (Wrapper) 클래스 section 5 문자열의개요 section 6 String 클래스 section 7 StringBuffer 클래스 section

More information

Business Agility () Dynamic ebusiness, RTE (Real-Time Enterprise) IT Web Services c c WE-SDS (Web Services Enabled SDS) SDS SDS Service-riented Architecture Web Services ( ) ( ) ( ) / c IT / Service- Service-

More information

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4

목차 BUG DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 ALTIBASE HDB 6.5.1.5.10 Patch Notes 목차 BUG-46183 DEQUEUE 의 WAIT TIME 이 1 초미만인경우, 설정한시간만큼대기하지않는문제가있습니다... 3 BUG-46249 [qp-select-pvo] group by 표현식에있는컬럼을참조하는집합연산이존재하지않으면결괏값오류가발생할수있습니다... 4 BUG-46266 [sm]

More information

<property name="configlocation" value="classpath:/egovframework/sqlmap/example/sql-map-config.xml"/> <property name="datasource" ref="datasource2"/> *

<property name=configlocation value=classpath:/egovframework/sqlmap/example/sql-map-config.xml/> <property name=datasource ref=datasource2/> * 표준프레임워크로구성된컨텐츠를솔루션에적용 1. sample( 게시판 ) 프로젝트생성 - egovframe Web Project next generate example finish 2. 프로젝트추가 - 프로젝트 Import 3. 프로젝트에 sample 프로젝트의컨텐츠를추가, 기능동작확인 ⓵ sample 프로젝트에서 프로젝트로복사 sample > egovframework

More information

GeoTools 3D Extension Guide 출시 0.5.0 Soojin Kim, Hyung-Gyu Ryoo 12 월 02, 2017 Modules 1 목차 3 1.1 개요................................................... 3 1.2 Geometry.................................................

More information

슬라이드 1

슬라이드 1 UNIT 16 예외처리 로봇 SW 교육원 3 기 최상훈 학습목표 2 예외처리구문 try-catch-finally 문을사용핛수있다. 프로그램오류 3 프로그램오류의종류 컴파일에러 (compile-time error) : 컴파일실행시발생 럮타임에러 (runtime error) : 프로그램실행시발생 에러 (error) 프로그램코드에의해서해결될수없는심각핚오류 ex)

More information

Web Service Computing

Web Service Computing Spring MVC 2015 Web Service Computing Request & Response HTTP(Hyper-Text Transfer Protocol) 웹서버가하는일은요청 (Request) 과응답 (Response) 의연속이다. 1) 브라우저에 www.google.co.kr 을입력한다면 2) 구글서버에페이지를요청하는것이고 3) 화면이잘나타난다면구글서버가응답을한것이다.

More information

FileMaker ODBC and JDBC Guide

FileMaker ODBC and JDBC Guide FileMaker 13 5 5 5 6 6 6 7 7 8 8 8 8 9 9 10 10 11 11 12 12 12 12 12 12 13 13 14 14 16 16 18 4 19 19 20 20 21 21 21 23 23 23 23 25 26 26 26 26 27 28 28 28 28 29 31 31 32 33 33 33 33 34 34 35 35 35 36 1

More information

안드로이드기본 11 차시어댑터뷰 1 학습목표 어댑터뷰가무엇인지알수있다. 리스트뷰와스피너를사용하여데이터를출력할수있다. 2 확인해볼까? 3 어댑터뷰 1) 학습하기 어댑터뷰 - 1 -

안드로이드기본 11 차시어댑터뷰 1 학습목표 어댑터뷰가무엇인지알수있다. 리스트뷰와스피너를사용하여데이터를출력할수있다. 2 확인해볼까? 3 어댑터뷰 1) 학습하기 어댑터뷰 - 1 - 11 차시어댑터뷰 1 학습목표 어댑터뷰가무엇인지알수있다. 리스트뷰와스피너를사용하여데이터를출력할수있다. 2 확인해볼까? 3 어댑터뷰 1) 학습하기 어댑터뷰 - 1 - ArrayAdapter ArrayAdapter adapter = new ArrayAdapter(this, android.r.layout.simple_list_item_1,

More information

자바GUI실전프로그래밍2_장대원.PDF

자바GUI실전프로그래밍2_장대원.PDF JAVA GUI - 2 JSTORM http://wwwjstormpekr JAVA GUI - 2 Issued by: < > Document Information Document title: JAVA GUI - 2 Document file name: Revision number: Issued by: Issue Date:

More information

FileMaker 15 ODBC 및 JDBC 설명서

FileMaker 15 ODBC 및 JDBC 설명서 FileMaker 15 ODBC JDBC 2004-2016 FileMaker, Inc.. FileMaker, Inc. 5201 Patrick Henry Drive Santa Clara, California 95054 FileMaker FileMaker Go FileMaker, Inc.. FileMaker WebDirect FileMaker, Inc... FileMaker.

More information

3ÆÄÆ®-11

3ÆÄÆ®-11 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 C # N e t w o r k P r o g r a m m i n g Part 3 _ chapter 11 ICMP >>> 430 Chapter 11 _ 1 431 Part 3 _ 432 Chapter 11 _ N o t

More information

제11장 프로세스와 쓰레드

제11장 프로세스와 쓰레드 제9장자바쓰레드 9.1 Thread 기초 (1/5) 프로그램 명령어들의연속 (a sequence of instruction) 프로세스 / Thread 실행중인프로그램 (program in execution) 프로세스생성과실행을위한함수들 자바 Thread 2 9.1 Thread 기초 (2/5) 프로세스단위작업의문제점 프로세스생성시오버헤드 컨텍스트스위치오버헤드

More information

Remote UI Guide

Remote UI Guide Remote UI KOR Remote UI Remote UI PDF Adobe Reader/Adobe Acrobat Reader. Adobe Reader/Adobe Acrobat Reader Adobe Systems Incorporated.. Canon. Remote UI GIF Adobe Systems Incorporated Photoshop. ..........................................................

More information