0

c#、wcf で IBM datapower Web サービスを使用しようとしています。しかし、これはベンダーが送信したエラーです。

    May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: Required elements filter setting reject: expression /*[local-name()='Envelope' and (namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' or namespace-uri()='http://www.w3.org/2003/05/soap-envelope')]/*[local-name()='Header' and (namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' or namespace-uri()='http://www.w3.org/2003/05/soap-envelope')]//*[local-name()='UsernameToken' and namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd']/*[local-name()='Password'][not(/following-sibling::*[local-name()='Salt' or local-name()='Iteration'])] was not satisfied
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: Required elements filter setting reject: expression /*[local-name()='Envelope' and (namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' or namespace-uri()='http://www.w3.org/2003/05/soap-envelope')]/*[local-name()='Header' and (namespace-uri()='http://schemas.xmlsoap.org/soap/envelope/' or namespace-uri()='http://www.w3.org/2003/05/soap-envelope')]//*[local-name()='UsernameToken' and namespace-uri()='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd']/*[local-name()='Password'][not(/following-sibling::*[local-name()='Salt' or local-name()='Iteration'])] was not satisfied
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: Execution of 'store:///required-elements-filter.xsl' aborted: Rejected by policy.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: Execution of 'store:///required-elements-filter.xsl' aborted: Rejected by policy.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: Rejected by filter 'endpoint_14_5-1-2-request-rule-suptoken' of rule 'endpoint_14_5-req'.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: Rejected by filter 'endpoint_14_5-1-2-request-rule-suptoken' of rule 'endpoint_14_5-req'.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: request endpoint_14_5-req #3 filter: 'INPUT store:///required-elements-filter.xsl' failed: Rejected by policy.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: request endpoint_14_5-req #3 filter: 'INPUT store:///required-elements-filter.xsl' failed: Rejected by policy.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: rule (MedsHistoryWSP_default_request-rule): implied action Calling rule var://service/wspolicy/endpoint/configname with input INPUT and output PIPE failed: Rejected by policy.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[request][ ]: rule (MedsHistoryWSP_default_request-rule): implied action Calling rule var://service/wspolicy/endpoint/configname with input INPUT and output PIPE failed: Rejected by policy.
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[error][ ]: Rejected by filter; SOAP fault sent
May 23 10:29:44   [error] wsgw(MedsHistoryWSP): trans(308571109)[error][ ]: Rejected by filter; SOAP fault sent

1) 質問: まず、datapower Web サービスを使用するためのヒントを教えてください。Visual Studio でサービス参照を追加することはできません。2)サンプル石鹸はこんな感じ。 https://stackoverflow.com/questions/16705812/wcf-client-usernametoken-nonce-x509-binary-security 3) 提案してください

2) この wsdl https://service100.emedny.org:9047/MHService?wsdlがあるとします。カスタム バインディングは何でしょうか。

4

2 に答える 2

0

フィルターによる拒否から推測できます: ベンダーは、wsdl ファイルに従っていないメッセージを送信しました。「問題」を開くことをお勧めします。おそらく、テストのためにポリシーを無効にしてください。私がいくらか助けてくれることを願っています:)

于 2013-07-09T06:56:23.533 に答える
0

あなたが datapower に投稿した SOAP パケットは正しくないようです。まず、WSDL を見て、.. 要素が含まれているかどうかを確認する必要があります。メッセージから、それを使用しているように見えます。

ここで、SOAP メッセージを datapower に送信すると、datapower は、SOAP メッセージが WSDL コントラクトに従って正しく形成されていないと言っています [この場合、'UserNameToken' と SOAP ヘッダー内の関連コンテンツが正しく構造化されていないために発生しています。] .

SOAP メッセージを再構築する必要があります。最善の方法は、ポリシー対応の WS クライアントを使用して、サンプル リクエストを生成することです。提供された WSDL に WS-Policy が添付されている場合に SOAP メッセージをどのように作成する必要があるかを理解するための出発点として、このサンプル リクエストを使用してください [上の WSDL リンクは機能していません。このフォーラムに WSDL ファイルを投稿していただければ、私がお手伝いできるかもしれません。 ]。

  • アジターブ
于 2013-07-26T07:13:22.130 に答える