Exemple #1
0
        /// <summary>
        ///  Goes through WSDL operations and applies stores the type information in relation to that operation.
        /// <param name="typeInformation"> The list of type information to iterate through</param>
        /// <returns></returns>
        public void ApplyTypeInformation(List <WSDLTypeInformation> typeInformation)
        {
            // For every type we have find the operation and fill out the input/output parameters
            foreach (WSDLTypeInformation current in typeInformation)
            {
                WSDLOperation currentInfo = null;

                // Find the operation, if we dont have one continue.
                currentInfo = FindOperationByMessage(current.Name);
                if (currentInfo == null)
                {
                    continue;
                }

                string type = GetParameterTypeByName(current.Name);
                if (type == WSDLHelpers.IN_PARAMETER)
                {
                    currentInfo.InputTypeInformation = current;
                }
                else if (type == WSDLHelpers.OUT_PARAMETER)
                {
                    currentInfo.OutputTypeInformation = current;
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Finds a WSDLInformation's operation by message.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        public WSDLOperation FindOperationByMessage(string message)
        {
            WSDLOperation result = null;

            result = message.Contains("Response") ? Operations.Cast <WSDLOperation>().FirstOrDefault(o => WSDLHelpers.TrimNamespace(o.OutputMessage) == message) :
                     Operations.Cast <WSDLOperation>().FirstOrDefault(o => WSDLHelpers.TrimNamespace(o.InputMessage) == message);

            return(result);
        }
Exemple #3
0
        /// <summary>
        /// Finds an operation by its parameter name
        /// </summary>
        /// <param name="input">The name of the </param>
        /// <returns></returns>
        public WSDLOperation FindOperationByParameter(string parameter)
        {
            WSDLOperation result = null;

            if (parameter.Contains("SoapIn"))
            {
                result = Operations.Cast <WSDLOperation>().First(o => WSDLHelpers.TrimNamespace(o.Input) == parameter);
            }
            else if (parameter.Contains("SoapOut"))
            {
                result = Operations.Cast <WSDLOperation>().First(o => WSDLHelpers.TrimNamespace(o.Output) == parameter);
            }

            return(result);
        }