Don't think this can be done in webservice generator. However it can be done easily in C#. We had to do something very smilar to this to interface with SEP. For example:
public static policyList GetLuPolicySettingsList(SEPUserHolder holder)
{
PoliciesImplService policies = InitAndLoginService<PoliciesImplService>(holder, "Policies");
policyList oo = policies.getLuPolicySettingsList();
TidyUp();
return oo;
}
private static SessionImplService sessionService = new SessionImplService();
private static T InitAndLoginService<T>(SEPUserHolder seh, string newServiceName) where T : SoapHttpClientProtocol, new()
{
try
{
sessionService.Url = SEPServicesBaseURL + "/Session";
sessionService.CookieContainer = new CookieContainer();
sessionService.login(seh.UserName, seh.Password, seh.Domain);
T otherService = new T();
otherService.Url = String.Format("{0}/{1}", SEPServicesBaseURL, newServiceName);
CookieCollection cccc = sessionService.CookieContainer.GetCookies(new Uri(SEPServicesBaseURL + "/Session"));
otherService.CookieContainer = new CookieContainer();
foreach (Cookie xxx in cccc)
{
otherService.CookieContainer.Add(new Uri(SEPServicesBaseURL + "/" + newServiceName), xxx);
}
return otherService;
}
catch (Exception e)
{
log.LogFatal(null, "Exception Occured: ", e);
throw new InvalidClientCreationException("Could not create the Service Client due to the following exception.", e);
}
}
private static void TidyUp()
{
sessionService.logout();
}