public static SessionCreateRQService Create()
        {
            SessionCreateRQService serviceObj = new SessionCreateRQService();
            SessionCreateRS resp = new SessionCreateRS();
            try
            {
                // Set user information, including security credentials and the IPCC.
                string username = "******";
                string password = "******";
                string ipcc = "4REG";
                string domain = "DEFAULT";

                Security security = new Security();
                SecurityUsernameToken securityUserToken = new SecurityUsernameToken();
                securityUserToken.Username = username;
                securityUserToken.Password = password;
                securityUserToken.Organization = ipcc;
                securityUserToken.Domain = domain;
                security.UsernameToken = securityUserToken;

                SessionCreateRQ req = new SessionCreateRQ();
                SessionCreateRQPOS pos = new SessionCreateRQPOS();
                SessionCreateRQPOSSource source = new SessionCreateRQPOSSource();
                source.PseudoCityCode = ipcc;
                pos.Source = source;
                req.POS = pos;

                serviceObj.MessageHeaderValue = Get("SessionCreateRQ", "SessionCreate");
                serviceObj.SecurityValue = security;

                resp = serviceObj.SessionCreateRQ(req);
            }
            catch (Exception e)
            {
                throw new Exception(e.InnerException.ToString());
            }

            return serviceObj;
        }
示例#2
0
 /// <remarks/>
 public void SessionCreateRQAsync(SessionCreateRQ SessionCreateRQ1, object userState) {
     if ((this.SessionCreateRQOperationCompleted == null)) {
         this.SessionCreateRQOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSessionCreateRQOperationCompleted);
     }
     this.InvokeAsync("SessionCreateRQ", new object[] {
                 SessionCreateRQ1}, this.SessionCreateRQOperationCompleted, userState);
 }
示例#3
0
 /// <remarks/>
 public void SessionCreateRQAsync(SessionCreateRQ SessionCreateRQ1) {
     this.SessionCreateRQAsync(SessionCreateRQ1, null);
 }