Connecting to SOAP web service requiring WS Security and WS Adressing

Dear community,   For a project I need to connect to a SOAP web service that requires WS Security UsernameToken elements with password and username and additionally at least the MessageID from WS Adressing. When building a custom request header Mendix automatically applies the WS Adressing with an Action which is fine for me. But when trying to request a custom header without defining the wsa (like below) an export error is thrown because of an unnamed namespace while Mendix would apply this themselves afterwards. <wsse:Security xmlns:wsse="">   <wsse:UsernameToken>     <wsse:Username>{1}</wsse:Username>     <wsse:Password Type="">{2}</wsse:Password>   </wsse:UsernameToken> </wsse:Security> <wsa:MessageID>tag:WS-Gateway_SOAPUI-template_v8,TijmenVerwoert,13 Apr 2022:239630</wsaa:MessageID> <wsa:To></wsa:To>   When I define the wsa again for the 2 elements I need to add (below here), I receive a 500 internal error from the server. <wsse:Security xmlns:wsse="">   <wsse:UsernameToken>     <wsse:Username>{1}</wsse:Username>     <wsse:Password Type="">{2}</wsse:Password>   </wsse:UsernameToken> </wsse:Security> <wsaa:MessageID xmlns:wsaa="">tag:WS-Gateway_SOAPUI-template_v8,TijmenVerwoert,13 Apr 2022:239630</wsaa:MessageID> <wsaaa:To xmlns:wsaaa=""></wsaaa:To>   When I run the request from SoapUI I do get a status 200 with the following request: <soap:Envelope xmlns:soap="" xmlns:wsdl="" xmlns:xsd=""> <soap:Header xmlns:wsa=""> <wsse:Security xmlns:wsse="" xmlns:wsu=""> <wsu:Timestamp wsu:Id="TS-EA706E41C4997DB99916498386383052"> <wsu:Created> 2022-04-13T08:30:38.305Z </wsu:Created> <wsu:Expires> 2022-04-14T08:30:38.305Z </wsu:Expires> </wsu:Timestamp> <wsse:UsernameToken wsu:Id="UsernameToken-EA706E41C4997DB99916498386382991"> <wsse:Username> FakeUsername </wsse:Username> <wsse:Password Type=""> FakePass </wsse:Password> <wsse:Nonce EncodingType=""> WNNE9P32x8udLoWUa+F+aA== </wsse:Nonce> <wsu:Created> 2022-04-13T08:30:38.297Z </wsu:Created> </wsse:UsernameToken> </wsse:Security> <wsa:Action> urn:RiskMetricsWS:1.0:Connectivity:Ping </wsa:Action> <wsa:MessageID> tag:WS-Gateway_SOAPUI-template_v8,TijmenVerwoert,13 Apr 2022:239630 </wsa:MessageID> <wsa:To> </wsa:To> </soap:Header> <soap:Body> <wsdl:Ping> World </wsdl:Ping> </soap:Body> </soap:Envelope>   What can I do to get this to work in Mendix?   Any help is much appreciated!   Kind regards,   Tijmen  
2 answers

Tough one…

The only thing I see is that the 3rd structure in your first post (where soap ui succeeds with 200) is an other structure than WS Security username token.
What if you try to use the WS Security 2002-04 with Kerberos?
This is the structure Soap UI also uses what I see.



Furthermore have no knowledge unfortunately about this.


Hi Tijmen,

If you connect to their webservice then they have to deliver you the WSDL.
You can easily import it to Mendix:


Or you can create your own Published Web Service and export the WSDL to debug.

I’m not sure why your app is not working, but I always ask their WSDL.