Remember The Milk
Some time ago Google point me to the Remember The Milk service which looks interesting although it definitely wasn't what I've been looking for. An interesting question which came into my mind was if and how this service could be integrated into the IDE.
There's already available some documentation which describes way how services could be integrated into NetBeans' REST palette, which has been replaced by Web Service Manager in NetBeans 6.1, see for example http://wiki.netbeans.org/CreatePartnerWebServiceModule, http://wiki.netbeans.org/RESTPartnerSvcRegistration or Geerjan's blog but none from these shows how to integrate some service with REST interface, like ie Remember The Milk, into the IDE. And "how" is really simple, just follow these steps:
So for Remember The Milk service, which is similar to Flickr we need:
Module sources are available here, nbm you can install into the IDE is here. Enjoy!
In the next part I'll try to show, how this service can be called and used from within the IDE
.Posted at 08:35PM May 30, 2008 by jungi in NetBeans | Comments[2]
tcpmon in NetBeans 5.5
tcpmon is a utility to monitor a TCP connection, authored by Inderjeet Singh and hosted on https://tcpmon.dev.java.net/ which runs in in standalone mode, as Java Web Start application and now also directly from NetBeans.[Read More]
Posted at 02:13PM Nov 08, 2006 by jungi in NetBeans |
Export EJB client jar in NetBeans 5.5 & 6.1
When packaging enterprise application it can be useful to have separated EJB remote and local interfaces from EJB implementation. The jar with EJB interfaces (aka ejb client jar) can be then packaged into the lib directory in the final ear archive to become automatically visible to all submodules. The ejb client jar is also useful in cases you want someone to call your beans but you don't want to give him implementation classes. In this entry I'll present simple NetBeans module for NetBeans 5.5/6.1 which is able to export ejb interfaces from existing ejb module project. I'll also show you a way how to do that as a part of build process if you don't want to use "just another module" for that.[Read More]
Posted at 07:41PM Oct 19, 2006 by jungi in NetBeans |
Java EE application client on top of NetBeans Platform
This entry shows an idea how to create Java EE application client based on NetBeans Platform which we will deploy to and run on GlassFish. For simplicity FeedReader demo application which is bundled with NetBeans will be used for demonstration.[Read More]
Posted at 06:04PM Jul 28, 2006 by jungi in NetBeans | Comments[1]
Securing Web Service (BASIC auth)
This entry is based on this example and shows how to configure a JAX-WS-based web service for HTTP BASIC authentication in Netbeans 5.5. The purpose of this is not to show how to create webservice but to show how to configure security on it, so just simple HelloService will be used.[Read More]
Posted at 08:50PM Jul 18, 2006 by jungi in NetBeans |
NetBeans 5.0 & Web service client on JBoss
Today we will create JSR-109 (container generated) web service client for the web service from my previous post. And we will use JBoss again
Code of the form in index.jsp, nothing more to say here:
Again an easy step - use a wizard for it. Fill in values for wsdl url (should be smth like http://localhost:8080/JBossWebservice/CalcService?WSDL), package name (I will use math.calculator.client), press Retrieve button and Finish the wizard. The client will be generated by IDE.
Now we will create the heart of our simple application - servlet which will call our web service and show us the result of that call. First, we will create some helper methods - for retrieving parameter from HttpServletRequest and for showing instance of ComplexNumber in human-readable way:
Following picture shows possible implementation of processRequest method without ws invocation code:
Now use "Web Service Client Resources -> Call Web Service Operation" action from editor's context menu on emtpy lines in our code. This action will add necessary helper methods to our servlet and also the ws operation invocation code. Only thing we have to do is to modify generated code in processRequest method. The result can look like this:
This is the most important part if we want to be run this project on JBoss. As in previous case (ws creation) we have to create server-side artifacts manually - here's target for project’s build.xml (if the name of your service is not CalcService replace it with yourServiceName):
And the last thing we have to do is to remove JAX-RPC library from the libraries which will be packaged with our application - we need this library only for building our project. So uncheck "package" checkbox in for JAX-RPC 1.6 library in Project properties -> Libraries.
Now we are ready to deploy and run our project. Let's see if it works (click on the picture for better view):
And here you can download sources for this project. Enjoy... 
Posted at 02:59PM Feb 03, 2006 by jungi in NetBeans | Comments[2]
NetBeans 5.0 & Web services on JBoss
Let’s create doc/lit web service which will provide two operations: plus and minus. Sounds easy? So do it for complex type and have JBoss as target server… 
Complex number consists of real and imaginary part, so we will create a value object for it. It will have two private fields, some getters and setters and two constructors. Full code:
Creating web service is also an easy step there’s a wizard for its creation and actions for adding operation to web service (you can find it in the editor’s and web service’s context menu). So here’s only listing of web service implementation:
This is the most important part if we want to be able to use the service which will be deployed to JBoss – we have to create server-side artifacts manually but wscompile is our friend here
(see JBossWSFAQ). So let’s do it – add following target into project’s build.xml (if the name of your service is not CalcService replace it with _yourServiceName_ ):
Now we are ready to deploy our project and to test our web service. Let's see if it works (click on the picture for better view):
And here you can download sources for this project. Enjoy... 
Posted at 03:10AM Feb 03, 2006 by jungi in NetBeans | Comments[4]
Today's Page Hits: 60