Hello All,
I have met a question when I request my local web service from Browser. The
error from Tomcat server as following:
Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: No Content-Type specified for HTTP GET
But still the same web service when I request from Junit test, It's work.
The request code as following:
URL url = *new* URL("http://localhost:8000/sso/webservice/policyservice/test
");
InputStream in = url.openStream();
log.info(*getStringFromInputStream*(in));
This is server code:
@GET
@Path("/test/")
*public* Response test(InputStream is) {
*return* Response.*status*(Response.Status.*OK*).entity(
"<result>success</result>").build();
}
Would someone could help me, please. I really appreciate!
Best wishes for you!
Wayne Wang