Start a new topic
Answered

Set webservice password dynamically in XDI

We use a webservice using user/password authentication via WS Security element in WSDL metadata. Username and password is passed via variable such as:

user : ${~/WS_USER}$

password: ${~/WS_PASSWORD}$ or %{WS_VARPASSWORD}% if we use Variable Set.


These variables are set by our process depending on the data arrived (different logins/passwords for different data). So, username substituted correctly but not the password. Either "%{WS_PASSWORD}%" expression itself is written to the SOAP Header or we have an error (java.lang.NumberFormatException: For input string: "T) in case of "${~/WS_PASSWORD}$" variable.


How can we dynamically set passwords for Webservices correctly ?


Best Answer

The variable must contain the encrypted value of the password. 

Here, we can use the Runtime command "encrypt" to get this encrypted value.

1 Comment

Answer

The variable must contain the encrypted value of the password. 

Here, we can use the Runtime command "encrypt" to get this encrypted value.


1 person likes this
Login to post a comment