java webservice 注册_webservice注册ESB之后,客户端报错

在将Java WebService部署到集群并注册到ESB后,客户端使用ESB映射的地址调用服务时遇到错误:AxisFault - BEA-380000: Length Required。该错误发生在数据解析过程中,可能与HTTP头部内容长度有关,导致服务无法正常响应。
摘要由CSDN通过智能技术生成

客户端方法:

/**

* 检修计划通知

* @param docXML格式的参数字符串

* @return1:成功信息;0:错误信息

*/

public static String repairNoticeManager(String data) {

try {

Service service = new Service();

Call call = (Call) service.createCall(new QName(TNS));

call.setTargetEndpointAddress( new java.net.URL(WSDL));

call.setOperationName(new QName(TNS, "repairNotice") );

String res = (String) call.invoke( new Object[] {data});

if(String.valueOf(res).startsWith("1:")) {

log_.info("√发送成功![检修通知,至:总部门户]");

}else {

log_.error(res+"[检修通知,至:总部门户]");

}

return res;

} catch (ServiceException e) {

e.printStackTrace();

log_.error("创建服务连接失败[检修通知,分发至:总部门户!]",e);

} catch (MalformedURLException e) {

e.printStackTrace();

log_.error("实例服务地址失败[检修通知,分发至:总部门户!]",e);

} catch (RemoteException e) {

e.printStackTrace();

log_.error("呼叫服务方法失败[检修通知,分发至:总部门户!]",e);

}

return "0:发送SOAP消息失败[检修通知,分发至:总部门户!]";

} 将服务端部署在集群上,客户端用F5的地址调用服务端,一切正常。

将F5的地址注册到ESB上之后,客户端用ESB映射出来的地址调用服务端,出现如下错误:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server

faultSubcode:

faultString: BEA-380000: Length Required

faultActor:

faultNode:

faultDetail:

{http://www.bea.com/wli/sb/context}fault:BEA-380000Length RequiredRouteNode1response-pipeline

BEA-380000: Length Required

at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)

at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)

at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1774)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2930)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)

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:807)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)

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:424)

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:2765)

at org.apache.axis.client.Call.invoke(Call.java:2748)

at org.apache.axis.client.Call.invoke(Call.java:2424)

at org.apache.axis.client.Call.invoke(Call.java:2347)

at org.apache.axis.client.Call.invoke(Call.java:1804)

at com.sgcc.portal.client.IdsClient.repairObjectManager(IdsClient.java:64)

at com.sgcc.portal.test.Test$1.run(Test.java:54)

不知道为何?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值