Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Description / SoapFormatExtensions.cs / 1305376 / SoapFormatExtensions.cs
namespace System.Web.Services.Description { using System.Xml; using System.IO; using System.Xml.Schema; using System.Xml.Serialization; using System.ComponentModel; using System.Text; using System.Web.Services.Configuration; ///[XmlFormatExtension("binding", SoapBinding.Namespace, typeof(Binding))] [XmlFormatExtensionPrefix("soap", SoapBinding.Namespace)] [XmlFormatExtensionPrefix("soapenc", "http://schemas.xmlsoap.org/soap/encoding/")] public class SoapBinding : ServiceDescriptionFormatExtension { SoapBindingStyle style = SoapBindingStyle.Document; string transport; static XmlSchema schema = null; /// public const string Namespace="http://schemas.xmlsoap.org/wsdl/soap/"; /// public const string HttpTransport = "http://schemas.xmlsoap.org/soap/http"; /// [XmlAttribute("transport")] public string Transport { get { return transport == null ? string.Empty : transport; } set { transport = value; } } /// [XmlAttribute("style"), DefaultValue(SoapBindingStyle.Document)] public SoapBindingStyle Style { get { return style; } set { style = value; } } /// /// /// public static XmlSchema Schema { get { if (schema == null) { schema = XmlSchema.Read(new StringReader(Schemas.Soap), null); } return schema; } } } ///[To be supplied.] ///public enum SoapBindingStyle { /// [XmlIgnore] Default, /// [XmlEnum("document")] Document, /// [XmlEnum("rpc")] Rpc, } /// [XmlFormatExtension("operation", SoapBinding.Namespace, typeof(OperationBinding))] public class SoapOperationBinding : ServiceDescriptionFormatExtension { string soapAction; SoapBindingStyle style; /// [XmlAttribute("soapAction")] public string SoapAction { get { return soapAction == null ? string.Empty : soapAction; } set { soapAction = value; } } /// [XmlAttribute("style"), DefaultValue(SoapBindingStyle.Default)] public SoapBindingStyle Style { get { return style; } set { style = value; } } } /// [XmlFormatExtension("body", SoapBinding.Namespace, typeof(InputBinding), typeof(OutputBinding), typeof(MimePart))] public class SoapBodyBinding : ServiceDescriptionFormatExtension { SoapBindingUse use; string ns; string encoding; string[] parts; /// [XmlAttribute("use"), DefaultValue(SoapBindingUse.Default)] public SoapBindingUse Use { get { return use; } set { use = value; } } /// [XmlAttribute("namespace"), DefaultValue("")] public string Namespace { get { return ns == null ? string.Empty : ns; } set { ns = value; } } /// [XmlAttribute("encodingStyle"), DefaultValue("")] public string Encoding { get { return encoding == null ? string.Empty : encoding; } set { encoding = value; } } /// [XmlAttribute("parts")] public string PartsString { get { if (parts == null) return null; StringBuilder builder = new StringBuilder(); for (int i = 0; i < parts.Length; i++) { if (i > 0) builder.Append(' '); builder.Append(parts[i]); } return builder.ToString(); } set { if (value == null) parts = null; else parts = value.Split(new char[] {' '}); } } /// [XmlIgnore] public string[] Parts { get { return parts; } set { parts = value; } } } /// public enum SoapBindingUse { /// [XmlIgnore] Default, /// [XmlEnum("encoded")] Encoded, /// [XmlEnum("literal")] Literal, } /// [XmlFormatExtension("fault", SoapBinding.Namespace, typeof(FaultBinding))] public class SoapFaultBinding : ServiceDescriptionFormatExtension { SoapBindingUse use; string ns; string encoding; string name; /// [XmlAttribute("use"), DefaultValue(SoapBindingUse.Default)] public SoapBindingUse Use { get { return use; } set { use = value; } } /// [XmlAttribute("name")] public string Name { get { return name; } set { name = value; } } /// [XmlAttribute("namespace")] public string Namespace { get { return ns == null ? string.Empty : ns; } set { ns = value; } } /// [XmlAttribute("encodingStyle"), DefaultValue("")] public string Encoding { get { return encoding == null ? string.Empty : encoding; } set { encoding = value; } } } /// [XmlFormatExtension("header", SoapBinding.Namespace, typeof(InputBinding), typeof(OutputBinding))] public class SoapHeaderBinding : ServiceDescriptionFormatExtension { XmlQualifiedName message = XmlQualifiedName.Empty; string part; SoapBindingUse use; string encoding; string ns; bool mapToProperty; SoapHeaderFaultBinding fault; /// [XmlIgnore] public bool MapToProperty { get { return mapToProperty; } set { mapToProperty = value; } } /// [XmlAttribute("message")] public XmlQualifiedName Message { get { return message; } set { message = value; } } /// [XmlAttribute("part")] public string Part { get { return part; } set { part = value; } } /// [XmlAttribute("use"), DefaultValue(SoapBindingUse.Default)] public SoapBindingUse Use { get { return use; } set { use = value; } } /// [XmlAttribute("encodingStyle"), DefaultValue("")] public string Encoding { get { return encoding == null ? string.Empty : encoding; } set { encoding = value; } } /// [XmlAttribute("namespace"), DefaultValue("")] public string Namespace { get { return ns == null ? string.Empty : ns; } set { ns = value; } } /// [XmlElement("headerfault")] public SoapHeaderFaultBinding Fault { get { return fault; } set { fault = value; } } } /// public class SoapHeaderFaultBinding : ServiceDescriptionFormatExtension { XmlQualifiedName message = XmlQualifiedName.Empty; string part; SoapBindingUse use; string encoding; string ns; /// [XmlAttribute("message")] public XmlQualifiedName Message { get { return message; } set { message = value; } } /// [XmlAttribute("part")] public string Part { get { return part; } set { part = value; } } /// [XmlAttribute("use"), DefaultValue(SoapBindingUse.Default)] public SoapBindingUse Use { get { return use; } set { use = value; } } /// [XmlAttribute("encodingStyle"), DefaultValue("")] public string Encoding { get { return encoding == null ? string.Empty : encoding; } set { encoding = value; } } /// [XmlAttribute("namespace"), DefaultValue("")] public string Namespace { get { return ns == null ? string.Empty : ns; } set { ns = value; } } } /// [XmlFormatExtension("address", SoapBinding.Namespace, typeof(Port))] public class SoapAddressBinding : ServiceDescriptionFormatExtension { string location; /// [XmlAttribute("location")] public string Location { get { return location == null ? string.Empty : location; } set { location = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SerializationBinder.cs
- DataGridViewTextBoxEditingControl.cs
- ViewPort3D.cs
- Int32Storage.cs
- ProxyGenerator.cs
- InfoCardSymmetricAlgorithm.cs
- GeometryDrawing.cs
- StrongNameUtility.cs
- initElementDictionary.cs
- safesecurityhelperavalon.cs
- WebPartConnectionsCloseVerb.cs
- QueryOptionExpression.cs
- RightNameExpirationInfoPair.cs
- ComponentResourceManager.cs
- NetStream.cs
- ToolboxItem.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ConnectionStringSettings.cs
- CqlGenerator.cs
- DataGridCaption.cs
- wgx_commands.cs
- _AutoWebProxyScriptEngine.cs
- CacheVirtualItemsEvent.cs
- SHA384.cs
- HtmlElementEventArgs.cs
- QuerySafeNavigator.cs
- WebPartZone.cs
- OdbcConnectionString.cs
- XmlSequenceWriter.cs
- WindowsFormsHost.cs
- DesignerVerb.cs
- NumericUpDownAcceleration.cs
- CustomValidator.cs
- DefaultTraceListener.cs
- LassoHelper.cs
- BooleanExpr.cs
- MetaColumn.cs
- ListBoxAutomationPeer.cs
- IFlowDocumentViewer.cs
- TextMetrics.cs
- PcmConverter.cs
- FrameworkContentElement.cs
- FormattedTextSymbols.cs
- LocalizationParserHooks.cs
- HtmlDocument.cs
- TextOutput.cs
- TrackBarRenderer.cs
- IssuedTokenClientElement.cs
- TreeNodeBinding.cs
- TextSegment.cs
- Component.cs
- DataGridViewComboBoxCell.cs
- CardSpaceException.cs
- MachineKeySection.cs
- VirtualPathUtility.cs
- NativeRecognizer.cs
- ThreadExceptionDialog.cs
- ErrorWebPart.cs
- Rect.cs
- Soap12ProtocolImporter.cs
- SortedSet.cs
- NavigationExpr.cs
- SingleTagSectionHandler.cs
- ContainerAction.cs
- Matrix.cs
- NativeCppClassAttribute.cs
- DesignerSerializationOptionsAttribute.cs
- ParameterToken.cs
- Marshal.cs
- InstanceLockTracking.cs
- IPEndPoint.cs
- SoapExtensionImporter.cs
- XamlNamespaceHelper.cs
- StylusPointPropertyId.cs
- AnimationTimeline.cs
- ZipArchive.cs
- LinkTarget.cs
- ManagementPath.cs
- MailBnfHelper.cs
- SystemIPGlobalStatistics.cs
- SecurityUtils.cs
- ParentQuery.cs
- TimeSpan.cs
- CompilationLock.cs
- TabControlDesigner.cs
- ScriptManager.cs
- OdbcErrorCollection.cs
- DataGridViewElement.cs
- SwitchAttribute.cs
- BitmapEffectDrawingContent.cs
- XmlImplementation.cs
- XslCompiledTransform.cs
- ObjectCacheHost.cs
- CustomDictionarySources.cs
- EdmSchemaError.cs
- TextSimpleMarkerProperties.cs
- assemblycache.cs
- TextParagraphView.cs
- HostingEnvironmentWrapper.cs
- AuthenticationModulesSection.cs