环境
(1)用jdk1.6.25生成webservice客户端
(2)项目中内嵌了cxf的jar包(不能去掉)
报错:
Caused by: javax.wsdl.WSDLException: WSDLException (at /soap:Envelope): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.
at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:237)
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:92)
... 29 more
)
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.TestSuite$1.runTest(TestSuite.java:97)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
出错原因及解决方案:
wsdlLocation = "http://172.16.82.92:8080/OmaeService/services/UserService" 没有加后缀,具体为什么还没弄清楚,可能是jdk的jaxws和cxf的jaxws不兼容吧。总之,我加上后缀后,问题解决。
正解:
wsdlLocation = "http://172.16.82.92:8080/OmaeService/services/UserService?wsdl"
分享到:
相关推荐
根据WSDL文件生成客户端代码与创建客户端工程 注意小细节:在根据对方提供的... 否则报:WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.:
此外,项目中会自动生成配置文件如`sun-jaxws.xml`和`web.xml`,用于配置WebService服务。 4. **部署服务**:将项目发布到MyEclipse自带的Tomcat或其他Servlet容器中,并启动服务器。可以通过浏览器访问WSDL文件的...
PHP开启openssl时候遇到的坑。出现以下报错,替换/usr/local/include/openssl里面的文件之后编译成功。add_assoc_name_entry’:/data/src/... In function ‘asn1_time_to_time_t’:/d
NULL 博文链接:https://wilian.iteye.com/blog/1992365
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
在Java编程环境中,处理Excel文件是一项常见的任务,无论是读取数据、分析数据还是写入新的信息。本项目“ReadService.7z”专注于利用Java来读取Excel文件,然后向其中写入数据,并最终生成一个新的Excel文件。...
3. **配置**: 可根据需求对`activemq.xml`进行修改,但通常情况下无需修改。 4. **启动**: 在`${active-home}\bin\win64`目录下执行`activemq.bat`脚本来启动服务。 5. **监控**: 启动完成后,可以通过浏览器访问`...
<faultcode>soap:Client</faultcode> <faultstring>Invalid parameter</faultstring> <Error xmlns="http://example.com/"> <Code>1001</Code> <Description>Invalid value for 'intA'</Description> </...
Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: /data/app/vmdl890369339.tmp/7_slice__ signatures are inconsistent. It is possible that this ...
MapBox GL Language插件是专为MapBox GL JS设计的一款扩展工具,用于增强地图的多语言支持。MapBox GL JS是一种流行的开源JavaScript库,它允许开发者创建交互式、高性能的地图,利用矢量图层和样式来呈现地理数据。...
cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. One of '{"http:// java.sun.com/xml/ns/javaee":include-prelude, ...
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. ...
在ROS(Robot Operating System)开发过程中,遇到`rlexception: invalid roslaunch xml syntax: no element found: line 1, column 0`这样的错误信息时,表明当前的`.launch`文件存在XML语法错误。具体来说,可能是...
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config Welcome to mkscript setup progress All available chips: 0. sun8iw5p1 Choice: 0 All available platforms: 0. android 1. ...
我们可以创建一个实现了`org.springframework.core.convert.converter.Converter`接口的类,专门用于将字符串转换为日期。在`convert()`方法中,我们可以编写逻辑来解析不同的日期格式。例如,我们可以使用`java....
今天在使用docker获取镜像时,出现了镜像获取报错的问题,找到了解决的方法记一下。 一、问题 ➜ ~ docker search sameersbn Error response from daemon: Get ...➜ ~ docker pull sameersbn Us
- Fix: invalid encoding of non-ascii urls in web seeds - Fix: uTP fix when receiving acks for old packets - Fix: uTP variable packet size bug - Change: link to EULA in installer - Change: added knob ...
if (hFile == INVALID_HANDLE_VALUE) { // Display error switch (::GetLastError()) { case ERROR_FILE_NOT_FOUND: // The specified COM-port does not exist return EPortNotAvailable; case ERROR_...
<faultcode>soap:Client</faultcode> <faultstring>Invalid request data</faultstring> <error xmlns="http://www.example.com/errors">...</error> </detail> </soap:Fault> ``` #### 总结 SOAP作为一种...
ERROR_INVALID_SERVICE_ACCOUNT: sInfo := 'ERROR_INVALID_SERVICE_ACCOUNT'; ERROR_SERVICE_EXISTS: sInfo := 'ERROR_SERVICE_EXISTS'; end; {$IFDEF DEBUG} ShowMessage(sInfo); {$ENDIF} end else ...