How to build a simple web proxy in Mule 3? -
i ran mule 3 file expecting when browse http://localhost:9000
, redirected http://localhost/path
(source - behind login prompt):
<?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>
instead, unfriendly message web browser:
‹mo=oÃ0Ýó+Žl0kÂÈx‚&ˆj-dÂŒ×øÀ•ì8rÜjý÷8)bb9éî}Ü{â¢y[©Ï®…µÝ@÷ñ´y¯ ¿f\·ê±qÍ©‹±}Íe<v äÓ÷Ѳ¼)+Øú#kè88xˆö$ðf²Øy}šõ•ü‡›®™¥2Ú÷—Î`h·p üõ›Ç{dë{²Æo§Ã7…>8Ì¥áÀiÇùohƒ´
the web-service-proxy pattern designed work soap-style web services. pointing browser won't good.
for pure http proxying either:
- use new pattern:http-proxy coming in mule 3.2 , usable in snapshot builds (examples),
- use pattern:bridge http in , out endpoints (examples).
the former better option, if you're not snapshot averse, has extended support http requests semantics , upcoming caching module.
Comments
Post a Comment