protected override bool ReflectMethod() { this.soapMethod = base.ReflectionContext[base.Method] as SoapReflectedMethod; if (this.soapMethod == null) { this.soapMethod = SoapReflector.ReflectMethod(base.Method, false, base.ReflectionImporter, this.SoapImporter, base.DefaultNamespace); base.ReflectionContext[base.Method] = this.soapMethod; this.soapMethod.portType = (base.Binding != null) ? base.Binding.Type : null; } WebMethodAttribute methodAttribute = base.Method.MethodAttribute; base.OperationBinding.Extensions.Add(this.CreateSoapOperationBinding(this.soapMethod.rpc ? SoapBindingStyle.Rpc : SoapBindingStyle.Document, this.soapMethod.action)); this.CreateMessage(this.soapMethod.rpc, this.soapMethod.use, this.soapMethod.paramStyle, base.InputMessage, base.OperationBinding.Input, this.soapMethod.requestMappings); if (!this.soapMethod.oneWay) { this.CreateMessage(this.soapMethod.rpc, this.soapMethod.use, this.soapMethod.paramStyle, base.OutputMessage, base.OperationBinding.Output, this.soapMethod.responseMappings); } this.CreateHeaderMessages(this.soapMethod.name, this.soapMethod.use, this.soapMethod.inHeaderMappings, this.soapMethod.outHeaderMappings, this.soapMethod.headers, this.soapMethod.rpc); if ((this.soapMethod.rpc && (this.soapMethod.use == SoapBindingUse.Encoded)) && (this.soapMethod.methodInfo.OutParameters.Length > 0)) { base.Operation.ParameterOrder = GetParameterOrder(this.soapMethod.methodInfo); } this.AllowExtensionsToReflectMethod(); return(true); }
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(); } }
protected override bool ReflectMethod() { soapMethod = ReflectionContext[Method] as SoapReflectedMethod; if (soapMethod == null) { soapMethod = SoapReflector.ReflectMethod(Method, false, ReflectionImporter, SoapImporter, DefaultNamespace); ReflectionContext[Method] = soapMethod; soapMethod.portType = Binding != null ? Binding.Type : null; } WebMethodAttribute methodAttr = WebMethodReflector.GetAttribute(Method); OperationBinding.Extensions.Add(CreateSoapOperationBinding(soapMethod.rpc ? SoapBindingStyle.Rpc : SoapBindingStyle.Document, soapMethod.action)); CreateMessage(soapMethod.rpc, soapMethod.use, soapMethod.paramStyle, InputMessage, OperationBinding.Input, soapMethod.requestMappings); if (!soapMethod.oneWay) { CreateMessage(soapMethod.rpc, soapMethod.use, soapMethod.paramStyle, OutputMessage, OperationBinding.Output, soapMethod.responseMappings); } CreateHeaderMessages(soapMethod.name, soapMethod.use, soapMethod.inHeaderMappings, soapMethod.outHeaderMappings, soapMethod.headers); if (soapMethod.rpc && soapMethod.methodInfo.OutParameters.Length > 0) { Operation.ParameterOrder = GetParameterOrder(soapMethod.methodInfo); } AllowExtensionsToReflectMethod(); return(true); }
private void ReflectInternal(ProtocolReflector[] reflectors) { description = new ServiceDescription(); description.TargetNamespace = serviceAttr.Namespace; ServiceDescriptions.Add(description); service = new Service(); string name = serviceAttr.Name; if (name == null || name.Length == 0) { name = serviceType.Name; } service.Name = XmlConvert.EncodeLocalName(name); if (serviceAttr.Description != null && serviceAttr.Description.Length > 0) { service.Documentation = serviceAttr.Description; } description.Services.Add(service); reflectionContext = new Hashtable(); exporter = new XmlSchemaExporter(description.Types.Schemas); importer = SoapReflector.CreateXmlImporter(serviceAttr.Namespace, SoapReflector.ServiceDefaultIsEncoded(serviceType)); WebMethodReflector.IncludeTypes(methods, importer); for (int i = 0; i < reflectors.Length; i++) { reflectors[i].Reflect(); } }
protected override void BeginClass() { if (base.Binding != null) { SoapBindingStyle rpc; if (SoapReflector.GetSoapServiceAttribute(base.ServiceType) is SoapRpcServiceAttribute) { rpc = SoapBindingStyle.Rpc; } else { rpc = SoapBindingStyle.Document; } base.Binding.Extensions.Add(this.CreateSoapBinding(rpc)); SoapReflector.IncludeTypes(base.Methods, this.SoapImporter); } base.Port.Extensions.Add(this.CreateSoapAddressBinding(base.ServiceUrl)); }
protected override void BeginClass() { if (Binding != null) { SoapBindingStyle style; if (SoapReflector.GetSoapServiceAttribute(ServiceType) is SoapRpcServiceAttribute) { style = SoapBindingStyle.Rpc; } else { style = SoapBindingStyle.Document; } Binding.Extensions.Add(CreateSoapBinding(style)); SoapReflector.IncludeTypes(Methods, SoapImporter); } Port.Extensions.Add(CreateSoapAddressBinding(ServiceUrl)); }
protected override string ReflectMethodBinding() { return(SoapReflector.GetSoapMethodBinding(base.Method)); }