码迷,mamicode.com
首页 > 其他好文 > 详细

WS调用的时候报错

时间:2016-11-29 13:49:06      阅读:680      评论:0      收藏:0      [点我收藏+]

标签:style   mode   init   res   sse   except   toc   pos   back   

报错内容
技术分享javax.xml.ws.WebServiceException: Method recognizeIdentityCardByFilePath is exposed as WebMethod, but there is no corresponding wsdl operation with name {技术分享http://tempuri.org/}RecognizeIdentityCardByFilePath in the wsdl:portType{技术分享http://tempuri.org/}OCRServiceSoap
at 技术分享com.sun.xml.internal.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:367)
at 技术分享com.sun.xml.internal.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:105)
at 技术分享com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:320)
at 技术分享com.sun.xml.internal.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:85)
at 技术分享com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:59)
at 技术分享com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:43)
at 技术分享com.sun.xml.internal.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:105)
at 技术分享com.sun.xml.internal.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:875)
at 技术分享com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:892)
at 技术分享com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:855)
at 技术分享com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:435)
at 技术分享com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)
at 技术分享com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)
at 技术分享javax.xml.ws.Service.getPort(Service.java:119)
at org.tempuri.OCRService.getOCRServiceSoap(OCRService.java:100)
at com.vcredit.ddcash.monitor.client.IdentityRecognizeClient.recognize(IdentityRecognizeClient.java:39)
at com.vcredit.ddcash.monitor.service.IdentityRecognizeService.newRecognizeIdentityCard(IdentityRecognizeService.java:63)
at com.vcredit.ddcash.monitor.schedule.IdentityRecognizeMonitorJob.getIdentityRecognizeData(IdentityRecognizeMonitorJob.java:57)
 
调用内容 

OCRService recong = new OCRService(new URL(baseUrl));
OCRServiceSoap soap = recong.getOCRServiceSoap();
IdentityCard idCard = soap.recognizeIdentityCardByBytes(content);

 

解决办法:pom文件缺少包:

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>

 

WS调用的时候报错

标签:style   mode   init   res   sse   except   toc   pos   back   

原文地址:http://www.cnblogs.com/muliu/p/6112949.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!