首页 > 代码库 > WS调用的时候报错
WS调用的时候报错
报错内容
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)
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调用的时候报错
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。