Javabeanを簡単に渡すWebService構造+基本jarパッケージ

1867 ワード

com.company.project.module:【Javabean】いくつか、jaxbで注釈
  com.company.project.Webservice:【WebServiceインタフェース】IWebService
  com.company.project.webservice.impl:【インタフェース実装クラス】WebServiceImpl
--------Endpoint.publish("localhost:8080/service",new WebServiceImpl())------------
  com.company.project.クライアント:【クライアントインタフェース】IServiceClient
  com.company.project.client.impl:【実装クラス】ServiceClient
  ----------------------------------
基本jarパッケージ(maven):
  
  <dependencies>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf</artifactId>
			<version>3.1.1</version>
			<type>pom</type>
			<!-- scope>import</scope -->
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxws</artifactId>
			<version>3.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-databinding-aegis</artifactId>
			<version>3.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http</artifactId>
			<version>3.1.1</version>
		</dependency>
		<!-- The server example in here launches the embedded jetty. Not needed 
			if you deploy a WAR. -->
		<dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-transports-http-jetty</artifactId>
			<version>3.1.1</version>
		</dependency>

  </dependencies>