|
Thanks and Regards, Jitesh I have to introduce wrapper class TMLoggerList to
have Map of TMLogger to avoid using location.
XML before and after unmarshalling and marshalling
resp is same as below.
---------------------------------------------------------------------------------------------------------------------------
logger.xml
-----------------
<?xml version="1.0"
encoding="UTF-8"?>
<tmsettings xmlns="http://www.ne.jp/method" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ne.jp/method ./settings.xsd"> <logging> <logger name="tmcompiler" boundrylevel="5"/> <logger name="tmclient" boundrylevel="10"/> <logger name="tmwebapp" boundrylevel="15"/> </logging> </tmsettings> ---------------------------------------------------------------------------------------------------------------------------
mapping.xml
---------------------
<?xml version="1.0"?>
<ca:mapping xmlns:ca="http://castor.exolab.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://castor.exolab.org/ mapping.xsd"> <ca:class
name="TMSettings">
<ca:map-to xml="tmsettings" ns-uri="http://www.ne.jp/method" /> <ca:field name="loggerList" type="TMLoggerList"> <ca:bind-xml name="logging" /> </ca:field> </ca:class> <ca:class
name="TMLoggerList">
<ca:map-to xml="logging" ns-uri="http://www.ne.jp/method" /> <ca:field name="loggerList" collection="map" get-method="getLoggerList" set-method="addLogger" type="TMLogger"> <ca:bind-xml name="logger"/> </ca:field> </ca:class> <ca:class name="TMLogger"> <ca:map-to xml="logger" ns-uri="http://www.ne.jp/method" /> <ca:field name="name" type="string"> <ca:bind-xml name="name" node="attribute"/> </ca:field> <ca:field name="boundryLevel" type="string"> <ca:bind-xml name="boundrylevel" node="attribute"/> </ca:field> </ca:class>
</ca:mapping>
---------------------------------------------------------------------------------------------------------------------------
|

