用Call调用webservice接口,报错?

调用接口时,报的错:nested exception is:
org.xml.sax.SAXException: Deserializing parameter 'receiveReturn': could not find deserializer for type {http://schemas.xmlsoap.org/soap/encoding/}string
请问大神这是由于什么原因导致的?

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

AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: Fault occurred while processing. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:Fault occurred while processing. 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 org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) 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.skyon.webframe.auth.util.SvcPermissonUtil.getInfoByWSNew(SvcPermissonUtil.java:123) at com.skyon.webframe.auth.util.SvcPermissonUtil.main(SvcPermissonUtil.java:330)

java 调用webservice接口遇到的问题 接口就是调用不通 求解?

``` String one="参数一"; String two="参数二"; String three="参数三" String four= "参数四"; try { Service service = new Service(); Call call1 = (Call) service.createCall(); call1.setTargetEndpointAddress("接口url地址......."); call1.setOperationName("getCorpInfoDataById"); //查询参数 call1.addParameter("name", XMLType.XSD_STRING, ParameterMode.IN); call1.setReturnType(XMLType.XSD_STRING);// 设置返回类型 // 由于需要认证,加入验证头 call1.setUseSOAPAction(true); call1.setSOAPActionURI(""); SOAPHeaderElement element = new SOAPHeaderElement("","tongtechheader"); SOAPElement se = element.addChildElement("one"); se.addTextNode(one); se = element.addChildElement("two"); se.addTextNode(two); se = element.addChildElement("three"); se.addTextNode(three); se = element.addChildElement("four"); se.addTextNode(four); call1.addHeader(element); String result = (String) call1.invoke(new Object[] {"1"}); 下面就是解析工作了...... ``` 附上soapUI调用的例子 ![图片说明](https://img-ask.csdn.net/upload/201905/30/1559205938_753305.png)

调用webservice接口,call.setOperationName的参数问题

本人刚开始用webservice,很多不懂,还望大神赐教啊,拜谢 我用Java调用webservice接口,用的是org.apache.axis包的类,关键代码如下: Call call = null; try { call = (Call)service.createCall(); call.setTargetEndpointAddress(new URL("http://localhost:8081/UserService?wsdl")); call.setProperty("axis.connection.timeout", new Integer(3600000)); call.setTimeout(new Integer(3600000)); //call.setOperationName(new javax.xml.namespace.QName("http://webservice.web.demo.com/", "queryUsers")); //用这句可以正常调用 call.setOperationName("queryUsers");//用这句就报错说找不到匹配的方法 Object res=call.invoke(new Object[]{}); PrintWriter out = response.getWriter(); out.println(res); }catch (Exception e) { e.printStackTrace(); } 其中,call.setOperationName的时候如果指定QName的namespaceURL和方法名就可以正常调用,如果不指定namespaceURL只写方法名就报错说找不到匹配的方法。我就想知道指定namespace和不指定有什么区别啊?什么时候可以不指定namespaceURL?我查了网上的代码,很多都直接写方法名没指定namespace呀。实在困惑,摆脱摆脱了

调用webservice接口出错

我从客户端给服务器的参数中有一个list,怀疑是这里有问题,想问下,参数可以是list吗 2016-2-24 14:40:00 org.apache.cxf.phase.PhaseInterceptorChain doIntercept 信息: Application has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: null while invoking public java.util.List com.ipi.server.ws.impl.BzRecordServiceImpl.query(java.util.List,java.lang.String,java.lang.String,int) with params [null, null, null, null]. at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:152) at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:83) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:126) at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:95) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:89) at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:357) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:183) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:163) at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:141) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: java.lang.IllegalArgumentException 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.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82) ... 30 more

关于调用webservice接口,出参入参用json格式

想写一个工具类,调用webservice接口,出参入参用json格式

在oracle 11g 中使用utl_dbws包调用webservice报错,跪求大神帮忙!

webservice的wsdl文件内容如下 ``` <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://e3.org/projectws/soapws" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://e3.org/projectws/soapws"> <wsdl:documentation>projectws</wsdl:documentation> <wsdl:types> <xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://e3.org/projectws/soapws"> <xs:element name="login"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="loginName" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="password" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="loginResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="unimethod"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="sessionId" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="funccode" nillable="true" type="xs:string"/> <xs:element minOccurs="0" name="args" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="unimethodResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="unimethodRequest"> <wsdl:part name="parameters" element="ns:unimethod"/> </wsdl:message> <wsdl:message name="unimethodResponse"> <wsdl:part name="parameters" element="ns:unimethodResponse"/> </wsdl:message> <wsdl:message name="loginRequest"> <wsdl:part name="parameters" element="ns:login"/> </wsdl:message> <wsdl:message name="loginResponse"> <wsdl:part name="parameters" element="ns:loginResponse"/> </wsdl:message> <wsdl:portType name="projectwsPortType"> <wsdl:operation name="unimethod"> <wsdl:input message="ns:unimethodRequest" wsaw:Action="urn:unimethod"/> <wsdl:output message="ns:unimethodResponse" wsaw:Action="urn:unimethodResponse"/> </wsdl:operation> <wsdl:operation name="login"> <wsdl:input message="ns:loginRequest" wsaw:Action="urn:login"/> <wsdl:output message="ns:loginResponse" wsaw:Action="urn:loginResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="projectwsSoap11Binding" type="ns:projectwsPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="unimethod"> <soap:operation soapAction="urn:unimethod" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="login"> <soap:operation soapAction="urn:login" 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="projectwsSoap12Binding" type="ns:projectwsPortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <wsdl:operation name="unimethod"> <soap12:operation soapAction="urn:unimethod" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> <wsdl:output> <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="login"> <soap12:operation soapAction="urn:login" style="document"/> <wsdl:input> <soap12:body use="literal"/> </wsdl:input> <wsdl:output> <soap12:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="projectwsHttpBinding" type="ns:projectwsPortType"> <http:binding verb="POST"/> <wsdl:operation name="unimethod"> <http:operation location="unimethod"/> <wsdl:input> <mime:content type="application/xml" part="parameters"/> </wsdl:input> <wsdl:output> <mime:content type="application/xml" part="parameters"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="login"> <http:operation location="login"/> <wsdl:input> <mime:content type="application/xml" part="parameters"/> </wsdl:input> <wsdl:output> <mime:content type="application/xml" part="parameters"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="projectws"> <wsdl:port name="projectwsHttpSoap11Endpoint" binding="ns:projectwsSoap11Binding"> <soap:address location="http://192.168.68.32:8080/projectws/services/projectws.projectwsHttpSoap11Endpoint/"/> </wsdl:port> <wsdl:port name="projectwsHttpSoap12Endpoint" binding="ns:projectwsSoap12Binding"> <soap12:address location="http://192.168.68.32:8080/projectws/services/projectws.projectwsHttpSoap12Endpoint/"/> </wsdl:port> <wsdl:port name="projectwsHttpEndpoint" binding="ns:projectwsHttpBinding"> <http:address location="http://192.168.68.32:8080/projectws/services/projectws.projectwsHttpEndpoint/"/> </wsdl:port> </wsdl:service> </wsdl:definitions> ``` oracle的函数内容如下: ``` CREATE OR REPLACE FUNCTION get_session (loginName IN VARCHAR2, loginPassword IN VARCHAR2) RETURN VARCHAR2 AS l_service UTL_DBWS.service; l_call UTL_DBWS.call; l_wsdl_url VARCHAR2(32767); l_namespace VARCHAR2(32767); l_service_qname UTL_DBWS.qname; l_port_qname UTL_DBWS.qname; l_operation_qname UTL_DBWS.qname; l_xmltype_in SYS.XMLTYPE; l_xmltype_out SYS.XMLTYPE; l_return VARCHAR2(32767); l_loginName UTL_DBWS.qname; l_loginPassword UTL_DBWS.qname; BEGIN l_wsdl_url := 'http://192.168.68.32:8080/projectws/services/projectws?wsdl'; l_namespace := 'http://e3.org/projectws/soapws'; l_service_qname := UTL_DBWS.to_qname(l_namespace, 'projectws'); l_port_qname := UTL_DBWS.to_qname(l_namespace, 'projectwsHttpSoap12Endpoint'); l_operation_qname := UTL_DBWS.to_qname(l_namespace, 'login'); l_service := UTL_DBWS.create_service ( wsdl_document_location => HttpUriType(l_wsdl_url), service_name => l_service_qname); l_call := UTL_DBWS.create_call ( service_handle => l_service, port_name => l_port_qname, operation_name => l_operation_qname); UTL_DBWS.set_property(l_call, 'SOAPACTION_USE', 'TRUE'); UTL_DBWS.set_property(l_call, 'SOAPACTION_URI', 'login'); UTL_DBWS.set_property(l_call, 'ENCODINGSTYLE_URI','http://schemas.xmlsoap.org/soap/encoding/'); UTL_DBWS.set_property(l_call, 'OPERATION_STYLE', 'document'); l_loginName := UTL_DBWS.to_qname(l_namespace, loginName); l_loginPassword := UTL_DBWS.to_qname(l_namespace, loginPassword); UTL_DBWS.add_parameter(l_call, 'loginName', l_loginName, 'ParameterMode.IN'); UTL_DBWS.add_parameter(l_call, 'password', l_loginPassword, 'ParameterMode.IN'); UTL_DBWS.set_return_type(l_call, l_loginName); l_xmltype_in := SYS.XMLType('<?xml version="1.0" encoding="utf-8"?>' || '<login xmlns="' || l_namespace || '">' || '<loginName>wstest</loginName>' || '<password>123456</password>' || '</login>'); l_xmltype_out := UTL_DBWS.invoke(l_call,l_xmltype_in); UTL_DBWS.release_call (l_call); UTL_DBWS.release_service (l_service); l_return := l_xmltype_out.getStringVal(); RETURN l_return; --EXCEPTION --WHEN OTHERS THEN -- return sqlerrm;-- 返回错误信息 END; ``` 执行结果如下,报错: ![图片说明](https://img-ask.csdn.net/upload/201703/08/1488964201_377630.png) 用官网的例子在本地跑是可以调用成功的,调用公司项目的web service接口时报错。网上资料比较少,这个问题已经搞了两三天了,要哭,跪求大神帮忙!感激不尽

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)

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

java 调用 webservice接口传参出现错误java.lang.linkageerror.

when resolving method "org.apache.axis.client.Call.addParameter(Ljavax/xml/namespace/QName;Ljavax/xml/namespace/QName;Ljavax/xml/rpc/ParameterMode;)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, com/kostech/TcforwareApp/SysTemplateToTc, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, org/apache/axis/client/Call, have different Class objects for the type javax/xml/rpc/ParameterMode used in the signature

基于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报错

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

用spring+axis调用自己写的一个测试webservice接口报错,代码如下

接口代码 ```public interface TestWebService { public String getWgceaUrl(String jsonString)throws Exception; } 实现代码 ``` public class TestWebServiceImpl implements TestWebService{ @Override public String getWgceaUrl(String jsonString) throws Exception { System.out.print("测试"); return "1111111"; } } ```整合类 /** * 用于axis1与Spring进行整合 */ public class IntegrationService extends ServletEndpointSupport { private ApplicationContext applicationContext; private TestWebService testWebService; @Override protected void onInit() throws ServiceException { // 初始化Spirng 配置 applicationContext = super.getApplicationContext(); testWebService = (TestWebService) applicationContext.getBean("testWebService"); } /** * * @Description: 接口 * @param * @return * @throws Exception */ public String getWgceaUrl(String jsonString) throws Exception { return String.valueOf(testWebService.getWgceaUrl(jsonString)); } ```package cn.dreamit.p1001.webservice; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; import java.net.URL; 测试类如下 public class test { private String nameSpaceUri = "http://192.168.0.18:8080/DreamWeb/services/testWebService"; //private String nameSpaceUri = "http://www.ntrl.gov.cn/services/WebService"; private String wsdlUrl = nameSpaceUri + "?wsdl"; private Service service=null; private Call call=null; public final void init() throws Exception { // 创建调用对象 service = new Service(); call = (Call) service.createCall(); // 调用 远程方法 call.setOperationName(new QName(nameSpaceUri, "getWgceaUrl")); // 设置URL call.setTargetEndpointAddress(new URL(wsdlUrl)); } public final void testGet() throws Exception { // 执行远程调用,同时获得返回值 String r = (String) call.invoke(new Object[] {"11"}); System.out.println("jsonStrings=" + r); } public static void main(String[] args) { test test = new test(); try { test.init(); test.testGet(); } catch (Exception e) { e.printStackTrace(); } } } wsdl配置如下 ``` <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <globalConfiguration> <parameter name="adminPassword" value="admin" /> <parameter name="sendXsiTypes" value="true" /> <parameter name="sendMultiRefs" value="true" /> <parameter name="sendXMLDeclaration" value="true" /> <parameter name="axis.sendMinimizedElements" value="true" /> <requestFlow> <handler type="java:org.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="session" /> </handler> <handler type="java:org.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="request" /> <parameter name="extension" value=".jwr" /> </handler> </requestFlow> </globalConfiguration> <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler" /> <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder" /> <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper" /> <service name="AdminService" provider="java:MSG"> <parameter name="allowedMethods" value="AdminService" /> <parameter name="enableRemoteAdmin" value="false" /> <parameter name="className" value="org.apache.axis.utils.Admin" /> <namespace>http://xml.apache.org/axis/wsdd/</namespace> </service> <service name="Version" provider="java:RPC"> <parameter name="allowedMethods" value="getVersion" /> <parameter name="className" value="org.apache.axis.Version" /> </service> <transport name="http"> <requestFlow> <handler type="URLMapper" /> <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler" /> </requestFlow> </transport> <transport name="local"> <responseFlow> <handler type="LocalResponder" /> </responseFlow> </transport> <!-- 自定义服务 --> <service name="testWebService" provider="java:RPC"> <parameter name="className" value="cn.dreamit.p1001.webservice.service.TestWebService" /> </service> </deployment> ``` springcontext.xml配置如下 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <context:annotation-config /> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize" value="209715200"></property> <property name="defaultEncoding" value="UTF-8"></property> </bean> <bean id="testWebService" class="cn.dreamit.p1001.webservice.service.impl.TestWebServiceImpl" /> </beans> ``` 报错异常如下 ``` faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.InstantiationException: cn.dreamit.p1001.webservice.service.TestWebService faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:VDN91YQHSK5EG2L java.lang.InstantiationException: cn.dreamit.p1001.webservice.service.TestWebService 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 org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) 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.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796) 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 cn.dreamit.p1001.webservice.test.testGet(test.java:37) at cn.dreamit.p1001.webservice.test.main(test.java:50) ```

java调用远程webservice服务报错,需要忽略证书认证,急,求各位大神帮帮忙!

//调用方法 public String callServiceEsbGFY(BsServiceDict bsdVo, String custIdValue, Map<String, Object> servParam) throws SysException, AppException { System.out.println("servParam"+servParam.toString()); String retMsg = null; 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); System.out.println(input); //System.out.println("trustAllHttpsCertificates"); /*trustAllHttpsCertificates(); HttpsURLConnection.setDefaultHostnameVerifier(hv);*/ //trustAllHosts(); AxisProperties.setProperty("axis.socketSecureFactory","com.bbcare.comm.MySocketFactory");//注意包名 System.out.println("测试中"); org.apache.axis.client.Service service = new org.apache.axis.client.Service(); Call call = (Call) service.createCall(); String endpoint1 ="https://esbouter.ipmch.com/ESBOuterService.asmx"; call.setOperationName(new QName( endpoint1 , methodStr)); call.setUseSOAPAction(true); call.setSOAPActionURI(soapActionURI); //call.addParameter("username", XMLType.XSD_STRING, ParameterMode.IN); //URL realUrl =new java.net.URL(endpoint); call.setTargetEndpointAddress (new java.net.URL(endpoint)); 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:返回值不正确

本人对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。

axis2 webservice访问报错,下标越界

使用axis2做webservice。服务可以正常发布,在使用一个类调用服务时服务端报数组下标越界,谁可以帮忙解答一下。 服务端:public String createContract(String json){ return "aa"; } 客户端: try { call = (Call) service.createCall(); call.setTargetEndpointAddress(url); call.setOperationName(new QName(schema,"createContract")); call.addParameter("json", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); call.setUseSOAPAction(true); Object[] obj = new Object[1]; obj[0]="zhangsan"; call.invoke(obj); } catch (ServiceException e) { e.printStackTrace(); } catch (RemoteException e) { e.printStackTrace(); } ![图片说明](https://img-ask.csdn.net/upload/201605/24/1464073511_868786.png)

springCloud项目使用jws开发webservice接口出错的问题,请求大神帮忙

# test类 ``` @WebService @Service public class test{ @Autowired InfDictionaryService infDictionaryService ; @WebMethod(action="execute") public String execute(@WebParam(name = "xmlStr")String xmlStr) { String result = ""; try { result = infDictionaryService.synSalesMsg(xmlStr); } catch (Exception e) { e.printStackTrace(); } System.out.println("返回报文:"+result); return result; } } ``` # 发布服务的类 ``` @Configuration public class BeforeStartUp implements ApplicationListener<ContextRefreshedEvent>{ @Autowired private test testService; private static String address = "http://127.0.0.1:80/ttt"; private static int num =0; @Override public void onApplicationEvent(ContextRefreshedEvent event) { if(num == 0){ Endpoint.publish(address,testService); num ++; } } } ``` # 另一个项目调用webService接口报错,代码如下: ``` public class test { public static void main(String[] args) throws ServiceException{ String wsdl = "http://127.0.0.1:80/ttt?wsdl"; String synSalesMsgXml = "测试数据!"; Service service = new Service(); Call call = (Call) service.createCall(); try { call.setTargetEndpointAddress(wsdl); call.setOperationName("execute"); call.addParameter("xmlStr", XMLType.XSD_STRING, ParameterMode.IN); call.setReturnType(XMLType.XSD_STRING); Object[] paramValues = new Object[] {synSalesMsgXml}; String result = (String) call.invoke(paramValues); System.out.println("result is " + result); } catch (Exception e) { e.printStackTrace(); } } } ``` # 报错信息如下 AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client faultSubcode: faultString: 找不到{http://127.0.0.1:80/ttt?wsdl}execute的分派方法 faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:找不到{http://127.0.0.1:80/ttt?wsdl}execute的分派方法 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 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327) 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 test.main(test.java:67) {http://xml.apache.org/axis/}hostname:MACHENI-S6PC008 找不到{http://127.0.0.1:80/ttt?wsdl}execute的分派方法 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 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1783) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2970) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327) 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 test.main(test.java:67)

android webservice接口调用问题

public String login(String uid ,String pwd){ String result=null; // 设置需调用WebService接口需要传入的两个参数mobileCode、userId rpc.addProperty("uid", uid); rpc.addProperty("pwd",pwd); // 生成调用WebService方法的SOAP请求信息,并指定SOAP的版本 SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10); envelope.bodyOut = rpc; // 等价于envelope.bodyOut = rpc; envelope.setOutputSoapObject(rpc); HttpTransportSE transport = new HttpTransportSE(url); try { // 调用WebService transport.call(null, envelope); result = envelope.getResponse().toString(); } catch (Exception e) { e.printStackTrace(); } // 获取返回的数据 // SoapObject object = (SoapObject) envelope.bodyIn; // String result = object.getProperty("getMobileCodeInfoResult").toString(); return result; } ``` ``` 在进行访问的时候 transport.call(null, envelope); 报错。 百度说是传值方式不对,,不知道是啥原因

java调用webservice接口出现如下错误,求指教。

![图片说明](https://img-ask.csdn.net/upload/201601/22/1453429977_524712.png) 找了好久也没有找到类似的问题,有没有大神知道是怎么回事?

axis调用webservice报参数为空的问题

axis调用无参数的接口可以,但是一但有参数就出错 错误信息大致是:参数为空,但是我传的值打印出来是有值的。下面附上代码,大佬帮忙看看!谢谢 PS:大致的错误我明白了,这个链接需要两个参数一个data 一个GUID 但是wsdl文件里只有一个data参数!!所以这个GUID只能拼接上去,axis可以拼接吗?在哪个地方拼接 public static String MethodsGeneral(String url,String methods, Map<String, Object> params,String str) { String GUID="7b33dd14-b183-4d1e-8c96-04baf421498f"; String result=""; try{ String namespace ="http://tempuri.org/"; String soapActionUI = "http://tempuri.org/"+methods; String endpoint = url; Service service = new Service(); Call call = (Call)service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setUseSOAPAction(true); call.setSOAPActionURI(soapActionUI); call.setOperationName(new QName(namespace,methods)); call.addParameter(new QName(namespace,"data"),org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.addParameter(new QName(namespace,"GUID"),org.apache.axis.Constants.XSD_STRING,javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING); JSONObject jsonObject = new JSONObject(params); HashMap<String, String> allParam = new HashMap(); String beforeEnc = jsonObject.toString(); String cipherInfo = null; try { cipherInfo = AESUtil.encrypt(beforeEnc); } catch (Exception e) { e.printStackTrace(); } // 把加密后的字符串转化为16进制 String temp = StringUtil.str2HexStr(cipherInfo); //访问的方法名 System.out.println(temp); System.out.println(GUID); result = (String)call.invoke(new Object[]{temp,GUID}); }catch(Exception e){ e.printStackTrace(); System.out.println("调用webservice失败!"); } //將result字符串解析成要用的字符串 return result; } 以下是错误信息:AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server faultSubcode: faultString: System.Web.Services.Protocols.SoapException: 服务器无法处理请求。 ---&gt; System.NullReferenceException: 未将对象引用设置到对象的实例。 在 Fuli.WebService.BaseWebService.AESEncrypt(String toEncrypt) 位置 D:\花汇购项目\Backend\Fuli.WebService\BaseWebService.cs:行号 426 在 Fuli.WebService.BaseWebService.GetExceptionReturnInfo(String exMessage) 位置 D:\花汇购项目\Backend\Fuli.WebService\BaseWebService.cs:行号 311 在 Fuli.WebService.UserWebService.GetAddresslistByUsername(String data) 位置 D:\花汇购项目\Backend\Fuli.WebService\UserWebService.asmx.cs:行号 689 --- 内部异常堆栈跟踪的结尾 --- faultActor: faultNode: faultDetail:

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

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

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

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

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

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

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

抖音上很火的时钟效果

反正,我的抖音没人看,别人都有几十万个赞什么的。 发到CSDN上来,大家交流下~ 主要用到原生态的 JS+CSS3。 具体不解释了,看注释: &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Title&lt;/tit...

记录下入职中软一个月(外包华为)

我在年前从上一家公司离职,没想到过年期间疫情爆发,我也被困在家里,在家呆着的日子让人很焦躁,于是我疯狂的投简历,看面试题,希望可以进大公司去看看。 我也有幸面试了我觉得还挺大的公司的(虽然不是bat之类的大厂,但是作为一名二本计算机专业刚毕业的大学生bat那些大厂我连投简历的勇气都没有),最后选择了中软,我知道这是一家外包公司,待遇各方面甚至不如我的上一家公司,但是对我而言这可是外包华为,能...

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

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

手机经常收到"回复TD退订",回还是不回?今天总算是弄清楚了

自从有了微信和QQ,手机短信几乎很少再用了,但是我们手机里面还是经常会收到"回复TD退订"的消息,那到底要不要回复呢?今天就来告诉大家! 信息内容可能包括 推销信息 品牌活动日的时候,会根据你的用户浏览信息,或者购买记录,后续发送一些降价消息。 但是笔者想说我是缺那10块钱的人嘛,我缺的是1000块。 垃圾信息 虽然我们已经不经常用短信功能,但是还是有不少...

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

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

面试官问我:如何加载100M的图片却不撑爆内存

还记得当年面试一个面试官问我怎么加载巨图才能不撑爆内存,我没回答上来,他说分片显示,我寻思特么分片能减少内存使用??现在可以打他脸了! 内容扩展 1.图片的三级缓存中,图片加载到内存中,如果内存快爆了,会发生什么?怎么处理? 2.内存中如果加载一张 500*500 的 png 高清图片.应该是占用多少的内存? 3.Bitmap 如何处理大图,如一张 30M 的大图,如何预防 OOM? A...

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

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

又出事了?网站被攻击了?高中生?

北京时间2020年3月27日9点整,如往常一样来到公司,带开电脑,正准备打开Github网站看一会源代码,再开始手头的工作。哟吼,一直打不开,一直出现如下页面: 我想很多网友也尝到了甜头,各大技术群炸开了锅,据网友反馈有攻击者正在发起大规模的中间人挟持,京东和Github等网站等网站都受到了影响。 什么是中间中间人挟持呢? 简而言之,就是攻击者在数据网络传输的过程中,截获传输过程中的数据并篡改...

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

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

培训班出来的人后来都怎么样了?(二)

接着上回说,培训班学习生涯结束了。后面每天就是无休止的背面试题,不是没有头脑的背,培训公司还是有方法的,现在回想当时背的面试题好像都用上了,也被问到了。回头找找面试题,当时都是打印下来天天看,天天背。 不理解呢也要背,面试造飞机,上班拧螺丝。班里的同学开始四处投简历面试了,很快就有面试成功的,刚开始一个,然后越来越多。不知道是什么原因,尝到胜利果实的童鞋,不满足于自己通过的公司,嫌薪水要少了,选择...

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

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

6年开发经验女程序员,面试京东Java岗要求薪资28K

写在开头: 上周面试了一位女程序员,上午10::30来我们部门面试,2B哥接待了她.来看看她的简历: 个人简历 个人技能: ● 熟悉spring mvc 、spring、mybatis 等框架 ● 熟悉 redis 、rocketmq、dubbo、zookeeper、netty 、nginx、tomcat、mysql。 ● 阅读过juc 中的线程池、锁的源...

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

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

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

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

工作八年,月薪60K,裸辞两个月,投简历投到怀疑人生!

近日,有网友在某职场社交平台吐槽,自己裸辞两个月了,但是找工作却让自己的心态都要崩溃了,全部无果,不是已查看无回音,就是已查看不符合。 “工作八年,两年一跳,裸辞两个月了,之前月薪60K,最近找工作找的心态崩了!所有招聘工具都用了,全部无果,不是已查看无回音,就是已查看不符合。进头条,滴滴之类的大厂很难吗???!!!投简历投的开始怀疑人生了!希望 可以收到大厂offer” 先来看看网...

推荐9个能让你看一天的网站

分享的这9个保证另你意外的网站,每个都非常实用!非常干货!毫不客气的说,这些网站最少值10万块钱。 利用好这些网站,会让你各方面的技能都得到成长,不说让你走上人生巅峰,但对比现在的你,在眼界、学识、技能方面都有质的飞跃。 一、AIRPANO 传送门:https://www.airpano.com/360photo_list.php 这是一个可以躺在家里,就能环游世界的神奇网站。 世界那么大,绝大多...

大牛都会用的IDEA调试技巧!!!

导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

月薪22K程序员,打卡迟到10次,收到工资短信一脸懵逼

每家公司为了保证公司员工每天的工作时间,一般都会采用上下班打卡的工作制度,这其实是一个很常见的是,本身也没有什么问题的。正所谓无规矩不成方圆,公司肯定是有公司的规矩,虽然每个员工都很不喜欢这些规矩来束缚我们,但是公司也只是为了能更好的管理员工。但是一家公司如果一成不变的使用打卡制度,而不会去变通管理,也真不一定是好事。 打卡制度特别对于销售部门来说,不但会让公司发展不起来,还很容易丢失员工。但如...

97年世界黑客编程大赛冠军作品(大小仅为16KB),惊艳世界的编程巨作

这是世界编程大赛第一名作品(97年Mekka ’97 4K Intro比赛)汇编语言所写。 整个文件只有4095个字节, 大小仅仅为16KB! 不仅实现了3D动画的效果!还有一段震撼人心的背景音乐!!! 内容无法以言语形容,实在太强大! 下面是代码,具体操作看最后! @echo off more +1 %~s0|debug e100 33 f6 bf 0 20 b5 10 f3 a5...

不要再到处使用 === 了

我们知道现在的开发人员都使用 === 来代替 ==,为什么呢?我在网上看到的大多数教程都认为,要预测 JavaScript 强制转换是如何工作这太复杂了,因此建议总是使用===。这些都...

什么是a站、b站、c站、d站、e站、f站、g站、h站、i站、j站、k站、l站、m站、n站?00后的世界我不懂!

A站 AcFun弹幕视频网,简称“A站”,成立于2007年6月,取意于Anime Comic Fun,是中国大陆第一家弹幕视频网站。A站以视频为载体,逐步发展出基于原生内容二次创作的完整生态,拥有高质量互动弹幕,是中国弹幕文化的发源地;拥有大量超粘性的用户群体,产生输出了金坷垃、鬼畜全明星、我的滑板鞋、小苹果等大量网络流行文化,也是中国二次元文化的发源地。 B站 全称“哔哩哔哩(bilibili...

十个摸鱼,哦,不对,是炫酷(可以玩一整天)的网站!!!

文章目录前言正文**1、Kaspersky Cyberthreat real-time map****2、Finding Home****3、Silk – Interactive Generative Art****4、Liquid Particles 3D****5、WINDOWS93****6、Staggering Beauty****7、Ostagram图片生成器网址****8、全历史网址*...

我真的错了,我被跳槽后的高薪冲昏了头脑...

国内疫情已接近尾声,疫情对生活各个方面造成的影响,就是一场真实的“蝴蝶效应”。“全球最大安全套制造商因疫情停产,已造成一亿个安全套缺口”“口罩印钞机,月入千万的暴富神话”“百程旅行...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

​能让德国人放弃现金支付​,也没谁了

在新冠疫情中,德国人越来越多地选择在超市,加油站或其他商店付款时使用非接触式付款方式。德国信贷协会Deutschen Kreditwirtschaft (DK) 的一位发言人告诉德国新...

相关热词 c# 按行txt c#怎么扫条形码 c#打包html c# 实现刷新数据 c# 两个自定义控件重叠 c#浮点类型计算 c#.net 中文乱码 c# 时间排序 c# 必备书籍 c#异步网络通信
立即提问