0 Replies Latest reply on Jan 24, 2008 4:40 AM by shefagarwal

    jBPM BPEL- accessing a business process from java client

    shefagarwal

      Hi,

      I have created a simple BPEL process (similar to hello example of jBPM BPEL package) with receive-assign-reply activities.
      The process has been successfully deployed on JBOSS 4.0.5.GA But when I try to access this process through my java client program, it throws some exceptions:
      The client program is as follows:
      public class WsClient
      {
      private static String invokeWS() throws Exception
      {
      Service service;
      String namespace = "http://eclipse.org/bpel/sample";
      URL url = new URL("http://ddc1a-01-378:8080/bank/helloProvider?wsdl");
      QName qname = new QName(namespace, "helloService");
      ServiceFactory factory = ServiceFactory.newInstance();
      service = factory.createService(url, qname);
      QName operation = new QName(namespace, "process");
      QName port = new QName(namespace, "helloProviderPort");
      Call call = service.createCall(port, operation);
      return (String) call.invoke(new Object[] { "Shefali" } );
      }

      public static void main(String[] args)
      {
      try {
      System.out.println("Invoke: " + invokeWS() );
      } catch (Exception e) {
      e.printStackTrace();
      }
      }

      The runtime exception I faced:
      the serializer/deserializer for parameter number: 0, named: "{http://eclipse.org/bpel/sample}helloResponse", type: "{http://eclipse.org/bpel/sample}helloResponse", is ambiguous because its class could not be determined at com.sun.xml.rpc.client.dii.BasicCall.serializerNotFoundException(BasicCall.java:779) at com.sun.xml.rpc.client.dii.BasicCall.createLiteralResponseSerializer(BasicCall.java:722) at com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.java:692) at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:480) at com.test.WsClient.invokeWS(WsClient.java:32) at com.test.WsClient.main(WsClient.java:38)

      Can somebody provide a possible solution to this problem?

      Thanks in advance
      Shefali.