I'm trying to use a webservice in my Oracle Application. In my Pl/SQL procedure i have an out parameter of type refcursor
PROCEDURE LISTE_FOURNISSEUR (liste_fournisseurs out SYS_REFCURSOR)
But when i call the webservice i get the response in this format
<LISTE_FOURNISSEURS>
<Row>
<Column name="CODE_FOURNISSEUR" sqltype="VARCHAR2">1</Column>
<Column name="VENDOR_NAME" sqltype="VARCHAR2">IAM</Column>
<Column name="ICE" sqltype="VARCHAR2">1</Column>
<Column name="NIF" sqltype="VARCHAR2">1</Column>
<Column name="RC" sqltype="VARCHAR2">1</Column>
<Column name="ADDRESS_LINE1" sqltype="VARCHAR2">Casa</Column>
<Column name="CODE_PORT" sqltype="NUMBER">101</Column>
<Column name="BANK_ACCOUNT_NUM" sqltype="VARCHAR2"></Column>
</Row>
<Row>
<Column name="CODE_FOURNISSEUR" sqltype="VARCHAR2">1</Column>
<Column name="VENDOR_NAME" sqltype="VARCHAR2">IAM</Column>
<Column name="ICE" sqltype="VARCHAR2">1</Column>
<Column name="NIF" sqltype="VARCHAR2">1</Column>
<Column name="RC" sqltype="VARCHAR2">1</Column>
<Column name="ADDRESS_LINE1" sqltype="VARCHAR2">Casa</Column>
<Column name="CODE_PORT" sqltype="NUMBER">141</Column>
<Column name="BANK_ACCOUNT_NUM" sqltype="VARCHAR2"></Column>
</Row>
</LISTE_FOURNISSEURS>
But i want my result to be as the following
<LISTE_FOURNISSEURS>
<FOURNISSEUR>
<CODE_FOURNISSEUR>1</CODE_FOURNISSEUR>
<VENDOR_NAME>IAM</VENDOR_NAME>
<ICE>1</ICE>
<NIF>1</NIF>
<RC>1</RC>
<CADDRESS_LINE1>Casa</CADDRESS_LINE1>
<CODE_PORT>101</CODE_PORT>
<BANK_ACCOUNT_NUM></BANK_ACCOUNT_NUM>
</FOURNISSEUR>
</LISTE_FOURNISSEURS>
The issue doesn't happen when i use other output parameters (Varchar2, number,...) Is there any way to get the wanted results
I'm guessing that you're using dbms_xmlgen to generate XML. So if that's the case then use following command to change default row tag name:
where ctx is your context initialized something like this: