0 Replies Latest reply on May 21, 2002 6:21 AM by Peter Ondrus

    SOAP & entity EJB

    Peter Ondrus Newbie

      Hello,
      I have problems in communication with entity EJB via SOAP. It seems, that on server side everything is O.K. I just do not know how to write correct client.
      Here is my code of SOAP client which is unfortunately not working:
      String service = "urn:ejbsoaptest";
      Call call = new Call ();

      call.setTargetObjectURI (service);
      String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
      call.setEncodingStyleURI(encodingStyleURI);

      call.setMethodName ("findByPrimaryKey");
      Vector params = new Vector ();
      params.addElement (new Parameter("id", Integer.class, new integer(2), null));

      call.setParams(params);
      Response resp = call.invoke (url, "" );
      // this works OK - without fail or exception

      String ejbKeyURI = resp.getFullTargetObjectURI();

      Call callM = new Call();
      System.out.println("ejbKeyURI:"+ejbKeyURI);
      callM.setFullTargetObjectURI(resp.getFullTargetObjectURI());
      callM.setEncodingStyleURI(encodingStyleURI);
      callM.setMethodName ("getValue");
      resp = callM.invoke (url, "" );
      // this fails with SOAP exception - no such Method findByPrimaryKey

      thanks for any help.

      Peter