Skip to Content.
Sympa Menu

mace-opensaml-users - RE: Creating an XMLObject - C++

Subject: OpenSAML user discussion

List archive

RE: Creating an XMLObject - C++


Chronological Thread 
  • From: "Brian Sheely" <>
  • To: <>
  • Subject: RE: Creating an XMLObject - C++
  • Date: Mon, 7 Jan 2008 13:55:45 -0800

You're right... I wasn't up to date (no pun intended). I think I've
figured out part of the problem. It seems that it's because the year is
2008 that DateTime::parseInt throws "Invalid non-numeric characters." If
I change the year to 2007 as shown below, no exception is thrown when I
later try to create an XMLObject. I can then cast the XMLObject to an
AuthnRequest object, but it doesn't return values that I expect.


SYSTEMTIME time;
GetSystemTime(&time);
ostringstream utcFormat;
utcFormat << time.wYear << "-" << time.wMonth << "-" <<
time.wDay << "T" << time.wHour << ":" << time.wMinute << ":" <<
time.wSecond << "." << time.wMilliseconds << "Z";
//str = XMLString::transcode(utcFormat.str().c_str());
str = XMLString::transcode("2007-12-21T17:27:23.700Z");//added
for testing!
issueInstant.setBuffer(str);
XMLString::release(&str);
request->setIssueInstant(&issueInstant);

Brian Sheely




Archive powered by MHonArc 2.6.16.

Top of Page