package org.jboss.test.webservice.jbws79;
import junit.framework.Test;
import org.jboss.test.webservice.WebserviceTestBase;
import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
public class JBWS79TestCase extends WebserviceTestBase
{
public JBWS79TestCase(String name)
{
super(name);
}
public static Test suite() throws Exception
{
return getDeploySetup(JBWS79TestCase.class, "ws4ee-jbws79.war, ws4ee-jbws79-client.jar");
}
public void testEndpointOne() throws Exception
{
InitialContext iniCtx = getClientContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloOneService");
HelloOne hello = (HelloOne)service.getPort(HelloOne.class);
String in0 = "Kermit";
assertEquals(in0, hello.echoString(in0));
}
public void testEndpointTwo() throws Exception
{
InitialContext iniCtx = getClientContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloTwoService");
HelloTwo hello = (HelloTwo)service.getPort(HelloTwo.class);
QName in0 = new QName("http://somens", "Kermit");
assertEquals(in0, hello.echoQName(in0));
}
}