[英]Interacting with an ServletApplication through Jboss-fuse-ESB accross multiple networks
在我們的本地網絡中,我們有一個現有的Web IDE類型的應用程序 ,可以通過流行的Web瀏覽器訪問該應用程序 。
我想使用Jboss FUSE ESB 作為/充當 本地與雲/任何網絡之間的隧道。
所以,我們也可以通過網絡瀏覽器客戶端 ,可以連接到應用漠然的網絡瀏覽器中。發送REQ清晰度在任何時候通過ESB的客戶端瀏覽器。
我正在使用代理方法 :
JBOSS-FUSE-ESB是否有可能,或者此任務使用了錯誤的工具?
<camelContext trace="true" id="blueprintContext" xmlns="http://camel.apache.org/schema/blueprint">
<route id="REQUEST">
<from uri="jetty:http://0.0.0.0:1805/myRemoteApp?matchOnUriPrefix=true" id="TO-APP">
<description/>
</from>
<to uri="jetty:http://my.cpny.com:1804/myapp/mainServlet?bridgeEndpoint=true&throwExceptionOnFailure=false" id="RealServer-IN"/>
</route>
任何建議都非常歡迎。
聽起來您應該發送HTTP重定向狀態代碼以及url,Web瀏覽器應繼續使用該URL來直接與服務器進行交互,而無需使用ESB。
您可以使用Camel消息中的標頭設置http狀態代碼並重定向位置,例如在第一次調用之后。
<route id="REQUEST">
<from uri="jetty:http://0.0.0.0:1805/myRemoteApp?matchOnUriPrefix=true" id="TO-APP">
<description/>
</from>
<to uri="jetty:http://my.cpny.com:1804/myapp/mainServlet?bridgeEndpoint=true&throwExceptionOnFailure=false" id="RealServer-IN"/>
.. // add logic here to compute the new url and set that as Location header. And then set a status code 30x for redirect
<setHeader headerName="HttpStatusCode"><constant>300</constant></setHeader>
<setHeader headerName="Location"><constant>http:blabla</constant></setHeader>
</route>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.