1 Reply Latest reply on Jan 19, 2006 11:34 PM by Thomas Diesler

    javax.naming.NameNotFoundException in web-service client

    Neeraj Singh Newbie

      I am trying to setup a sample web-service "QualityControlService" under JBoss 4.0.3.

      1. Below is the signature of remote web-service Interface:

      package gov.ed.fsa.payment.webservice;

      public interface QualityControlService extends Remote {
      public gov.ed.fsa.core.dto.PageableListDTO getQualityControlListing(gov.ed.fsa.payment.dto.QualityControlListingReqEDXDTO reqDTO) throws java.rmi.RemoteException;

      2. I followed the JBoss web-service development process on WIKI and created necessary files using WSCOMPILE tool for client and server part:

      C:\Sun\jwsdp-1.6\jaxrpc\bin>wscompile -classpath I:\QualityControl\WebContent\WEB-INF\classes -gen:server -f:rpcliteral -mapp
      ing mapping.xml config.xml

      C:\Sun\jwsdp-1.6\jaxrpc\bin>wscompile -classpath I:\QualityControl\WebContent\WEB-INF\classes -gen:client -f:rpcliteral -mapp
      ing mapping.xml -keep config-client.xml

      WSCOMPILE tool has generated one "QualityControlListingReqEDXDTO_LiteralSerializer" class and I guess this class acts as serializer for my DTO object "QualityControlListingReqEDXDTO".

      3. I deployed server as "quality-control.war" as It is deployed correctly as I can see the deployed service using Admin console.

      4. I have created "application-client.xml" and "META-INF/jboss-client.xml" files. Below is "META-INF/jboss-client.xml":


      5. Below is web-service client declaration:

      /** Test access to the JSE webservice via an app client */
      public static void main(String[] args)
      InitialContext iniCtx = getInitialContext();
      } catch (Exception ex){
      System.out.println("???? Failed: "+ex);

      /** Build the InitialContext */
      private static InitialContext getInitialContext() throws NamingException
      java.util.Properties env = new java.util.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", "qualitycontrolservice-client");
      return new InitialContext(env);

      6. But when I try to run my web-service client following error message pops up:
      ???? Failed: javax.naming.NameNotFoundException: qualitycontrolservice-client not bound

      Theoretically my web-service client should not complain about name NOT found as it is declared in "META-INF/jboss-client.xml". Looks like something is missing on client part. Any help is appreciated, if someone can send me the directory structure for deployed components (classes and xml files) on client side it would be very helpful.