package org.jboss.test.webservice.contextroot;
import junit.framework.Test;
import org.jboss.test.webservice.WebserviceTestBase;
import org.jboss.test.webservice.admindevel.Hello;
import javax.naming.InitialContext;
import javax.xml.rpc.Service;
public class ContextRootTestCase extends WebserviceTestBase
{
public ContextRootTestCase(String name)
{
super(name);
}
protected void setUp() throws Exception
{
super.setUp();
}
public void testHelloString() throws Exception
{
InitialContext iniCtx = getClientContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
Hello helloPort = (Hello)service.getPort(Hello.class);
String retStr = helloPort.helloString("Kermit");
assertEquals("Hello Kermit!", retStr);
}
public static Test suite() throws Exception
{
return getDeploySetup(ContextRootTestCase.class, "ws4ee-contextroot.ear");
}
}