This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
below is my code to call a REST service. It worked fine outside of Weblogic. After I deployed it (WAR) to Weblogic 10.3.5, I got the below errors. It's the same exact code. Do you have any ideas?
//Set basic authentication in the header required by the REST service
String userPassword = "user1:password1";
String encoding = new sun.misc.BASE64Encoder().encode(userPassword.getBytes());
conn.setRequestProperty("Authorization", "Basic " + encoding);
//Submit user and password
String params = "{\"username\":\"user2\",\"password\":\"password2\"}";
I printed out the output for both the good and bad ones. I noticed the content-type is text/html when I call the REST service within Weblogic. It should be application/json since the code is exactly the same.