XReferenceResolvedListener.class, signatureCreator);
/*
* initializes the SignatureCreator.
*/
XInitialization xInitialization =
(XInitialization)UnoRuntime.queryInterface(
XInitialization.class, m_xReferenceResolvedListener);
Object args[]=new Object[5];
args[0] = new Integer(m_nSecurityId).toString();
args[1] = m_xSAXEventKeeper;
args[2] = new Integer(m_nSignatureElementCollectorId).toString();
args[3] = m_xXMLSecurityContext.getSecurityEnvironment();
args[4] = m_xXMLSignature;
xInitialization.initialize(args);
/*
* creates a Blocker.
*/
int blockerId = m_xSAXEventKeeper.addBlocker();
m_xSAXEventKeeper.setSecurityId(blockerId, m_nSecurityId);
XBlockerMonitor xBlockerMonitor = (XBlockerMonitor)UnoRuntime.queryInterface(
XBlockerMonitor.class, m_xReferenceResolvedListener);
xBlockerMonitor.setBlockerId(blockerId);
/*
* sets signature creation result listener.
*/
XSignatureCreationResultBroadcaster xSignatureCreationResultBroadcaster =
(XSignatureCreationResultBroadcaster)UnoRuntime.queryInterface(
XSignatureCreationResultBroadcaster.class, m_xReferenceResolvedListener);
xSignatureCreationResultBroadcaster.addSignatureCreationResultListener(
(XSignatureCreationResultListener)UnoRuntime.queryInterface(
XSignatureCreationResultListener.class, resultListener));
}
catch( com.sun.star.uno.Exception e)
{
e.printStackTrace();
}
}
else
{
m_nSignatureElementCollectorId = m_xSAXEventKeeper.addSecurityElementCollector(
ElementMarkPriority.BEFOREMODIFY, false);
m_xSAXEventKeeper.setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId);
try
{
/*
* creates a SignatureVerifier.
*/
Object signatureVerifier = m_xRemoteServiceManager.createInstanceWithContext(
TestTool.SIGNATUREVERIFIER_COMPONENT, m_xRemoteContext);
m_xReferenceResolvedListener =
(XReferenceResolvedListener)UnoRuntime.queryInterface(
XReferenceResolvedListener.class, signatureVerifier);
/*
* initializes the SignatureVerifier.
*/
XInitialization xInitialization =
(XInitialization)UnoRuntime.queryInterface(
XInitialization.class, m_xReferenceResolvedListener);
Object args[]=new Object[5];
args[0] = new Integer(m_nSecurityId).toString();
args[1] = m_xSAXEventKeeper;
args[2] = new Integer(m_nSignatureElementCollectorId).toString();
args[3] = m_xXMLSecurityContext;
args[4] = m_xXMLSignature;
xInitialization.initialize(args);
/*
* sets signature verify result listener.
*/
XSignatureVerifyResultBroadcaster xSignatureVerifyResultBroadcaster =