在调用wso2 http端点时收到“org.apache.http.nohttpresponseexception目标服务器无法响应”

时间:2017-11-08 11:14:51

标签: http wso2

调用http端点时出现以下错误: - 端点是我正在使用的HTTP端点。 还在axis2.xml和axis2.blocking.xml中添加了超时参数。 但它没有用。 任何人都可以提供任何解决方案吗?

HTTPSender Unable to sendViaPost to url[http://*********]
org.apache.commons.httpclient.NoHttpResponseException: The server ****** failed to respond
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1976)
        at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
        at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)

esb代理如下所示: -

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="mqListener"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="http,https">
   <target>
      <inSequence>
         <log description="print message" level="full">
            <property name="message" value="&#34;In listenAbc1Mq&#34;"/>
         </log>
<payloadFactory media-type="json">
            <format>
      {
"orderId": ""
}
    </format>
            <args>
               <arg evaluator="xml" expression="//verkkopvc/text()"/>
</payloadFactory>
         <log description="print message" level="full">
            <property name="message" value="&#34;after payload factory&#34;"/>
         </log>
<property name="OUT_ONLY" value="true"/>
         <property name="DISABLE_CHUNKING"
                   scope="axis2"
                   type="STRING"
                   value="true"/>
         <call blocking="true">
            <endpoint key="abc"/>
         </call>
         <log description="print message" level="full">
            <property name="message" value="&#34;Out sequence&#34;"/>
         </log>
      </inSequence>
      <outSequence/>
<description/>
</proxy>

1 个答案:

答案 0 :(得分:0)

我相信你的http客户端会打印错误。要修复它,请执行以下操作。

1)删除<property name="OUT_ONLY" value="true"/>

2)在<respond/>末尾添加inSequence调解员。