wsse security header

0
Hi, When connecting to a webservice via SoapUI, I have an empty header and filled body, like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">    <soapenv:Header/>    <soapenv:Body>         <stk_factuurarchief>             <stk_selection>                 <document>GetInvoiceRowsCustomer</document>                 <pairs>                     <pair>                         <key>BLABLA</key>                         <value />                     </pair>                 </pairs>             </stk_selection>         </stk_factuurarchief>     </soapenv:Body> </soapenv:Envelope> As authorization I use Basic, providing username and password and the WSS-Password Type is PasswordText. The request header that is build up by SoapUI looks like this: <soapenv:Header>     <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">         <wsse:UsernameToken wsu:Id="UsernameToken-81B7B73B161CF67BC2155974196832728">             <wsse:Username>UN</wsse:Username>             <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PW</wsse:Password>             <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">un13awM6z7dp6u+Rn4LuJA==</wsse:Nonce>             <wsu:Created>2019-06-05T13:39:28.327Z</wsu:Created>         </wsse:UsernameToken>     </wsse:Security> </soapenv:Header> This returns a correct result. Now, I can't get this to work in Mendix, since I can't find a way to build up that correct security header.  Who knows how to achieve this in Mendix? Thanks in advance!
asked
2 answers
2

In a call webservice action you configure a custom SOAP Request header as shown below.

More info on how to consume a webservice in Mendix can be found in the link below.

https://docs.mendix.com/howto/integration/consume-a-complex-web-service

answered
0

What is the response when you enter the wsse-header into the template, without any variables:

<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:UsernameToken wsu:Id="UsernameToken-81B7B73B161CF67BC2155974196832728">
        <wsse:Username>UN</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PW</wsse:Password>
        <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">un13awM6z7dp6u+Rn4LuJA==</wsse:Nonce>
        <wsu:Created>2019-06-05T13:39:28.327Z</wsu:Created>
    </wsse:UsernameToken>
</wsse:Security>

Also, the errormessage says it is missing ‘value for {0}’, not 1. This might indicate something else than the authorization is failing. 

answered