Skip to Content.
Sympa Menu

mace-opensaml-users - marshalling problem C++

Subject: OpenSAML user discussion

List archive

marshalling problem C++


Chronological Thread 
  • From: "Brian Sheely" <>
  • To: <>
  • Subject: marshalling problem C++
  • Date: Fri, 9 May 2008 13:54:25 -0700

Code which seemed to work perfectly several months ago, now has a problem with marshalling.  None of my code has changed since then and is shown below. The pointer returned from the marshall call isn't NULL, but it doesn't point to a valid DOMElement. I recently updated to the latest versions of saml2 and xmltooling. Other third-party libs are the most recent versions which I used previously. It may be worth noting that not calling set methods on AuthnRequest doesn't change the result.

 

      AuthnRequest* request = NULL;

      Issuer* issuer = NULL;

 

      try {

            request = opensaml::saml2p::AuthnRequestBuilder::buildAuthnRequest();

            issuer = IssuerBuilder::buildIssuer();

      } catch (XMLObjectException& e) {

            return

      }

 

      (calls to set methods not shown)

      DOMElement* element = request->marshall();

 

Strangely enough, if I run against the saml2 and xmltooling DLLs which I think I used previously, I crash while trying to marshall the response. That code is shown below.

 

      ifstream in(CREDENTIAL_RESOLVER_PATH.c_str());

      DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(in);

      CredentialResolver* resolver;

     

      try {

            resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER, doc->getDocumentElement());

      } catch (exception& e) {

            return

      }

     

      CredentialCriteria criteria;

      criteria.setUsage(Credential::SIGNING_CREDENTIAL);

      Signature* signature = SignatureBuilder::buildSignature();

      //additional set methods not shown

      const Credential* credential = resolver->resolve(&criteria);

      vector<Signature*> signatures(1, signature);

      DOMElement* element = response->marshall((DOMDocument*)NULL, &signatures, credential);

 

Do you have any ideas on what the possible issue(s) could be? Thanks in advance.

 




Archive powered by MHonArc 2.6.16.

Top of Page