我用Jax-ws生成了一个webservice使用者,并使用maven将其打包到一个jar文件中。我想在另一个项目中使用这个jar文件,这样我就可以从这个其他项目中与webservice交谈。我使用maven和本地存储库添加了依赖关系:
<dependencies>
<dependency>
<groupId>be.vrt</groupId>
<artifactId>ScheduAllClient</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>data-local</id>
<name>data</name>
<url>file://${project.basedir}/repo</url>
</repository>
</repositories>
当我在IntelliJ中使用spring boot运行我的项目时,我可以毫无问题地与WS交谈。如果我然后将项目打包到war文件中并尝试在Wildfly上部署,我会收到以下错误:
Cannot upload deployment: {
"WFLYCTL0080: Failed services" => {
"jboss.undertow.deployment.default-server.default-host./sa-integrations"
=> "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./sa-integrations:
java.lang.RuntimeException:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSController': Unsatisfied dependency expressed through field 'kpsImportTask';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSImportTask': Unsatisfied dependency expressed through field 'saService';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SAService': Unsatisfied dependency expressed through field 'resourceDAO';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceDAO': Unsatisfied dependency expressed through field 'scheduAllService';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type. Caused by: java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSController': Unsatisfied dependency expressed through field 'kpsImportTask';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSImportTask': Unsatisfied dependency expressed through field 'saService';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SAService': Unsatisfied dependency expressed through field 'resourceDAO';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceDAO': Unsatisfied dependency expressed through field 'scheduAllService';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
Caused by:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSController': Unsatisfied dependency expressed through field 'kpsImportTask';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSImportTask': Unsatisfied dependency expressed through field 'saService';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SAService': Unsatisfied dependency expressed through field 'resourceDAO';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceDAO': Unsatisfied dependency expressed through field 'scheduAllService';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
Caused by:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'KPSImportTask': Unsatisfied dependency expressed through field 'saService';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SAService': Unsatisfied dependency expressed through field 'resourceDAO';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceDAO': Unsatisfied dependency expressed through field 'scheduAllService';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
Caused by:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SAService': Unsatisfied dependency expressed through field 'resourceDAO';
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceDAO': Unsatisfied dependency expressed through field 'scheduAllService';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
Caused by:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'resourceDAO': Unsatisfied dependency expressed through field 'scheduAllService';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduAllServiceImpl': Injection of resource dependencies failed;
nested exception is org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type.
Caused by:
org.apache.cxf.wsdl11.WSDLRuntimeException: Part Body defined with no element and no type."
},"WFLYCTL0412: Required services that are not installed:" => [
"jboss.undertow.deployment.default-server.default-host./sa-integrations"
],"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined}
ScheduAllServiceImpl如下所示:
@Service
@Qualifier("ScheduAllService")
public class ScheduAllServiceImpl {
@WebServiceRef(SchedWebServiceAPI.class)
private SchedWebServiceAPISoap schedWebServiceAPISoap;
SchedWebServiceAPI.class是所需jar的主类。
有人知道出了什么问题吗?我想这与maven有关。我尝试使用mvn clean install
或mvn clean package
进行打包,但似乎没有任何效果。当我检查war文件时,WEB-INF / lib中存在所需的jar文件。
如果它有任何帮助,我正在使用: