[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jibx-users
Subject:    [jibx-users] Jibx mapping suggestions for HashMap please ...
From:       "Sandeep Khanna" <sandeep.khanna () villanova ! edu>
Date:       2006-01-09 18:25:27
Message-ID: 1136831127.21394.17.camel () voyager ! the-khannas ! com
[Download RAW message or body]

Hi All,

Can someone suggest the proper mapping definition for the following
HashMap XML representation:

<?xml version="1.0" encoding="UTF-8"?>
<AsClient>
    <ClientGUID/>
    <Sex>M</Sex>
    <DateOfBirth>1970-01-01T00:00:00.000-05:00</DateOfBirth>
    <TypeCode>02</TypeCode>
    <TaxID>999-99-9999</TaxID>
    <FirstName>Sandeep</FirstName>
    <MiddleInitial>T</MiddleInitial>
    <LastName>Khanna</LastName>
    <Fields>
        <AsClientField>
            <key>PhoneType4</key>
            <value>
                <ClientGUID/>
                <FieldName>PhoneType4</FieldName>
                <TextValue>00</TextValue>
                <FieldTypeCode>02</FieldTypeCode>
            </value>
        </AsClientField>
        <AsClientField>
            <key>PhoneNumber3</key>
            <value>
                <ClientGUID/>
                <FieldName>PhoneNumber3</FieldName>
                <FieldTypeCode>02</FieldTypeCode>
            </value>
        </AsClientField>
    </Fields>
</AsClient>

What I got so far is:

<?xml version="1.0" encoding="UTF-8"?>
<binding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="file:/home/sandeepk/Download/jibx/docs/binding.xsd">
    <!--
=================================================================== -->
    <!--   Mapping for class com.adminserver.dcl.ClientDcl  -->
    <!--
=================================================================== -->
    <mapping name="AsClient" class="com.adminserver.dcl.ClientDcl"
ordered="false">
        <value get-method="getClientGuid" set-method="setClientGuid"
name="ClientGUID"
            style="element" usage="optional"/>
        <value get-method="getSex" set-method="setSex" name="Sex"
style="element" usage="optional"/>
        <value get-method="getDateOfBirth" set-method="setDateOfBirth"
name="DateOfBirth"
            style="element" usage="optional"/>
        <value get-method="getEmail" set-method="setEmail" name="Email"
style="element" usage="optional"/>
        <value get-method="getDateOfDeath" set-method="setDateOfDeath"
name="DateOfDeath"
            style="element" usage="optional"/>
        <value get-method="getTypeCode" set-method="setTypeCode"
name="TypeCode" style="element" usage="optional"/>
        <value get-method="getTaxId" set-method="setTaxId" name="TaxID"
style="element" usage="optional"/>
        <value get-method="getFirstName" set-method="setFirstName"
name="FirstName" style="element" usage="optional"/>
        <value get-method="getMiddleInitial"
set-method="setMiddleInitial" name="MiddleInitial"
            style="element" usage="optional"/>
        <value get-method="getCompanyName" set-method="setCompanyName"
name="CompanyName"
            style="element" usage="optional"/>
        <value get-method="getLastName" set-method="setLastName"
name="LastName" style="element" usage="optional"/>
        <structure get-method="getFields" set-method="setFields"
name="Fields"
            marshaller="com.adminserver.utl.JibxHashMapHandler"
            unmarshaller="com.adminserver.utl.JibxHashMapHandler"
usage="optional">            
        </structure>
    </mapping>
    <!--
=================================================================== -->
    <!--   Mapping for class com.adminserver.dcl.ClientFieldDcl  -->
    <!--
=================================================================== -->
    <mapping name="AsClientField"
class="com.adminserver.dcl.ClientFieldDcl" ordered="false">
        <value get-method="getClientGuid" set-method="setClientGuid"
name="ClientGUID"
            style="element" usage="optional"/>
        <value get-method="getFieldName" set-method="setFieldName"
name="FieldName" style="element" usage="optional"/>
        <value get-method="getTextValue" set-method="setTextValue"
name="TextValue" style="element" usage="optional"/>
        <value get-method="getFieldTypeCode"
set-method="setFieldTypeCode" name="FieldTypeCode"
            style="element" usage="optional"/>
    </mapping>
</binding>

Any help would be appreciated.

--Sandeep Khanna



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic