[openSAML] How to convert a <Response> string to a Response object

Brent Putman putmanb at georgetown.edu
Thu Jul 26 16:41:18 EDT 2012


On 7/26/12 2:59 PM, Yaowen Tu wrote:
> Is this the correct place to ask this question?
>

Yes.


>  What I have is plain XML string like:
>
> <samlp:Response Destination="...">
>   <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
>   </saml:Issuer>
>   ...
>   ...
> </smalp:Response>
>
> What method should I call the parse this XML string into Response object?
>


This would be a 2-step process:

1) Parse the XML string into a DOM Element instance, e.g. using a JAXP
parser. Note that this step is not specific to OpenSAML.

2) Unmarshall an OpenSAML XMLObject around the Element.  This is covered
in the user's manual here:


https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaCreateFromXML






More information about the dev mailing list