1 Reply Latest reply on Dec 16, 2004 3:38 AM by prasanna_b2001

    Web Serivce Problem

    ponifaax

      I want to invoke a EJB as a web service. But it is giving me an error "No such operation : "authenticate".

      I wrote the
      web-services.xml for it as follows:-


      <deployment
      xmlns="http://xml.apache.org/axis/wsdd/"
      targetNamespace="http://net.jboss.org/service1"
      xmlns:service1="http://net.jboss.org/service1"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
      <!-- Session bean exposed as a web service -->
















      Client for it is as follows:-


      import org.apache.axis.client.Call;
      import org.apache.axis.client.Service;
      import com.baypackets.sms.utility.CommonUserInfo;
      import com.baypackets.sms.utility.DataObject;
      import javax.xml.namespace.QName;
      import java.util.Vector;

      public class client {

      public static void main(String[] args) {
      try {
      String endpoint =

      "http://123.122.4.43:8003/jboss-net/services/Session1";
      Service service = new Service();
      org.apache.axis.client.Call call = (org.apache.axis.client.Call)

      service.createCall();
      call.setTargetEndpointAddress( new java.net.URL(endpoint) );
      call.setOperationName("authenticate");

      call.setReturnClass(x.class);


      QName qn = new QName("http://123.122.4.43:8003/jboss-net/services/Session1","x");
      call.registerTypeMapping(x.class, qn, new

      org.apache.axis.encoding.ser.BeanSerializerFactory(x.class, qn), new

      org.apache.axis.encoding.ser.BeanDeserializerFactory(x.class, qn));
      x ret = (x) call.invoke( new Object[] {"dd","1234" } );
      }
      catch(Exception ex) {
      System.out.println("Exception caught");
      ex.printStackTrace();
      }
      return;
      }
      }

      Can anyone tell me what the problem is?
      thanx,
      shubhu