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);
        }
예제 #2
0
        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);
        }