wso2dss - how to create Output mapping in wso2 DSS to achieve below structure? -


i have created service in dss , working. problem getting output :

<cir_registrycollection xmlns="http://cts.falcon/cir">  <cir_getregistrydata>   <id>aamprop_721</id>   <description>its tough this</description>   <id>aamprop_721</id>   <sourceid>aampublic_134</sourceid>   <description>its tough this</description>   <iso15926referenceuri>arya2publication@books.com</iso15926referenceuri>   <registry_id>book_112</registry_id> </cir_getregistrydata> </cir_registrycollection> 

but want output :

<cir_registrycollection xmlns="http://cts.falcon/cir">      <cir_getregistrydata>       <id>aamprop_721</id>       <description>its tough this</description> </cir_getregistrydata> <cir_getcategorydata> <id>aamprop_721</id>       <sourceid>aampublic_134</sourceid>       <description>its tough this</description>       <iso15926referenceuri>arya2publication@books.com</iso15926referenceuri>       <registry_id>book_112</registry_id> </cir_getcategorydata>         </cir_registrycollection> 

how achieve structure using output mapping? looking forward answers. in advance.

the above thing done there problem? have dss service as:

<data name="cir_getallregistry_dataservice" servicenamespace="http://cts.falcon/cir">    <description>select data tables                          &#13;                                &#13;                                &#13;                                &#13;                                &#13;                                &#13;                                </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 cir_registry r join cir_category c&#13;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 table data in case of no data passed                              &#13;                                    </description>       <call-query href="select_all_cir_table_query"/>    </operation> </data> 

i have column name id same table cir_registry cir_category table. since both have same name, value everytime gets overwritten. how refrence column id of registry , category table uniquely?

in dss, have ability create complex output elements, is, can nest information arbitrary xml structure, check [1] more information.

[1] http://docs.wso2.org/wiki/display/dss301/complex+elements

cheers, anjana.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -