1

そのため、 NetMsmqBinding を使用すると、配信不能サービスをキューからプルすることができました。しかし、MsmqIntegrationBinding を使用してメッセージをターゲット キューにプッシュするように切り替えたところ、配信不能キューは配信不能サービスに送信されなくなりました。メッセージは WCF 形式ではなく、XML でシリアル化されているだけです。配管設定を新しいサービスに送信する方法がわかりません。キューと URL は引き続き一致します。

そのまま (netMsmqBinding を使用して) 実行し、msmqIntegrationBinding に切り替え、serializationFormat を次のように指定してみました。

<bindings>
  <msmqIntegrationBinding>
    <binding exactlyOnce="true" durable="true" serializationFormat="Xml">
      <security mode="Transport" />
    </binding>
  </msmqIntegrationBinding>
</bindings>

ただし、これはどれも機能していないようです。どんなアイデアでも大歓迎です。

4

1 に答える 1

0

(を使用して) WCFトレースを有効にした後switchValue="All"、次の例外が発生していることがわかりました。

An error occurred while deserializing an MSMQ message's XML body. The message cannot be received. Ensure that the service contract is decorated with appropriate [ServiceKnownType] attributes or the TargetSerializationTypes property is set on the MsmqIntegrationBindingElement.

ServiceKnownTypeタイプごとに追加する適切なコントラクトを見つけた後、次の例外が発生しました。

The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

Simon Evansのブログから、次の情報が見つかります。

MsmqIntegrationBinding requires contracts that are designed only for its use. Unless additional behaviors are applied to the dispatcher, the service contract can contain only one service operation.

基本的に、MSDNの例で見たように、MsmqIntegrationBindingを使用するには、すべてのメッセージを受け入れる1つの操作が必要です(Action = "*"[または、実際にAction = ""は、おそらく同様に機能します])。msmqIntegrationBindingに切り替えて契約を切り替えると(ServiceKnownType新しい契約をまだ持っていることを確認して)、すべてが機能し始めました。

于 2012-12-11T16:20:03.077 に答える