0

I am trying to consume a IBM datapower webservice in c#, wcf. But this is the error the vendor has sent.

    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) Questions: First of all, any hints to consume a datapower webservice. I won't let me add a service reference in Visual studio. 2) This is how the sample soap looks like. https://stackoverflow.com/questions/16705812/wcf-client-usernametoken-nonce-x509-binary-security 3) Please suggest

2) Suppose I have this wsdl https://service100.emedny.org:9047/MHService?wsdl, what could be the custom binding

Community
  • 1
  • 1
user575219
  • 2,346
  • 15
  • 54
  • 105

2 Answers2

0

From the reject by filter I can guess that : the vendor sent message not according your wsdl file. I would suggest you open "prob" And maybe for the test peruse disable the policy. Hope I helped some how :)

alex
  • 916
  • 4
  • 12
  • 26
0

The SOAP packet posted by you to the datapower seems to be incorrect. First you need to see WSDL and see if it contains any .. element. From the message it looks that it is using it.

Now when you are posting a SOAP message to the datapower, datapower is saying the SOAP message is not correctly formed according the WSDL contract [In this case this is happening because 'UserNameToken' and its related content in SOAP header is not correctly structure.].

You need to re-structure the SOAP message. The best is to use any policy aware WS client and generate a sample request. Use that sample request as a starting point to understand how SOAP message needs to be formulated in case WS-Policy is attached with provided WSDL [The WSDL link above is not working, may be I can help if you post the WSDL file in this forum].

  • Ajitabh