Defining the Request and Response MDCs
The <request/>
within a multi-request service should be the name of a custom MATRIXX Data Container (MDC) that holds all
input for the multi-request. The <response/>
within a multi-request service should be the name of acustom MATRIXX Data Container (MDC) that holds all output for the multi-request.
The following example creates a request MDC (AcmeRequestProvision) and a response MDC (AcmeResponseProvision).
<container id='AcmeRequestProvision'>
<doc_description>
A container for a multirequest service that creates a user, a subscription,
a device, and purchase offers atomically.
</doc_description>
<created_schema_version>5280</created_schema_version>
<base_container id='5280'>MtxRequest</base_container>
<field id='User'>
<created_schema_version>5280</created_schema_version>
<doc_description>The user to create.</doc_description>
<datatype>struct</datatype>
<struct_id>MtxRequestUserCreate</struct_id>
</field>
<field id='Subscription'>
<created_schema_version>5280</created_schema_version>
<doc_description>The subscriber to create.</doc_description>
<datatype>struct</datatype>
<struct_id>MtxRequestSubscriptionCreate</struct_id>
</field>
<field id='Device'>
<created_schema_version>5280</created_schema_version>
<doc_description>The device to create.</doc_description>
<datatype>struct</datatype>
<struct_id>MtxRequestDeviceCreate</struct_id>
</field>
<field id='GroupBA'>
<created_schema_version>5280</created_schema_version>
<doc_description>The user to create.</doc_description>
<datatype>struct</datatype>
<struct_id>MtxRequestGroupCreate</struct_id>
</field>
<field id='GroupRA'>
<created_schema_version>5280</created_schema_version>
<doc_description>The user to create.</doc_description>
<datatype>struct</datatype>
<struct_id>MtxRequestGroupCreate</struct_id>
</field>
<field id='PaymentMethod'>
<created_schema_version>5280</created_schema_version>
<doc_description>Optional payment method for a subscriber in engine / payment gateway.</doc_description>
<datatype>struct</datatype>
<struct_id>MtxRequestSubscriberAddPaymentMethod</struct_id>
</field>
<field id='SubscriberOfferPurchase'>
<doc_description>optional subscriber purchases.</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxRequestSubscriberPurchaseOffer</struct_id>
</field>
</container>
<container id='AcmeResponseProvision'>
<doc_description>A custom response object for creating subscriber and device.</doc_description>
<created_schema_version>5280</created_schema_version>
<base_container id='5051'>MtxResponseCreate</base_container>
<field id='UserResponse'>
<doc_description>user response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponseCreate</struct_id>
</field>
<field id='SubscriptionResponse'>
<doc_description>subscription response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponseCreate</struct_id>
</field>
<field id='DeviceResponse'>
<doc_description>device response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponseCreate</struct_id>
</field>
<field id='AddDeviceResponse'>
<doc_description>add device response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='AddSubscriptionResponse'>
<doc_description>add subscription to user response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='GroupBAResponse'>
<doc_description>response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='GroupRAResponse'>
<doc_description>response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='GroupBAMemberResponse'>
<doc_description>response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='GroupRAMemberResponse'>
<doc_description>response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='PaymentResponse'>
<doc_description>response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
<field id='PurchaseResponse'>
<doc_description>response</doc_description>
<datatype>struct</datatype>
<created_schema_version>5280</created_schema_version>
<struct_id>MtxResponse</struct_id>
</field>
</container>
<container_relationship id='op_return_type'>
<relationship id='AcmeRequestProvision'>
<target_container>AcmeResponseProvision</target_container>
</relationship>
</container_relationship>
</configuration>
The request definition in the service is:
<request>AcmeRequestProvision</request>
The response definition in the service is:
<response>AcmeResponseProvision</response>