この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

アウトバウンドメッセージの WSDL

このトピックの残りの部分は、アウトバウンドメッセージの WSDL の関連セクションについて説明します。特定のオブジェクトの特定のイベントにアウトバウンドメッセージを設定した際に選択した内容によって、ご使用の WSDL は異なります。

notifications()

このセクションでは、notifications() コールを定義します。このコールは特定のオブジェクトの指定された項目および値を記載したアウトバウンドメッセージを作成し、指定されたエンドポイント URL に値を送信します。

1<schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" 
2         targetNamespace="http://soap.sforce.com/2005/09/outbound">
3            <import namespace="urn:enterprise.soap.sforce.com" />
4            <import namespace="urn:sobject.enterprise.soap.sforce.com" />
5    
6            <element name="notifications">
7                <complexType> 
8                    <sequence> 
9                        <element name="OrganizationId" type="ent:ID" />
10                        <element name="ActionId" type="ent:ID" />
11                        <element name="SessionId" type="xsd:string" nillable="true" />
12                        <element name="EnterpriseUrl" type="xsd:string" />
13                        <element name="PartnerUrl" type="xsd:string" />
14                        <element name="Notification" maxOccurs="100" 
15                          type="tns:OpportunityNotification" />
16                    </sequence> 
17                </complexType> 
18            </element>
19        </schema>

次の表で、notifications メソッドの定義で指定される要素について説明します。

名前 説明
OrganizationId ID メッセージを送信する組織の ID。
ActionId string メッセージをトリガするワークフロールール (アクション)。
SessionId string アウトバウンドメッセージに応答するエンドポイント URL クライアントが使用するセッション ID (省略可能)。Salesforce にコールバックする受信コードによって使用します。
EnterpriseURL string Enterprise WSDL を使用して Salesforce に API コールバックするために使用する URL。
PartnerURL string Partner WSDL を使用して Salesforce に API コールバックするために使用する URL。
Notification Notification 次のセクションで定義され、OpportunityNotification または ContactNotification など、オブジェクトデータ型と Id が指定されています。

Notification データ型は WSDL で定義されます。次の例では、notifications() コールの定義の Notification エントリに基づいて、商談の Notification が定義されます。

1<complexType name="OpportunityNotification">
2                <sequence>
3                    <element name="Id" type="ent:ID" />
4                    <element name="sObject" type="ens:Opportunity" />
5                </sequence>
6            </complexType>

各オブジェクト要素 (今回の例では商談) には、アウトバウンドメッセージを作成したときに選択した項目のサブセットが指定されます。各メッセージの Notification にはオブジェクト ID が指定され、すでに処理された通知の再送信を追跡するために使用される必要があります。

notificationsResponse

この要素は、確認応答 (ack) を Salesforce に送信するためのスキーマです。

1<element name="notificationsResponse">
2                <complexType>
3                    <sequence>
4                        <element name="Ack" type="xsd:boolean" />
5                    </sequence>
6                </complexType>
7            </element> //This section is the last in the types definition section.

複数の通知がある場合、メッセージ内ですべての通知を確認します。