{"id":117,"date":"2010-02-20T14:09:00","date_gmt":"2010-02-20T12:09:00","guid":{"rendered":"http:\/\/www.bestcoder.net\/?p=117"},"modified":"2012-10-14T13:53:06","modified_gmt":"2012-10-14T13:53:06","slug":"blackberry-application-development-part-2-stub-generator","status":"publish","type":"post","link":"http:\/\/www.bestcoder.net\/?p=117","title":{"rendered":"Blackberry Application Development &#8211; Part 2 (Stub Generator &amp; Introduction to Eclipse)"},"content":{"rendered":"<p>Now we are starting to develop Blackberry part of our tutorial.<\/p>\n<p>We will use following development IDE &amp; tools during our tutorial.<\/p>\n<ul>\n<li><a href=\"http:\/\/na.blackberry.com\/eng\/developers\/javaappdev\/devtools.jsp\">Eclipse 3.4.1 with Blackberry Plugin<\/a> (<a href=\"https:\/\/www.blackberry.com\/Downloads\/contactFormPreload.do?code=DC727151E5D55DDE1E950767CF861CA5&amp;dl=AC44596FD197101932FFB572DFBC129C\" target=\"_blank\">Download<\/a>)<\/li>\n<li>BlackBerry Email and MDS Services Simulator Package v4.1.4 (<a href=\"https:\/\/www.blackberry.com\/CorpDevZone\/sd2integration.do?file=https:\/\/www.blackberry.com\/Downloads\/contactFormPreload.do?code=00EC53C4682D36F5C4359F4AE7BD7BA1&amp;dl=A863E2C10B7E517A09C80F83418E8B2D\" target=\"_blank\">Download<\/a>)<\/li>\n<li>Sun Java (TM) Wireless Toolkit 2.5.2_01 for CLDC (<a href=\"http:\/\/java.sun.com\/products\/sjwtoolkit\/download.html\" target=\"_blank\">Download<\/a>)<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>Check your webservice is correct or not using browser. Type the webservice url to address field. Webservice url seems like that : http:\/\/&lt;hostname&gt;\/&lt;nsf db file path&gt;\/&lt;web service name&gt;?wsdl<\/p>\n<p>My webservice url is <a title=\"http:\/\/gmlfbulut.bestcoder.net\/searchpeople.nsf\/SearchPeople?wsdl\" href=\"http:\/\/gmlfbulut.bestcoder.net\/searchpeople.nsf\/SearchPeople?wsdl\">http:\/\/gmlfbulut.bestcoder.net\/searchpeople.nsf\/SearchPeople?wsdl<\/a><\/p>\n<ol>\n<li>Open the Sun Java Wireless Toolkit application.<a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP10.JavaStubGeneratorApplication.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 10. Java - Stub Generator Application\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP10.JavaStubGeneratorApplication_thumb.jpg\" alt=\"SP - 10. Java - Stub Generator Application\" width=\"354\" height=\"205\" border=\"0\" \/><\/a><\/li>\n<li>Select <strong>Stub Generator<\/strong> and click to <strong>Launch<\/strong> button. <a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP11.StubGenerator.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 11. Stub Generator\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP11.StubGenerator_thumb.jpg\" alt=\"SP - 11. Stub Generator\" width=\"185\" height=\"244\" border=\"0\" \/><\/a><\/li>\n<li>Type necessary information to Dialog\n<ol>\n<li><strong>WSDL Filename or URL : <\/strong>Your WSDL URL \u2013&gt; http:\/\/&lt;hostname&gt;\/&lt;nsf db file path&gt;\/&lt;web service name&gt;?wsdl<\/li>\n<li><strong>Output Path : <\/strong>Location for generated files. Select a directory. For example : C:\\SearchPeople<\/li>\n<li><strong>Output Package : <\/strong>Type the package name for your java files. For example : com.blackberry.searchpeople<\/li>\n<li><strong>CLDC Version : <\/strong>Select CLDC 1.1 option. I don\u2019t know exactly what is it \ud83d\ude42<\/li>\n<\/ol>\n<\/li>\n<li>Select <strong>OK<\/strong> button to finish process.<\/li>\n<\/ol>\n<p>If you got an error, please check this list to solve problem :<\/p>\n<ol>\n<li>Check the domino server is running \ud83d\ude42 just kidding \u2026<\/li>\n<li>Check HTTP Task on your server is running\n<ol>\n<li>Type on console \u201cshow tasks\u201d. On the list \u201cHTTP Server\u201d \u201cListen for connect requests on TCP Port : 80\u201d<\/li>\n<\/ol>\n<\/li>\n<li>Check server configuration (I mentioned about in Part I)<\/li>\n<li>Check Webservice Consumer codes<\/li>\n<\/ol>\n<p>If everything is OK, Stub Generator shows a dialogbox like this. \u201c<span style=\"color: #000080;\"><em>Stub Generation Complete<\/em><\/span>\u201d<\/p>\n<p>After that close Stub Generator application. Goto <strong>C:\\SearchPeople<\/strong> directory. Look at files. You will see 8 files. We need java files to begin our blackberry application development.<\/p>\n<p><a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP10.StubFiles.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 10. Stub Files\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP10.StubFiles_thumb.jpg\" alt=\"SP - 10. Stub Files\" width=\"496\" height=\"234\" border=\"0\" \/><\/a><\/p>\n<p>Now open your Eclipse for Blackberry application.<\/p>\n<p>Now we will create new Blackberry Project. Click to <strong>File \u2013&gt; New \u2013&gt; Project<\/strong><\/p>\n<p>Expand Blackberry category, select Blackberry Project and click to Next button.<\/p>\n<p><a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP12.EclipseCreateProject1.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 12. Eclipse Create Project 1\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP12.EclipseCreateProject1_thumb.jpg\" alt=\"SP - 12. Eclipse Create Project 1\" width=\"286\" height=\"286\" border=\"0\" \/><\/a><\/p>\n<p>Type a name for our project. I choose <strong>\u201cSearchPeople\u201d<\/strong> for my project\u2019s name. And click to <strong>Finish<\/strong> button.<\/p>\n<p><a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP13.EclipseCreateProject2.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 13. Eclipse Create Project 2\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP13.EclipseCreateProject2_thumb.jpg\" alt=\"SP - 13. Eclipse Create Project 2\" width=\"251\" height=\"251\" border=\"0\" \/><\/a><\/p>\n<p>Our project looks like this from Package Explorer.<\/p>\n<p><a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP14.EclipseCreateProject3.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 14. Eclipse Create Project 3\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP14.EclipseCreateProject3_thumb.jpg\" alt=\"SP - 14. Eclipse Create Project 3\" width=\"525\" height=\"225\" border=\"0\" \/><\/a><\/p>\n<p>Now we need to add our java files to project.<\/p>\n<p>Create a <strong>Package <\/strong>under <strong>src <\/strong>folder with the name \u201c<strong>com.blackberry.searchpeople<\/strong>\u201d<\/p>\n<ol>\n<li><span style=\"background-color: #ffffff;\">Right mouse click on the <strong>src<\/strong> folder.<\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">Click to <strong>New \u2013&gt; Package<\/strong><\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">Name : <strong>com.blackberry.searchpeople<\/strong><\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">Click to <strong>Finish<\/strong> button.<\/span><\/li>\n<\/ol>\n<p>Now add java source files to this package<\/p>\n<ol>\n<li><span style=\"background-color: #ffffff;\">Right mouse click on the package \u201ccom.blackberry.searchpeople\u201d<\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">Click to <strong>Import<\/strong><\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">Select <strong>General \u2013&gt; FileSystem<\/strong> category<\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">From Directory : C:\\SearchPeople\\com\\blackberry\\searchpeople<\/span><\/li>\n<li><span style=\"background-color: #ffffff;\">Select <strong>*.Java<\/strong> files and click to Finish button. <a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP15.EclipseImportJavaFiles.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 15. Eclipse Import Java Files\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP15.EclipseImportJavaFiles_thumb.jpg\" alt=\"SP - 15. Eclipse Import Java Files\" width=\"272\" height=\"289\" border=\"0\" \/><\/a> <\/span><\/li>\n<\/ol>\n<p>Now our application looks like this.<\/p>\n<p><a href=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP14.EclipseCreateProject4.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SP - 14. Eclipse Create Project 4\" src=\"http:\/\/www.bestcoder.net\/wp-content\/uploads\/2010\/02\/SP14.EclipseCreateProject4_thumb.jpg\" alt=\"SP - 14. Eclipse Create Project 4\" width=\"303\" height=\"284\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now we are starting to develop Blackberry part of our tutorial. We will use following development IDE &amp; tools during our tutorial. Eclipse 3.4.1 with Blackberry Plugin (Download) BlackBerry Email and MDS Services Simulator Package v4.1.4 (Download) Sun Java (TM) Wireless Toolkit 2.5.2_01 for CLDC (Download)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[85,10,9,7],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-blackberry","category-lotusnotesdevelopment","tag-blackberry","tag-eclipse","tag-lotus","tag-webservice","entry","has-more-link"],"_links":{"self":[{"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":6,"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":216,"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions\/216"}],"wp:attachment":[{"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bestcoder.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}