某些調解基本元素會使用「服務訊息物件 (SMO)」的 XML 序列。
訊息日誌程式和 XSLT 調解基本元素會使用 SMO 的 XML 序列。
「訊息日誌程式」調解基本元素會記載 SMO 的 XML 序列。XSLT 調解基本元素會使用 XSLT 1.0 轉換來轉換訊息。轉換會操作 SMO 的 XML 序列。如果您需要瞭解由「訊息日誌程式」記載的資料, 或是撰寫會操作 XML 序列的 XSL 轉換,則您應該知道 SMO 表示成 XML 的方法。
一般而言, SMO 會有標頭資料、環境定義資訊,以及含有訊息有效負載的主體。訊息有效負載是服務端點之間交換的應用程式資料。標頭資料是固定結構;環境定義資料的結構部分是固定的, 部分則是由流程設計人員來定義。主體的結構是參照 WSDL 定義之來定義的。
「訊息日誌程式」和 XSLT 調解基本元素可指定序列的根, 而 XML 文件的根元素則會反映這個根。
一般而言,根元素在 SMO 結構中會在選定的根之後命名, 且位於預設名稱空間中。不過,如果在調解基本元素中選擇 / 作為根來將整個 SMO 序列化, 則根元素的名稱為 smo 且位於 SMO 名稱空間中。
<?xml version="1.0" encoding="UTF-8"?> <smo:smo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:accounts="urn://www.example.com/accounts" xmlns:smo="http://www.ibm.com/websphere/sibx/smo/v6.0.1"> <context> <correlation xsi:type="accounts:CorrelateByAgentId"> <agentid>SMI537654-2</agentid> </correlation> <transient xsi:type="accounts:ExchangeRate"> <from>GBP</from> <to>USD</to> <multiplier>1.74068</multiplier> </transient> </context> <headers> <SMOHeader> <MessageUUID>b048778f-0701-0000-0080-80c5b8a4d8b8</MessageUUID> <Version> <Version>6</Version> <Release>0</Release> <Modification>1</Modification> </Version> </SMOHeader> </headers> <body xsi:type="accounts:processPaymentRequestMsg"> <processPayment> <agentid>SMI537654-2</agentid> <priority>2</priority> <payment> <value>415.26</value> <currency>USD</currency> <date>2005-01-16Z</date> <account>546219G</account> </payment> </processPayment> </body> </smo:smo>
<?xml version="1.0" encoding="UTF-8"?> <body xsi:type="accounts:processPaymentRequestMsg" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:accounts="urn://www.example.com/accounts"> <processPayment> <agentid>SMI537654-2</agentid> <priority>2</priority> <payment> <value>415.26</value> <currency>USD</currency> <date>2005-01-16Z</date> <account>546219G</account> </payment> </processPayment> </body>
一般而言,XML 序列的主體是由 WSDL 訊息的參照所定義。