リモート処理に spring jax-ws SimpleJaxWsServiceExporter を使用してスタンドアロン Web サービスを公開しているときに問題に直面しています。以下は、アプリケーションの起動時の構成とエラー メッセージです。アプリケーション サーバーとして JBoss 5.1.0 を使用しています。設定を手伝ってください。Web サービスをスタンドアロンとして公開したいので、com.sun.xml.ws.transport.http.servlet.WSSpringServlet を使用していません。
私のapplicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<context:annotation-config />
<aop:aspectj-autoproxy proxy-target-class="true" />
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:8989/services" />
</bean>
<bean id="carServiceEndpoint" class="com.webservices.CarServiceEndpoint" />
私のエンドポイントクラス:
@Service("CarService")
@WebService(endpointInterface = "com.webservices.ICarServiceEndpoint", serviceName = "CarService")
public class CarServiceEndpoint implements ICarServiceEndpoint {
@Autowired
CarService carService;
@Override
public Car getCar() {
return carService.getCar();
}
@Override
public Car process(Car car) {
return carService.getCar();
}
}
エンドポイントが実装する私のインターフェース:
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@WebService(serviceName = "CarService")
public interface ICarServiceEndpoint {
@WebMethod
public Car getCar();
@WebMethod
public Car process(@WebParam(name = "car") Car car);
}
私のドメイン オブジェクト:
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "Car")
public class Car implements Serializable {
private static final long serialVersionUID = 1L;
private String carId;
private String carName;
public String getCarId() {
return carId;
}
public void setCarId(String carId) {
this.carId = carId;
}
public String getCarName() {
return carName;
}
public void setCarName(String carName) {
this.carName = carName;
}
}
エラーメッセージ:
org.springframework.beans.factory.BeanCreationException: ZipEntryHandler@1724575[パス=provider.war/WEB-INF/lib/core-services- 1.0.0-SNAPSHOT.jar/module-beans/applicationContext.xml context=file:/D:/Softwares/JBoss5.1.x/jboss510/server/NEWFW_SERVER/deploy/real=file:/D:/Softwares/JBoss5 .1.x/jboss510/server/NEWFW_SERVER/deploy/provider.war/WEB-INF/lib/core-services-1.0.0-SNAPSHOT.jar/module-beans/applicationContext.xml]: init メソッドの呼び出しに失敗しました。ネストされた例外は java.lang.IllegalArgumentException です: クラス com.webservices.CarServiceEndpoint$$EnhancerByCGLIB$$3002d7c には @WebService アノテーションも @WebServiceProvider アノテーションもありません