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
G
Gaurav Srivastava
said
about 1 year ago
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
G
Gaurav Srivastava
said
about 1 year ago
Answer
The variable must contain the encrypted value of the password.
Here, we can use the Runtime command "encrypt" to get this encrypted value.
Gaurav Srivastava
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 ?
The variable must contain the encrypted value of the password.
Here, we can use the Runtime command "encrypt" to get this encrypted value.
Gaurav Srivastava
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