1 Reply Latest reply on Apr 7, 2016 3:46 AM by jolinnen

    Using HttpRequest inside an MDB or EJB

    jolinnen Newbie


      In our JBoss 7.2 AS we run some MDB/EJB which just need some information from some other Webservices located in our internal network.

      So quite simple I want to use Apache HttpClient inside my MDB or EJB  like this


        HttpClient client = new DefaultHttpClient();

        HttpGet request = new HttpGet("http://localhost:8585/axis2/services/myservice/mymethod?param1=test&param2=test");

        HttpResponse response = client.execute(request);


      but the thread hangs in execute().

      Maybe I'm too starry-eyed so are there some hints for fetching data from other webservices?

      Thanks in advance