Mule应用程序没有发送响应

时间:2015-01-28 13:17:24

标签: rest mule esb

我的第一个应用程序正在调用另一个应用程序,但如果我直接从SoapUI调用第二个应用程序,我没有得到任何响应我得到了响应请帮助

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
    <flow name="stackFlow1" doc:name="stackFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" address="example.com/main" doc:name="HTTP"/>
        <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" method="POST" doc:name="seconapp.co.io/flow"/>
    </flow>
</mule>

第二个应用程序xml是

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
    <flow name="secondflowFlow1" doc:name="secondflowFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" address="seconapp.co.io/flow" doc:name="HTTP"/>
        <cxf:jaxws-service doc:name="CXF"/>
        <logger message="hello" level="INFO" doc:name="Logger"/>
    </flow>
</mule>

1 个答案:

答案 0 :(得分:0)

我不完全确定第二个应用程序的端点正在侦听localhost,实际上假设您使用的是主机名,而不是:

    <http:inbound-endpoint exchange-pattern="request-response" address="seconapp.co.io/flow" doc:name="HTTP"/>

您应该尝试将第一个应用出站端点更改为:

    <http:outbound-endpoint exchange-pattern="request-response" host="seconapp.co.io" path="flow" port="8081" method="POST" doc:name="seconapp.co.io/flow"/>