public void deployServerSide(PrimitiveAssertion assertion, ExtensibleMetaData extMetaData) throws UnsupportedAssertion
{
ByteArrayOutputStream stream = new ByteArrayOutputStream();
if (extMetaData instanceof EndpointMetaData)
{
EndpointMetaData ep = (EndpointMetaData) extMetaData;
WSSecurityConfiguration securityConfiguration;
try
{
//GET XML of security assertion
PrimitiveAssertionWriter.newInstance().writePrimitiveAssertion(assertion, stream);
StringReader reader = new StringReader(stream.toString());
//Set security configuration
securityConfiguration = WSSecurityOMFactory.newInstance().parse(reader);
WSSecurityConfigFactory.newInstance().initKeystorePath(ep.getRootFile(), securityConfiguration);
ep.getServiceMetaData().setSecurityConfiguration(securityConfiguration);
//set up handler chain as defined in standard file
ep.setConfigName("Standard WSSecurity Endpoint");
ep.initEndpointConfig();
}
catch (Exception e)
{
e.printStackTrace();