कॉल करते समय निरपेक्ष अपवाद नहीं मिलता है नीचे कोड स्निपेट आराम से एपीआई का उपयोग करके मेरी वेब सेवा को कॉल करने के लिए उपयोग कर रहा है।उरी को स्थायी वेबसाइट सेवा
ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
String uri= "https://127.0.0.1:8443/cas-server-webapp-3.5.0/login";
WebResource resource = client.resource(URLEncoder.encode(uri));
MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl();
queryParams.add("username", "suresh");
queryParams.add("password", "suresh");
resource.queryParams(queryParams);
ClientResponse response = resource.type(
"application/x-www-form-urlencoded").get(ClientResponse.class);
String en = response.getEntity(String.class);
System.out.println(en);
और इसके बाद के संस्करण कोड
com.sun.jersey.api.client.ClientHandlerException: java.lang.IllegalArgumentException: URI is not absolute
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
at com.sun.jersey.api.client.Client.handle(Client.java:648)
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:680)
मैं कई लेख googled और जहां मैं गलत कर रहा हूँ मिल हमारा इस तरह से चल रहा है, जबकि यह अपवाद हो रही।
साइड नोट: cas-server-webapp-3.5.0
युद्ध
आपके ** यूआरआई ** में, क्या आप निश्चित हैं, इसका ** https **, और ** ** ** नहीं है? कृपया एक बार जांचें। – SudoRahul
हां इसके एचटीटीपीएस केवल। एसएसएल मेरे टॉमकैट सर्वर पर सक्षम है। –