このサンプルでは、地球上の特定の日付と位置に対応した日の出と日没のそれぞれの時刻を計算する Solar パターンを作成します。
日付は、WebSphere MQ XML メッセージで用意し、位置は、パターン・ユーザーが Solar パターンを使用してインスタンスを生成するときに指定します。パターンの各インスタンスで、位置変数を指定することになります。
出力は、以下の詳細が含まれている WebSphere MQ XML メッセージです。
Solar Pattern Authoring サンプルを使用して、以下のパターン・オーサリング機能のデモを実行します。
このサンプルでは 1 つのメッセージ・フローが使用され、以下のアクションが取り上げられます。
<?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>