2

パズルのこの部分は私の悪夢です。ServiceMix と 2 つの Java アプリを 2 つの異なる tomcat インスタンスにデプロイしました。

最初のアプリ:

http://localhost:8080/textmsgClient

2 番目のアプリ:

http://localhost:8181/textmsgServer

ここで、2 つのアプリが通信する必要がありますが、その通信を ServiceMix 経由で行いたいので、いくつかのログとすべてを実行できます。

ディレクトリにブループリント XML ファイルを作成しました./deployが、どのルートを入れればよいですか?

私はこれを行うことはできません:

  <route>
    <from uri="http://localhost:8080/textmsgClient"/>
    <log message="Test log"/>
    <to uri="http://localhost:8181/textmsgServer"/>
  </route>

それで、何をするのが正しいのですか?

ところで、私の XML ファイルは次のようになります。

<?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"
    xsi:schemaLocation="
      http://www.osgi.org/xmlns/blueprint/v1.0.0
      http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
      <route>
        <from uri="file:camel/input"/>
        <log message="Moving ${file:name} to the output directory"/>
        <to uri="file:camel/output"/>
      </route>
    </camelContext>

</blueprint>
4

1 に答える 1

2

Camel Componentsのリストを見てください。サービス間で送信しているデータの種類がわからないため、使用するデータを推奨することは困難です。ただし、想像できるほぼすべてのデータ型のコンポーネントがあり、独自のデータ型の作成もサポートしています!

編集 例は次のとおりです。

<route>
    <from uri="direct:textmsgClient"/>
    <log message="Test log"/>
    <to uri="direct:textmsgServer"/>
</route>
于 2014-06-23T12:59:40.027 に答える