cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching inputs from basic auth account

aditya_gupta41
Contributor

Hello Experts,

I have an interface that is to be created over 3 different SOAP request as a positive flow.
Login → Check/update Data → Logout

The first step of Login requires username and password to be sent along the SOAP request.
The Envelope loops like this:

<env:Envelope
    xmlns:env="http://www.w3.org/2003/05/soap-envelope"
    xmlns:ns0="http://siemens.com/agilews">
    <env:Header/>
    <env:Body>
        <ns0:login
            xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <credentials>
                <username>$credentials.username</username>
                <password>$credentials.password</password>
                <application>$credentials.application</application>
            </credentials>
        </ns0:login>
    </env:Body>
</env:Envelope>

Now I can hardcode $credentials.application but from business POV, I cannot do the same for username and password. Is there any way in which I can create a basic auth account using this username and password and fetch it as a flat value and pass it in SOAP?

Thanks in Advance

1 ACCEPTED SOLUTION

aditya_gupta41
Contributor

Hello,

I am getting below error when writing above expressions in HTTP Entity:

failure:
“HTTP Entity: Cannot lookup a property on a null value”
value:
“Please check expression syntax and data types.”
reason:
“Please check expression syntax and data types.”

I have created a REST POST basic auth account with username and password.

Do you have any suggestion?

Thanks,
Aditya

View solution in original post

5 REPLIES 5

aditya_gupta41
Contributor

Hello,

I am getting below error when writing above expressions in HTTP Entity:

failure:
“HTTP Entity: Cannot lookup a property on a null value”
value:
“Please check expression syntax and data types.”
reason:
“Please check expression syntax and data types.”

I have created a REST POST basic auth account with username and password.

Do you have any suggestion?

Thanks,
Aditya