5

我运行了这个 Mule 3 文件,期望当我浏览到 时http://localhost:9000,我会被重定向到http://localhost/pathsource - 在登录提示后面):

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:pattern="http://www.mulesoft.org/schema/mule/pattern"
      xsi:schemaLocation="
          http://www.mulesoft.org/schema/mule/pattern http://www.mulesoft.org/schema/mule/pattern/3.1/mule-pattern.xsd
          http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.1/mule.xsd">

    <pattern:web-service-proxy
        name="WSProxyService"
        inboundAddress="http://localhost:9000"
        outboundAddress="http://localhost/sugarcrm"/>

</mule>

相反,我从网络浏览器收到这条不友好的消息:

‹mO=OÃ0Ýó+ŽL0KÂÈX‚&amp;ˆJ-DÂŒ×øÀ•ì8rÜJý÷8)bb9éî}Ü{â¢y[©Ï®…µÝ@÷ñ´Y¯ ¿F\·ê±QÍ©‹±}Íe&LtV äÓ÷Ѳ¼)+Øú#kè88xˆö$ðf²Øy}šõ•ü‡›®™¥2Ú÷—Î`h·P  üõ›Ç{Dë{²ÆO§Ã7…&gt;8Ì¥áÀIÇùOHƒ´
4

2 回答 2

6

The web-service-proxy pattern is designed to work with SOAP-style web services. Pointing your browser to it won't do you any good.

For pure HTTP proxying either:

  • use the new pattern:http-proxy coming in Mule 3.2 and already usable in snapshot builds (examples),
  • use a pattern:bridge with HTTP in and out endpoints (examples).

The former is a much better option, if you're not snapshot averse, as it has extended support for HTTP requests semantics and an upcoming caching module.

于 2011-07-01T19:29:43.930 回答
1

尽管我使用soapUI 来执行测试,但我也遇到了类似的问题。几天迷路后的解决方案很简单,将soapUI配置为不使用/不允许压缩。您看到的实际上是服务器未标记为压缩的压缩答案。

于 2013-01-17T11:08:12.640 回答