Web services 使用Maven构建/部署时,WebSphere与Web服务之间存在问题

Web services 使用Maven构建/部署时,WebSphere与Web服务之间存在问题,web-services,maven,websphere,websphere-7,Web Services,Maven,Websphere,Websphere 7,我正在迁移要用Maven构建和部署的应用程序。它部署在WebSphere7上。我已经设法使这个应用程序的一部分(HTMLUI等)工作正常,但是web服务出现了问题 当我尝试访问web服务的URL(例如localhost:9000/MyApplication/MyWebServiceProject/MyService)时,我希望看到一个类似“您好,这是一个web服务!”的页面 相反,我看到了这个例外: [4/1/13 11:49:37:484 EDT] 0000001d WASAxis2Servl

我正在迁移要用Maven构建和部署的应用程序。它部署在WebSphere7上。我已经设法使这个应用程序的一部分(HTMLUI等)工作正常,但是web服务出现了问题

当我尝试访问web服务的URL(例如
localhost:9000/MyApplication/MyWebServiceProject/MyService
)时,我希望看到一个类似“您好,这是一个web服务!”的页面

相反,我看到了这个例外:

[4/1/13 11:49:37:484 EDT] 0000001d WASAxis2Servl E The following exception was encountered while attempting to load the ConfigurationContext for the servlet: com.ibm.ws.websvcs.exception.ConfigurationException: Could not retrieve server module metadata in Axis servlet for module: MyWebServiceProject com.ibm.ws.websvcs.exception.ConfigurationException: Could not retrieve server module metadata in Axis servlet for module: MyWebServiceProject at com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.init(WASAxis2Servlet.java:290) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:171) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:739) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1613) [4/1/13 11:49:37:484 EDT]000000 1D WasAxis2服务尝试加载servlet的ConfigurationContext时遇到以下异常:com.ibm.ws.webvcs.exception.ConfigurationException:无法在Axis servlet中检索模块MyWebServiceProject的服务器模块元数据 com.ibm.ws.webvcs.exception.ConfigurationException:无法在Axis servlet中检索模块MyWebServiceProject的服务器模块元数据 位于com.ibm.ws.websvcs.transport.http.WASAxis2Servlet.init(WASAxis2Servlet.java:290) 位于com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358) 位于com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:171) 位于com.ibm.ws.webcontainer.servlet.ServletWrapper.HandlerRequest(ServletWrapper.java:739) 位于com.ibm.ws.webcontainer.servlet.ServletWrapper.HandlerRequest(ServletWrapper.java:502) 位于com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.HandlerRequest(ServletWrapperImpl.java:181) 位于com.ibm.ws.webcontainer.webapp.webapp.handleRequest(webapp.java:3935) 位于com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276) 位于com.ibm.ws.webcontainer.webcontainer.handleRequest(webcontainer.java:931) 位于com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) 位于com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) 位于com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) 位于com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) 在com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)上 位于com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) 在com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted上(AioReadCompletionListener.java:165) 位于com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 位于com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 位于com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 位于com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 位于com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 位于com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 位于com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1613) 我猜通过Maven部署web服务需要一些特定于IBM的配置,但我不确定它是什么

EAR项目POM的相关章节:

<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.7</version>
<configuration>

  <applicationName>PolicyGatewayEAR</applicationName>

      <defaultLibBundleDir>lib/</defaultLibBundleDir>
</configuration>
</plugin>
<plugin>
    <groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
<version>1.2</version>
<executions>
    <execution>
    <phase>integration-test</phase>
    <id>uninstall</id>
    <goals>
        <goal>wsUninstallApp</goal>
    </goals>
    <configuration>
        <wasHome>${was7Home}</wasHome>
        <verbose>false</verbose>
        <failOnError>false</failOnError>
        <profileName>was70profile1</profileName>
        <workingDirectory>${project.build.directory}/was6-maven-plugin</workingDirectory>
            <applicationName>MyApplication</applicationName>
    </configuration>
</execution>
<execution>
    <phase>integration-test</phase>
    <id>installation</id>
    <goals>
    <goal>installApp</goal>
    </goals>
    <configuration>
    <wasHome>${was7Home}</wasHome>
    <verbose>false</verbose>
    <failOnError>true</failOnError>
    <updateExisting>false</updateExisting>
    <profileName>was70profile1</profileName>
    <workingDirectory>${project.build.directory}/was6-maven-plugin</workingDirectory>
        <applicationName>MyApplication</applicationName>
   </configuration>
</execution>
</executions>
</plugin>

maven耳朵插件
2.7
政策网关
解放党/
org.codehaus.mojo
was6 maven插件
1.2
集成测试
卸载
wsUninstallApp
${was7Home}
假的
假的
WAS701
${project.build.directory}/was6 maven插件
我的申请
集成测试
安装
installApp
${was7Home}
假的
真的
假的
WAS701
${project.build.directory}/was6 maven插件
我的申请
web服务子项目的POM代码段:

        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.2</version>
            <configuration>
                <warSourceDirectory>WebContent</warSourceDirectory>
                <failOnMissingWebXml>true</failOnMissingWebXml>
                <warSourceDirectory>WebContent</warSourceDirectory>
                <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
                <archive>
                <manifest>
                  <addClasspath>true</addClasspath>
                  <classpathPrefix>lib/</classpathPrefix>
                </manifest>
              </archive>
            </configuration>
        </plugin>

maven战争插件
2.2
网络内容
真的
网络内容
WEB-INF/lib/*.jar
真的
解放党/

当我使用RAD(v8.5)部署到时,这并不是一个问题——自从我尝试使用Maven构建和部署应用程序以来,它才开始。有人知道如何解决这个错误吗?

所以我不得不使用与这里描述的相同的解决方案:

由于某种原因,当Maven构建项目中没有提供WSDL和模式文件时,WebSphere无法从代码生成WSDL。我报告的错误消息类似于我在EJB项目中运行包含WSDL和模式的测试时看到的错误消息