Soap UI > Preferences > HTTP Settings > To enable preemptive authentication, select the Authenticate preemptively check box.
soapUI request without basic auth credentials:
Log without basic auth credentials:
********************************************************************************
WARN 2022-08-18 15:28:34,604 [[MuleRuntime].uber.14: [expose-soapapi_poc].uber@org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource.lambda$null$16:412 @5d1ae385] [processor: ; event: ] org.mule.runtime.module.extension.internal.runtime.source.ExtensionMessageSource: Message source 'listener' on flow 'api-main' successfully reconnected
ERROR 2022-08-18 15:28:44,259 [[MuleRuntime].uber.14: [expose-soapapi_poc].api-main.CPU_LITE @2e360464] [processor: api-main/processors/0; event: ae870e50-1ef9-11ed-b4b0-88665a282a6f] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler:
********************
Message : Registered authentication is set to HTTP basic authentication but there was no security context on the session. Authentication denied on connector HTTP listener
Element : api-main/processors/0 @ expose-soapapi_poc:expose-soapapi_poc.xml:24
Element DSL : <http:basic-security-filter realm="mule"></http:basic-security-filter>
Error type : HTTP:BASIC_AUTHENTICATION
FlowStack : at api-main(api-main/processors/0 @ expose-soapapi_poc:expose-soapapi_poc.xml:24)
(set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************
********************************************************************************
soapUI request with basic auth credentials:
Log with basic auth credentials:
********************************************************************************
INFO 2022-08-18 15:28:54,317 [[MuleRuntime].uber.13: [expose-soapapi_poc].api-main.BLOCKING @aaf909d] [processor: api-main/processors/3; event: b4634cd0-1ef9-11ed-b4b0-88665a282a6f] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: Basic Authentication Implemented Successfully.
********************************************************************************
Disclaimer 1: This solution provides a suggestion that should be considered in conjunction with your specific use case and requirements and does not represent a complete solution for all circumstances.
Disclaimer 2: This example is provided as a reference for your own usage and it's not part of the official MuleSoft product so its use will be considered as a custom implementation made by MuleSoft customers.
001116432

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.