环境
(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'.:
NULL 博文链接:https://wilian.iteye.com/blog/1992365
PHP开启openssl时候遇到的坑。出现以下报错,替换/usr/local/include/openssl里面的文件之后编译成功。add_assoc_name_entry’:/data/src/... In function ‘asn1_time_to_time_t’:/d
使用java读excel文件,往excel里面写入数据,并重新生成excel文件
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 ...
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. ...
1.PHP4.23在WindowsXP下的IIS和Apache2两种服务器上的安装实例 http://www.phpe.net/articles/260.shtml 2.Apache服务器配置全攻略(一)http://www.phpe.net/articles/94.shtml 3.WinXp sp1+apache2.0+...
LogEOS: Warning: [LogHttp] 000001A5C806C040: invalid HTTP response code received. URL: https://api.epicgames.dev/sdk/v1/default?platformId=WIN, HTTP code: 0, content length: 0, actual payload size: 0 ...
- 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_...
ERROR_INVALID_SERVICE_ACCOUNT: sInfo := 'ERROR_INVALID_SERVICE_ACCOUNT'; ERROR_SERVICE_EXISTS: sInfo := 'ERROR_SERVICE_EXISTS'; end; {$IFDEF DEBUG} ShowMessage(sInfo); {$ENDIF} end else ...
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. ...
http://code.taobao.org/p/tfs/wiki/get/ http://my.oschina.net/beiyou/blog/76129?fromerr=bGluCWDI tfs版本:2.2.16 centos:7.2.1511 gcc:4.8.5 # docker run -i -t centos /bin/bash [root@2f60c4bcddfa /]# ...
m_hSocket = INVALID_SOCKET; m_bCreate = FALSE; memset(&m_gThreadSocket,0,sizeof(m_gThreadSocket)); ////m_gThreadSocket.hThread = NULL; ////m_gThreadSocket.hEventSocket = NULL; ////m_...
海康威视WEB3.0,包含官方控件:CH_32位、CH_64位、CN_64位、火狐浏览器:4.00/45.0/50.0.1、IE浏览器:IE7-32位/64位。具体操作:https://blog.csdn.net/concealed0/article/details/88637413#comments
一个n的flex组件(SpringGraph Flex Component) SpringGraph Flex Component 有几个demo,不多做解释,用了就知道强大了,关于如何使用,以后在慢慢写了。 <A href=...
Java 一些实际应用案例 demo,适合初学者,代码很实用的初级版
如果我传递的无效URL不遵循有效的http(s)://www.example.com(/more/routes)格式,则JSON响应将包含类似{"error":"invalid URL"} 。 当我访问缩短的URL时,它将把我重定向到我的原始链接。 创建示例: POST [url] ...
To learn more, see http://code.google.com/appengine/kb/general.html#rpcssl 更换证书文件,第一次更换会自动恢复默认,要再更换一次,就好了,具体方法参见:博客https://mp.csdn.net/postedit/72821974,更新...