Validation of encrypted SOAP request throws the error fault

点点圈 提交于 2019-12-02 11:35:29

Don't hesitate about the Validate option in the testStep request.

This option validates the request against the xsd schema of your request located in the wsdl which you use to load the project in SOAPUI

Probably your wsdl lacks on the definition of the [ws security policy] which tells you the security requeriments implemented in your WS.

For your case your wsdl must have something like:

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                  xmlns:wsp="http://www.w3.org/ns/ws-policy"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
                  xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200802">
    ...
    <wsp:Policy>
        ...
        <sp:EncryptedParts>...</sp:EncryptedParts>
        ...
    </wsp:Policy>
</wsdl:definitions>

So since this is missing the request doesn't validate against your wsdl.

Anywise, the thing is that the wsdl you load on SOAPUI could be different from the WS implementation (since it's not up to date or something like that). So simply try to send the request (although it does not meet the wsdl validation) and see what your WS respond.

Hope this helps,

You have the already encrypted message in the xml-tab of SoapUI and try to validate it against the xsd. That will never work as the xsd doesn't know anything about "xenc:EncryptedData"!

The encrypted message will be shown in the "Raw"-tab after you send the request as SoapUI will do the encryption while sending. You should not "apply outgoing" by yourself!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!