use of org.opensaml.soap.common.SOAPObjectBuilder in project cas by apereo.
the class ECPSamlIdPProfileHandlerControllerTests method getEnvelope.
private Envelope getEnvelope(final String entityId) {
var builder = (SOAPObjectBuilder) openSamlConfigBean.getBuilderFactory().getBuilder(Envelope.DEFAULT_ELEMENT_NAME);
var envelope = (Envelope) builder.buildObject();
builder = (SOAPObjectBuilder) openSamlConfigBean.getBuilderFactory().getBuilder(Header.DEFAULT_ELEMENT_NAME);
val header = (Header) builder.buildObject();
envelope.setHeader(header);
builder = (SOAPObjectBuilder) openSamlConfigBean.getBuilderFactory().getBuilder(Body.DEFAULT_ELEMENT_NAME);
val body = (Body) builder.buildObject();
body.getUnknownXMLObjects().add(getAuthnRequest(entityId));
envelope.setBody(body);
return envelope;
}
Aggregations