求助:在调取服务方提供的接口时报了个错,我传过去的报文格式是按照对方提供的写的,对方能收到我传过去的报文,但没有返回结果,无法找到解决办法,帮忙看看!

xiaoqingxinyi 2017-11-17 10:11:26
wsdl的代码为:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://10.33.253.208:8080/uap/services/AutoUpdateAcctService"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://10.33.253.208:8080/uap/services/AutoUpdateAcctService"
xmlns:intf="http://10.33.253.208:8080/uap/services/AutoUpdateAcctService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)

-->
- <wsdl:message name="AutoUpdateAcctServiceRequest">
<wsdl:part name="RequestInfo" type="soapenc:string" />
</wsdl:message>
-

<wsdl:message name="AutoUpdateAcctServiceResponse">
<wsdl:part name="AutoUpdateAcctServiceReturn" type="soapenc:string" />
</wsdl:message>
-

<wsdl:portType name="AutoUpdateAcctService">
- <wsdl:operation name="AutoUpdateAcctService" parameterOrder="RequestInfo">
<wsdl:input message="impl:AutoUpdateAcctServiceRequest" name="AutoUpdateAcctServiceRequest" />
<wsdl:output message="impl:AutoUpdateAcctServiceResponse" name="AutoUpdateAcctServiceResponse" />
</wsdl:operation>
</wsdl:portType>
-
<wsdl:binding name="AutoUpdateAcctServiceSoapBinding" type="impl:AutoUpdateAcctService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="AutoUpdateAcctService">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="AutoUpdateAcctServiceRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://service.common.core.a4.asiainfo.com" use="encoded" />
</wsdl:input>
- <wsdl:output name="AutoUpdateAcctServiceResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.33.253.208:8080/uap/services/AutoUpdateAcctService" use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
-

<wsdl:service name="AutoUpdateAcctServiceService">
- <wsdl:port binding="impl:AutoUpdateAcctServiceSoapBinding" name="AutoUpdateAcctService">
<wsdlsoap:address location="http://10.33.253.208:8080/uap/services/AutoUpdateAcctService" />
</wsdl:port>
</wsdl:service>

</wsdl:definitions>

我在调用方面的代码为:
org.apache.axis.client.Service service_main = new org.apache.axis.client.Service();
Call call_main = (Call) service_main.createCall();
call_main.setTargetEndpointAddress(new java.net.URL("http://10.33.253.208:8080/uap/services/AutoUpdateAcctService"));
call_main.setOperationName("AutoUpdateAcctService");// 设置方法名
call_main.addParameter("RequestInfo", XMLType.XSD_STRING, ParameterMode.IN);// 设置入参
call_main.setReturnType(XMLType.XSD_STRING);
String result_main = (String)call_main.invoke(new Object[]{param_main});

报错信息:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:a4cs7

java.lang.NullPointerException
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:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
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:117)
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:648)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:332)
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 DynCode_1112_1_node7.addAcctOn4A(DynCode_1112_1_node7.java:407)
at DynCode_1112_1_node7.onUpdateEnd(DynCode_1112_1_node7.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.ailk.toptea.itsm.cfg.wf.DynamicCodeInfo.invokeMethod(DynamicCodeInfo.java:159)
at com.ailk.toptea.itsm.cfg.wf.node.NodeInfo.onUpdateEnd(NodeInfo.java:496)
at com.ailk.toptea.itsm.task.TaskManager.dealExecuteData(TaskManager.java:1097)
at com.ailk.toptea.itsm.task.TaskManager.updateTask(TaskManager.java:986)
at com.ailk.toptea.itsm.task.TaskManager.updateTask(TaskManager.java:570)
at com.ailk.toptea.itsm.task.TaskManager.updateTask(TaskManager.java:461)
at org.apache.jsp.task.taskPost_jsp._jspService(taskPost_jsp.java:407)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
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 com.ailk.toptea.SecurityFilter.doFilter(SecurityFilter.java:174)
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.core.StandardHostValve.invoke(StandardHostValve.java:127)
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:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
java.lang.Exception: 增加失败:
增加账号出错
at DynCode_1112_1_node7.onUpdateEnd(DynCode_1112_1_node7.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.ailk.toptea.itsm.cfg.wf.DynamicCodeInfo.invokeMethod(DynamicCodeInfo.java:159)
at com.ailk.toptea.itsm.cfg.wf.node.NodeInfo.onUpdateEnd(NodeInfo.java:496)
at com.ailk.toptea.itsm.task.TaskManager.dealExecuteData(TaskManager.java:1097)
at com.ailk.toptea.itsm.task.TaskManager.updateTask(TaskManager.java:986)
at com.ailk.toptea.itsm.task.TaskManager.updateTask(TaskManager.java:570)
at com.ailk.toptea.itsm.task.TaskManager.updateTask(TaskManager.java:461)
at org.apache.jsp.task.taskPost_jsp._jspService(taskPost_jsp.java:407)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)



...全文
243 7 点赞 打赏 收藏 举报
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
xiaoqingxinyi 2017-11-20
引用 6 楼 yanghaimingg 的回复:
回参也检查下
谢谢了,跟对方讨论发现是有个参数对方不需要,多传了导致的。
  • 打赏
  • 举报
回复
mtian2020 2017-11-17
回参也检查下
  • 打赏
  • 举报
回复
xiaoqingxinyi 2017-11-17
引用 4 楼 yanghaimingg 的回复:
检查下调用传入和传回的参数是否有空格之类的
是检查传参吗?没发现有空格,本来参数是通过前台传过来的值拼的,我怕有的没定义,就写了一个固定的传参传过去,还是报这个错。
  • 打赏
  • 举报
回复
mtian2020 2017-11-17
检查下调用传入和传回的参数是否有空格之类的
  • 打赏
  • 举报
回复
xiaoqingxinyi 2017-11-17
引用 1 楼 yanghaimingg 的回复:
call_main.setReturnType(XMLType.XSD_STRING); 别设这个试试
注释掉这段后错误还是存在,没有变。
  • 打赏
  • 举报
回复
Sunyiban 2017-11-17
对方能收到说明交互是正常的,没有返回值得原因可能是:1.报文格式错误。2.如果有加密看看是否加密解密有误,导致对方解密后格式错误
  • 打赏
  • 举报
回复
mtian2020 2017-11-17
call_main.setReturnType(XMLType.XSD_STRING); 别设这个试试
  • 打赏
  • 举报
回复
相关推荐
发帖
Web 开发
加入

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2017-11-17 10:11
社区公告
暂无公告