Yes, that would be a problem, because you are trying to look up the service .
I have the service deployed on JBOSS AS and run the test case successfully.
Check your server log files to identify any other issues with your setup.
Here's the test case I use to test my client code.
import java.util.Properties;
| import javax.naming.*;
| import javax.xml.rpc.Service;
| import org.jboss.test.ws.samples.jsr181pojo.EndpointInterface;
| import junit.framework.*;
|
| public class JBossClientTest extends TestCase
| {
| /** Test access to the JSR181pojo webservice via an app client */
| public void testJSR181pojo() throws Exception
| {
| InitialContext iniCtx = getInitialContext();
| Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestService");
| EndpointInterface endpoint =
(EndpointInterface)service.getPort(EndpointInterface.class);
| String info = endpoint.echo("mafia");
| assertEquals("mafia", info);
| }
| /** Build the InitialContext */
| private InitialContext getInitialContext() throws NamingException
| {
| Properties env = new Properties();
| env.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
| env.setProperty(Context.URL_PKG_PREFIXES,
"org.jboss.naming.client:org.jboss.naming");
| env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
| env.setProperty("j2ee.clientName", "jbossws-client");
|
| return new InitialContext(env);
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947266#3947266
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3947266
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user