## Class server

zeep::server

## Synopsis

    // In header: </home/maarten/projects/libzeep/zeep/server.hpp>

    class server : public zeep::dispatcher, public zeep::http::server {
    public:
      // construct/copy/destruct
      server(const std::string &, const std::string &);

      // public member functions
      void bind(const std::string &, unsigned short);
      void set_location(const std::string &);

      // protected member functions
      void handle_request(const http::request &, http::reply &);
    };

## Description

zeep::server inherits from zeep::http::server and zeep::dispatcher to do its work. You construct a new server object by passing in a namespace in the ns parameter and a service name in the service parameter.

If the server is behind a proxy, you'll also need to call set_location to specify the external address of your server.

### `server` public construct/copy/destruct

1.     server(const std::string & ns, const std::string & service);

   The constructor takes two arguments

   Parameters: |
   `ns` | The namespace as used for the WSDL and SOAP messages
   `service` | The service name for this server

### `server` public member functions

1.     void bind(const std::string & address, unsigned short port);

   Calls `zeep::http::server` and sets m_location if it wasn't already specified.

2.     void set_location(const std::string & location);

   If your server is located behind a reverse proxy, you'll have to specify the address where it can be found by clients. If you don't, the WSDL will contain an unreachable address.

   Parameters: |
   `location` | The URL that specifies the external address of this server.

### `server` protected member functions

1.     void handle_request(const http::request & req, http::reply & rep);