private void ReflectInternal(ProtocolReflector[] reflectors) { this.description = new System.Web.Services.Description.ServiceDescription(); this.description.TargetNamespace = this.serviceAttr.Namespace; this.ServiceDescriptions.Add(this.description); this.service = new System.Web.Services.Description.Service(); string name = this.serviceAttr.Name; if ((name == null) || (name.Length == 0)) { name = this.serviceType.Name; } this.service.Name = XmlConvert.EncodeLocalName(name); if ((this.serviceAttr.Description != null) && (this.serviceAttr.Description.Length > 0)) { this.service.Documentation = this.serviceAttr.Description; } this.description.Services.Add(this.service); this.reflectionContext = new Hashtable(); this.exporter = new XmlSchemaExporter(this.description.Types.Schemas); this.importer = SoapReflector.CreateXmlImporter(this.serviceAttr.Namespace, SoapReflector.ServiceDefaultIsEncoded(this.serviceType)); WebMethodReflector.IncludeTypes(this.methods, this.importer); for (int i = 0; i < reflectors.Length; i++) { reflectors[i].Reflect(); } }
public ServiceEndpointCollection ImportEndpoints(System.Web.Services.Description.Service wsdlService) { Contract.Requires(wsdlService.Ports != null); Contract.Ensures(Contract.Result <System.ServiceModel.Description.ServiceEndpointCollection>() != null); return(default(ServiceEndpointCollection)); }
private void MoveToBinding(System.Web.Services.Description.Service service, System.Web.Services.Description.Port port, System.Web.Services.Description.Binding binding, System.Web.Services.Description.PortType portType) { this.service = service; this.port = port; this.portType = portType; this.binding = binding; this.encodedBinding = false; }
private void ReflectInternal(ProtocolReflector[] reflectors) { this.description = new System.Web.Services.Description.ServiceDescription(); this.description.TargetNamespace = this.serviceAttr.Namespace; this.ServiceDescriptions.Add(this.description); this.service = new System.Web.Services.Description.Service(); string name = this.serviceAttr.Name; if ((name == null) || (name.Length == 0)) { name = this.serviceType.Name; } this.service.Name = XmlConvert.EncodeLocalName(name); if ((this.serviceAttr.Description != null) && (this.serviceAttr.Description.Length > 0)) { this.service.Documentation = this.serviceAttr.Description; } this.description.Services.Add(this.service); this.reflectionContext = new Hashtable(); this.exporter = new XmlSchemaExporter(this.description.Types.Schemas); this.importer = SoapReflector.CreateXmlImporter(this.serviceAttr.Namespace, SoapReflector.ServiceDefaultIsEncoded(this.serviceType)); WebMethodReflector.IncludeTypes(this.methods, this.importer); for (int i = 0; i < reflectors.Length; i++) { reflectors[i].Reflect(); } }
internal void SetParent(System.Web.Services.Description.Service parent) { this.parent = parent; }
internal void SetParent(System.Web.Services.Description.Service parent) { this.parent = parent; }
public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType) { System.Web.Services.Description.Service ob = null; if (isNullable && ReadNull()) return null; if (checkType) { System.Xml.XmlQualifiedName t = GetXsiType(); if (t != null) { if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/") throw CreateUnknownTypeException(t); } } ob = new System.Web.Services.Description.Service (); Reader.MoveToElement(); while (Reader.MoveToNextAttribute()) { if (Reader.LocalName == "name" && Reader.NamespaceURI == "") { ob.Name = XmlConvert.DecodeName(Reader.Value); } else if (IsXmlnsAttribute (Reader.Name)) { } else { UnknownNode (ob); } } Reader.MoveToElement(); if (Reader.IsEmptyElement) { Reader.Skip (); return ob; } Reader.ReadStartElement(); Reader.MoveToContent(); bool b21=false, b22=false; System.Web.Services.Description.PortCollection o24 = ob.Ports; int n23=0; while (Reader.NodeType != System.Xml.XmlNodeType.EndElement) { if (Reader.NodeType == System.Xml.XmlNodeType.Element) { if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b22) { b22 = true; ob.Documentation = Reader.ReadElementString (); } else if (Reader.LocalName == "port" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) { if (o24 == null) throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection"); o24.Add (ReadObject_Port (false, true)); n23++; } else { UnknownNode (ob); } } else UnknownNode(ob); Reader.MoveToContent(); } ReadEndElement(); return ob; }
private void MoveToBinding(System.Web.Services.Description.Service service, System.Web.Services.Description.Port port, System.Web.Services.Description.Binding binding, System.Web.Services.Description.PortType portType) { this.service = service; this.port = port; this.portType = portType; this.binding = binding; this.encodedBinding = false; }