Wireless sensor networks (WSN) have attracted an increasing attention, therefore, the number of WSN deployments is expected to grow rapidly in the near future. Sensors can be deployed in various environments to monitor and collect information. Most current research is interests in the application layer to develop a WSN with various applications. In this paper we design an application-layer approach for a WebService Gateway to interact with WSN. In our proposed architecture, the gateway manages the service consumption. This architecture intended to support heterogeneous WSN protocols.