Skip to Content.
Sympa Menu

mace-opensaml-users - Re: [OpenSAML] local part cannot be "null" when creating a QName during unmarshalling an Assertion object

Subject: OpenSAML user discussion

List archive

Re: [OpenSAML] local part cannot be "null" when creating a QName during unmarshalling an Assertion object


Chronological Thread 
  • From: Sidhartha Priye <>
  • To:
  • Subject: Re: [OpenSAML] local part cannot be "null" when creating a QName during unmarshalling an Assertion object
  • Date: Mon, 1 Mar 2010 07:57:29 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=lkokhGW1/Bgdzh4D9kMsB7sdCf2pggSXkAtwYxa2BnwmWtlIs9Q2ujkkYOT9mvnjfvdjtkVCpXuoht1zOYlNsdXp/nZG62X5mFaLDIfKiCDsfcj5lfMA+SMnLAjw7YxCJnmVvoKu6yhqUHowzEMVF6xROYqPOCf9wIgLTG5t13o=;

I think yahoo mail Rich text was the culprit. sending via plain text.
Hopefully it will go this time

<soap:Header><wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";><saml2:Assertion
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_33776a319493ad607b7ab3e689482e45"
IssueInstant="2010-03-01T05:30:49.730Z"
Version="2.0"><saml2:Issuer>http://localhost:9088</saml2:Issuer><saml2:Subject><saml2:NameID

Format="urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName">mbrendish</saml2:NameID></saml2:Subject></saml2:Assertion></wsse:Security></soap:Header>


thanks
Sid


>
>From: Sidhartha Priye
><>
>To:
>
>Sent: Mon, March 1, 2010 10:02:23 AM
>Subject: Re: [OpenSAML] local part cannot be "null" when creating a QName
>during unmarshalling an Assertion object
>
>
>Not sure why my Assertion XML is getting stripped.
>
>Brent - How can I provide the XML. I am taking another shot
>
><code>
>
><?xml version="1.0" encoding="UTF-8"?>
>>http://localhost:9088 mbrendish
>>GETFULLEOPINWRK'>http://web.hsc.syscom.com/";>GETFULLEOPINWRK
>>-1'>http://web.hsc.syscom.com/";>-1
>
></code>
>
>
>thanks
>Sid
>
>
________________________________
From: Sidhartha Priye
<>
>To:
>
>Sent: Mon, March 1, 2010 9:55:28 AM
>Subject: Re: [OpenSAML] local part cannot be "null" when creating a QName
>during unmarshalling an Assertion object
>
>
>Here is the Assertion Element that was stripped off from my previous post
>
>http://localhost:9088 mbrendish
>
>
>thanks
>Sid
>
>
________________________________
From: Sidhartha Priye
<>
>To:
>
>Sent: Mon, March 1, 2010 9:48:59 AM
>Subject: Re: [OpenSAML] local part cannot be "null" when creating a QName
>during unmarshalling an Assertion
> object
>
>
>Thanks a bunch Brent,
>
>Here is the XML of the SOAP Header that I am
>generating. I am trying to test with a very basic Assertion element.
>
>http://localhost:9088 mbrendish
>
>
>That being said, I have access to the AssertionElement.
>
>UnmarshallerFactory unmarshallerfactory
> = Configuration.getUnmarshallerFactory();
>Unmarshaller unmarshaller
> = unmarshallerfactory.getUnmarshaller(samlElem);
>
>out.println("Unmarshalling
> SAML document root
>element{}"+XMLHelper.getNodeQName(samlElem));
>
>The
> output is:
>
>[3/1/10 3:02:16:725 EST] 0000001c SystemOut
>O Unmarshalling SAML document root element
>{}{urn:oasis:names:tc:SAML:2.0:assertion}Assertion
>
>However It fails here
> XMLObject xmlObject =
>unmarshaller.unmarshall(samlElem);
>
>When it was not obvious, I
> decompiled the AbstractXMLObjectUnmarshaller, added my own trace.
>
>System.out.println("Node
> name"+attribute.getNodeName());
>System.out.println("Node
> value"+attribute.getNodeValue());
>System.out.println("Node
> type"+attribute.getNodeType());
>if(attribute.getNodeType()
> == 2)
> unmarshallAttribute(xmlObject, Attr)attribute);
>
> }
>
>The output is -
>[3/1/10 3:02:16:741 EST] 0000001c
>SystemOut O Node name ID
>[3/1/10 3:02:16:741 EST] 0000001c
>SystemOut O Node
>value_33776a319493ad607b7ab3e689482e45
>[3/1/10
> 3:02:16:741 EST] 0000001c SystemOut O Node type 2
>
>thanks
>Sid
>
>________________________________
>
>
>
________________________________
From: Brent Putman
<>
>To:
>
>Sent: Mon, March 1, 2010 5:18:20 AM
>Subject: Re: [OpenSAML] local part cannot be "null" when creating a QName
>during unmarshalling an Assertion object
>
>
>
>>On 2/26/2010 8:31 PM, Sidhartha Priye wrote:
>
>>>
>>
>>
>>
>>>>[2/26/10 17:16:11:596 EST] 0000001c SystemErr R
>>java.lang.IllegalArgumentException: local part cannot be "null" when
>>>>creating a QName
>>>>[2/26/10 17:16:11:612 EST] 0000001c SystemErr R at
>>>>javax.xml.namespace.QName.<init>(Unknown Source)
>>>>[2/26/10 17:16:11:612 EST] 0000001c SystemErr R at
>>>>javax.xml.namespace.QName.<init>(Unknown Source)
>>>>[2/26/10 17:16:11:612 EST] 0000001c SystemErr R at
>>>>org.opensaml.xml.util.XMLHelper.constructQName(XMLHelper.java:433)
>>>>[2/26/10 17:16:11:612 EST] 0000001c SystemErr R at
>>>>org.opensaml.xml.util.XMLHelper.getNodeQName(XMLHelper.java:171)
>>>>[2/26/10 17:16:11:612 EST] 0000001c SystemErr R at
>>org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallAttribute(AbstractXMLObjectUnmarshaller.java:215)
>>
>
>
>>It's failing trying to construct a QName out of an DOM Attr Node.
>Either the XML you're sending is malformed in some way, or possibly the
>way that you parsed the structure into a DOM Element is causing a
>problem, perhaps it's not namespace-aware or something. I'd confirm
>exactly what you are sending from the client by getting a trace of the
>message, just to be sure.
>
>
>
>
>
>This is how I am getting the AssertionElement
>>>><code>
>>>> SOAPHeader sh = smc.getMessage().getSOAPHeader();
>>
>>>> // check for wsse:security element under SOAP Header
>>>> Node wsseElement = sh.getFirstChild();
>>
>>>> // check for SAML assertion under wsse:security
>>>>element
>>>> Element assertionElement = (Element)
>>>>wsseElement.getFirstChild();
>>
>
>>Personally, I wouldn't necessarily assume that the first Node under the
>Security header is your Assertion. You probably want to specifically
>check. Your client might be generating something else in there
>automatically, like a WSS timestamp or something. For that matter, it
>might not even be an Element Node at all, you could have whitespace
>Text node, etc. OpenSAML has some helper methods there that you might
>want to use if you don't want to write your own code for that, like
>XMLHelper.getChildElementsByTagNameNS(Element root, String
>namespaceURI, String localName).
>
>>--Brent
>
>
>
>
>
>






Archive powered by MHonArc 2.6.16.

Top of Page