You can request your own Vcard and get your name from the response when it was set before. See: http://xmpp.org/extensions/xep-0054.html
Example:
<iq id='get_vcard'
type='get'>
<vCard xmlns='vcard-temp'/>
</iq>
<iq id='get_vcard'
to='your_full_jid'
type='result'>
<vCard xmlns='vcard-temp'>
<FN>Your Full Name</FN>
<N>
<FAMILY>Familiy Name</FAMILY>
<GIVEN>Given Name</GIVEN>
<MIDDLE/>
</N>
<NICKNAME>nickname</NICKNAME>
</vCard>
</iq>