This sample creates a Solar pattern to calculate various sunrise and sunset times for a specific date and position on Earth.
The date is supplied in a WebSphere MQ XML message, and the position is specified when the Solar pattern is used by the pattern user to generate an instance. Each instance of the pattern has the position variable specified.
The output is a WebSphere MQ XML message containing the following details:
The Solar Pattern Authoring sample is used to demonstrate the following pattern authoring capabilities:
This sample uses one message flow and covers the following actions:
<?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://caspian.hursley.ibm.com" xmlns:solar="http://caspian.hursley.ibm.com" elementFormDefault="qualified"> <element name="sun"> <complexType> <sequence> <element name="dateQuery" type="date"/> <element name="sunEventTime" minOccurs="0" maxOccurs="1"> <complexType> <sequence> <element name="sunrise" type="date"/> <element name="sunset" type="date"/> <element name="transit" type="date"/> <element name="civil_twilight_begin" type="date"/> <element name="civil_twilight_end" type="date"/> <element name="nautical_twilight_begin" type="date"/> <element name="nautical_twilight_end" type="date"/> <element name="astronomical_twilight_begin" type="date"/> <element name="astronomical_twilight_end" type="date"/> </sequence> </complexType> </element> </sequence> </complexType> </element> </schema>
<?xml version="1.0" encoding="UTF-8"?> <solar:sun xmlns:solar="http://caspian.hursley.ibm.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://caspian.hursley.ibm.com solar.xsd"> <solar:dateQuery>2010-04-15</solar:dateQuery> </solar:sun>