Skip to Content.
Sympa Menu

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

Subject: OpenSAML user discussion

List archive

Problem creating SAMLAttributeStatement in C++


Chronological Thread 
  • From: Manuel Sánchez Cuenca <>
  • To:
  • Subject: Problem creating SAMLAttributeStatement in C++
  • Date: Mon, 22 Nov 2004 19:46:07 +0100

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"));
SAMLNameIdentifier *nameid = new SAMLNameIdentifier(nombre.get(), dominio.get());
SAMLSubject *sub = new SAMLSubject(nameid);
auto_ptr<XMLCh> attname(XMLString::transcode("atributo"));
auto_ptr<XMLCh> attns(XMLString::transcode("urn:application:attributes"));
auto_ptr<XMLCh> attvalor(XMLString::transcode("valor"));
std::vector<const XMLCh*> attvalores;
attvalores.push_back(attvalor.get());
SAMLAttribute *att_prueba = new SAMLAttribute(attname.get(), attns.get(), NULL, 0, attvalores);
std::vector<SAMLAttribute*> attributes_prueba;
attributes_prueba.push_back(att_prueba);
SAMLAttributeStatement *statement_prueba = new SAMLAttributeStatement(sub, attributes_prueba);
cout << "El statement es ..." << endl << *statement_prueba << endl;

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

Can anybody help me?

Thanks in advance.

--
======================================================
Manuel Sanchez Cuenca
Dept. Ingenieria de la Informacion y las Comunicaciones
Universidad de Murcia - Espana
Tlf: +34 968364644 - Fax: 968364151
email:

www: http://livia.dif.um.es/~lolo
www: http://livia.dif.um.es/~irisgrid





Archive powered by MHonArc 2.6.16.

Top of Page