wood burning stoves*
The moose likes Web Services and the fly likes restful client issues on linux and jboss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "restful client issues on linux and jboss" Watch "restful client issues on linux and jboss" New topic
Author

restful client issues on linux and jboss

fundo bandu
Greenhorn

Joined: Sep 28, 2012
Posts: 1
I have created a restful client to call restful webservice. I am using com.sun.jersey.api.client.Client for this. My code works as perfectly on windows and JBOSS 5.1 but it hangs on Red Hat Linux and JBOSS 5.1.It hangs on following line. I am using jdk1.6. There is no port or environmental related issue. I have tested the environment and ports.

Client client = Client.create();

My code is as follows :

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;

public class restclientdemo{


public static void main(String[] args) {
String url= "blabla";
String userID="blabla";
Client client = Client.create();
WebResource resource = client.resource(url);
ClientResponse response = resource.accept("some domainspecific ")
.header("remote_user", userID)
.type("some domain specific")
.put(ClientResponse.class);

}

}


Thanks in advance
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: restful client issues on linux and jboss
 
Similar Threads
Jersey RESTful web service - How to post XML file using jersey framework
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/cl ient/config/ClientC
Map<Integer, String> or String[] ?
Problem with Rest Client
Speed differential between RESTFul webservices and RMI