While Wireless Sensor Networks (WSN) are starting to become more popular and used for many applications, developing these applications is still not a trivial task due to many technical challenges such as limited hardware capabilities, communication, and energy resources; high heterogeneity; security; and quality of service (QoS) issues. Recently Service-Oriented Middleware (SOM) has become a preferred platform for developing WSN applications over the more traditional development platforms to help address these challenges. SOM logically views WSN as a service provider for user applications. The SOM provides abstractions for the complex underlying WSN infrastructure through a set of services needed by the WSN applications. These services can be data aggregation, adaptation, security, self-organization, reliability, and management services. This paper surveys the current SOM solutions for WSN. The paper discusses the trends and challenges of designing and developing these solutions for WSN.