Skip to Content.
Sympa Menu

mace-opensaml-users - RE: Problem creating SAMLAttributeStatement in C++

Subject: OpenSAML user discussion

List archive

RE: Problem creating SAMLAttributeStatement in C++


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: "'Manuel Sánchez Cuenca'" <>, <>
  • Subject: RE: Problem creating SAMLAttributeStatement in C++
  • Date: Mon, 22 Nov 2004 17:52:13 -0500
  • Organization: The Ohio State University

> Hello all, I'm using C++ OpenSAML 1.0, and I'm trying to create a
> SAMLAttributeStatement. This is the code:
>
> auto_ptr<XMLCh> nombre(XMLString::transcode("nombre"));
> auto_ptr<XMLCh> dominio(XMLString::transcode("dominio"));

FWIW, I added some classes that should be used in place of this approach
that make the code a bit shorter, and also insure that the Xerces "release"
method is used to free the results. Technically, relying on delete[] in the
auto_ptr destructor is improper.

It looks like this:

auto_ptr_XMLCh nombre("nombre");

> But in the last line, when I try to print the AttributeStatement, an
> Abort message is generated.

Your code looked ok to me...could you provide a stack trace of the crash? On
Windows this is pretty easy, but assuming you're on Unix, configure with
--enable-debug and then use gdb and it should stop in your sample program
and indicate something.

-- Scott




Archive powered by MHonArc 2.6.16.

Top of Page