Skip to main content

Posts

Showing posts with the label java

Testing Remote Data Services with FlexUnit

This is a short example that describes an approach on testing a Flex remote data access code with FlexUnit . The access to the remote services in Flex is provided via HTTPService , WebService or RemoteObject classes. The requests to the data services are handled asynchronously. That adds a bit more complexity to the unit testing. In this example, I will share a design idea on how to test a client side of the remote data services. This is something I came up with working on my "pet" project. The "pet" project is a Web application that is based on a three tier architecture: an SQL database, a middleware part implemented with Java, Hibernate, and BlazeDS, and a client tier implemented with Flex. The example shown here works on a client side and tests access to the server-side part of the application. The tests covered in this example are designed to test a user login operation. The login operation is defined on the server-side class called UserService. public class ...

How to debug SOAP on Mac with tcpdump

I’ve been using several tools to debug SOAP on Mac and Windows. I would like to share my experience in using some of the tools and show some examples. So far I found four major categories of tools that are useful in debugging SOAP: Interface listeners such as tcpdump and others Proxy tools such as TCPMonitor Servlet filters Application server logging. For example, Weblogic has a special logging option that dumps SOAP requests and responses to the sever log. All of these tools have their own advantages and disadvantages. In this article, I will describe the first type - an interface listener tool called tcpdump. I am planning to describe other three categories in the future posts. The tcpdump is a tool that sniffs IP traffic and dumps it to a file or a standard output stream. It was originally developed by Van Jacobson, Craig Leres and Steven McCanne from the Lawrence Berkeley National Laboratory, University of California, Berkeley, CA. It is open source. The tcpdump documentation...

How To Run Java EE 5 Tutorial Examples On Mac

I spent some time configuring Java environment on Mac. Here are a few tips on how to get it going. The Max OS X comes with Java 5 installed. So, here are main steps: * Download Java EE 5 Tutorial package from http://java.sun.com/javaee/5/docs/tutorial/information/download.html * Download Sun Java System Application Server 9.1 from http://java.sun.com/javaee/downloads/ . I downloaded Java EE 5 SDK Update 3 that comes with the application server. * Use instructions posted here on how to install it http://java.sun.com/javaee/sdk/javaee5sdk_install.jsp Also use Application Server Installation Tips posted here: http://java.sun.com/javaee/5/docs/tutorial/doc/gexaj.html Once the application server is installed, change permissions on the SDK/javadb, so the folder permissions allow creating a database. Here is an example on how to do that: cd SDK sudo chown –R your_name javadb In general, I believe it is a good idea to change permissions to other files in SDK to some less privileged user than r...