This picture shows my simple ws-security configuration of soapui:
And I apply this configuration to soap request:
Then
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!
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,