protected virtual void WriteWebServiceDescriptorChildren(XmlDictionaryWriter writer, WebServiceDescriptor webServiceDescriptor)
 {
     WriteLogicalServiceNamesOffered(writer, webServiceDescriptor.IssuerNames);
     WriteTokenTypesOffered(writer, webServiceDescriptor.TokenTypesOffered);
     WriteClaimDialectsOffered(writer, webServiceDescriptor.ClaimDialectsOffered);
     WriteClaimTypes(writer, Prefix, Elements.ClaimTypesOffered, Namespace, webServiceDescriptor.ClaimTypesOffered);
     WriteClaimTypes(writer, Prefix, Elements.ClaimTypesRequested, Namespace, webServiceDescriptor.ClaimTypesRequested);
     _ = writer.TryWriteElementValue(Elements.AutomaticPseudonyms, Namespace, webServiceDescriptor.AutomaticPseudonyms);
     WsAddressingSerializer.WriteEndpointReferenceCollection(writer, Elements.TargetScopes, Namespace, webServiceDescriptor.TargetScopes);
 }
Example #2
0
        public virtual void WriteClaimType(XmlDictionaryWriter writer, ClaimType claimType)
        {
            if (claimType == null)
            {
                return;
            }

            writer.WriteStartElement(Elements.ClaimType, Namespace);
            if (!writer.TryWriteAttributeValue(Attributes.Uri, claimType.Uri))
            {
                throw XmlWriterExceptionHelper.CreateRequiredAttributeMissingException(Elements.ClaimType, Attributes.Uri);
            }
            _ = writer.TryWriteAttributeValue(Attributes.Optional, claimType.Optional);

            _ = writer.TryWriteElementValue(Elements.DisplayName, Namespace, claimType.DisplayName);
            _ = writer.TryWriteElementValue(Elements.Description, Namespace, claimType.Description);
            _ = writer.TryWriteElementValue(Elements.DisplayValue, Namespace, claimType.DisplayValue);

            _ = writer.TryWriteElementValue(Elements.Value, Namespace, claimType.Value);

            writer.WriteEndElement();
        }
Example #3
0
        public virtual void WriteEndpointReference(XmlDictionaryWriter writer, EndpointReference endpointReference)
        {
            if (endpointReference == null)
            {
                return;
            }

            writer.WriteStartElement(Elements.EndpointReference, Namespace);
            if (!writer.TryWriteElementValue(Elements.Address, Namespace, endpointReference.Address))
            {
                throw XmlWriterExceptionHelper.CreateRequiredChildElementMissingException(Elements.EndpointReference, Elements.Address);
            }

            writer.WriteEndElement();
        }