簡體   English   中英

通過跨多個網絡的Jboss-fuse-ESB與ServletApplication進行交互

[英]Interacting with an ServletApplication through Jboss-fuse-ESB accross multiple networks

在我們的本地網絡中,我們有一個現有的Web IDE類型的應用程序 ,可以通過流行的Web瀏覽器訪問該應用程序
我想使用Jboss FUSE ESB 作為/充當 本地雲/任何網絡之間的隧道。
所以,我們也可以通過網絡瀏覽器客戶端 ,可以連接到應用漠然的網絡瀏覽器中。發送REQ清晰度在任何時候通過ESB的客戶端瀏覽器。

我正在使用代理方法

  • 我在瀏覽器中輸入一個URL,這僅是第一次將我重定向到使用ESB的應用程序。
  • 然后我開始以正常方式與應用程序進行交互。 但不通過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&amp;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&amp;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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM