{"id":10093,"date":"2014-06-09T10:05:38","date_gmt":"2014-06-09T15:05:38","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=10093"},"modified":"2014-06-09T10:05:38","modified_gmt":"2014-06-09T15:05:38","slug":"use-jdev-http-analyzer-to-test-jersey-restful-service","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=10093","title":{"rendered":"Use JDev HTTP Analyzer to test Jersey RESTful Service"},"content":{"rendered":"<p>* From JDev, open <em>Tools > HTTP Analyzer<\/em><br \/>\n* Click <em>Create New Request<\/em> icon (second from upper left corner)<\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_createNewRequest_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_createNewRequest_1.jpg\" alt=\"httpAnalyzer_createNewRequest_1\" width=\"72\" height=\"47\" class=\"aligncenter size-full wp-image-10094\" \/><\/a><\/h6><\/span>\n<p>* Click <em>HTTP Content<\/em> tab (second from lower left corner)<\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_httpContent_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_httpContent_1-300x31.jpg\" alt=\"httpAnalyzer_httpContent_1\" width=\"300\" height=\"31\" class=\"aligncenter size-medium wp-image-10095\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_httpContent_1-300x31.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_httpContent_1.jpg 311w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Enter or select:<br \/>\n&#8211; URL field: Jersery RESTful service application WADL URL, e.g. <em>http:\/\/127.0.0.1:7101\/MyEJBModel\/jersey\/<strong>application.wadl<\/strong><\/em><br \/>\n&#8211; Method: <em>GET<\/em><br \/>\n* Click <em>Send Request<\/em> button and you should get a WADL XML response<\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_1-300x100.jpg\" alt=\"httpAnalyzer_wadl_1\" width=\"300\" height=\"100\" class=\"aligncenter size-medium wp-image-10097\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_1-300x100.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_1.jpg 775w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* On the WADL response window,<br \/>\n&#8211; locate the resource method you&#8217;d like to invoke, e.g. <em>listDepartments<\/em><br \/>\n&#8211; hold down Ctl button and click the method block<\/p>\n<span id=\"_3\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_1-300x80.jpg\" alt=\"httpAnalyzer_wadl_invoke_1\" width=\"300\" height=\"80\" class=\"aligncenter size-medium wp-image-10098\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_1-300x80.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_1.jpg 398w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* A new HTTP Analyzer window opens prepopulated with the RESTful request info<br \/>\n* Click <em>Send Request<\/em> button<br \/>\n* Response shows up in the Response window<\/p>\n<span id=\"_4\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_3-300x28.jpg\" alt=\"httpAnalyzer_wadl_invoke_3\" width=\"300\" height=\"28\" class=\"aligncenter size-medium wp-image-10100\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_3-300x28.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2014\/06\/httpAnalyzer_wadl_invoke_3.jpg 531w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n","protected":false},"excerpt":{"rendered":"<p>* From JDev, open Tools > HTTP Analyzer * Click Create New Request icon (second from upper left corner) * Click HTTP Content tab (second from lower left corner) * Enter or select: &#8211; URL field: Jersery RESTful service application &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=10093\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[78,483],"tags":[585,205],"class_list":["post-10093","post","type-post","status-publish","format-standard","hentry","category-jdev","category-restful-soa","tag-jdev","tag-restful"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2CN","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10093"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10093\/revisions"}],"predecessor-version":[{"id":10103,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10093\/revisions\/10103"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}