如何使用自定义Mule ESB路由器保持入站主机

如何使用自定义Mule ESB路由器保持入站主机,esb,mule,Esb,Mule,我用一个端点创建了一个自定义路由器。自定义路由器根据入站URL的URL参数查找端点的目标。我有一个这样的例子,我正在浏览器中测试。我想用这个来解决最后一件事。当我使用在浏览器中进行调用时,调用会重定向,浏览器中的URL将更改为。我不想让用户看到。我希望用户始终能够看到。我怎样才能做到这一点?我正在使用Mule 2.2.1社区版和Java 1.6 这是我的Mule配置文件: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="h

我用一个端点创建了一个自定义路由器。自定义路由器根据入站URL的URL参数查找端点的目标。我有一个这样的例子,我正在浏览器中测试。我想用这个来解决最后一件事。当我使用在浏览器中进行调用时,调用会重定向,浏览器中的URL将更改为。我不想让用户看到。我希望用户始终能够看到。我怎样才能做到这一点?我正在使用Mule 2.2.1社区版和Java 1.6

这是我的Mule配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:spring="http://www.springframework.org/schema/beans"
    xmlns:http="http://www.mulesource.org/schema/mule/http/2.2"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
        http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd">

    <model name="ProxyService">
        <service name="HttpProxyService">
            <inbound>
                <http:inbound-endpoint address="http://localhost:8787" synchronous="true"/>
            </inbound>
            <outbound>
                <custom-outbound-router class="com.abc.xyz.routing.LookupOutboundRouter">
                    <outbound-endpoint name="custom" address="http://nonexistant.server.com:8080" synchronous="true"/>
                </custom-outbound-router>
            </outbound>
        </service>
    </model>
</mule>

通过在HTTP连接器上将followRedirects设置为true,我可以在浏览器中实现这一点。现在唯一的问题是它不适用于POST重定向。我现在正在从SoapUI进行SOAP调用,而不是使用浏览器

Entity enclosing requests cannot be redirected without user intervention

Message               : Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@fd285ee0. Message payload is of type: PostMethod
Type                  : org.mule.api.transport.DispatchException
Code                  : MULE_ERROR-42999
Payload               : org.apache.commons.httpclient.methods.PostMethod@9fa8f
JavaDoc               : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html
Entity enclosing requests cannot be redirected without user intervention

Message               : Failed to route event via endpoint: org.mule.endpoint.DynamicURIOutboundEndpoint@fd285ee0. Message payload is of type: PostMethod
Type                  : org.mule.api.transport.DispatchException
Code                  : MULE_ERROR-42999
Payload               : org.apache.commons.httpclient.methods.PostMethod@9fa8f
JavaDoc               : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/DispatchException.html