1 package org.apache.axis2.engine; 2 3 import junit.framework.TestCase; 4 import org.apache.axis2.context.ConfigurationContextFactory; 5 import org.apache.axis2.deployment.DeploymentException; 6 import org.apache.axis2.description.ModuleDescription; 7 import org.apache.axis2.description.OperationDescription; 8 import org.apache.axis2.description.ServiceDescription; 9 import org.apache.axis2.phaseresolver.PhaseException; 10 11 import javax.xml.namespace.QName ; 12 import javax.xml.stream.XMLStreamException; 13 14 31 32 37 public class ModuleEngageTest extends TestCase{ 38 AxisConfiguration ac; 39 40 public void testModuleEngageMent() throws PhaseException, DeploymentException, AxisFault, XMLStreamException { 41 String filename = "./target/test-resources/deployment"; 42 ConfigurationContextFactory builder = new ConfigurationContextFactory(); 43 ac = builder.buildConfigurationContext(filename).getAxisConfiguration(); 44 ModuleDescription module = ac.getModule(new QName ("module1")); 45 assertNotNull(module); 46 ac.engageModule(new QName ("module1")); 47 ServiceDescription service = ac.getService(new QName ("service2")); 48 assertNotNull(service); 49 OperationDescription moduleOperation = service.getOperation(new QName ("creatSeq")); 50 assertNotNull(moduleOperation); 51 } 52 53 } 54 | Popular Tags |