mace-opensaml-users - Re: [OpenSAML] Unmarshalling issue: XML doc with no prefix and no namespace
Subject: OpenSAML user discussion
List archive
- From: "Cantor, Scott E." <>
- To: "" <>
- Subject: Re: [OpenSAML] Unmarshalling issue: XML doc with no prefix and no namespace
- Date: Thu, 31 Mar 2011 14:44:57 +0000
- Accept-language: en-US
On 3/31/11 11:46 AM, "KARTHIKEYAN RAMALINGAM"
<>
wrote:
>In my input XML document, the namespace and namespace prefix is not
>present.
>While unmarshalling the document element, I am getting
>NullPointerException
>since the unmarshaller retrieved below is null.
You should always check for null, that's the primary bug.
>Per OpenSaml, is it mandatory for an input xml document to have a
>valid/non-empty namespace or prefix for successful un-marshalling?
You have to have registered classes for the XML you have. Whether it has a
namespace isn't the point, and prefixes have nothing to do with it apart
from how the XML is expressed. From the sound of it, you ought to start by
reading the XML Namespaces spec and/or take a pass over some intro
material on them.
> The input xml document is as below:
> <?xml version="1.0"
> encoding="UTF-8"?><data><parameters><param1>abc</param1><param2>xyz</p
> aram2></parameters></data>
There's not going to be anything in this code base that knows about your
XML. If you really wanted to use these APIs to process it, you'd have to
create implementation, builder, marshaller, and unmarshaller classes for
all your content, or rely on generic classes like XSAny.
-- Scott
- [OpenSAML] Unmarshalling issue: XML doc with no prefix and no namespace, KARTHIKEYAN RAMALINGAM, 03/31/2011
- Re: [OpenSAML] Unmarshalling issue: XML doc with no prefix and no namespace, Cantor, Scott E., 03/31/2011
Archive powered by MHonArc 2.6.16.