private UddiLookupResponse GetLookupResponse(LookupParameters lookupParameters, UddiService uddiService, UddiBinding uddiBinding) { Identifier identifier = lookupParameters.Identifier; EndpointAddress endpointAddress = uddiBinding.GetEndpointAddress(); DateTime activationDateUtc = uddiService.GetActivationDateUtc(); DateTime expirationDateUtc = uddiService.GetExpirationDateUtc(); CertificateSubject subject = uddiService.GetCertificateSubject(); Uri termsOfUse = uddiService.GetTermsOfUseUrl(); MailAddress mail = uddiService.GetContactMail(); Version version = uddiService.GetVersion(); UddiId newerVersion = uddiService.GetNewerVersion(); UddiId serviceType = uddiBinding.GetPortType().UddiId; List <ProcessRoleDefinition> list = uddiBinding.GetProcessRoleDefinitions(); UddiLookupResponse response = new UddiLookupResponse( identifier, endpointAddress, activationDateUtc, expirationDateUtc, subject, termsOfUse, mail, version, newerVersion, serviceType, list ); return(response); }
public UddiLookupKey(Identifier identifier, UddiId serviceId, Uri endpoint, string profileConformanceClaim) { this.identifier = identifier; this.serviceId = serviceId; this.endpoint = endpoint; this.profileConformanceClaim = profileConformanceClaim; }
/// <summary> /// Constructor /// </summary> /// <param name="identifier">The identifier on the service (endpointKey and endpointKeyType)</param> /// <param name="serviceId">The identifier on the service type (portType)</param> /// <param name="acceptedTransportProtocols">The accepted transport protocols (http, mail)</param> /// <param name="profileConformanceClaim"></param> public LookupParameters( Identifier identifier, UddiId serviceId, List <EndpointAddressTypeCode> acceptedTransportProtocols, string profileConformanceClaim) { if (identifier == null) { throw new ArgumentNullException("identifier"); } if (serviceId == null) { throw new ArgumentNullException("serviceId"); } if (acceptedTransportProtocols == null) { throw new ArgumentNullException("acceptedTransportProtocols"); } if (string.IsNullOrEmpty(profileConformanceClaim)) { throw new ArgumentException("string profileConformanceClaim cannot be null or empty"); } Identifier = identifier; ServiceId = serviceId; AcceptedTransportProtocols = acceptedTransportProtocols; ProfileConformanceClaim = profileConformanceClaim; }
/// <summary> /// Constructor that takes the given parameters. /// /// No parameters are allowed to be null if any is a /// </summary> /// <exception cref="NullOrEmptyArgumentException">Exception thrown if the name parameter string is null or empty</exception> /// <exception cref="NullArgumentException">Exception thrown if any of the given parameters description, role, roletype or processDefinitionId is null</exception> /// <param name="name">Name of the process information</param> /// <param name="description">Description of the process information</param> /// <param name="role">Role of the process information</param> /// <param name="roleType">Role type of the process information</param> /// <param name="processDefinitionId">Identifier of the process information</param> public ProcessRoleDefinition(string name, string description, string role, string roleType, UddiId processDefinitionId) { if (string.IsNullOrEmpty(name)) { throw new NullOrEmptyArgumentException("name"); } if (description == null) { throw new NullArgumentException("description"); } if (role == null) { throw new NullArgumentException("role"); } if (roleType == null) { throw new NullArgumentException("roleType"); } if (processDefinitionId == null) { throw new NullArgumentException("processDefinitionId"); } Name = name; Description = description; Role = role; RoleType = roleType; ProcessDefinitionId = processDefinitionId; }
/// <summary> /// Constructor /// </summary> /// <param name="identifier">The identifier on the service (endpointKey and endpointKeyType)</param> /// <param name="serviceId">The identifier on the service type (portType)</param> /// <param name="profileIds">The profiles that must be supported</param> /// <param name="acceptedTransportProtocols">The accepted transport protocols (http, mail)</param> public LookupParameters( Identifier identifier, UddiId serviceId, List <UddiId> profileIds, List <EndpointAddressTypeCode> acceptedTransportProtocols) { if (identifier == null) { throw new ArgumentNullException("identifier"); } if (serviceId == null) { throw new ArgumentNullException("serviceId"); } if (profileIds == null) { throw new ArgumentNullException("profileIds"); } if (acceptedTransportProtocols == null) { throw new ArgumentNullException("acceptedTransportProtocols"); } if (profileIds.Count == 0) { throw new ArgumentException("profileIds must contain at least one item"); } Identifier = identifier; ServiceId = serviceId; ProfileIds = profileIds; AcceptedTransportProtocols = acceptedTransportProtocols; ProfileConformanceClaim = RASPPROFILECONFORMANCECLAIM; }
/// <summary> /// Constructor that takes the identifier, the name and the description of /// the process definition. /// </summary> /// <param name="id"></param> /// <param name="name"></param> /// <param name="description"></param> /// <param name="identifier"></param> /// <param name="identifierType"></param> /// <param name="registrationConformanceClaim"></param> public ProcessDefinition(UddiId id, string name, string description, string identifier, string identifierType, string registrationConformanceClaim) { Id = id; Name = name; Description = description; Identifier = identifier; IdentifierType = identifierType; RegistrationConformanceClaim = registrationConformanceClaim; }
public UddiLookupResponse(Identifier endpointIdentifierActual, EndpointAddress endpointAddress, DateTime activationDate, DateTime expirationDate, CertificateSubject certificateSubjectSerialNumber, Uri termsOfUseUrl, System.Net.Mail.MailAddress serviceContactEmail, Version version, UddiId newerVersionReference, List <ProcessRoleDefinition> processes) { EndpointIdentifierActual = endpointIdentifierActual; EndpointAddress = endpointAddress; ActivationDate = activationDate; ExpirationDate = expirationDate; CertificateSubjectSerialNumber = certificateSubjectSerialNumber; TermsOfUseUrl = termsOfUseUrl; ServiceContactEmail = serviceContactEmail; Version = version; NewerVersionReference = newerVersionReference; _processRoles = processes; }
public List <ProcessRoleDefinition> GetProcessRoleDefinitions() { List <UddiTModel> processesRoleTModels = GetProcessRoleTModels(); Converter <UddiTModel, ProcessRoleDefinition> converter = delegate(UddiTModel tmodel) { string name = tmodel.Name; string description = tmodel.Description; string role = tmodel.GetProfileRoleId(); string roleType = tmodel.GetProfileRoleTypeId(); UddiId processDefinitionReferenceId = IdentifierUtility.GetUddiIDFromString(tmodel.GetProcessDefinitionReferenceId()); return(new ProcessRoleDefinition(name, description, role, roleType, processDefinitionReferenceId)); }; return(processesRoleTModels.ConvertAll <ProcessRoleDefinition>(converter)); }
public List <ProcessDefinition> GetProcessDefinitions(List <UddiId> processDefinitionIds) { IList <UddiId> missingIds = new List <UddiId>(); List <UddiTModel> foundTModels = new List <UddiTModel>(); //Check the cache for any existing tmodels. foreach (UddiId processDefinitionId in processDefinitionIds) { UddiTModel tmodel = null; if (uddiTModelCache.TryGetValue(processDefinitionId, out tmodel)) { foundTModels.Add(tmodel); continue; } missingIds.Add(processDefinitionId); } //Get the tmodels not in the cache IList <UddiTModel> tmodels = this.GetUddiTModels(missingIds); //Adds the tmodels to the cache foreach (UddiTModel tmodel in tmodels) { uddiTModelCache.Set(tmodel.UddiId, tmodel); } List <ProcessDefinition> processDefinitions = new List <ProcessDefinition>(); foundTModels.AddRange(tmodels); foreach (UddiTModel tmodel in foundTModels) { UddiId uddiId = tmodel.UddiId; string name = tmodel.Name; string description = tmodel.Description; string profileId = tmodel.GetProfileId(); string profileTypeId = tmodel.GetProfileTypeId(); string registrationConformanceClaim = tmodel.GetRegistrationConformanceClaim(); ProcessDefinition processDefinition = new ProcessDefinition(uddiId, name, description, profileId, profileTypeId, registrationConformanceClaim); processDefinitions.Add(processDefinition); } return(processDefinitions); }
/// <summary> /// Constructor that is used to get all services for a specific identifier and /// a specific service type in the UDDI. /// </summary> /// <param name="identifier">The identifier on the service (endpointKey and endpointKeyType)</param> /// <param name="serviceId">The identifier on the service type (portType)</param> /// <param name="acceptedTransportProtocols">The accepted transport protocols (http, mail)</param> public LookupParameters( Identifier identifier, UddiId serviceId, List <EndpointAddressTypeCode> acceptedTransportProtocols) { // Test code call this one if (identifier == null) { throw new ArgumentNullException("identifier"); } if (serviceId == null) { throw new ArgumentNullException("serviceId"); } if (acceptedTransportProtocols == null) { throw new ArgumentNullException("acceptedTransportProtocols"); } Identifier = identifier; ServiceId = serviceId; AcceptedTransportProtocols = acceptedTransportProtocols; ProfileConformanceClaim = RASPPROFILECONFORMANCECLAIM; }
private IList <UddiService> GetUddiServices(Identifier organizationIdentifier, UddiId serviceUddiId, string profileConformanceClaim) { keyedReference profileConformanceClaimKeyReference = new keyedReference(); profileConformanceClaimKeyReference.tModelKey = "uddi:cc5f1df6-ae0a-4781-b24a-f30315893af7"; profileConformanceClaimKeyReference.keyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/profileConformanceClaim/"; profileConformanceClaimKeyReference.keyValue = profileConformanceClaim; keyedReference registrationConformanceClaim = new keyedReference(); registrationConformanceClaim.tModelKey = "uddi:80496ef5-4d24-4788-a3f8-12fb54a75106"; registrationConformanceClaim.keyName = "http://oio.dk/profiles/OWSA/modelT/1.0/UDDI/Categories/registrationConformanceClaim/"; registrationConformanceClaim.keyValue = RASPREGISTRATIONCONFORMANCECLAIM; keyedReference endpointKeyType = new keyedReference(); endpointKeyType.tModelKey = "uddi:182a4a2b-3717-4283-b97c-55cc3b684dae"; endpointKeyType.keyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKeyType/"; endpointKeyType.keyValue = organizationIdentifier.KeyTypeCode; keyedReference endpointKey = new keyedReference(); endpointKey.tModelKey = "uddi:e733684d-9f40-40ff-8807-1d80abc7c665"; endpointKey.keyName = "http://oio.dk/profiles/OIOSI/1.0/UDDI/Categories/endpointKey/"; endpointKey.keyValue = organizationIdentifier.GetAsString(); keyedReference[] categories = new[] { profileConformanceClaimKeyReference, registrationConformanceClaim, endpointKeyType, endpointKey }; categoryBag serviceCategories = new categoryBag { Items = categories }; find_service findService = new find_service(); findService.findQualifiers = new string[] { FindQualifers.andAllKeys.ToString() }; if (serviceUddiId != null) { findService.tModelBag = new string[] { serviceUddiId.ID }; } findService.categoryBag = serviceCategories; serviceList listOfServices = this.uddiProxy.find_service(findService); List <string> endPointUddiIds = new List <string>(); if (listOfServices.serviceInfos == null) { return(new List <UddiService>()); } foreach (serviceInfo service in listOfServices.serviceInfos) { endPointUddiIds.Add(service.serviceKey); } // Har uddi-ID på service endpoint, skal finde endpoint uri get_serviceDetail getServiceDetail = new get_serviceDetail(); getServiceDetail.serviceKey = endPointUddiIds.ToArray(); serviceDetail detail = this.uddiProxy.get_serviceDetail(getServiceDetail); if (detail.businessService == null) { return(new List <UddiService>()); } IList <UddiService> uddiServices = new List <UddiService>(); foreach (businessService businessServiceItem in detail.businessService) { List <UddiBinding> uddiBindings = new List <UddiBinding>(); foreach (bindingTemplate bindingTemplate in businessServiceItem.bindingTemplates) { List <string> tModelKeys = new List <string>(); foreach (tModelInstanceInfo tModel in bindingTemplate.tModelInstanceDetails) { tModelKeys.Add(tModel.tModelKey); } // Get the tModel details: get_tModelDetail tModelDetail = new get_tModelDetail(); tModelDetail.tModelKey = tModelKeys.ToArray(); tModelDetail modelDetail = this.uddiProxy.get_tModelDetail(tModelDetail); List <tModel> uddiTModels = new List <tModel>(); foreach (tModel tModelItem in modelDetail.tModel) { uddiTModels.Add(tModelItem); } UddiBinding uddiBinding = new UddiBinding(bindingTemplate, uddiTModels); uddiBindings.Add(uddiBinding); } UddiService uddiService = new UddiService(businessServiceItem, uddiBindings); uddiServices.Add(uddiService); } return(uddiServices); }
/// <summary> /// Constructor /// </summary> /// <param name="Id"></param> public UddiStringId(UddiId Id) : this(Id.ID, true) { }
/// <summary> /// Constructor /// </summary> /// <param name="Id"></param> public UddiGuidId(UddiId Id) : this(Id.ID, true) { }