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);

这两个参数是什么意思?

谢谢各位老师帮忙解答。

1个回答

phoenix850121
phoenix850121 谢谢。
接近 2 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
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> ```

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) 接口那边说没有问题的

关于Java WebService 的几种实现方式

关于Java WebService,网上有许多例子(不过好多写的都有问题,照着做还出问题),简单了解了一下,主要AXIS、CXF及XFire比较多,还有Java自带的JAX-WS(必须JDK6及以上环境),其中JAX-WS比较简洁,其他几个都挺繁琐的,一大堆的Jar包,而且有些跟项目Jar包冲突,所以向各位请教一下JAX-WS实际项目中有人使用吗,它与其他几种相比有什么有缺点?谢谢,还有真正项目中,不知道大家都用的什么?求大神指点

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)

关于webService 客户端 调用 对象数组 问题

我自己写的一个服务端需要的参数是一个对象数组 比如 public String getAge(Student[] ss ) { return ss[0].getAge(); } 这种形式的, 但是在客户端调用的时候 服务端接收到的 ss 对象数组的长度都为1,里面的对象的值都为null,哪位 大神指导一下新人啊 **下面是客户端调用代码** public static void main(String [] args) throws ServiceException, MalformedURLException, RemoteException{ String nameSpace="http://impl.webservice"; String method="getAge"; Service service = new Service(); Call call=(Call)service.createCall(); call.setTargetEndpointAddress(new java.net.URL("http://localhost:8070/TEST/services/testMyService?wsdl")); call.setUseSOAPAction(true); Student[] ss=new Student[2]; Student s0=new Student(); s0.setAge("123"); s0.setName("57"); ss[0]=s0; Student s1=new Student(); s1.setAge("123"); s1.setName("213"); ss[1]=s1; QName qn =new QName(nameSpace,method); call.setOperationName(qn); call.registerTypeMapping(Student.class, qn, new org.apache.axis.encoding.ser.BeanSerializerFactory(Student.class, qn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(Student.class, qn)); String ret = (String) call.invoke(new Object[] {ss}); System.out.println(ret); }

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的服务就报以上错误,如果一直报错也说的过去,只是在很偶然的情况下会调成功那么一次,本人折腾了两天了实在是没招了,有谁碰到过类似的问题希望可以给予帮助 ``` ```

axis1.4调用webservice 传递自定义对象参数出错

调用客户端后出现: org.xml.sax.SAXException: Invalid element in cn.services.QueryEquipmentRequest - queryEquipmentRequest 客户端代码(其中queryEquipmentRequest,QueryEquipmentResponse是我自定义的对象): call.addParameter(new QName(nameSpace, "queryEquipmentRequest"), new QName(nameSpace, "queryEquipmentRequest"), ParameterMode.IN); // // @@需修改成对应的输出参数名 call.setReturnType(new QName(nameSpace, "queryEquipmentResponse"), QueryEquipmentResponse.class); // // // 需要根据xsd生成的bean,对输入输出的XSD文件定义的类型进行注册映射关系 //// // @@如本服务输入输出XSD文件中有四个自定义类型 queryEquipmentRequest、queryEquipmentResponse、deviceItem、deviceItemList,配置如下 QName queryEquipmentRequest = new QName(nameSpace, "queryEquipmentRequest"); call.registerTypeMapping(QueryEquipmentRequest.class, queryEquipmentRequest, new BeanSerializerFactory(QueryEquipmentRequest.class, queryEquipmentRequest), new BeanDeserializerFactory( QueryEquipmentRequest.class, queryEquipmentRequest)); // QName queryEquipmentResponse = new QName(nameSpace, "queryEquipmentResponse"); call.registerTypeMapping(QueryEquipmentResponse.class, queryEquipmentResponse, new BeanSerializerFactory(QueryEquipmentResponse.class, queryEquipmentResponse), new BeanDeserializerFactory( QueryEquipmentResponse.class, queryEquipmentResponse)); 服务端的wsdl文件为: <wsdl:definitions targetNamespace="http://gd.soa.csg.com"><!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)--><wsdl:types><schema elementFormDefault="qualified" targetNamespace="http://gd.soa.csg.com"><complexType name="queryEquipmentRequest"><sequence><element maxOccurs="1" minOccurs="0" name="id" type="xsd:string"/></sequence></complexType><element name="queryEquipmentRequest" type="impl:queryEquipmentRequest"/><complexType name="queryEquipmentResponse"><sequence><element name="replyCode" type="xsd:string"/></sequence></complexType><element name="queryEquipmentResponse" type="impl:queryEquipmentResponse"/></schema></wsdl:types><wsdl:message name="queryEquipmentResponse"><wsdl:part element="impl:queryEquipmentResponse" name="queryEquipmentResponse"/></wsdl:message><wsdl:message name="queryEquipmentRequest"><wsdl:part element="impl:queryEquipmentRequest" name="queryEquipmentRequest"/></wsdl:message><wsdl:portType name="QueryEquipment"><wsdl:operation name="queryEquipment" parameterOrder="queryEquipmentRequest"><wsdl:input message="impl:queryEquipmentRequest" name="queryEquipmentRequest"/><wsdl:output message="impl:queryEquipmentResponse" name="queryEquipmentResponse"/></wsdl:operation></wsdl:portType><wsdl:binding name="QueryEquipmentSoapBinding" type="impl:QueryEquipment"><wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="queryEquipment"><wsdlsoap:operation soapAction="http://gd.soa.csg.com/queryEquipment"/><wsdl:input name="queryEquipmentRequest"><wsdlsoap:body use="literal"/></wsdl:input><wsdl:output name="queryEquipmentResponse"><wsdlsoap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="QueryEquipment"><wsdl:port binding="impl:QueryEquipmentSoapBinding" name="QueryEquipment"><wsdlsoap:address location="http://127.0.0.1:8400/webServiceTest/services/QueryEquipment"/></wsdl:port></wsdl:service></wsdl:definitions>

Webservice 生成客户端时少了Porttype.java 的文件怎么回事?

用axis 2发布的,有spring 框架,webservice

基于AXIS调用webservice报错:Connection refused: connect

我的调用方法: public static void main(String[] args) throws Exception { String client_id = "HeYiApp"; String orderNum = "2"; List numberList = new ArrayList(); numberList.add("120719"); numberList.add("120746"); numberList.add("113095"); String webUrl = "https://10.218.132.26/api/openapi/employee/getBatchEmpInfoList.json";// 服务端url地址 String webMethod = "getBatchEmpInfoList";// 调用方法名称 Service service = new Service(); // 建服务 Call call; try { call = (Call) service.createCall(); try { call.setTargetEndpointAddress(new URL(webUrl)); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); }// 设置访问地址 call.setOperationName(webMethod);// 设置访问方法 call.addParameter("arg0", XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);// 定义参数 call.addParameter("arg1", XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);// 定义参数 call.addParameter("arg2", XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN);// 定义参数 call.setReturnType(XMLType.XSD_STRING);// 定义返回值格式 //List<Map<String, Object>> workersInfo= (List<Map<String, Object>>) call.invoke(new Object[] { client_id, numberList, orderNum }); //for(Map m:workersInfo){ // System.out.println(m.get("name")); //} JSONArray jsonObject = (JSONArray) call.invoke(new Object[] { client_id, numberList, orderNum }); System.out.println(jsonObject.toString()); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } // 建对话 } 报错: Exception in thread "main" AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.net.ConnectException: Connection refused: connect faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) at sun.security.ssl.SSLSocketImpl.&lt;init&gt;(SSLSocketImpl.java:427) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) 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 webservice.Test.main(Test.java:52) {http://xml.apache.org/axis/}hostname:zhangxl java.net.ConnectException: Connection refused: connect at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154) 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 webservice.Test.main(Test.java:52) Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:427) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138) ... 10 more

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。

java webservice 返回byte[] 问题!!!

请教各位: webservice描述文件中对于方法返回值的描述如下: ![图片说明](https://img-ask.csdn.net/upload/201711/28/1511882850_594986.png) 客户端远程调用webservice,服务端收到客户端发送的信息后,会根据客户端发送的信息进行一些逻辑计算并且返回byte数组到客户端,调用代码如下: Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress("......"); call.setOperation("getData"); // 下面一行执行报错 Object obj = call.invoke(new Object[] {"p1", "t3", "a6"}); byte[] buffer = (byte[]) obj; String recvData = new String(Base64.decodeBase64(buffer), "GBK"); 客户端在接收服务端返回时出现错误: 28-Nov-2017 15:34:43.169 严重 [http-nio-8080-exec-5] org.apache.axis.client.Call.invoke Exception: org.xml.sax.SAXException: Deserializing parameter 'getDataReturn': could not find deserializer for type {http://schemas.xmlsoap.org/soap/encoding/}base64Binary at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at com.xxxx.xxxx.invokeByByte(xxxx.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)

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) 网上的给出的方法都试过了,添加服务端的方法上的命名空间,还是不好使,求大神给出答案。

java远程调用.net webservice服务,服务端接收到了请求,但是接收到参数的为null

我用java远程调用.net webservice服务,服务端接收到了请求,但是服务端接收到参数的为null呢? public String callServiceEsbGFY(BsServiceDict bsdVo, String custIdValue, Map<String, Object> servParam) throws SysException, AppException { //System.out.println("servParam"+servParam.toString()); String retMsg = null; String serviveCode = (String) servParam.get("code"); servParam.remove("code"); //String soapActionURI = "http://tempuri.org/selectVIN"; //处理入参 String str="<?xml version=\"1.0\" encoding=\"gb2312\"?><rows><row "; Set<String> keys = servParam.keySet(); if(keys != null) { Iterator<String> iterator = keys.iterator(); while(iterator.hasNext()) { String key =iterator.next(); str=str+key+"="+"\""+servParam.get(key)+"\""+" "; } str=str+"></row></rows>"; } String endpoint =bsdVo.getServiceAddress(); String methodStr = bsdVo.getMethodName(); String input = bsdVo.getInParam(); try { input=input.replace(Constants.STRING_CHARACTER_GFY, str); //用户密码替换 String password = ToolUtil.MD5Encrept(Constants.STRING_USERPASSWORD_INFO, Constants.INTEGER_FORMD5_32); input=input.replace(Constants.STRING_USERPASSWORD_GFY, password); //当前时间替换 Date date = new Date(); SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");//设置日期格式 String dateFormat = df.format(date); log.info("dateFormat@@@@@@"+dateFormat); input=input.replace(Constants.STRING_CREATETIMEINFO_GFY, dateFormat); /** *1、A = 变量用户MD5密钥值转为UTF8字符串 *2、B = 变量报文时间戳值转为UTF8字符串 *3、C = 变量业务逻辑 *3、D = A与B异或运算,运算时计算长度以A和B值中字符长度短的为准,将D的值转为BASE64字符串 **/ String baseInfo = ToolUtil.twoStringXor(password,dateFormat); log.info("baseInfo#######333 : "+baseInfo); //计算最后签名的值 String character = ToolUtil.changeToSHA(str,Constants.STRING_FORHASHCODE_256); String sign = ToolUtil.changeToSHA(character+baseInfo,Constants.STRING_FORHASHCODE_256); //将模板中的签名替换掉 input=input.replace(Constants.STRING_SIGNINPUT_GFY, sign); //替换调用接口code log.info("serviveCode$$$$$$$$$$$$"+serviveCode); input=input.replace(Constants.STRING_SERVICECODE_GFY, serviveCode); log.info("111111111111111111111111111111111111111111111111111111111111"); log.info("input=="+input); log.info("222222222222222222222222222222222222222222222222222222222222"); AxisProperties.setProperty("axis.socketSecureFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory"); org.apache.axis.client.Service service = new org.apache.axis.client.Service(); Call call = (Call) service.createCall(); String endpoint1 = "http://IPMCH.ESB.TopSchemaV2"; call.setTargetEndpointAddress (new java.net.URL(endpoint)); call.setOperationName(new QName( endpoint1 , methodStr)); call.setUseSOAPAction(true); call.setSOAPActionURI("http://IPMCH.ESB.TopSchemaV2/CallESB"); call.addParameter( "arg0", org.apache.axis.encoding.XMLType.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING); retMsg = (String) call.invoke(new Object[] {input} ); } catch (Exception e) { retMsg = "10000"; e.printStackTrace(); throw new SysException("","XmlException:OrderReceive.buildOrderReceiveXML():"+e.getMessage(),e); } return retMsg; }

axis调用webservice出错!!!

我用eclipse中的webservice client解析wsdl地址生成客户端代码。在调用客户端代码时总是出错! ``` AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Invalid element in mocha.framework.mpms.webservice.service.ProjectInfo - lastUpdateTime faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Invalid element in mocha.framework.mpms.webservice.service.ProjectInfo - lastUpdateTime at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at mocha.framework.mpms.webservice.service.impl.QueryServiceImplServiceSoapBindingStub.inquireProjectInfo(QueryServiceImplServiceSoapBindingStub.java:414) at com.zzp.Test.main(Test.java:38) ``` ``` ``` ``` ```

eclipse 生产webservice客户端代码 调用报错 求解答

报错内容: AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (0)null faultActor: faultNode: faultDetail: {}:return code: 0 {http://xml.apache.org/axis/}HttpErrorCode:0 (0)null at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) 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 com.power.prophase.webservice.impl.QueryDemanplanServiceImplPortBindingStub.queryDemanplanInfo(QueryDemanplanServiceImplPortBindingStub.java:107) at com.dlc.webserviceTestClient.Client.main(Client.java:36)

****client call webservice error(have ws-policy)

问题是这样的: 怎样编写client端代码调用一个webservice, 这个WS是deploy在weblogic上的,重点是做了ws-policy配置(需要用户名,密码认证),他们只提供给了我们WSDL。 我做了下面这些,可还是调用失败,并且错误信息不明确,哪为高手指点下小女子。不知到是否还需要别的配置, rampart ? 1. 新建了一个java项目,导入Axis2 (1.6.2) jar包。 2. 用WSDL2Java生成客户端代码(基于wsdl文件) 网上说WSDL2Java会自动把wsdl里的policy文件自动添加到生成的java文件里,参考:https://axis.apache.org/axis2/java/core/docs/WS_policy.html#client xxxStub xxxCallbackHandler 3. Client代码 // Create stub xxxStub stub = new xxxStub(); // Set userName, password HttpTransportProperties.Authenticator basicAuthentication = new HttpTransportProperties.Authenticator(); basicAuthentication.setUsername("***"); basicAuthentication.setPassword("***"); stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication); // Prepare input parameters ... // Set parameters ... // Invoke Services GetReportResponse response = stub.getReport(parameters); // Get result ... = response.getGetReportResult(); 4. 错误信息: org.apache.axis2.AxisFault: Unknown exception, internal system processing error. 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 ....xxxStub.getReportMetaData(xxxStub.java:200)

axis2 webservice 获得客户端IP

<p>webservice获取客户端IP,在网上查都说用这个方法:</p> <pre name="code" class="java">MessageContext mc = MessageContext.getCurrentMessageContext(); if(mc==null){ return null; }else{ HttpServletRequest request = (HttpServletRequest) mc .getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST); return request.getRemoteAddr(); }</pre> <p> 可是我用得到的MC一直为空,请教下还需要怎么配置么?</p>

调用webservice,出现了java.net.NoRouteToHostException异常

http://ip地址:8000/xfire_service_zongzhan/services/intendance?wsdl 已经把webservice放到了外网上的服务器了。上面这个路径我是可以直接访问到的,浏览器可以看到xml文件的。 然后我根据这个url生成了客户端类,用来调用webservice的。如下: D:\generateAxisClient>Java -Djava.ext.dirs=lib org.apache.axis.wsdl.WSDL2Java http://211.147.247.85:8000/xfire_service_zongzhan/services/intendance?wsdl 我是在cmd上执行的,使用了[color=#FF0000]axis[/color]的WSDL2Java来生成webservice的客户端的。 现在我用生成的客户端去调用webservice,但是报错了。 如下: java.net.NoRouteToHostException: No route to host: connect 这样的话,就无法把数据从本地传到服务器上了。 出现了这种情况后,我首先是ping一下放有webservice的服务器,是ping不通的,原因是 公司是通过代理的方式上网的,所以我直接ping不通了。 而之前的uri可以访问是因为浏览器使用了代理,所以可以访问到服务器。 想要问的问题是: 生成webservice的客户端有几种方式,我目前这种使用命令形式的生成的客户端中有 XfireServiceHttpBindingStub这样一个类。似乎是静态的方式调用webservice。 是不是应该换成动态代理方式或者其他方式呢? 要是客户那边是使用代理的方式上网的,应该如何写客户端,才可以把数据传到服务器上呢? 请指导一下。

webservice客户端调用报错空指针

![一直再报空指针,要疯了](https://img-ask.csdn.net/upload/201809/28/1538116252_63917.png)

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

立方体线框模型透视投影 (计算机图形学实验)

计算机图形学实验 立方体线框模型透视投影 的可执行文件,亲测可运行,若需报告可以联系我,期待和各位交流

2019 AI开发者大会

2019 AI开发者大会

组成原理课程设计(实现机器数的真值还原等功能)

实现机器数的真值还原(定点小数)、定点小数的单符号位补码加减运算、定点小数的补码乘法运算和浮点数的加减运算。

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

软件测试2小时入门

软件测试2小时入门

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

计算机图形学-球的光照模型课程设计

计算机图形学-球的光照模型,有代码完美运行,有课程设计书

Linux常用命令大全(非常全!!!)

Linux常用命令大全(非常全!!!) 最近都在和Linux打交道,感觉还不错。我觉得Linux相比windows比较麻烦的就是很多东西都要用命令来控制,当然,这也是很多人喜欢linux的原因,比较短小但却功能强大。我将我了解到的命令列举一下,仅供大家参考: 系统信息 arch 显示机器的处理器架构 uname -m 显示机器的处理器架构 uname -r 显示正在使用的内核版本 d...

因为看了这些书,我大二就拿了华为Offer

四年了,四年,你知道大学这四年我怎么过的么?

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

fakeLocation13.5.1.zip

fakeLocation13.5.1 虚拟定位 ios13.5.1的最新驱动下载,iPhone/iPad免越狱虚拟定位工具Location-cleaned驱动已更新

UnityLicence

UnityLicence

Python可以这样学(第一季:Python内功修炼)

Python可以这样学(第一季:Python内功修炼)

Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

土豆浏览器

土豆浏览器可以用来看各种搞笑、电影、电视剧视频

【数据结构与算法综合实验】欢乐连连看(C++ & MFC)案例

这是武汉理工大学计算机学院数据结构与算法综合实验课程的第三次项目:欢乐连连看(C++ & MFC)迭代开发代码。运行环境:VS2017。已经实现功能:开始游戏、消子、判断胜负、提示、重排、计时、帮助。

php+mysql学生成绩管理系统

学生成绩管理系统,分三个模块:学生,教师和管理员。 管理员模块:负责学生、老师信息的增删改;发布课程信息的增删改,以便让学生选课;审核老师提交的学生成绩并且打印成绩存档;按照课号查询每个课号的学生成绩

多功能数字钟.zip

利用数字电子计数知识设计并制作的数字电子钟(含multisim仿真),该数字钟具有显示星期、24小时制时间、闹铃、整点报时、时间校准功能

推荐24个国外黄色网站欣赏

在中国清朝,明黄色的衣服只有皇子才有资格穿,慢慢的黄色在中国就成了高贵的颜色。在人们的色彩印象中,黄色也表现为暂停。所以当你的网页设计采用黄色的时候,会让人们在你的网页前停留。 黄色,就像橙色和红色,黄色也是一个暖色。它有大自然、阳光、春天的涵义,而且通常被认为是一个快乐和有希望的色彩。黄色是所有色相中最能发光的颜色,给人轻快,透明,辉煌,充满希望的色彩印象。 黄色是一个高可见的色...

u-boot-2015.07.tar.bz2

uboot-2015-07最新代码,喜欢的朋友请拿去

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

学生成绩管理系统(PHP + MYSQL)

做的是数据库课程设计,使用的php + MySQL,本来是黄金搭配也就没啥说的,推荐使用wamp服务器,里面有详细的使用说明,带有界面的啊!呵呵 不行的话,可以给我留言!

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

C++语言基础视频教程

C++语言基础视频教程

玩转Python-Python3基础入门

玩转Python-Python3基础入门

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问