Ejemplo n.º 1
0
 /// <summary>
 /// Create a new SOAP dispatch.
 /// </summary>
 /// <param name="Description">A description for this SOAP dispatch.</param>
 /// <param name="Matcher">A delegate to check if this dispatch applies.</param>
 /// <param name="BodyDelegate">A HTTP/SOAP delegate to invoke this dispatch.</param>
 public SOAPDispatch(String Description,
                     SOAPMatch Matcher,
                     SOAPBodyDelegate BodyDelegate)
 {
     this._Description  = Description;
     this._Matcher      = Matcher;
     this._BodyDelegate = BodyDelegate;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new SOAP dispatch.
 /// </summary>
 /// <param name="Description">A description for this SOAP dispatch.</param>
 /// <param name="Matcher">A delegate to check if this dispatch applies.</param>
 /// <param name="BodyDelegate">A HTTP/SOAP delegate to invoke this dispatch.</param>
 public SOAPDispatch(String            Description,
                     SOAPMatch         Matcher,
                     SOAPBodyDelegate  BodyDelegate)
 {
     this._Description   = Description;
     this._Matcher       = Matcher;
     this._BodyDelegate  = BodyDelegate;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Register a SOAP delegate.
        /// </summary>
        /// <param name="Hostname">The HTTP Hostname.</param>
        /// <param name="URITemplate">The URI template.</param>
        /// <param name="Description">A description of this SOAP delegate.</param>
        /// <param name="SOAPMatch">A delegate to check whether this dispatcher matches the given XML.</param>
        /// <param name="SOAPBodyDelegate">A delegate to process a matching SOAP request.</param>
        public void RegisterSOAPDelegate(HTTPHostname Hostname,
                                         String URITemplate,
                                         String Description,
                                         SOAPMatch SOAPMatch,
                                         SOAPBodyDelegate SOAPBodyDelegate)
        {
            SOAPDispatcher _SOAPDispatcher = null;

            // Check if there are other SOAP dispatchers at the given URI template.
            var _Handler = GetHandler(HTTPHostname.Any,
                                      URITemplate,
                                      HTTPMethod.POST,
                                      ContentTypes => SOAPContentType);

            if (_Handler == null)
            {
                _SOAPDispatcher = new SOAPDispatcher(URITemplate, SOAPContentType);
                _SOAPDispatchers.Add(URITemplate, _SOAPDispatcher);

                // Register a new SOAP dispatcher
                AddMethodCallback(Hostname,
                                  HTTPMethod.POST,
                                  URITemplate,
                                  SOAPContentType,
                                  HTTPDelegate: _SOAPDispatcher.Invoke);

                // Register some information text for people using HTTP GET
                AddMethodCallback(Hostname,
                                  HTTPMethod.GET,
                                  URITemplate,
                                  SOAPContentType,
                                  HTTPDelegate: _SOAPDispatcher.EndpointTextInfo);
            }

            else
            {
                _SOAPDispatcher = _Handler.Target as SOAPDispatcher;
            }


            _SOAPDispatcher.RegisterSOAPDelegate(Description,
                                                 SOAPMatch,
                                                 SOAPBodyDelegate);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Register a SOAP delegate.
        /// </summary>
        /// <param name="Hostname">The HTTP Hostname.</param>
        /// <param name="URITemplate">The URI template.</param>
        /// <param name="Description">A description of this SOAP delegate.</param>
        /// <param name="SOAPMatch">A delegate to check whether this dispatcher matches the given XML.</param>
        /// <param name="SOAPBodyDelegate">A delegate to process a matching SOAP request.</param>
        public void RegisterSOAPDelegate(HTTPHostname      Hostname,
                                         String            URITemplate,
                                         String            Description,
                                         SOAPMatch         SOAPMatch,
                                         SOAPBodyDelegate  SOAPBodyDelegate)
        {
            SOAPDispatcher _SOAPDispatcher = null;

            // Check if there are other SOAP dispatchers at the given URI template.
            var _Handler = GetHandler(HTTPHostname.Any,
                                      URITemplate,
                                      HTTPMethod.POST,
                                      ContentTypes => SOAPContentType);

            if (_Handler == null)
            {

                _SOAPDispatcher = new SOAPDispatcher(URITemplate, SOAPContentType);
                _SOAPDispatchers.Add(URITemplate, _SOAPDispatcher);

                // Register a new SOAP dispatcher
                AddMethodCallback(Hostname,
                                  HTTPMethod.POST,
                                  URITemplate,
                                  SOAPContentType,
                                  HTTPDelegate: _SOAPDispatcher.Invoke);

                // Register some information text for people using HTTP GET
                AddMethodCallback(Hostname,
                                  HTTPMethod.GET,
                                  URITemplate,
                                  SOAPContentType,
                                  HTTPDelegate: _SOAPDispatcher.EndpointTextInfo);

            }

            else
                _SOAPDispatcher = _Handler.Target as SOAPDispatcher;

            _SOAPDispatcher.RegisterSOAPDelegate(Description,
                                                 SOAPMatch,
                                                 SOAPBodyDelegate);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Register a SOAP delegate.
        /// </summary>
        /// <param name="Description">A description of this SOAP delegate.</param>
        /// <param name="SOAPMatch">A delegate to check whether this dispatcher matches the given XML.</param>
        /// <param name="SOAPBodyDelegate">A delegate to process a matching SOAP request.</param>
        public void RegisterSOAPDelegate(String            Description,
                                         SOAPMatch         SOAPMatch,
                                         SOAPBodyDelegate  SOAPBodyDelegate)
        {

            _SOAPDispatches.Add(new SOAPDispatch(Description, SOAPMatch, SOAPBodyDelegate));

        }
Ejemplo n.º 6
0
 /// <summary>
 /// Register a SOAP delegate.
 /// </summary>
 /// <param name="Description">A description of this SOAP delegate.</param>
 /// <param name="SOAPMatch">A delegate to check whether this dispatcher matches the given XML.</param>
 /// <param name="SOAPBodyDelegate">A delegate to process a matching SOAP request.</param>
 public void RegisterSOAPDelegate(String Description,
                                  SOAPMatch SOAPMatch,
                                  SOAPBodyDelegate SOAPBodyDelegate)
 {
     _SOAPDispatches.Add(new SOAPDispatch(Description, SOAPMatch, SOAPBodyDelegate));
 }