Hi:
Thank you for your kind reply. I changed the binding.xml file as you told me, however, problem remains.
It seems that the problem is not caused by SourceRef. Even if I delete the SourceRef from the DataStore, programme will tell me : org.jibx.runtime.JiBXException: Expected end tag, found start tag "{syncml:devinf}DisplayName".
Below I will paste the xml file and the binding.xml to make things clear:
xml file:
.........................................................
<DevInf xmlns='syncml:devinf'>
<VerDTD>1.1</VerDTD>
<Man>Big Factory, Ltd.</Man>
<Mod>4119</Mod>
<OEM>Jane's phones</OEM>
<FwV>2.0e</FwV>
<SwV>2.0</SwV>
<HwV>1.22I</HwV>
<DevID>1218182THD000001-2</DevID>
<DevTyp>phone</DevTyp>
<DataStore>
<SourceRef>./contacts</SourceRef>
<DisplayName>Phonebook</DisplayName>
<MaxGUIDSize>32</MaxGUIDSize>
<Rx-Pref>
<CTType>text/x-vcard </CTType>
<VerCT>2.1</VerCT>
</Rx-Pref>
<Tx-Pref>
<CTType>text/x-vcard</CTType>
<VerCT>2.1</VerCT>
</Tx-Pref>
</DataStore>
<CTCap>
<CTType>text/x-vcard</CTType>
<PropName>BEGIN</PropName>
<ValEnum>VCARD</ValEnum>
<PropName>END</PropName>
<ValEnum>VCARD</ValEnum>
<PropName>VERSION</PropName>
<ValEnum>2.1</ValEnum>
<PropName>N</PropName>
<PropName>TEL</PropName>
<ParamName>VOICE</ParamName>
<ParamName>CELL</ParamName>
</CTCap>
<SyncCap>
<SyncType>01</SyncType>
<SyncType>02</SyncType>
</SyncCap>
</DevInf>
.............................................................
The binding.xml file:
.............................................................
<mapping name="DevInf" field="devInf" class="com.syncml.framework.core.DevInf" ordered="false">
<namespace uri="syncml:devinf" default="elements"/>


<structure field="verDTD" class="com.syncml.framework.core.VerDTD" usage="optional">
<value name="VerDTD" field="value" usage="optional"/>
</structure>
<value name="Man" field="man" usage="optional"/>
<value name="Mod" field="mod" usage="optional"/>
<value name="OEM" field="oem" usage="optional"/>
<value name="FwV" field="fwV" usage="optional"/>
<value name="SwV" field="swV" usage="optional"/>
<value name="HwV" field="hwV" usage="optional"/>
<value name="DevID" field="devID" usage="optional"/>
<value name="DevTyp" field="devTyp" usage="optional"/>
<value name="UTC" field="utc" format="formatBoolean" usage="optional"/>
<value name="SupportLargeObjs" field="supportLargeObjs" format="formatBoolean" usage="optional"/>
<value name="SupportNumberOfChanges" field="supportNumberOfChanges" format="formatBoolean" usage="optional"/>


<collection field="datastores" item-type="com.syncml.framework.core.DataStore" usage="optional"/>
<collection field="ctCap" item-type="com.syncml.framework.core.CTCap" usage="optional"/>
<collection field="ext" item-type="com.syncml.framework.core.Ext" usage="optional"/>
</mapping>
..........................................................................
<mapping name="DataStore" field="datastores" class="com.syncml.framework.core.DataStore" ordered="false">
<structure field="sourceRef" class="com.syncml.framework.core.SourceRef" usage="optional">
<value name="SourceRef" field="value" usage="optional"/>
</structure>
<value name="DisplayName" field="displayName" usage="optional"/>
<value name="MaxGUIDSize" field="maxGUIDSize" usage="optional"/>
<structure name="Rx-Pref" field="rxPref" class="com.syncml.framework.core.ContentTypeInfo">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
<collection field="rx" usage="optional">
<structure name="Rx" value-style="element" type="com.syncml.framework.core.ContentTypeInfo" usage="optional">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
</collection>
<structure name="Tx-Pref" field="txPref" class="com.syncml.framework.core.ContentTypeInfo" usage="optional">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
<collection field="tx" usage="optional">
<structure name="Tx" value-style="element" type="com.syncml.framework.core.ContentTypeInfo">
<value name="CTType" field="ctType"/>
<value name="VerCT" field="verCT" />
</structure>
</collection>
<structure name="DSMem" field="dsMem" class="com.syncml.framework.core.DSMem" usage="optional">
<value name="SharedMem" field="sharedMem" format="formatBoolean" usage="optional"/>
<value name="MaxMem" field="maxMem" usage="optional"/>
<value name="MaxID" field="maxID" usage="optional"/>


</structure>
<structure name="SyncCap" field="syncCap" class="com.syncml.framework.core.SyncCap" usage="optional">
<collection field="syncTypes" item-type="com.syncml.framework.core.SyncType"/>
</structure>
</mapping>
......................................................................................


If, in the xml file, I cut alll the DataStore out, errors would go to the CTType, the same error, asking for end tag, found start tag. When I cut the xml file to :
<DevInf xmlns='syncml:devinf'>
<VerDTD>1.1</VerDTD>
<Man>Big Factory, Ltd.</Man>
<Mod>4119</Mod>
<OEM>Jane's phones</OEM>
<FwV>2.0e</FwV>
<SwV>2.0</SwV>
<HwV>1.22I</HwV>
<DevID>1218182THD000001-2</DevID>
<DevTyp>phone</DevTyp>
</DevInf>
The problem can go.
So I guess the problem lies in the binding.xml of:
<collection field="datastores" item-type="com.syncml.framework.core.DataStore" usage="optional"/>
<collection field="ctCap" item-type="com.syncml.framework.core.CTCap" usage="optional"/>
<collection field="ext" item-type="com.syncml.framework.core.Ext" usage="optional"/>
It seems that the collections caused the problem. So What changes can I make? And how the problem is arised?


I am almost mad at this, please help me!!
   Best regards.
   Liu Xin

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to