Sending SOAP messages in OpenSAML v3

Stefan Rasmusson rasmusson.stefan at gmail.com
Tue Apr 26 15:12:10 EDT 2016


Hi, how are you supposed to send SOAP messages in v3. i have tried to use
the HTTPSOAP11Encoder, but it just encodes the envelope onto the
httpservlet response.

HTTPSOAP11Encoder encoder = new HTTPSOAP11Encoder();
MessageContext<SAMLObject> context = new MessageContext<SAMLObject>();

SAMLPeerEntityContext peerEntityContext =
context.getSubcontext(SAMLPeerEntityContext.class, true);
peerEntityContext.setEntityId(IDPConstants.IDP_ENTITY_ID);

SAMLEndpointContext endpointContext =
peerEntityContext.getSubcontext(SAMLEndpointContext.class, true);
endpointContext.setEndpoint(getIPDArtifactResolutionEndpoint());

SOAP11Context soapContext = context.getSubcontext(SOAP11Context.class,
true);
soapContext.setEnvelope(OpenSAMLUtils.wrapInSOAPEnvelope(artifactResolve));

context.setMessage(artifactResolve);
encoder.setMessageContext(context);
encoder.initialize();
encoder.prepareContext();
encoder.encode();

--
Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160426/66e8c8e1/attachment.html>


More information about the dev mailing list