Skip to Content.
Sympa Menu

mace-opensaml-users - RE: SAML response missing "samlp" namespace

Subject: OpenSAML user discussion

List archive

RE: SAML response missing "samlp" namespace


Chronological Thread 
  • From: Scott Cantor <>
  • To: 'Shannon Kendrick' <>,
  • Subject: RE: SAML response missing "samlp" namespace
  • Date: Tue, 25 Feb 2003 10:52:02 -0500
  • Importance: Normal
  • Organization: The Ohio State University

> I get the following output:
>
> <Response xmlns="urn:oasis:names:tc:SAML:1.0:protocol"
> xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"
> IssueInstant="2003-02-25T14:41:43Z" MajorVersion="1"
> MinorVersion="0" Recipient="recipient"
> ResponseID="78ea0d7a-675e-48ed-a2b1-a84e1a32dd14">

Correct. The default namespace is what it should be. There is no need to
prefix Response.

> Notice a couple of things about the XML:
> <?xml version="1.0" encoding="UTF-8"?> is missing at the
> start of the XML. <Response> should be <samlp:Response>

The output is canonicalized. That does not allow the XML declaration, and the
encoding is always UTF-8 in that case, which is the
default in XML. There is no need to prefix elements to make it work.

> Additionally I get the following message when I try to decode
> the message. The following statement:
>
> SAMLResponse samlResponse =
> SAMLPOSTProfile.accept(samlRespBase64.getBytes(), "recipient", 10);
>
> produces:
>
> SAMLPOSTProfile.accept() detected an XML parsing error:
> cvc-elt.1: Cannot find the declaration of element 'Response'.
> org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
> declaration of element 'Response'

That's something else entirely, it has nothing to do with the input document.
If it can't find the declaration, than it's not
feeding the schema to the parser for some reason. The schemas are part of the
source tree, and are usually provided via the class
loader's resource methods. There should be log4j output of some sort that
might help identify the problem.

My guess is that you're running the code in some unusual way that the entity
resolver is not accounting for.

Did you call Init.init() first? I don't think that's always needed, but
sometimes it can cause problems.

-- Scott

---------------------------------------------------mace-opensaml-users-+
For list utilities, archives, subscribe, unsubscribe, etc. please visit the
ListProc web interface at

http://archives.internet2.edu/

---------------------------------------------------mace-opensaml-users--




Archive powered by MHonArc 2.6.16.

Top of Page