Menu
- General Information
- Architecture :
- Services & Processes
- CookBooks
- Deployment
- Bundled Applications
- Source Code :
- Third-Party Setup :
- Polytech Staff Area :
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.
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"/>
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"/>