1

项目阶段:评估 ESB。

我们曾考虑将 WSO2 作为 ESB 解决方案,但遇到了许多问题。

目前我正在尝试让一个简单的 WSDL 代理服务正常工作,但没有成功。

这些是我做的事情

  • 创建了一个基于 WSDL 的代理
  • 点击“试用此服务”
  • 填写参数(邮编)
  • 点击发送

响应如下

<TryitProxyError h:status="SOAP envelope error" xmlns:h="http://wso2.org/ns/TryitProxy">**org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required**</TryitProxyError>

详细日志

[2012-08-02 10:48:21,556]  INFO - HTTPSender Unable to sendViaPost to url[http://localhost:8280/services/MYWeather.MYWeatherHttpSoap12Endpoint]
org.apache.axis2.AxisFault: Transport error: 411 Error: Length Required
    at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:308)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:449)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:276)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
    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.jsp.admin.jsp.WSRequestXSSproxy_005fajaxprocessor_jsp._jspService(WSRequestXSSproxy_005fajaxprocessor_jsp.java:272)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:161)
    at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:36)
    at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111)
    at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:67)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.wso2.carbon.bridge.BridgeServlet.service(BridgeServlet.java:164)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154)
    at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
4

1 回答 1

2

您的后端 Web 服务器是否支持 HTTP/1.1?如果没有,那么这可能就是这里的问题。因为,最新版本的 WSO2 ESB,默认使用 HTTP/1.1 进行 Web 服务通信。在 HTTP/1.1 中,它默认使用分块的 Transfer-Encoding 响应标头代替 HTTP/1.0 的 content-length 标头。因此,您可能希望禁用分块响应或强制通过 HTTP/1.0 发送消息。

将以下属性添加到您的 ESB 代理服务配置将禁用分块。

<property name="DISABLE_CHUNKING" value="true" scope="axis2"/>

希望能帮助到你!

问候, 普拉巴斯

于 2012-08-03T21:05:24.983 回答