日志:
Error: java.lang.NoSuchMethodError: javax.wsdl.Operation: method getExtensibilityElements()Ljava/util/List; not found at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateOperations(WSDL11ToAxisServiceBuilder.java:1241) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populatePortType(WSDL11ToAxisServiceBuilder.java:447) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:360) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:281) at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:109) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:230) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:332) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:64) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:137) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:571) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:141) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:318) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:220) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:118) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:272) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:78) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:500) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:262) at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1319) at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:84) at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:745) at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:493) at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:379) at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:114) at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:127) at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:776) at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:729) at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:140) at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1019) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1028) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:538) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:724) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:683) at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:1678) at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
解决:
打.aar包的时候不要把.WSDL文件打进去。
(引用:http://topic.csdn.net/u/20070517/18/053f6045-1ead-44a1-9992-b2041583fe08.html)
痕迹:
1.本机开发时(tomcat)没有此问题,但部署到webspere下,就出现该问题。在网上搜了一把日志,解决方案都是说环境的wsdl4j.jar与应用下wsdl4j-1.6.2.jar包冲突造成的。
第一次尝试了一下2中方案:
a)修改类加载顺序,操作如下:(失败)
Apache Muse - Conflicting Version of WSDL4J in WebSphere Deployments
When deploying your Muse-based applications on IBM WebSphere Application Server (WAS) 6.0 or 6.1, you need to be aware that Muse relies on WSDL4J 1.6.1 while the server's core libraries include WSDL4J 1.4. If you install your application using the default class loading system, it will fail to start because the Muse framework depends on WSDL4J APIs that are only available in WSDL4J 1.5 and above. To work around this issue, you can configure the server to use the application's class loader before the container or system class loaders; this will ensure that the WSDL4J classes that are in your application's /WEB-INF/lib directory will be loaded before those in $WAS_HOME/lib.
If you are developing and deploying your application through IBM Rational Application Developer (RAD), you can make the required changes by setting the class loader mode to PARENT_LAST and the class loader policy to SINGLE.
If you are installing your application through the WAS admin console, select Enterprise Applications > Your Application > Class loading and update detection. You should then check the boxes labeled as follows:
* Classes loaded with application class loader first
* Single class loader for application
Making these changes should not affect your other (non-Muse) applications because, having no WSDL4J JAR files of their own, the server will continue up the chain of class loaders until the container's class loader discovers WSDL4J 1.4 in $WAS_HOME/lib.
b)删除wsdl4j.jar。(成功,生产上不可行)
操作步骤:发布完应用,删除wsdl4j.jar,重启服务,webservice发布成功,was不能再发布新的应用。
2.分析源码:
a)反编译wsdl4j和wsdl4j-1.6.2中Operation都没找到getExtensibilityElements
b)重新搜索Operation.getExtensibilityElements,找上面那篇文章解决问题。
总结:
1.新版本的东西要按流程操作,不要自己随意发挥。看readme、demo。
2.必要时初始化。在错误上解决问题,是一错再错,开始就错了,为弥补错误的解决方式,无论结果都是错的。可能无可避免得发生错误,僵局时还是要把握策略,不能走的更远,差点否认了axis2,打算回去使用axis1。
分享到:
相关推荐
java调用webservicejava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava调用webservice.zipjava...
1、开始->程序->Visual Studio 2005 命令提示 2、输入如下红色标记部分 D:\Program Files\Microsoft Visual Studio 8\VC>wsdl /language:c# /n:TestDemo /out:d:\Temp\TestService.cs D:\Temp\TestService.wsdl ...
【标题】"QDS.rar_WebService 图片_webservice" 提供了一个关于Web服务(WebService)在处理图片方面的实例。Web服务是一种基于互联网的协议,允许不同的应用程序之间进行交互和数据交换,而这里的示例着重展示了...
在代码实现方面,创建Webservice在VS2003中非常直观,只需新建Web服务应用程序项目,会自动生成一个Service1.asmx文件。默认的 HelloWorld 示例展示了基本的Web服务工作原理。要使一个函数成为外部可调用的接口,...
我们将探讨Webservice的基本概念、C#中创建Webservice的步骤以及如何通过WebSite1和WebServices目录下的文件来理解这个示例。 首先,让我们了解什么是Webservice。Webservice是一种基于XML(Extensible Markup ...
生成的代理类通常位于命名空间下,例如`YourNamespace.ServiceReference1`。你可以创建类的实例,调用其方法来与Web Service进行交互。例如: ```csharp using YourNamespace.ServiceReference1; // 创建Web ...
【标题】"eth.rar_webservice" 提供的是一个关于 WebService 的初始框架,适用于初学者进行学习。WebService 是一种基于互联网的、平台无关的服务提供方式,它允许不同系统间的应用程序通过网络进行通信和数据交换。...
下一步,我们需要添加 web 服务客户端,以便调用 SAP SOAP webservice。 1. 右键点击项目名称,选择“New”->“Other”。 2. 在“New”对话框中,选择“Web Services”->“Web Service Client”,然后单击“Next”...
jaxws-rt-2.2.8.jar java webservice依赖包 在Tomcat中发布webservice时所用到
0.部署工具u8webservice.zip0.部署工具u8webservice.zip0.部署工具u8webservice.zip0.部署工具u8webservice.zip0.部署工具u8webservice.zip0.部署工具u8webservice.zip
利用wsdl.exe生成webservice代理类:根据提供的wsdl生成webservice代理类1、开始->程序->Visual Studio 2005 命令提示2、输入如下红色标记部分D:/Program Files/Microsoft Visual Studio 8/VC>wsdl /language:c# /n:...
这个"WebService教程+实例+代码提示功能WebService实例.rar"压缩包文件显然包含了关于WebService的学习资料、实例代码和可能的代码提示功能,旨在帮助用户深入理解和实践WebService的开发。 首先,"教程地址.txt"很...
webservices-api-2.2.jar.zip webservices-extra-2.2.jar.zip webservices-extra-api-2.2.jar.zip webservices-rt-1.2.jar.zip webservices-tools-2.2.0-4.jar.zip 如果还需要其他jar包,请留言留邮箱,如果我有,就...
1. **服务器端Web服务发布**:CXF允许开发者通过JAX-WS或JAX-RS接口定义服务,然后自动暴露为SOAP或RESTful服务。SpringBoot结合CXF,可以轻松将服务发布到内嵌的Servlet容器中。 2. **客户端Web服务调用**:CXF还...
本文将详细介绍 WebService 的四种常见发布方式:CXF、XFire、Axis2 和 Axis1,并探讨如何通过客户端进行调用。 #### 二、CXF 方式 ##### 2.1 搭建环境 CXF 与 Spring 结合使用是当前流行的 WebService 构建方案之...
简单的webservice+Cxf+Spring数据对接实例以及jar.rar简单的webservice+Cxf+Spring数据对接实例以及jar.rar简单的webservice+Cxf+Spring数据对接实例以及jar.rar简单的webservice+Cxf+Spring数据对接实例以及jar.rar...
综上所述,"webservice.zip"提供了关于Java WebService的实践教程,涵盖了服务端发布、客户端调用的两种方法,以及如何在不依赖额外库的情况下实现这些功能。这对于想要学习Web服务的Java开发者来说是一个宝贵的资源...
easyUI+HighCharts+Aspose.cells+Aspose.word+Aspose.Pdf+WebService等的实例应用,easyui包括异步树加载,嵌套表格等,highcharts包括本地导出图片(仅限jpg)柱状,线状图例等,aspose.word、excel、pdf等使用的...