mercredi 23 août 2017

Transforming opensaml Response object to String, modifying it, then back into a response object

I'm trying to modify a SAML Response body contents (to add white space, extra attributes, etc) for testing. But can't seem to find a way to get the marshalled object converted to a string I can modify, then unmarshall back into a Response object.

doing a .toString() (as it mentions here: I want to convert an output stream into String object) Just seems to get the main node, not the entirety.

Basically I've been just messing around with

        Element el = XMLObjectProviderRegistrySupport.getMarshallerFactory().getMarshaller(response).marshall(response);

To try and get it, but thought I'd ask here since I couldn't find it in search. Once I can turn it into a string or XML object seems straight forward to just unmarshall it back (http://ift.tt/2vfS2Hx)

Thanks!

Aucun commentaire:

Enregistrer un commentaire