Advertisement
Guest User

Untitled

a guest
Mar 15th, 2017
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.84 KB | None | 0 0
  1. >> "POST /X/Y/052ABC/ServicesDEV HTTP/1.1[r][n]"
  2. >> "Accept-Encoding: gzip,deflate[r][n]"
  3. >> "Content-Type: application/json;charset=UTF-8[r][n]"
  4. >> "Content-Length: 92[r][n]"
  5. >> "Host: devint.test.intranet[r][n]"
  6. >> "Connection: Keep-Alive[r][n]"
  7. >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[r][n]"
  8. >> "[r][n]"
  9. >> "{"payLoad":{"REQUEST":{"PROCESS_NM":"ORDER_ID"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}"
  10.  
  11.  
  12. << "HTTP/1.1 401 Unauthorized[r][n]"
  13. << "Server: Apache-Coyote/1.1[r][n]"
  14. << "WWW-Authenticate: Basic realm="L7SSGBasicRealm"[r][n]"
  15. << "L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821[r][n]"
  16. << "Content-Length: 23[r][n]"
  17. << "Date: Wed, 15 Mar 2017 02:17:09 GMT[r][n]"
  18. << "[r][n]"
  19. << "Authentication Required"
  20.  
  21. >> "POST /X/Y/052ABC/ServicesDEV HTTP/1.1[r][n]"
  22. >> "Accept-Encoding: gzip,deflate[r][n]"
  23. >> "Content-Type: application/json;charset=UTF-8[r][n]"
  24. >> "Content-Length: 92[r][n]"
  25. >> "Host: devint.test.intranet[r][n]"
  26. >> "Connection: Keep-Alive[r][n]"
  27. >> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[r][n]"
  28. >> "Authorization: Basic RVNMQ1hHNzpvVnlGUjNFNXMxQU41NnBJTXFOSCE=[r][n]"
  29. >> "[r][n]"
  30. >> "{"payLoad":{"REQUEST":{"PROCESS_NM":"ORDER_ID"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}"
  31. << "HTTP/1.1 200 OK[r][n]"
  32. << "Server: Apache-Coyote/1.1[r][n]"
  33. << "Jmscorrelationidasbytes: Camel-ID-NE1ITCDRHAS09-ne1-savvis-net-39938-1486746426315-0-94041[r][n]"
  34. << "Jmstimestamp: 1489544237805[r][n]"
  35. << "Jmsdestination: temp-queue://ID:NE1ITCDRHAS09.ne1.savvis.net-40529-1486746732513-1:914:1[r][n]"
  36. << "Jmsexpiration: 0[r][n]"
  37. << "Jmsdeliverymode: 1[r][n]"
  38. << "Jmsmessageid: ID:NE1ITCDRHAS09.ne1.savvis.net-36391-1489532794035-1:1:1:1:1[r][n]"
  39. << "Jmscorrelationid: Camel-ID-NE1ITCDRHAS09-ne1-savvis-net-39938-1486746426315-0-94041[r][n]"
  40. << "Jmspriority: 4[r][n]"
  41. << "Jmsredelivered: false[r][n]"
  42. << "Content-Encoding: gzip[r][n]"
  43. << "Content-Type: text/plain;charset=UTF-8[r][n]"
  44. << "Content-Length: 495[r][n]"
  45. << "Date: Wed, 15 Mar 2017 02:17:17 GMT[r][n]"
  46. << "[r][n]"
  47. << "<Encrypted Ouyput>"
  48.  
  49. public class TestMainOne {
  50. private static final String RESPONSE_TYPE_JSON = "application/json;charset=UTF-8";
  51. private static String getTextSearchResults(String restWebServiceURL) {
  52. try {
  53. String jksFile = "C:\Users\temp\Desktop\Cert\ABC1-cxg-test2.jks";
  54. String jksFilePassword = "!jkspassword700";
  55. String username = "<username>";
  56. String password = "<password>";
  57. File file = new File(jksFile);
  58. SSLContext sslcontext = SSLContexts.custom()
  59. .loadTrustMaterial(file, jksFilePassword.toCharArray(),
  60. new TrustStrategy() {
  61. public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
  62. return true;
  63. }
  64. })
  65. .build();
  66. SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, new String[] { "TLSv1", "TLSv1.1", "TLSv1.2" }, null, NoopHostnameVerifier.INSTANCE);
  67. CloseableHttpClient httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();
  68. HttpPost httpPost = new HttpPost(restWebServiceURL);
  69. String requestString = "{"payLoad":{"REQUEST":{"PROCESS_NM":"GetOrdersHierarchy"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}";
  70. StringEntity entity = new StringEntity(requestString);
  71. entity.setContentType(RESPONSE_TYPE_JSON);
  72. httpPost.setEntity(entity);
  73. HttpResponse response = httpClient.execute(httpPost);
  74. response.setHeader("WWW-Authenticate", "Basic realm="L7SSGBasicRealm"");
  75. System.out.println("Test 4 First Response: " + String.valueOf(response));
  76. byte[] credentialsByte = Base64.encodeBase64((username + ":" + password).getBytes(StandardCharsets.UTF_8));
  77. httpPost.setHeader("Authorization", "Basic " + new String(credentialsByte, StandardCharsets.UTF_8));
  78. response = httpClient.execute(httpPost);
  79. System.out.println("Test 4 Second Response: " + String.valueOf(response));
  80. if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
  81. System.out.println("Error While Calling Web restWebServiceURL: " + restWebServiceURL + " HTTP error code : " + response.getStatusLine().getStatusCode());
  82. throw new RuntimeException("Failed : HTTP error code : " + response.getStatusLine().getStatusCode());
  83. }else{
  84. json = EntityUtils.toString(response.getEntity());
  85. logger.("json: " + json);
  86. }
  87. } catch (Exception e) {
  88. System.out.println("Exception While Calling Web restWebServiceURL: " + restWebServiceURL + ", Exception: " + ExceptionUtils.getStackTrace(e));
  89. }
  90. }
  91. return json;
  92. }
  93. }
  94.  
  95. RequestAddCookies:123 - CookieSpec selected: default
  96. RequestAuthCache:77 - Auth cache not set in the context
  97. PoolingHttpClientConnectionManager:255 - Connection request: [route: {s}->https://devint.test.intranet:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
  98. PoolingHttpClientConnectionManager:288 - Connection leased: [id: 0][route: {s}->https://devint.test.intranet:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
  99. MainClientExec:235 - Opening connection {s}->https://devint.test.intranet:443
  100. DefaultHttpClientConnectionOperator:139 - Connecting to devint.test.intranet/155.70.58.219:443
  101. SSLConnectionSocketFactory:337 - Connecting socket to devint.test.intranet/155.70.58.219:443 with timeout 0
  102. SSLConnectionSocketFactory:390 - Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
  103. SSLConnectionSocketFactory:391 - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, ... TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
  104. SSLConnectionSocketFactory:395 - Starting handshake
  105. SSLConnectionSocketFactory:425 - Secure session established
  106. SSLConnectionSocketFactory:426 - negotiated protocol: TLSv1.2
  107. SSLConnectionSocketFactory:427 - negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  108. SSLConnectionSocketFactory:435 - peer principal: CN=cxg7o.test.centurylink.com, OU=IT, O=CenturyLink, L=Monroe, ST=Louisiana, C=US
  109. SSLConnectionSocketFactory:444 - peer alternative names: [cxg7o.test.centurylink.com, cxg7o.test.qintra.com]
  110. SSLConnectionSocketFactory:448 - issuer principal: CN=Symantec Class 3 Secure Server CA - G4, OU=Symantec Trust Network, O=Symantec Corporation, C=US
  111. DefaultHttpClientConnectionOperator:146 - Connection established 10.1.209.211:65485<->155.70.58.219:443
  112. MainClientExec:256 - Executing request POST /X/Y/052ABC/ServicesDEV HTTP/1.1
  113. MainClientExec:261 - Target auth state: UNCHALLENGED
  114. MainClientExec:267 - Proxy auth state: UNCHALLENGED
  115.  
  116.  
  117. headers:133 - http-outgoing-0 >> POST /X/Y/052ABC/ServicesDEV HTTP/1.1
  118. headers:136 - http-outgoing-0 >> Content-Length: 92
  119. headers:136 - http-outgoing-0 >> Content-Type: application/json;charset=UTF-8
  120. headers:136 - http-outgoing-0 >> Host: devint.test.intranet
  121. headers:136 - http-outgoing-0 >> Connection: Keep-Alive
  122. headers:136 - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)
  123. headers:136 - http-outgoing-0 >> Accept-Encoding: gzip,deflate
  124. wire:73 - http-outgoing-0 >> "POST /X/Y/052ABC/ServicesDEV HTTP/1.1[r][n]"
  125. wire:73 - http-outgoing-0 >> "Content-Length: 92[r][n]"
  126. wire:73 - http-outgoing-0 >> "Content-Type: application/json;charset=UTF-8[r][n]"
  127. wire:73 - http-outgoing-0 >> "Host: devint.test.intranet[r][n]"
  128. wire:73 - http-outgoing-0 >> "Connection: Keep-Alive[r][n]"
  129. wire:73 - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)[r][n]"
  130. wire:73 - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[r][n]"
  131. wire:73 - http-outgoing-0 >> "[r][n]"
  132. wire:87 - http-outgoing-0 >> "{"payLoad":{"REQUEST":{"PROCESS_NM":"GetOrdersHierarchy"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}"
  133.  
  134.  
  135. wire:73 - http-outgoing-0 << "HTTP/1.1 500 Internal Server Error[r][n]"
  136. wire:73 - http-outgoing-0 << "Server: Apache-Coyote/1.1[r][n]"
  137. wire:73 - http-outgoing-0 << "L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821[r][n]"
  138. wire:73 - http-outgoing-0 << "Content-Type: text/xml;charset=utf-8[r][n]"
  139. wire:73 - http-outgoing-0 << "Content-Length: 582[r][n]"
  140. wire:73 - http-outgoing-0 << "Date: Wed, 15 Mar 2017 02:21:38 GMT[r][n]"
  141. wire:73 - http-outgoing-0 << "Connection: close[r][n]"
  142. wire:73 - http-outgoing-0 << "[r][n]"
  143. wire:73 - http-outgoing-0 << "<?xml version="1.0" encoding="UTF-8"?>[n]"
  144. wire:73 - http-outgoing-0 << "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">[n]"
  145. wire:73 - http-outgoing-0 << " <soapenv:Body>[n]"
  146. wire:73 - http-outgoing-0 << " <soapenv:Fault>[n]"
  147. wire:73 - http-outgoing-0 << " <faultcode>soapenv:Server</faultcode>[n]"
  148. wire:73 - http-outgoing-0 << " <faultstring>Policy Falsified</faultstring>[n]"
  149. wire:73 - http-outgoing-0 << " <faultactor>https://devint.test.intranet/X/Y/052ABC/ServicesDEV</faultactor>[n]"
  150. wire:73 - http-outgoing-0 << " <detail>[n]"
  151. wire:73 - http-outgoing-0 << " <l7:policyResult status="Authentication Required" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>[n]"
  152. wire:73 - http-outgoing-0 << " </detail>[n]"
  153. wire:73 - http-outgoing-0 << " </soapenv:Fault>[n]"
  154. wire:73 - http-outgoing-0 << " </soapenv:Body>[n]"
  155. wire:73 - http-outgoing-0 << "</soapenv:Envelope>[n]"
  156. headers:122 - http-outgoing-0 << HTTP/1.1 500 Internal Server Error
  157. headers:125 - http-outgoing-0 << Server: Apache-Coyote/1.1
  158. headers:125 - http-outgoing-0 << L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821
  159. headers:125 - http-outgoing-0 << Content-Type: text/xml;charset=utf-8
  160. headers:125 - http-outgoing-0 << Content-Length: 582
  161. headers:125 - http-outgoing-0 << Date: Wed, 15 Mar 2017 02:21:38 GMT
  162. headers:125 - http-outgoing-0 << Connection: close
  163. Test 4 First Response: HttpResponseProxy{HTTP/1.1 500 Internal Server Error [Server: Apache-Coyote/1.1, L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821, Content-Type: text/xml;charset=utf-8, Content-Length: 582, Date: Wed, 15 Mar 2017 02:21:38 GMT, Connection: close, WWW-Authenticate: Basic realm="L7SSGBasicRealm"] ResponseEntityProxy{[Content-Type: text/xml;charset=utf-8,Content-Length: 582,Chunked: false]}}
  164. RequestAddCookies:123 - CookieSpec selected: default
  165. RequestAuthCache:77 - Auth cache not set in the context
  166. PoolingHttpClientConnectionManager:255 - Connection request: [route: {s}->https://devint.test.intranet:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
  167. PoolingHttpClientConnectionManager:288 - Connection leased: [id: 1][route: {s}->https://devint.test.intranet:443][total kept alive: 0; route allocated: 2 of 2; total allocated: 2 of 20]
  168. MainClientExec:235 - Opening connection {s}->https://devint.test.intranet:443
  169. DefaultHttpClientConnectionOperator:139 - Connecting to devint.test.intranet/155.70.58.219:443
  170. SSLConnectionSocketFactory:337 - Connecting socket to devint.test.intranet/155.70.58.219:443 with timeout 0
  171. SSLConnectionSocketFactory:390 - Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
  172. SSLConnectionSocketFactory:391 - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, ... TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
  173. SSLConnectionSocketFactory:395 - Starting handshake
  174. SSLConnectionSocketFactory:425 - Secure session established
  175. SSLConnectionSocketFactory:426 - negotiated protocol: TLSv1.2
  176. SSLConnectionSocketFactory:427 - negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  177. SSLConnectionSocketFactory:435 - peer principal: CN=cxg7o.test.centurylink.com, OU=IT, O=CenturyLink, L=Monroe, ST=Louisiana, C=US
  178. SSLConnectionSocketFactory:444 - peer alternative names: [cxg7o.test.centurylink.com, cxg7o.test.qintra.com]
  179. SSLConnectionSocketFactory:448 - issuer principal: CN=Symantec Class 3 Secure Server CA - G4, OU=Symantec Trust Network, O=Symantec Corporation, C=US
  180. DefaultHttpClientConnectionOperator:146 - Connection established 10.1.209.211:65486<->155.70.58.219:443
  181. MainClientExec:256 - Executing request POST /X/Y/052ABC/ServicesDEV HTTP/1.1
  182. MainClientExec:267 - Proxy auth state: UNCHALLENGED
  183. headers:133 - http-outgoing-1 >> POST /X/Y/052ABC/ServicesDEV HTTP/1.1
  184. headers:136 - http-outgoing-1 >> Authorization: Basic RVNMQ1hHNzpvVnlGUjNFNXMxQU41NnBJTXFOSCE=
  185. headers:136 - http-outgoing-1 >> Content-Length: 92
  186. headers:136 - http-outgoing-1 >> Content-Type: application/json;charset=UTF-8
  187. headers:136 - http-outgoing-1 >> Host: devint.test.intranet
  188. headers:136 - http-outgoing-1 >> Connection: Keep-Alive
  189. headers:136 - http-outgoing-1 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)
  190. headers:136 - http-outgoing-1 >> Accept-Encoding: gzip,deflate
  191. wire:73 - http-outgoing-1 >> "POST /X/Y/052ABC/ServicesDEV HTTP/1.1[r][n]"
  192. wire:73 - http-outgoing-1 >> "Authorization: Basic RVNMQ1hHNzpvVnlGUjNFNXMxQU41NnBJTXFOSCE=[r][n]"
  193. wire:73 - http-outgoing-1 >> "Content-Length: 92[r][n]"
  194. wire:73 - http-outgoing-1 >> "Content-Type: application/json;charset=UTF-8[r][n]"
  195. wire:73 - http-outgoing-1 >> "Host: devint.test.intranet[r][n]"
  196. wire:73 - http-outgoing-1 >> "Connection: Keep-Alive[r][n]"
  197. wire:73 - http-outgoing-1 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)[r][n]"
  198. wire:73 - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[r][n]"
  199. wire:73 - http-outgoing-1 >> "[r][n]"
  200. wire:87 - http-outgoing-1 >> "{"payLoad":{"REQUEST":{"PROCESS_NM":"GetOrdersHierarchy"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}"
  201. wire:73 - http-outgoing-1 << "HTTP/1.1 500 Internal Server Error[r][n]"
  202. wire:73 - http-outgoing-1 << "Server: Apache-Coyote/1.1[r][n]"
  203. wire:73 - http-outgoing-1 << "L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821[r][n]"
  204. wire:73 - http-outgoing-1 << "Content-Type: text/xml;charset=utf-8[r][n]"
  205. wire:73 - http-outgoing-1 << "Content-Length: 582[r][n]"
  206. wire:73 - http-outgoing-1 << "Date: Wed, 15 Mar 2017 02:21:38 GMT[r][n]"
  207. wire:73 - http-outgoing-1 << "Connection: close[r][n]"
  208. wire:73 - http-outgoing-1 << "[r][n]"
  209. wire:73 - http-outgoing-1 << "<?xml version="1.0" encoding="UTF-8"?>[n]"
  210. wire:73 - http-outgoing-1 << "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">[n]"
  211. wire:73 - http-outgoing-1 << " <soapenv:Body>[n]"
  212. wire:73 - http-outgoing-1 << " <soapenv:Fault>[n]"
  213. wire:73 - http-outgoing-1 << " <faultcode>soapenv:Server</faultcode>[n]"
  214. wire:73 - http-outgoing-1 << " <faultstring>Policy Falsified</faultstring>[n]"
  215. wire:73 - http-outgoing-1 << " <faultactor>https://devint.test.intranet/X/Y/052ABC/ServicesDEV</faultactor>[n]"
  216. wire:73 - http-outgoing-1 << " <detail>[n]"
  217. wire:73 - http-outgoing-1 << " <l7:policyResult status="Authentication Required" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>[n]"
  218. wire:73 - http-outgoing-1 << " </detail>[n]"
  219. wire:73 - http-outgoing-1 << " </soapenv:Fault>[n]"
  220. wire:73 - http-outgoing-1 << " </soapenv:Body>[n]"
  221. wire:73 - http-outgoing-1 << "</soapenv:Envelope>[n]"
  222. headers:122 - http-outgoing-1 << HTTP/1.1 500 Internal Server Error
  223. headers:125 - http-outgoing-1 << Server: Apache-Coyote/1.1
  224. headers:125 - http-outgoing-1 << L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821
  225. headers:125 - http-outgoing-1 << Content-Type: text/xml;charset=utf-8
  226. headers:125 - http-outgoing-1 << Content-Length: 582
  227. headers:125 - http-outgoing-1 << Date: Wed, 15 Mar 2017 02:21:38 GMT
  228. headers:125 - http-outgoing-1 << Connection: close
  229. Test 4 Second Response: HttpResponseProxy{HTTP/1.1 500 Internal Server Error [Server: Apache-Coyote/1.1, L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821, Content-Type: text/xml;charset=utf-8, Content-Length: 582, Date: Wed, 15 Mar 2017 02:21:38 GMT, Connection: close] ResponseEntityProxy{[Content-Type: text/xml;charset=utf-8,Content-Length: 582,Chunked: false]}}
  230. Error While Calling Web restWebServiceURL: https://devint.test.intranet/X/Y/052ABC/ServicesDEV HTTP error code : 500
  231. Exception While Calling Web restWebServiceURL: https://devint.test.intranet/X/Y/052ABC/ServicesDEV, Exception: java.lang.RuntimeException: Failed : HTTP error code : 500
  232. at TestMain2.getTextSearchResults(TestMain2.java:132)
  233. at TestMain2.main(TestMain2.java:69)
  234.  
  235. public class TestMainTwo {
  236. private static final String RESPONSE_TYPE_JSON = "application/json;charset=UTF-8";
  237. private static String getTextSearchResults(String restWebServiceURL) {
  238. String json ="";
  239. try {
  240. String jksFile = "C:\Users\temp\Desktop\Cert\ABC1-cxg-test2.jks";
  241. String jksFilePassword = "!jkspassword700";
  242. String username = "<username>";
  243. String password = "<password>";
  244. File file = new File(jksFile);
  245. SSLContext sslcontext = SSLContexts.custom()
  246. .loadTrustMaterial(file, jksFilePassword.toCharArray(),
  247. new TrustStrategy() {
  248. public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {
  249. return true;
  250. }
  251. })
  252. .build();
  253.  
  254. SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, new String[] { "TLSv1", "TLSv1.1", "TLSv1.2" }, null, NoopHostnameVerifier.INSTANCE);
  255.  
  256. HttpHost target = new HttpHost("devint.test.intranet", 443, "https");
  257. CredentialsProvider provider = new BasicCredentialsProvider();
  258. UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(username, password);
  259. provider.setCredentials(new AuthScope(target.getHostName(), target.getPort()),
  260. credentials);
  261. AuthCache authCache = new BasicAuthCache();
  262. BasicScheme basicAuth = new BasicScheme();
  263. authCache.put(target, basicAuth);
  264. HttpClientContext localContext = HttpClientContext.create();
  265. localContext.setAuthCache(authCache);
  266. CloseableHttpClient httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf)
  267. .setDefaultCredentialsProvider(provider)
  268. .build();
  269. HttpPost httpPost = new HttpPost(restWebServiceURL);
  270. String requestString = "{"payLoad":{"REQUEST":{"PROCESS_NM":"GetOrdersHierarchy"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}";
  271. StringEntity entity = new StringEntity(requestString);
  272. entity.setContentType(RESPONSE_TYPE_JSON);
  273. httpPost.setEntity(entity);
  274. HttpResponse response = httpClient.execute(target,httpPost,localContext);
  275. System.out.println("Test 4 First Response: " + String.valueOf(response));
  276. } catch (Exception e) {
  277. System.out.println("Exception While Calling Web restWebServiceURL: " + restWebServiceURL + ", Exception: " + ExceptionUtils.getStackTrace(e));
  278. }
  279. return json;
  280. }
  281. }
  282.  
  283. RequestAddCookies:123 - CookieSpec selected: default
  284. RequestAuthCache:131 - Re-using cached 'basic' auth scheme for https://devint.test.intranet:443
  285. PoolingHttpClientConnectionManager:255 - Connection request: [route: {s}->https://devint.test.intranet:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
  286. PoolingHttpClientConnectionManager:288 - Connection leased: [id: 0][route: {s}->https://devint.test.intranet:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
  287. MainClientExec:235 - Opening connection {s}->https://devint.test.intranet:443
  288. DefaultHttpClientConnectionOperator:139 - Connecting to devint.test.intranet/155.70.58.219:443
  289. SSLConnectionSocketFactory:337 - Connecting socket to devint.test.intranet/155.70.58.219:443 with timeout 0
  290. SSLConnectionSocketFactory:390 - Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
  291. SSLConnectionSocketFactory:391 - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, ... TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
  292. SSLConnectionSocketFactory:395 - Starting handshake
  293. SSLConnectionSocketFactory:425 - Secure session established
  294. SSLConnectionSocketFactory:426 - negotiated protocol: TLSv1.2
  295. SSLConnectionSocketFactory:427 - negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  296. SSLConnectionSocketFactory:435 - peer principal: CN=cxg7o.test.centurylink.com, OU=IT, O=CenturyLink, L=Monroe, ST=Louisiana, C=US
  297. SSLConnectionSocketFactory:444 - peer alternative names: [cxg7o.test.centurylink.com, cxg7o.test.qintra.com]
  298. SSLConnectionSocketFactory:448 - issuer principal: CN=Symantec Class 3 Secure Server CA - G4, OU=Symantec Trust Network, O=Symantec Corporation, C=US
  299. DefaultHttpClientConnectionOperator:146 - Connection established 10.1.209.211:49163<->155.70.58.219:443
  300. MainClientExec:256 - Executing request POST /X/Y/052ABC/ServicesDEV HTTP/1.1
  301. MainClientExec:261 - Target auth state: CHALLENGED
  302. MainClientExec:267 - Proxy auth state: UNCHALLENGED
  303. headers:133 - http-outgoing-0 >> POST /X/Y/052ABC/ServicesDEV HTTP/1.1
  304. headers:136 - http-outgoing-0 >> Content-Length: 92
  305. headers:136 - http-outgoing-0 >> Content-Type: application/json;charset=UTF-8
  306. headers:136 - http-outgoing-0 >> Host: devint.test.intranet
  307. headers:136 - http-outgoing-0 >> Connection: Keep-Alive
  308. headers:136 - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)
  309. headers:136 - http-outgoing-0 >> Accept-Encoding: gzip,deflate
  310. headers:136 - http-outgoing-0 >> Authorization: Basic RVNMQ1hHNzpvVnlGUjNFNXMxQU41NnBJTXFOSCE=
  311. wire:73 - http-outgoing-0 >> "POST /X/Y/052ABC/ServicesDEV HTTP/1.1[r][n]"
  312. wire:73 - http-outgoing-0 >> "Content-Length: 92[r][n]"
  313. wire:73 - http-outgoing-0 >> "Content-Type: application/json;charset=UTF-8[r][n]"
  314. wire:73 - http-outgoing-0 >> "Host: devint.test.intranet[r][n]"
  315. wire:73 - http-outgoing-0 >> "Connection: Keep-Alive[r][n]"
  316. wire:73 - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_102)[r][n]"
  317. wire:73 - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[r][n]"
  318. wire:73 - http-outgoing-0 >> "Authorization: Basic RVNMQ1hHNzpvVnlGUjNFNXMxQU41NnBJTXFOSCE=[r][n]"
  319. wire:73 - http-outgoing-0 >> "[r][n]"
  320. wire:87 - http-outgoing-0 >> "{"payLoad":{"REQUEST":{"PROCESS_NM":"GetOrdersHierarchy"},"ITEMS":{"0":{"ORDER_ID":"ABC1"}}}}"
  321. wire:73 - http-outgoing-0 << "HTTP/1.1 500 Internal Server Error[r][n]"
  322. wire:73 - http-outgoing-0 << "Server: Apache-Coyote/1.1[r][n]"
  323. wire:73 - http-outgoing-0 << "L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821[r][n]"
  324. wire:73 - http-outgoing-0 << "Content-Type: text/xml;charset=utf-8[r][n]"
  325. wire:73 - http-outgoing-0 << "Content-Length: 582[r][n]"
  326. wire:73 - http-outgoing-0 << "Date: Wed, 15 Mar 2017 02:30:20 GMT[r][n]"
  327. wire:73 - http-outgoing-0 << "Connection: close[r][n]"
  328. wire:73 - http-outgoing-0 << "[r][n]"
  329. wire:73 - http-outgoing-0 << "<?xml version="1.0" encoding="UTF-8"?>[n]"
  330. wire:73 - http-outgoing-0 << "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">[n]"
  331. wire:73 - http-outgoing-0 << " <soapenv:Body>[n]"
  332. wire:73 - http-outgoing-0 << " <soapenv:Fault>[n]"
  333. wire:73 - http-outgoing-0 << " <faultcode>soapenv:Server</faultcode>[n]"
  334. wire:73 - http-outgoing-0 << " <faultstring>Policy Falsified</faultstring>[n]"
  335. wire:73 - http-outgoing-0 << " <faultactor>https://devint.test.intranet/X/Y/052ABC/ServicesDEV</faultactor>[n]"
  336. wire:73 - http-outgoing-0 << " <detail>[n]"
  337. wire:73 - http-outgoing-0 << " <l7:policyResult status="Authentication Required" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>[n]"
  338. wire:73 - http-outgoing-0 << " </detail>[n]"
  339. wire:73 - http-outgoing-0 << " </soapenv:Fault>[n]"
  340. wire:73 - http-outgoing-0 << " </soapenv:Body>[n]"
  341. wire:73 - http-outgoing-0 << "</soapenv:Envelope>[n]"
  342. headers:122 - http-outgoing-0 << HTTP/1.1 500 Internal Server Error
  343. headers:125 - http-outgoing-0 << Server: Apache-Coyote/1.1
  344. headers:125 - http-outgoing-0 << L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821
  345. headers:125 - http-outgoing-0 << Content-Type: text/xml;charset=utf-8
  346. headers:125 - http-outgoing-0 << Content-Length: 582
  347. headers:125 - http-outgoing-0 << Date: Wed, 15 Mar 2017 02:30:20 GMT
  348. headers:125 - http-outgoing-0 << Connection: close
  349. HttpAuthenticator:86 - Authentication succeeded
  350. Test 4 First Response: HttpResponseProxy{HTTP/1.1 500 Internal Server Error [Server: Apache-Coyote/1.1, L7-Policy-URL: https://devint.test.intranet:443/ssg/policy/disco?serviceoid=83f02502063fbaf43344f0c0888e3821, Content-Type: text/xml;charset=utf-8, Content-Length: 582, Date: Wed, 15 Mar 2017 02:30:20 GMT, Connection: close] ResponseEntityProxy{[Content-Type: text/xml;charset=utf-8,Content-Length: 582,Chunked: false]}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement