2016-11-21 6 views
1

私は公開されているWebサービスを公開しています。私はそれを達成するためにCamel Proxyを設定しなければならないと思います。シンプルマンJBossでCamel Routeを作成するためのガイドJBossでのFuse JBoss EAP上の6.4 SOAPプロキシのための6.4

開発環境(Windows 7 x64マシン)では、jdk-8u111-windows-x64、apache-maven-3.3.9、jboss-eap-6.4.0-installer、fuseをインストールしてテストしました。 -eap-installer-6.3.0.redhat-187とdevstudio-integration-stack-9.0.2.GA-standalone-installer、そして私はJBoss Dev Studio 9.1.0.GAを使用しています。

現在、私はJBoss Developer Studio 9.1.0.GAを使用してパブリックWebサービス(http://www.webservicex.net/country.asmx)を消費し、その後、別の名前の新しいWebサービスとして展開します私の地元のスタンドアロンのヒューズサーバーではもちろん、オリジナルとまったく同じです)。

ブログ、記事、Red Hatチュートリアル、ビデオを約1週間から2週間は見直しましたが、私は自分自身にこれをあきらめています。それは難しいですか?

+0

このトピックに関するこのような多くの情報を読んでいれば、問題の解決にこれをどれだけ適用できないかを分かち合うとよいでしょう。 – ImportanceOfBeingErnest

答えて

0

Camelを使用して実際のWebサービスをプロキシするのはかなり簡単です。

最小限のルーティングで、これを実現できる以下の(上記のエンドポイントからの国別Webサービスを考慮してください)を参照してください。ただし、さらに検証する必要があるか、処理ロジックを実行するか、メディエーション中に何らかの変換を行うなど、ユースケースに応じて行うこともできます。

<?xml version="1.0" encoding="UTF-8"?> 
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf" 
     xsi:schemaLocation=" 
     http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd 
     http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> 


    <!-- CurrencyService Proxy Endpoint --> 
    <cxf:cxfEndpoint id="currencyServiceProxyEP" xmlns:c="http://www.webserviceX.NET" 
     endpointName="c:countrySoap" serviceName="c:country" 
     loggingFeatureEnabled="true" address="/CurrencyService/MyGatewayProxy" wsdlURL="WSDL/CountryService.wsdl"> 
     <cxf:properties> 
      <entry key="dataFormat" value="MESSAGE" /> 
     </cxf:properties> 
    </cxf:cxfEndpoint> 


    <!-- CurrencyService Actual Endpoint --> 
    <cxf:cxfEndpoint id="currencyServiceActualEP" xmlns:c="http://www.webserviceX.NET" 
     endpointName="c:countrySoap" serviceName="c:country" 
     loggingFeatureEnabled="true" address="http://www.webservicex.net/country.asmx" wsdlURL="WSDL/CountryService.wsdl"> 
     <cxf:properties> 
      <entry key="dataFormat" value="MESSAGE" /> 
     </cxf:properties> 
    </cxf:cxfEndpoint> 




    <camelContext xmlns="http://camel.apache.org/schema/blueprint" id="CountryService-Context"> 

     <route id="proxyEPRoute"> 

      <from uri="cxf:bean:currencyServiceProxyEP" />   

      <!-- Do Extra validation of payload, additional routing, processing, transaformation, mediation etc.. depending on your use case here.. --> 

      <to uri="cxf:bean:currencyServiceActualEP"/> 


     </route> 

    </camelContext> 

</blueprint> 

ノートを行います:

しかし、ちょうどこの実際のエンドポイントにカスタムエンドポイントからプロキシ要求に最低でも

が必要なものです私は露出させるための青写真のDSLとキャメルCXFとキャメルのルートを使用していますし、 SOAPエンドポイントを消費します。

関連する問題