从wsimport工具创建java文件后,尝试使用Web服务我收到此错误
引起:javax.xml.ws.WebServiceException:方法__execute公开为WebMethod,但在wsdl:portType {http://microsoft.com/webservices/}中没有名称为{{{}}} __的对应wsdl操作UsersServiceSoap 在com.sun.xml.internal.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:367)〜[na:1.8.0_60] 在com.sun.xml.internal.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:105)〜[na:1.8.0_60] at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:320)〜[na:1.8.0_60] 在com.sun.xml.internal.ws.db.DatabindingImpl。(DatabindingImpl.java:85)〜[na:1.8.0_60] at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:59)〜[na:1.8.0_60] at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:43)〜[na:1.8.0_60] at com.sun.xml.internal.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:105)〜[na:1.8.0_60] at com.sun.xml.internal.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:875)~ [na:1.8.0_60] at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:892)~ [na:1.8.0_60] 在com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:855)〜[na:1.8.0_60] 在com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:435)〜[na:1.8.0_60] 在com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)〜[na:1.8.0_60] 在com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)〜[na:1.8.0_60] 在javax.xml.ws.Service.getPort(Service.java:119)〜[na:1.8.0_60] 在com.microsoft.webservices.UsersService.getUsersServiceSoap(UsersService.java:56)〜[main /:na] 在com.microsoft.webservices.UsersService $ getUsersServiceSoap.call(Unknown Source)〜[na:na] 在com.asal.attendance.AccountService $$ EPWLrhGY。$ tt__doTest(AccountService.groovy:20)〜[na:na] at com.asal.attendance.AccountService $$ DPWLrhGY。$ tt__doTest(Unknown Source)〜[na:na] 在com.asal.attendance.AccountService。$ tt__doTest(AccountService.groovy)〜[main /:na] 在 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)〜[na:1.8.0_60] 在java.lang.reflect.Method.invoke(Method.java:497)〜[na:1.8.0_60] at org.springsource.loaded.ri.OriginalClassInvoker.invoke(OriginalClassInvoker.java:50)〜[springloaded-1.2.4.RELEASE.jar:1.2.4.RELEASE] at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1459)~ [springloaded-1.2.4.RELEASE.jar:1.2.4.RELEASE] 在org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)〜[groovy-2.4.5.jar:2.4.5] 在groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)〜[groovy-2.4.5.jar:2.4.5] 在org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)〜[groovy-2.4.5.jar:2.4.5] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)~ [groovy-2.4.5.jar:2.4.5] 在groovy.lang.Closure.call(Closure.java:426)〜[groovy-2.4.5.jar:2.4.5] 在 在
答案 0 :(得分:2)
我通过将此插件添加到gradle.plugin来解决此问题 runtime" com.sun.xml.ws:jaxws-rt:2.1.7"