多线程调用Axis客户端异常问题请教

相同版本程序大部分时间可以正常运行(一直为bug不规律出现烦恼,提升并发线程数量不会增加其出现频率,至今出现2次),

偶尔启动运行抛出以下异常(不存在参数个数不匹配问题)。下附异常信息与代码片段:
javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of IN/INOUT

parameters (2) from the addParameter() calls
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.Call.invoke(Call.java:1828)
at com.ffcs.zteintf.SendRunnable.run(SendRunnable.java:122)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of

IN/INOUT parameters (2) from the addParameter() calls
at org.apache.axis.client.Call.getParamList(Call.java:2059)
at org.apache.axis.client.Call.invoke(Call.java:2364)
at org.apache.axis.client.Call.invoke(Call.java:1812)
... 2 more
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of

IN/INOUT parameters (2) from the addParameter() calls
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:javax.xml.rpc.JAXRPCException: Number of parameters passed in (1)

doesn't match the number of IN/INOUT parameters (2) from the addParameter() calls
at org.apache.axis.client.Call.getParamList(Call.java:2059)
at org.apache.axis.client.Call.invoke(Call.java:2364)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ffcs.zteintf.SendRunnable.run(SendRunnable.java:122)
at java.lang.Thread.run(Thread.java:662)

run()方法中部分代码:
call = (Call) soapService.createCall();//soapService为单例,因为不规律报错,无法证实是此原因

call.setTargetEndpointAddress(soapService.getUrl());
call.setOperationName(new QName(soapService.getTargetObjectURI(),soapService.getMethodName()));
call.addParameter(new QName("http://***********/********/exchange", "parameters"), new QName

("http://***********/********/exchange", "parameters"), String.class, ParameterMode.IN);//

    call.setReturnType(XMLType.XSD_STRING);

response = (String) call.invoke(new Object[] { crmReq });

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
AXIS1环境下调用AXIS2服务端问题

我的项目现在是用的AXIS1的环境但是想调用AXIS2的服务端.我用的RPC的方式.每次调用都会报出org.apache.axis2.AxisFault: String index out of range: -12的错误.在纯AXIS2的环境下是可以的.我的代码如下 import javax.xml.namespace.QName; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.rpc.client.RPCServiceClient; public class test { /** * RPC调用AXIS2 webservice * @param endpoint 服务地址 如:http://192.168.212.192:8090/jyedi/services/ediService?wsdl * @param localPart 方法名 如sendMessageLD2WMS * @param opArgs 方法参数 如Object[] opArgs = new Object[] { param }; * @param namespaceURI 命名空间 如 :targetNamespace="http://impl.services.service.server.edi.vtradex.com"> * @param opReturnType 返回类型 如字符串:Class[] opReturnType = new Class[] { String[].class }; * @throws org.apache.axis2.AxisFault */ public static String axis2RPCInvoke(String endpoint,String localPart,Object[] opArgs,String namespaceURI,Class[] opReturnType) throws org.apache.axis2.AxisFault, AxisFault { Object[] ret = null; try { RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference(endpoint); options.setTo(targetEPR); QName opQName = new QName(namespaceURI, localPart); ret = serviceClient.invokeBlocking(opQName, opArgs, opReturnType); System.out.println(((String[]) ret[0])[0]); } catch (AxisFault e) { e.printStackTrace(); } return ((String[]) ret[0])[0]; } }

axis2客户端调用时报错

axis2在调用的时候报这个错,本地环境没问题,发布到linux时就出问题了 Exception in thread "main" org.apache.axis2.AxisFault: Dangling meta character '?' near index 0 ? ^ at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:508) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:368) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:533) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:509) at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:75) at sinosoft.core.service.coretogpi.webservice.SingleTransactionParse.main(SingleTransactionParse.java:104)

axis2客户端调用cxf服务端报异常,接口调不同,求帮助,求解答?

org.apache.axis2.AxisFault: Unmarshalling Error: unexpected element (uri:"", local:"arg0"). Expected elements are <{}method>,<{}xml> at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531) at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:76) at com.neusoft.soc.itsm.client.ITSMClient.invokeServiceMethod(ITSMClient.java:108) at com.neusoft.soc.itsm.client.ITSMClient.doITSMService(ITSMClient.java:41) at com.neusoft.soc.asset.securitydomainmanage.domain.impl.SecurityDomainServiceImpl.addSecurityDomain(SecurityDomainServiceImpl.java:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203) at $Proxy318.addSecurityDomain(Unknown Source) at com.neusoft.soc.asset.securitydomainmanage.domain.SecurityDomainAction.addSave(SecurityDomainAction.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274) at com.neusoft.unieap.action.EAPDispatchAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at com.neusoft.unieap.action.EAPActionServlet.process(Unknown Source) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292) at com.neusoft.unieap.service.security.intercept.filter.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:79) at com.neusoft.unieap.service.security.ui.webapp.UniEAPSecurityEnforcementFilter.doFilter(Unknown Source) at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at net.sf.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:305) at com.neusoft.unieap.service.security.ui.webapp.AuthenticationProcessingFilter.doFilter(AuthenticationProcessingFilter.java:65) at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at com.neusoft.unieap.service.security.accountPolicy.AccountPolicyFilter.doFilter(AccountPolicyFilter.java:109) at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at com.neusoft.unieap.service.security.ui.webapp.JcaptchaProcessingFilter.doFilter(JcaptchaProcessingFilter.java:230) at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at com.neusoft.unieap.service.security.context.HttpSessionContextIntegrationFilter.doFilter(Unknown Source) at net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303) at net.sf.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173) at net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.unieap.comp.ajaxanywhere.AAFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.unieap.comp.transcoding.TranscodingFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.soc.common.filter.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:60) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.report.server.util.fw.ReportFWFilter.doFilter(ReportFWFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.soc.common.filter.UrlFilter.doFilter(UrlFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.soc.common.filter.XSSFilter.doFilter(XSSFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.neusoft.soc.common.filter.XSSScanFilter.doFilter(XSSScanFilter.java:41) 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:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:722) 网上的给出的方法都试过了,添加服务端的方法上的命名空间,还是不好使,求大神给出答案。

axis客户端调用webservice报错

有两个虚拟机,称为A和B,虚拟机A中部署着webservice服务端提供WSDL地址, 虚拟机B是客户端调用虚拟机A中的服务,调用时出现了一个奇怪的现象,报错如下: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(XMLDocumentFragmentScannerImpl.java:663) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerImpl.java:556) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1779) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1758) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanContent(XMLEntityScanner.java:694) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanContent(XMLDocumentFragmentScannerImpl.java:1051) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1649) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.test.Test.main(Test.java:28) 单纯报错没什么奇怪的,奇怪的是我在物理机上调用虚拟机A中的服务是正常的,用的客户端代码跟虚拟机B中是一样的,然后在虚拟机B中调用物理机里边的部署的和虚拟机A一样的服务也是可以正常的,虚拟机B通过浏览器访问虚拟机A的wsdl地址也是可以正常访问到的,虚拟机B中的客户端代码通过junit测试也是可以正常测试通过的。种种迹像表明,虚拟机A的webservice服务是没有问题的,虚拟机B中的客户端代码也是没有问题的,虚拟机A和虚拟机B是可以互相访问的,但只要通过虚拟机B调A的服务就报以上错误,如果一直报错也说的过去,只是在很偶然的情况下会调成功那么一次,本人折腾了两天了实在是没招了,有谁碰到过类似的问题希望可以给予帮助 ``` ```

axis2 webservice 客户端调用时报错

代码部分如下: RPCServiceClient serviceClient = new RPCServiceClient(); EndpointReference targetEPR = new EndpointReference(wsurl); Options options = serviceClient.getOptions(); options.setTo(targetEPR); HttpTransportProperties.Authenticator basicauth = new HttpTransportProperties.Authenticator(); basicauth.setUsername("ECInsurance"); //服务器访问用户名 basicauth.setPassword("YGBXECInsurance"); //服务器访问密码 options.setProperty(HTTPConstants.AUTHENTICATE, basicauth); options.setAction("idNoCheck"); QName qname = new QName("http://slis-uat.sinosig.com/services/IdNoCheck", "idNoCheck"); // 指定IdNoCheck方法的参数值 Object[] parameters = new Object[1]; //PackReg方法是组装xml的,报文经过接口测试没问题 parameters[0]=PackReg(order); System.out.println(parameters[0]); // 指定IdNoCheck方法返回值的数据类型的Class对象 Class[] returnTypes = new Class[] {String.class}; System.out.println(serviceClient.invokeBlocking(qname,parameters, returnTypes)[0].toString()); } catch (AxisFault e) { e.printStackTrace(); } 错误信息如下: org.apache.axis2.AxisFault: Server Error at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508) at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:101) at com.sinosig.lifewebsite.util.idCheck.idCheckIdNo(idCheck.java:65) at com.sinosig.lifewebsite.controller.jkseb.JksebController.idCheckNo(JksebController.java:90) 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:597) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:439) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:427) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.sinosig.ec.sso.filter.SSOClientFilter.doFilter(SSOClientFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:662) 接口那边说没有问题的

如何用多个客户端测试axis2服务端

如何用webservice axis2 测试,并发的客户端2个客户端/10个客户端/20个客户端/50个客户端/100个客户端;

axis2 客户端用户名密码

axis2客户端调用的时候需要设置用户名密码,在网上搜了下,发现了3种方式,其中方法1我调用成功了,2、3都认证失败,有没有高手帮忙解释下3面3种写法: 1、 HttpTransportProperties.Authenticator auth = new Authenticator(); auth.setUsername(userName); auth.setPassword(password); stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, auth); 2、 stub._getServiceClient().getOptions().setUserName(userName); stub._getServiceClient().getOptions().setPassword(password); 3、 OMFactory fac = OMAbstractFactory.getOMFactory(); OMElement header = fac.createOMElement("AuthenticationToken", omNs); OMElement ome_user = fac.createOMElement("Username", omNs); ome_user.setText(""); header.addChild(ome_user); OMElement ome_pass = fac.createOMElement("Password", omNs); ome_pass.setText(""); header.addChild(ome_pass); serviceClient.addHeader(header);

java多线程中的异常问题?

今天看java编程思想中并发部分的时候,看到了那么一句话“异常不能跨线程传播回main(),所以你必须在本地所有的任务内部产生的异常”,也就是说run()方法不可以throws Exception。但是测试的时候发现,Callable接口中的call方法是可以throws的。想请教一下大牛们,Runnable和Callable接口除了有无返回值的区别外,底层实现有什么本质区别啊,能简明说一下吗?

axis2 WebService的客户端无法调用?

![![![图片说明](https://img-ask.csdn.net/upload/201610/09/1476007052_450717.png)图片说明](https://img-ask.csdn.net/upload/201610/09/1476007012_66118.png)![图片说明](https://img-ask.csdn.net/upload/201610/09/1476007072_382240.png) 正常来说aa可以调用setA()、setB()方法传参数,但是根本不存在这两个方法,是怎么回事?

axis1 调用axis2 的服务上传pdf文件.报错

axis1 调用axis2 的服务上传pdf文件.报错org.apache.axis2.AxisFault:invalid reference:cid:******的错误

webservice相关axis实现方式客户端参数(java)

1.客户端调用服务端执行到 (String) call.invoke(obj);时报错:The given SOAPAction “命名空间/方法名” does not match an operation. 客户端代码如下: String interfaceName = "aaa"; Service service = new Service(); Call call; call = (Call) service.createCall(); String url="http://localhost:8080/Service"; call.setTargetEndpointAddress(new java.net.URL(url)); String qName="http:/temp.org/"; call.setOperationName(new QName(qName, interfaceName)); String xmlPara="arg0"; call.addParameter(new QName("", xmlPara), org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setUseSOAPAction(true); call.setReturnType(org.apache.axis.encoding.XMLType.SOAP_STRING); call.setSOAPActionURI(qName + interfaceName); Object obj[] = new Object[] { "" }; String serviceReturnXml = (String) call.invoke(obj); System.out.println(serviceReturnXml); 我把下面两行去掉就好用,请问是什么原因? call.setUseSOAPAction(true); call.setSOAPActionURI(qName + interfaceName); 2.下面两个参数 call.setOperationStyle(org.apache.axis.constants.Style.RPC); call.setOperationUse(org.apache.axis.constants.Use.ENCODED); 这两个参数是什么意思? 谢谢各位老师帮忙解答。

java客户端使用axis1.4jar包调用webService传递复杂参数

有如下一段WSDL,请问使用axis1.4jar包应该如何传递参数,谢谢。 ``` <xsd:complexType name="function"> <xsd:sequece> <xsd:element name="Head"> <xsd:sequece> <xsd:element name="e1"> <xsd:simpleType> ... </xsd:simpleType> </xsd:element> <xsd:element name="e2"> <xsd:simpleType> ... </xsd:simpleType> </xsd:element> </xsd:sequece> <xsd:element> </xsd:sequece> </xsd:complexType> ```

webservice客户端怎么调用服务端CXF

用的cxf客户端服务端都是wsdl反向生成的 服务端服务已经发布 客户端怎么调用?

AXIS1.4客户端抛出InvocationTargetException,求大神帮忙解决。

服务端的地址:http://203.110.174.169:7014/services/LoginService?wsdl 按照axis1.4的生成方式生成的客户端,两个class和两个interface: public class LoginServiceSoapBindingStub extends org.apache.axis.client.Stub               implements com.cmbc.dcrz.client.login.LoginEndpoint public class LoginServiceSoapBindingStub extends org.apache.axis.client.Stub               implements com.cmbc.dcrz.client.login.LoginEndpoint public interface LoginEndpoint extends java.rmi.Remote public interface LoginEndpointService extends javax.xml.rpc.Service 自己写了个调用方法: LoginEndpointServiceLocator locator = new LoginEndpointServiceLocator(); byte[] loginToken = locator.getLoginService().login(userName, userPassword); 但是执行到“byte[] loginToken = locator.getLoginService().login(userName, userPassword);”时,一直报AxisFault  java.lang.reflect.InvocationTargetException 异常,有哪位大神帮忙解决一下? <br/> 异常信息如下: 2016-11-20 20:33:33.376 [http-bio-8080-exec-2] INFO com.cmbc.dcrz.service.LoginExecuteService - 【LoginExecuteService】开始 AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:oradb java.lang.reflect.InvocationTargetException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:392) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.cmbc.dcrz.client.login.LoginServiceSoapBindingStub.login(LoginServiceSoapBindingStub.java:120) at com.cmbc.dcrz.service.LoginExecuteService.LoginService(LoginExecuteService.java:27) at com.cmbc.dcrz.service.LoginExecuteServiceDelegate.LoginService(LoginExecuteServiceDelegate.java:9) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:246) at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146) at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257) at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:744)

axis2生成客户端代码问题

我这边是java 他是.net我用axis2 调用的 之前命令肯定 没错 而且我也生成过 后来就不会听 不知道 为嘛 报错 是 Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException : java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 实在不知道什么问题了有回答地址 也可以给您 在线等 急求 啊 我现在 没有 分数 但是 真的很着急啊啊啊 在线等 !

如何解决java axis 调用webservice服务器操作异常

Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507) at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980) at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055) at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145) at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478) at org.apache.axis.message.MessageElement.output(MessageElement.java:1208) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269) at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530) at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554) at org.apache.axis.Message.getContentType(Message.java:486) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.apache.jsp.sendms_jsp._jspService(sendms_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) {http://xml.apache.org/axis/}hostname:89501e4cc6db46e java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:317) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:269) at org.apache.axis.SOAPPart.saveChanges(SOAPPart.java:530) at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:554) at org.apache.axis.Message.getContentType(Message.java:486) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:343) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.apache.jsp.sendms_jsp._jspService(sendms_jsp.java:65) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) Caused by: java.io.IOException: No serializer found for class myjava.MTMessage in registry org.apache.axis.encoding.TypeMappingDelegate@8bfdea at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507) at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980) at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055) at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145) at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478) at org.apache.axis.message.MessageElement.output(MessageElement.java:1208) at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315) ... 46 more

weblogic下,客户端方式调用axis包访问webserivce接口

weblogic下,客户端方式调用axis包访问webserivce接口,在tomcat下能正常访问,而在weblogic下面就会报以下错误。 ![图片说明](https://img-ask.csdn.net/upload/201512/22/1450781148_831468.jpg) 下面是调用接口代码: public String invokeWebservice(String wsurl, String funName, String arg) throws MalformedURLException, RemoteException { String rtnxml = ""; StringBuffer rtnxmlErr = new StringBuffer(); String timeout = "1800000"; try { Service service=new Service(); Call call=(Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(wsurl)); call.setOperationName(new QName(wsurl, funName)); // 指定方法的命名空间 call.addParameter("s1", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); // 设置返回类型 rtnxml = (String) call.invoke(new Object[] { arg }); // System.out.println(rtnxml); } catch (Exception e) { e.printStackTrace(); rtnxmlErr.append("<?xml version='1.0' encoding='gbk'?>\n").append( "<DATAPACKET>\n").append( "<Result>" + e.toString() + "发生异常,读取终止!'</Result>\n").append( "<T0500></T0500>").append( "</DATAPACKET>\n"); rtnxml = rtnxmlErr.toString(); } return rtnxml; }

axis客户端调用.net时报:未能加载文件或程序集或它的某一个依赖项。系统找不到指定的文件。

我用的是axis,不是axis2,调用一个由.net发布的Webservice接口。可程序报“未能加载文件或程序集或它的某一个依赖项。系统找不到指定的文件。”的错误,一时查不到资料,请各位tx帮忙解决。 Init方法返回的是boolean型,ValidEncryptPassword返回的是String型的xml内容。 代码在后面,先把报错贴出来 报错如下: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: 服务器无法处理请求。 ---&gt; 未能加载文件或程序集“Interop.MSXML2, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:服务器无法处理请求。 ---&gt; 未能加载文件或程序集“Interop.MSXML2, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。系统找不到指定的文件。 at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) .... 调用代码如下: [code="java"] Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(this.urlPoint)); call.setUseSOAPAction(true); call.setSOAPActionURI("WebService/ValidEncryptPassword"); call.setOperationName(new QName("WebService", "ValidEncryptPassword")); call.addParameter(new QName("WebService", "CardNo"), XMLType.XSD_STRING, ParameterMode.IN); call.addParameter(new QName("WebService", "EncryptPassword"), XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); String ret = (String) call.invoke(new Object[] { cardNo, encryptPassword }); [/code] wsdl文件如下 [code="java"] <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="WebService" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="WebService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="WebService"> <s:element name="Init"> <s:complexType /> </s:element> <s:element name="InitResponse"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="InitResult" type="s:boolean" /> </s:sequence> </s:complexType> </s:element> <s:element name="ValidEncryptPassword"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="CardNo" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="EncryptPassword" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="ValidEncryptPasswordResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="ValidEncryptPasswordResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> <wsdl:message name="InitSoapIn"> <wsdl:part name="parameters" element="tns:Init" /> </wsdl:message> <wsdl:message name="InitSoapOut"> <wsdl:part name="parameters" element="tns:InitResponse" /> </wsdl:message> <wsdl:message name="ValidEncryptPasswordSoapIn"> <wsdl:part name="parameters" element="tns:ValidEncryptPassword" /> </wsdl:message> <wsdl:message name="ValidEncryptPasswordSoapOut"> <wsdl:part name="parameters" element="tns:ValidEncryptPasswordResponse" /> </wsdl:message> <wsdl:portType name="ServiceSoap"> <wsdl:operation name="Init"> <wsdl:input message="tns:InitSoapIn" /> <wsdl:output message="tns:InitSoapOut" /> </wsdl:operation> <wsdl:operation name="ValidEncryptPassword"> <wsdl:input message="tns:ValidEncryptPasswordSoapIn" /> <wsdl:output message="tns:ValidEncryptPasswordSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Init"> <soap:operation soapAction="WebService/Init" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="ValidEncryptPassword"> <soap:operation soapAction="WebService/ValidEncryptPassword" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Init"> <soap12:operation soapAction="WebService/Init" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="ValidEncryptPassword"> <soap12:operation soapAction="WebService/ValidEncryptPassword" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Service"> <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap"> <soap:address location="http://192.1.1.2/Service.asmx" /> </wsdl:port> <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12"> <soap12:address location="http://192.1.1.2/Service.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions> [/code] [b]问题补充:[/b] 我看了其他公司的调用,是用xfire作的,也是直接有wsdl文件生成的,可以返回结果啊,我的程序是不是写的有问题呢?

axis调用webservice:返回值不正确

本人对webservice的调用不熟悉,求助各位大侠!多谢! WSDL的XML文件中定义的参数如下 name="zone" type="xsd:string" default="CM-ACCTSPID" name="Id" type="xsd:string" name="rowCount" type="xsd:decimal" name="accountId" type="xsd:string" accountID是返回值 我自己写的调用程序是 Service service = new Service(); // 创建一个call对象 Call call = (Call) service.createCall(); // 设置目标地址,即webservice路径 call.setTargetEndpointAddress(endpoint); // 设置操作名称,即方法名称 call.setSOAPActionURI("http://ouaf.oracle.com/spl/XAIXapp/xaiserver/CM-ACCTSPID"); call.setOperationName("CM-ACCTID");// 调用的方法名 call.setUseSOAPAction(true); Object [] c={"CM-ACCTID","5706648717",1,""}; Object a=call.invoke(c); 但是上述打印出a是CM-ACCTID,这不是webservice的正确返回信息。求解答! 用soapUI测试webservice,输入参数CM-ACCTID、5706648717、1,就有输出参数 0614668080。

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

springboot+jwt实现token登陆权限认证

一 前言 此篇文章的内容也是学习不久,终于到周末有时间码一篇文章分享知识追寻者的粉丝们,学完本篇文章,读者将对token类的登陆认证流程有个全面的了解,可以动态搭建自己的登陆认证过程;对小项目而已是个轻量级的认证机制,符合开发需求;更多精彩原创内容关注公主号知识追寻者,读者的肯定,就是对作者的创作的最大支持; 二 jwt实现登陆认证流程 用户使用账号和面发出post请求 服务器接受到请求后使用私...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

程序员写出这样的代码,能不挨骂吗?

当你换槽填坑时,面对一个新的环境。能够快速熟练,上手实现业务需求是关键。但是,哪些因素会影响你快速上手呢?是原有代码写的不够好?还是注释写的不够好?昨夜...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

早上躺尸,晚上干活:硅谷科技公司这么流行迟到?

硅谷科技公司上班时间OPEN早已不是什么新鲜事,早九晚五是常态,但有很多企业由于不打卡,员工们10点、11点才“姗姗来迟”的情况也屡见不鲜。 这种灵活的考勤制度为人羡慕,甚至近年来,国内某些互联网企业也纷纷效仿。不过,硅谷普遍弹性的上班制度是怎么由来的呢?这种“流行性迟到”真的有那么轻松、悠哉吗? 《动态规划专题班》 课程试听内容: 动态规划的解题要领 动态规划三大类 求最值/计数/可行性 常...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

Python爬虫,高清美图我全都要(彼岸桌面壁纸)

爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

Java岗开发3年,公司临时抽查算法,离职后这几题我记一辈子

前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...

大胆预测下未来5年的Web开发

在2019年的ReactiveConf 上,《Elm in Action》的作者Richard Feldman对未来5年Web开发的发展做了预测,很有意思,分享给大家。如果你有机会从头...

立即提问
相关内容推荐