0 Replies Latest reply on Apr 14, 2005 3:58 AM by tatineni mouli

    javax.naming.NameNotFoundException

    tatineni mouli Newbie

      Hi,

      I have created the stateless session bean and I deployed in the jboss server in \server\default\deploy folder then I make it as a webservice by writing the wsdd file and I deployed it using the AdminClient. till here there is no problem, but when I call the webservice from the client then the following exception it is throwing

      xisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
      faultSubcode:
      faultString: javax.naming.NameNotFoundException: Simulator not bound
      faultActor:
      faultNode:
      faultDetail:
      {http://xml.apache.org/axis/}stackTrace: AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
      faultSubcode:
      faultString: javax.naming.NameNotFoundException: Simulator not bound
      faultActor:
      faultNode:
      faultDetail:

      javax.naming.NameNotFoundException: Simulator not bound
      at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
      at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
      at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
      at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
      at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
      at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
      at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
      at org.apache.axis.client.Call.invoke(Call.java:2553)
      at org.apache.axis.client.Call.invoke(Call.java:2248)
      at org.apache.axis.client.Call.invoke(Call.java:2171)
      at org.apache.axis.client.Call.invoke(Call.java:1691)
      at simulator.Client.main(Client.java:44)


      javax.naming.NameNotFoundException: Simulator not bound
      at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
      at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
      at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
      at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
      at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
      at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
      at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
      at org.apache.axis.client.Call.invoke(Call.java:2553)
      at org.apache.axis.client.Call.invoke(Call.java:2248)
      at org.apache.axis.client.Call.invoke(Call.java:2171)
      at org.apache.axis.client.Call.invoke(Call.java:1691)
      at simulator.Client.main(Client.java:44)

      here is the client code.

      public class Client
      {

      public static void main(String[] args)
      {
      try{
      // Endpoint is used for making the call
      String endpoint = "http://localhost:8080/axis/services/SimulatorService";

      // The Service object is the starting point for accessing the web service.
      Service service = new Service();
      // The call object is used to actually invoke the
      // web service.
      Call call = (Call)service.createCall();
      // Sets the call object?s endpoint address
      call.setTargetEndpointAddress(endpoint);
      // Sets the operation name associated with this Call object. The QName is the qualified name of the method.
      call.setOperationName(new QName("getSecBySec"));
      System.out.println("in call "+call);
      // Calls the object, passing in the acct number and the amount of money to deposit. The return value is stored as an object.
      Object ret = call.invoke(new Object[] { "testing" });
      // Object ret = call.invoke( new QName("deposit"),new Object[] {new Integer(123) , new Double(5000.0)} );
      // Since we know that the return value is a boolean, we //cast it to a Boolean.
      System.out.println(ret);
      }catch(Exception e)
      {
      e.printStackTrace();
      }
      }
      }



      please help me.

      Thanks