我有一个由jax-ws生成的wsdl文件。是否可以将它与“Axis2 wsdl-to-java”生成的java代码一起使用?
因为我得到了这个例外;
java.lang.InstantiationError: org.apache.axis2.databinding.ADBDataSource
at tr.com.turkcell.radius.IPToDataWithPortServiceStub$TSO_DATA.getOMElement(IPToDataWithPortServiceStub.java:5751)
at tr.com.turkcell.radius.IPToDataWithPortServiceStub.toEnvelope(IPToDataWithPortServiceStub.java:7826)
at tr.com.turkcell.radius.IPToDataWithPortServiceStub.process(IPToDataWithPortServiceStub.java:167)
at com.ericsson.enk.mtv.authentication.radius.RadiusService.callRadiusWS(RadiusService.java:100)
at com.ericsson.enk.mtv.authentication.radius.RadiusService.authenticate(RadiusService.java:62)
at com.ericsson.enk.mtv.plugin.authentication.RadiusAuthenticationPlugin.processDefaultAuthenticationRequest(RadiusAuthenticationPlugin.java:137)
at com.ericsson.enk.mtv.plugin.authentication.RadiusAuthenticationPlugin.authenticate(RadiusAuthenticationPlugin.java:96)
at com.ericsson.mtv.bric.bl.AuthenticationBusinessDelegateImpl.authenticate(AuthenticationBusinessDelegateImpl.java:244)
at com.ericsson.mtv.bric.bl.AuthenticationBusinessDelegateImpl.authenticate(AuthenticationBusinessDelegateImpl.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.service.ServiceContainer.dynamicInvoke(ServiceContainer.java:376)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.service.ServiceRemoteProxy.invoke(ServiceRemoteProxy.java:98)
at $Proxy811.authenticate(Unknown Source)
at com.ericsson.mtv.bric.common.authentication.AuthenticationFilter.authenticate(AuthenticationFilter.java:171)
at com.ericsson.mtv.bric.common.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
我需要做什么?我应该使用jax-ws工具生成java代码吗?或者这是问题还有其他什么?
答案 0 :(得分:5)
由于用于生成和构建代码的Axis2版本与运行时使用的版本不匹配,可能会发生此特定错误。你使用哪个Axis2版本?
答案 1 :(得分:0)
您可以尝试wsimport
命令。以下是wsimport docs