public SecurityHandler(AmadeusWebServicesPTClient client) : base(client) { this.iSecurity = new SecurityTokenInspector("userName", "password"); SecurityBehavior behavior = new SecurityBehavior(); behavior.inspector = this.iSecurity; client.Endpoint.EndpointBehaviors.Insert(0, behavior); }
public ServiceHandler(String wsap, String endpointConfigurationName) { client = new AmadeusWebServicesPTClient(endpointConfigurationName); hSecurity = new SecurityHandler(client); hSession = new SessionHandler(client, hSecurity); hLink = new TransactionFlowLinkHandler(client); hAddressing = new AddressingHandler(client, wsap); }
public SecurityHandler(AmadeusWebServicesPTClient client) : base(client) { this.iSecurity = new SecurityTokenInspector(ConfigurationManager.AppSettings["userId"], ConfigurationManager.AppSettings["password"]); SecurityBehavior behavior = new SecurityBehavior(); behavior.inspector = this.iSecurity; client.Endpoint.Behaviors.Insert(0, behavior); }
public ServiceHandler(string wSap, LoggingBehavior loggingEndpointBehavior) { client = new AmadeusWebServicesPTClient(); hSecurity = new SecurityHandler(client); hSession = new SessionHandler(client, hSecurity); hLink = new TransactionFlowLinkHandler(client); hAddressing = new AddressingHandler(client, wSap); _loggingEndpointBehavior = loggingEndpointBehavior; }
public Session CreateSession(string username, string agency, string organization, string password, int dataLength, bool forceNewSession) { //AuthenticateRequest client = new AmadeusWebServicesPTClient(); var sec_auth = new Security_Authenticate(); sec_auth.dutyCode = new ReferenceInformationTypeI(); sec_auth.dutyCode.dutyCodeDetails = new ReferencingDetailsTypeI2(); sec_auth.dutyCode.dutyCodeDetails.referenceIdentifier = "SU"; sec_auth.dutyCode.dutyCodeDetails.referenceQualifier = "DUT"; sec_auth.passwordInfo = new BinaryDataType[1]; sec_auth.passwordInfo[0] = new BinaryDataType(); sec_auth.passwordInfo[0].dataLength = dataLength.ToString(); sec_auth.passwordInfo[0].dataType = "E"; sec_auth.passwordInfo[0].binaryData = password; sec_auth.systemDetails = new SystemDetailsInfoType(); sec_auth.systemDetails.organizationDetails = new SystemDetailsTypeI1(); sec_auth.systemDetails.organizationDetails.organizationId = organization; sec_auth.userIdentifier = new UserIdentificationType2[1]; sec_auth.userIdentifier[0] = new UserIdentificationType2(); sec_auth.userIdentifier[0].originator = username; sec_auth.userIdentifier[0].originatorTypeCode = "U"; sec_auth.userIdentifier[0].originIdentification = new OriginatorIdentificationDetailsTypeI3(); sec_auth.userIdentifier[0].originIdentification.sourceOffice = agency; session = new Session { SessionId = string.Empty, SecurityToken = string.Empty, SequenceNumber = "1" }; var sec_auth_reply = client.Security_Authenticate(ref session, sec_auth); if (sec_auth_reply.errorSection != null) { var sb = new StringBuilder(); foreach (var s in sec_auth_reply.errorSection.interactiveFreeText.freeText) { sb.Append(s); } throw new Exception(sb.ToString()); } return(session); }
public Session CreateSession(string username, string agency, string organization, string password, int dataLength, bool forceNewSession) { //AuthenticateRequest client = new AmadeusWebServicesPTClient(); var sec_auth = new Security_Authenticate(); sec_auth.dutyCode = new ReferenceInformationTypeI(); sec_auth.dutyCode.dutyCodeDetails = new ReferencingDetailsTypeI2(); sec_auth.dutyCode.dutyCodeDetails.referenceIdentifier = "SU"; sec_auth.dutyCode.dutyCodeDetails.referenceQualifier = "DUT"; sec_auth.passwordInfo = new BinaryDataType[1]; sec_auth.passwordInfo[0] = new BinaryDataType(); sec_auth.passwordInfo[0].dataLength = dataLength.ToString(); sec_auth.passwordInfo[0].dataType = "E"; sec_auth.passwordInfo[0].binaryData = password; sec_auth.systemDetails = new SystemDetailsInfoType(); sec_auth.systemDetails.organizationDetails = new SystemDetailsTypeI1(); sec_auth.systemDetails.organizationDetails.organizationId = organization; sec_auth.userIdentifier = new UserIdentificationType2[1]; sec_auth.userIdentifier[0] = new UserIdentificationType2(); sec_auth.userIdentifier[0].originator = username; sec_auth.userIdentifier[0].originatorTypeCode = "U"; sec_auth.userIdentifier[0].originIdentification = new OriginatorIdentificationDetailsTypeI3(); sec_auth.userIdentifier[0].originIdentification.sourceOffice = agency; session = new Session { SessionId = string.Empty, SecurityToken = string.Empty, SequenceNumber = "1" }; var sec_auth_reply = client.Security_Authenticate(ref session, sec_auth); if (sec_auth_reply.errorSection != null) { var sb = new StringBuilder(); foreach (var s in sec_auth_reply.errorSection.interactiveFreeText.freeText) sb.Append(s); throw new Exception(sb.ToString()); } return session; }
public SessionHandler(AmadeusWebServicesPTClient client, SecurityHandler h) : base(client) { this.Session = null; hSecurity = h; }
public TransactionFlowLinkHandler(AmadeusWebServicesPTClient client) : base(client) { this.Link = null; }
public AddressingHandler(AmadeusWebServicesPTClient client, String wsap) : base(client) { this.mWSAP = wsap; }