Today' s broad coverage of mobile networks allows for large-scale environmental monitoring systems capable of warning citizens prior to an incident. In this paper, we present an embedded prototype system which collects environmental data and distributes them either using Web service protocols or using the JXTA Peer-to-Peer protocol stack. The complete system was implemented based on both protocol stacks in order to prove their applicability for a middleware solution in the field of sensor networks. The performance of both stacks is analyzed, utilizing an embedded sensor gateway node with a wireless GPRS connection. In case of the Web service approach standard XML-based SOAP messages as well as WAP binary XML (WBXML) based SOAP messages are examined and compared against the JXTA peer-to-peer protocol. Both the processing power of the embedded sensor gateway node and the throughput of the GPRS-based wireless communication channel are the major bottlenecks focused in this performance evaluation. In our scenario WBXML is the favorable approach for small sets of data being transmitted over the wireless link whereas JXTA is the favorable approach for large sets of data.