The question is, why this WebService works when I pass the AuthHeader as part of the soap message. but we do not want to keep the usr/password in abap code.
If I comment out the below code , it throws an error.
********************************************
* get WS_HEADER protocol
lr_header_protocol ?= client_proxy->get_protocol( if_wsprotocol=>ws_header ).
CONCATENATE
'<Header>'
'<AuthHeader xmlns="http://webservices.test.com.ie/values/ValueOneService/">'
'<sUserName>test</sUserName>'
'<sPassword>test</sPassword>'
'</AuthHeader>'
'</Header>'
INTO l_string.
Thanks
Krish