我正在尝试使用c#,wcf中的IBM datapower webservice。 但这是供应商发送的错误。
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 webservice的提示。 我不会让我在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,可能是自定义绑定
答案 0 :(得分:0)
从过滤器拒绝我可以猜到:供应商发送的消息不是根据你的wsdl文件。 我建议你打开“prob” 也许对于测试细读禁用策略。 希望我帮助了一些:)
答案 1 :(得分:0)
您发布到数据电源的SOAP数据包似乎不正确。首先,您需要查看WSDL并查看它是否包含任何..元素。从消息中可以看出它正在使用它。
现在,当您向数据权限发布SOAP消息时,datapower表示根据WSDL协议未正确形成SOAP消息[在这种情况下会发生这种情况,因为'UserNameToken'及其在SOAP头中的相关内容不正确结构。]。
您需要重新构造SOAP消息。最好的方法是使用任何策略感知的WS客户端并生成样本请求。使用该样本请求作为起点,了解如何在WS-Policy附带提供的WSDL的情况下如何制定SOAP消息[上面的WSDL链接不起作用,如果您在此论坛中发布WSDL文件,我可以提供帮助]