2 Replies Latest reply on Aug 13, 2014 12:09 PM by Jorge Morales

    Trying to invoke swithyard webservice from external client.Null java object is returned from the webservice port type.

    pavani suggula Newbie

      From two days i have been trying to invoke a swithyard webservice and getting a null onject as a response in external application. To make it simple i created a swithyard wsdl using a simple class


      public class HelloBean implements Hello {

      public Response sayHello(Request req) {
        System.out.println("in say hello");
        Response res = new Response();
        System.out.println("after say hello");
        res.setMessage("hellow" +req.getName());
        return res;


      and trying to invoke it from a external java client.


      my java client code looks like this


               System.out.println("Create Web Service Client...");
               Hello service1 = new Hello();
               System.out.println("Create Web Service...");
               HelloPortType port1 = service1.getHelloPort();

               ((BindingProvider)port1).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:8080/Hello/Hello"); 

               System.out.println("Call Web Service Operation...");
               Request request = new Request();
               System.out.println("name is set");
               System.out.println("Server said: " + port1.sayHello(request));



      but i am getting null at port1.sayHello(request)) instead of response .


      any idea on this please respond.