<div dir="ltr"><div>Hello Rahul,</div><div><br></div><div>Long time ago in a galaxy far, far away I implemented a SAML2Logout servlet for Oracle WebLogic: <a href="https://github.com/cerndb/wls-cern-sso/blob/master/saml2slo/src/ch/cern/security/saml2/servlet/SAML2sloServlet.java">https://github.com/cerndb/wls-cern-sso/blob/master/saml2slo/src/ch/cern/security/saml2/servlet/SAML2sloServlet.java</a> Maybe it can be of your help. It makes no use of the opensaml API but builds the SAMLResponse correctly. You can have a look at the this answer <a href="https://stackoverflow.com/questions/8150096/construct-a-signed-saml2-logout-request">https://stackoverflow.com/questions/8150096/construct-a-signed-saml2-logout-request</a></div><div><br></div><div>Hope it helps,</div><div><br></div><div>Luis<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 15 ene. 2020 a las 23:49, Brent Putman (<<a href="mailto:putmanb@georgetown.edu">putmanb@georgetown.edu</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p><br>
    </p>
    <div>On 1/15/20 1:03 PM, rahul sharma wrote:</div>
    <blockquote type="cite">
      <pre>try {
                final HTTPPostEncoder pe = new HTTPPostEncoder();
                pe.setHttpServletResponse(response);
                pe.setMessageContext(mc);
                pe.initialize();
                pe.prepareContext();
                pe.encode();
            } catch (final MessageEncodingException |
ComponentInitializationException e) {
                logger.warn("SAML2Request generation failed: {}",
e.getMessage(), e);
            }

*This is the error I got *- SAML2Request generation failed: VelocityEngine
must be supplied 
net.shibboleth.utilities.java.support.component.ComponentInitializationException:
VelocityEngine must be supplied
        at
org.opensaml.saml.saml2.binding.encoding.impl.HTTPPostEncoder.doInitialize(HTTPPostEncoder.java:128)
</pre>
    </blockquote>
    <p><br>
    </p>
    <p>The error is pretty self-explanatory.  You must supply a
      VelocityEngine instance to the HTTPPostEncoder instance via the
      corresponding setter before you call initialize() on it.<br>
    </p>
  </div>

-- <br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net" target="_blank">dev-unsubscribe@shibboleth.net</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><p>"Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better."</p><p>- Samuel Beckett<br></p></div></div></div></div>