public void testWscTranslateContext()
throws Exception
{
System.out.println("Running test : " + this.getClass().getName());
UserCoordinator ua = UserCoordinatorFactory.userCoordinator();
try
{
ua.begin();
System.out.println("Started: "+ua.identifier()+"\n");
DeploymentContext manager = DeploymentContextFactory.deploymentContext();
SOAPContext theContext = (SOAPContext) manager.context();
System.out.println(theContext);
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document doc = builder.newDocument();
org.w3c.dom.Element ctx = doc.createElement("Context-test");
final Element context = ((SOAPContext)theContext).serialiseToElement(ctx) ;
org.w3c.dom.Element wscCtx = translate(context);
System.out.println("\nNow got "+DomUtil.nodeAsString(wscCtx));
ua.cancel();
}
catch (Exception ex)
{
WSCFTestUtils.cleanup(ua);
throw ex;