[xsd-users] Question about xml serialization
Akram Saye
akramsaye at yahoo.se
Fri Jan 30 06:57:47 EST 2009
Hello Boris!
I have a question about xml serialization.
My program worked find before. But I did not why “Segmentation Fault (core dumped)”
Or I get “4) AdjCtcService:: handle_input(): :11:31 error: Expected end of tag 'POSITION_TRACK'
Pure virtual function called”
When I run the debug it says:”
t at 3 (l at 3) terminated by signal ABRT (Abort)
0xfeec642c: __lwp_kill+0x0008: bcc,a,pt %icc,__lwp_kill+0x18 ! 0xfeec643c
Current function is xsd::cxx::xml::dom::serialize<char>
159 DOMImplementation* impl (
(dbx) where
current thread: t at 3
dbx: can't find definition for symbol 'namespace_infomap<char>
[1] __lwp_kill(0x0, 0x6, 0xfe989fcc, 0xad260, 0xfeef12d8, 0x0), at 0xfeec642c
[2] raise(0x6, 0x0, 0xfeef2e18, 0xfe989804, 0xffffffff, 0x6), at 0xfee64e14
[3] abort(0x149714, 0x1, 0xfe989fcc, 0xad260, 0xfeef12d8, 0x0), at 0xfee41198
[4] xercesc_2_8::DOMImplementationImpl::getDOMImplementation(0x149714, 0xfe57af1e, 0xfeb74d30, 0xfeb74d30, 0xa00, 0x800), at 0xfe989804
[5] xercesc_2_8::DOMImplementationRegistry::getDOMImplementation(0xfe57af1e, 0x126778, 0x0, 0xfe989904, 0x149718, 0xfeb8b22c), at 0xfe989fcc
=>[6] xsd::cxx::xml::dom::serialize<char>(el = CLASS, ns = CLASS, , line 159 in "serialization-source.txx"
[7] xsd::cxx::xml::dom::serialize<char>(root_element = 0x107bbe "TRAININFO", root_element_namespace = 0x107bc8 "", map = STRUCT, flags = 0), line 97 in "serialization-source.hxx"
[8] TRAININFO_(s = CLASS, m = STRUCT, f = CLASS), line 1370 in "TrainPositionInfo.cpp"
[9] TRAININFO_(o = CLASS, s = CLASS, m = STRUCT, e = CLASS, f = CLASS), line 1240 in "TrainPositionInfo.cpp"
[10] Eis::SystemModule::MysHandler::MysHandlerSerializeXmlMsg(this = 0x12ce10, msg = CLASS), line 186 in "MysHandler.cpp"”
In my MysHandler::MysHandlerSerializeXmlMsg function I have this code.
string MysHandler::MysHandlerSerializeXmlMsg(const Myclass& msg)
{
// Declare and initialize the Infomap for serialization.
xml_schema::namespace_infomap map;
//map[""].name = "http://www.bombardier.com/rcs/3NSS007094D0008";
map[""].schema = "../xml/test.xsd";
// Serialize.
std::ostringstream sxml;
try
{
//TRAININFO_( sxml,msg, map, "ISO8859-1");
TRAININFO_(sxml, msg, map, "utf-8");
}
catch (const xml_schema::no_namespace_mapping& e)
{
ACE_DEBUG
((LM_DEBUG, ACE_TEXT("(%t) MysHandler:: serializeMsg(): %s\n%s\n"),
e.namespace_().c_str(),
boost::lexical_cast<std::string>(e).c_str()
));
}
catch (const xml_schema::exception& e)
{
ACE_DEBUG
((LM_DEBUG, ACE_TEXT("(%t) MysHandler:: serializeMsg(): %s\n"),
boost::lexical_cast<std::string>(e).c_str()
));
}
// Return the resulting string.
return sxml.str();
}
Could you be nice and answer me where I do wrong.
I have no namespace in my xml file.
thank you for your answer.
__________________________________________________________
Ta semester! - sök efter resor hos Kelkoo.
Jämför pris på flygbiljetter och hotellrum här:
http://www.kelkoo.se/c-169901-resor-biljetter.html?partnerId=96914052
More information about the xsd-users
mailing list