Consuming SOAP Webservice without pre-emptive Authentication
I am trying to consume a SOAP-webservice. The “Authenticate Preemptively” in the global preferences in Soap-UI is configured as follows: If I use Soap-UI and use Basic Authentication non pre-emptive it works. If I choose “Authenticate pre-emptively” in Soap-UI I recieve a 401 response. When consuming this webservice in Mendix I also recieve a 401 response. It looks like Mendix is using a “pre-emptively” way of Basic Authentication. The corresponding log shows: com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: The server sent HTTP status code 401: Unauthorized If in Soap-UI I use “No-Authentication” and add the following entry in the SOAP-Header: <Authentication> <username>XXXXXXXX</username> <password>XXXXXXXX</password> </Authentication> it works and I recieve an expected response. So I tried to use this method in Mendix by disabling “Basic Authentication” and adding a custom request template on the header: It still does not work (401-response). If I log the request-information being used I see this request: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <Authentication> <username>XXXXXXXX</username> <password>XXXXXXXX</password> </Authentication> </soapenv:Header><soapenv:Body>...XXXXX...</soapenv:Body></soapenv:Envelope> [All specific information is being masked with XXXXX] If I copy this request into Soap-UI, it does work, but not in Mendix…. I hope someone can help me with this. What am I missing.