WeatherProxy

Overview

From a given city identification code, this orchestration asks our WeatherBug partner to retrieve weather information about this city. It returns the live weather condition and a 7 days forecast for the given city.

Architectural Description

Business Process Description

Request

The orchestration receives a cityCode (xsd:string) inside its input message. The code must be a valid WeatherBug city identifier code.

<xsd:complexType name="WeatherProxyIn">
  <xsd:sequence>
    <xsd:element name="CityCode" type="xsd:string"/>
  </xsd:sequence>
</xsd:complexType>
<xsd:element name="WeatherProxyRequest" type="tns:WeatherProxyIn"/>

Response

The orchestration defines a first business object model to represent live weather conditions. This model is a simplified flavor of the original WeatherBug LiveData model (available here, look for the LiveWeatherData xsd:complexType).

<xsd:complexType name="LiveWeather">
  <xsd:sequence>
    <xsd:element name="station"       type="xsd:string"/>
    <xsd:element name="pressure"      type="xsd:float"/>
    <xsd:element name="rain"          type="xsd:float"/>
    <xsd:element name="windSpeed"     type="xsd:int"/>
    <xsd:element name="windDirection" type="xsd:string"/>
    <xsd:element name="icon"          type="xsd:string"/>
    <xsd:element name="minTemp"       type="xsd:float"/>
    <xsd:element name="maxTemp"       type="xsd:float"/>
    <xsd:element name="temp"          type="xsd:float"/>
  </xsd:sequence>
</xsd:complexType>

A more simple representation is used for forecasts:

<xsd:complexType name="ForecastWeather">
  <xsd:sequence>
    <xsd:element name="maxTemp" type="xsd:float"/>
    <xsd:element name="minTemp" type="xsd:float"/>
    <xsd:element name="icon"    type="xsd:string"/>
  </xsd:sequence>
  <xsd:attribute name="day" type="xsd:string"/>
</xsd:complexType>

So, a Weather information for a city is basicaly defined as a live condition and a set of forecasts:

<xsd:complexType name="WeatherInformation">
  <xsd:sequence>
    <xsd:element name="live"     type="tns:LiveWeather"/>
    <xsd:element name="forecast" type="tns:ForecastWeather" minOccurs="0" maxOccurs="unbounded" />
  </xsd:sequence>
</xsd:complexType>

And, finally, the response message contains a WeatherInformation as output:

<xsd:complexType name="WeatherProxyOut">
  <xsd:sequence>
    <xsd:element name="return" type="tns:WeatherInformation"/>
  </xsd:sequence>
</xsd:complexType>
<xsd:element name="WeatherProxyResponse" type="tns:WeatherProxyOut"/>

Download

services/orch/weatherproxy.txt · Last modified: 2009/03/12 14:14 by mosser
CC Attribution-Noncommercial-Share Alike 3.0 Unported www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0