SOAPMessageV2 - setBasicAuth(String userName, String userPass)

Set basic authentication headers for the SOAP message.

Setting basic authentication headers using this method overrides basic authentication values defined in the SOAP message record.

Table 1. Parameters
Name Type Description
userName String The username to use when authenticating the SOAP message.
userPass String The password for the specified user.
Table 2. Returns
Type Description
void
var sm = new sn_ws.SOAPMessageV2("StockQuote","GetQuote"); //Might throw exception if message doesn't exist or not visible due to scope.
sm.setBasicAuth("username","password");