Greetings,
I'm using v1.2.1 to unmarshal an xml to its java object and I always get the
following error.
Expected "{http://example.com}VerDTD" start tag, found
"{http://example.com}VerDTD" end tag (line 1, col 152)
Actually, at line 1, col 152, is </VerDTD>.
So, jibx finds the </VerDTD> tag correctly but, for some reason, thinks it
should be <VerDTD> rather than </VerDTD>.
A segment of the binding.xml wrt the VerDTD tag is in red below.
<mapping class="com.example.SyncHdr" name="SyncHdr">
<structure type="com.example.VerDTD" get-method="getVerDTD"
set-method="setVerDTD"/>
<structure type="com.example.VerProto" get-method="getVerProto"
set-method="setVerProto"/>
<structure type="com.example.SessionID" get-method="getSessionID"
set-method="setSessionID"/>
<structure type="com.example.MsgID" get-method="getMsgID"
set-method="setMsgID"/>
<structure type="com.example.Target" get-method="getTarget"
set-method="setTarget"/>
<structure type="com.example.Source" get-method="getSource"
set-method="setSource"/>
<structure type="com.example.RespURI" get-method="getRespURI"
set-method="setRespURI" usage="optional"/>
<structure type="com.example.NoResp" get-method="getNoResp"
set-method="setNoResp" usage="optional"/>
<structure type="com.example.Cred" get-method="getCred"
set-method="setCred" usage="optional"/>
<structure type="com.example.Meta" get-method="getMeta"
set-method="setMeta" usage="optional"/>
</mapping>
A segment of xml for this binding is:
<SyncHdr>
<VerDTD>1.1</VerDTD>
<VerProto>SyncML/1.1</VerProto>
<SessionID>1</SessionID>
<MsgID>1</MsgID>
<Target>
<LocURI>/</LocURI>
</Target>
<Source>
<LocURI>GSM Remote ML</LocURI>
</Source>
</SyncHdr>
The Java class, SyncHdr looks good to me, too.
public class SyncHdr
{
private VerDTD verDTD;
private VerProto verProto;
private SessionID sessionID;
private MsgID msgID;
private Target target;
private Source source;
private RespURI respURI;
private NoResp noResp;
private Cred cred;
private Meta meta;
/**
* getters and setters
*/
}
I'm still new to jibx and have been fighting with this problem for 2 days
after googling around for a resolution. Please help!! Thanks!
Cheers,
Peter
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users