Hi,
I am new in java mapping.
I want to do a file to proxy scenario , where 2 different types of xml files (only difference of 2 tags)will come. Files are as follow -
File 1 :
<?xml version="1.0" standalone="yes" ?>
<ns0:DTRDeltaChange xmlns:ns0="urn:ne.rapdrp.gis.DTRDeltachange">
<DocumentElement>
<DELTA_CHANGE_IN_NETWORK_TABLE>
<ASSET>CHANGE</ASSET>
<ASSET_TYPE>DTR</ASSET_TYPE>
<NETWORK_TYPE>RADIAL</NETWORK_TYPE>
<ASSET_CHANGE_DATE />
<SSID>7208028101</SSID>
<FEEDERID>ITI 11 KV</FEEDERID>
<DTRID>128150000000000006</DTRID>
<DTR_LONG_CODE>7208028006</DTR_LONG_CODE>
<VOLTAGE_LEVEL />
<LOCATION_CODE>ETDC</LOCATION_CODE>
<METER_NUMBER />
<PROCESS_FLAG>N</PROCESS_FLAG>
<DISCOM>2</DISCOM>
</DELTA_CHANGE_IN_NETWORK_TABLE>
</DocumentElement>
</ns0:DTRDeltaChange>
File 2 :
<?xml version="1.0" standalone="yes" ?>
<ns0:MeterDeltaChange xmlns:ns0="urn:ne.rapdrp.gis.MeterDeltachange">
<DocumentElement>
<DELTA_CHANGE_IN_NETWORK_TABLE>
<ASSET>CHANGE</ASSET>
<ASSET_TYPE>METER</ASSET_TYPE>
<NETWORK_TYPE>RADIAL</NETWORK_TYPE>
<ASSET_CHANGE_DATE />
<SSID />
<FEEDERID />
<DTRID>128150000000000006</DTRID>
<DTR_LONG_CODE />
<VOLTAGE_LEVEL />
<LOCATION_CODE />
<OLD_METER_NUMBER>TSE 01854</OLD_METER_NUMBER>
<NEW_METER_NUMBER>TSE 01854</NEW_METER_NUMBER>
<PROCESS_FLAG>N</PROCESS_FLAG>
<DISCOM>2</DISCOM>
</DELTA_CHANGE_IN_NETWORK_TABLE>
</DocumentElement>
</ns0:MeterDeltaChange>
I want to do a java mapping which will check whether <ASSET_TYPE> field value is DTR or METER and accordingly it will create the corresponding target xml.
Please tell me what have to be created (i.e: data type message type etc) on sender and receiver side and what will be exact java code.
Thanks,
Apu