Я создал сервис в dss и он работает. Проблема в том, что я получаю вывод как:
<cir_registryCollection xmlns="http://cts.falcon/cir">
<cir_getRegistryData>
<ID>AamProp_721</ID>
<Description>its really tough to do this</Description>
<ID>AamProp_721</ID>
<SourceID>AamPublic_134</SourceID>
<Description>its really tough to do this</Description>
<ISO15926ReferenceURI>[email protected]</ISO15926ReferenceURI>
<Registry_ID>Book_112</Registry_ID>
</cir_getRegistryData>
</cir_registryCollection>
но я хочу, чтобы мой вывод был следующим:
<cir_registryCollection xmlns="http://cts.falcon/cir">
<cir_getRegistryData>
<ID>AamProp_721</ID>
<Description>its really tough to do this</Description>
</cir_getRegistryData>
<cir_getCategoryData>
<ID>AamProp_721</ID>
<SourceID>AamPublic_134</SourceID>
<Description>its really tough to do this</Description>
<ISO15926ReferenceURI>[email protected]</ISO15926ReferenceURI>
<Registry_ID>Book_112</Registry_ID>
</cir_getCategoryData>
</cir_registryCollection>
как достичь этой структуры с помощью выходного отображения? с нетерпением жду ваших ответов. Заранее спасибо.
Вышеупомянутая вещь сделана, но есть проблема? У меня есть служба DSS как:
<data name="cir_GetAllRegistry_DataService" serviceNamespace="http://cts.falcon/cir">
<description>select all data from all tables </description>
<config id="Cir_DataSource">
<property name="carbon_datasource_name">CIR_MySQL_DB</property>
</config>
<query id="select_all_cir_table_query" useConfig="Cir_DataSource">
<sql>select r.ID,r.Description,c.ID,c.SourceID,c.Description,c.ISO15926ReferenceURI,c.Registry_ID from cir_registry r join cir_category c on r.ID=c.Registry_ID;</sql>
<result element="Entries" rowName="Entry">
<element column="ID" name="ID" xsdType="string"/>
<element column="Description" name="Description" xsdType="string"/>
<element column="ID" name="ID" xsdType="string"/>
<element column="SourceID" name="SourceID" xsdType="string"/>
<element column="Description" name="Description" xsdType="string"/>
<element column="ISO15926ReferenceURI" name="ISO15926ReferenceURI" xsdType="string"/>
<element column="Registry_ID" name="Registry_ID" xsdType="string"/>
</result>
</query>
<operation name="select_all_cir_table_operation">
<description>selects all table data in case of no data passed </description>
<call-query href="select_all_cir_table_query"/>
</operation>
</data>
У меня есть идентификатор имени столбца, одинаковый для таблицы cir_registry и таблицы cir_category. Поскольку оба имеют одинаковое имя, мое значение каждый раз перезаписывается. Итак, как однозначно указать идентификатор столбца реестра и таблицы категорий?