Wednesday, July 30, 2008

output template

Today, i am exploring webmethods about assigning template to output. WM provides you several template's type as an output. They are:

  1. xml
  2. html
  3. wml
  4. hdml
The third and fourth are types that can be used in mobile. Thus, you may want to create a service which return an output to your mobile, wm has provided you an easy way.

You can fill in the value using DSP (Dynamic Server Page) syntax. DSP is pretty much like a server side scripting (PHP or JSP) provided by wm. By assigning some variable in certain place, you fill in the output and send the output to client such as computer's browser and mobile's browser.

Tuesday, July 29, 2008

Ways to send an input to webmethods

There are several ways to send an input to webmethods:

  1. Using Get method. Giving the input service's name like the variable name. To note that the character is in case sensitive.
  2. Using Post method. This is pretty much same like the above. The different must be the hidden data posted in this method.
For more information is in the webmethod's documentation page 356.

The URL address to invoke webmethod's service is in the following formats:


I created a code to post a variable using HttpClient (developed by Apache). The following is a piece of code that I created:

client.getState().setCredentials(new AuthScope("localhost", 5555), new
PostMethod postMethod = new PostMethod(url);
postMethod.addParameter("name", "nama saya arie murdianto ganteng banged");
postMethod.addParameter("USERNAME", "Administrator");
postMethod.addParameter("PASSWORD", "manage");

byte[] responseBody = postMethod.getResponseBody();

My flow step is only performing the length of the input String. For your information that the latest HttpClient is having 2 dependencies. They are commons codec and commons logging

Thursday, July 24, 2008

Pipeline processing

When a message comes to several processing steps. Let's say there is an event triggering the process which is sending a message to several process. The processes are: authentication, decryption and updating db.

In order to maintain a loosely integration, it will be difficult. The best way is to make each process independent. There is a method called pipelines processing. Yeah, you can imagine the method is having pipe connected each other. When there is a message comes to the pipe. The process will taking the message from it and process it. Once the first process finishes it process, then it just straightly put the message to another pipe to be processed. While the first process finishes its job, it can take another message without waiting for the message to be finished until the last process. Using this method, the throughput will be increased.

Note that each process are running independently. It may be better to have a look at the following image.

The above picture is taken from the book Addison wesley- Martin Fowler - Enterprise Integration pattern.

Looking on the above image, we can see a comparison between pipeline processing and sequential processing. The throughput of pipeline is more effective compare to sequential. The time needed to process 3 messages in pipeline is almost a half of sequential.

Tuesday, July 22, 2008

Integration (Message and Message channel)

Message channel can be imagined as a conduit of data between one application to another. The data which will be transmitted via message channel, should be wrapped by some object that can be understand by message channel. Or we usually call this as a marshalling. Thus, before going to the message broker. The data should be marshalled. The data will be queued in the message broker.

If there is a client interested on the data, it will go to the message channel to get the data from the message broker. Before consuming the data, the data should be unmarshalled.

The data that is being transmitted via message channel contains 2 parts. They are:

  • Header, header contains the data regarding destination and application.
  • Body, this part contains information as-is. there should not be any modification on this part.
Several technologies divide the body content which depends on the type of the body content. For JMS itself, it defines several body content type, for example:
  • TextMessage
  • ByteMessage, and
  • Object message.

Monday, July 21, 2008


In order to perform integration, there are several points we need to aware of. They are:

  1. Loosely couple
  2. Simplify integration
  3. Unified data format
  4. Data staleness
  5. Awareness of Asynchronicity
Thus, when we perform integration, those points are the thing we need to remember so that it produces a good result. However, There are several ways to perform integration among several applications. They are:
  1. File transfer
  2. Shared database
  3. RPC
  4. Messaging

The above ways have advantages and disadvantages, it depends on the way people performing integration but the most recommended way is messaging. Messaging solves several limitation on File transfer, Shared database and RPC. Using messaging, you can store data and functions. With messaging, the system will be very loosely. So, the integrated applications will not depend each other.

Monday, July 14, 2008

Get back to my hometown

Today is my last day in this week in my company. Hehehe, a bit confusing right? I feel that I cannot wait any longer to go back to my hometown. Meet my family, my cousin and my friends. I cannot imagine what it would like. I m hoping that I could be refreshed after going back to my hometown. Really, this is what I want to, this is what I meant to. My working here is not meant only for working and get a money. There is other purpose what I am here.

Beside attending my cousin's marriage, I need to finish my left task in my home town. Hehehe, as usual of me, always leaving something behind. One of the thing left behind, is giving back the stuffs that I have borrowed :P. What the hell!!!!..... My bad.

If you are an expatriate and moreover this is your first overseas traveling. You will feel what I feel. A very hard homesickness is one of the purpose why do I want to go back. Hehehe...... May be what I feel cannot be imagine by anyone who has never felt like what I feel. That's all what I want to write now. I m hoping that getting back to my hometown will recharge my spirit, will refresh my mind. Thus, I will be getting back to be myself. As an ambitious man, as a very hardworker man.

Amien!!!! Amiennnn!!!!

Sunday, July 13, 2008

Different between servlet and JSP

I have done a little experiment about jsp and servlet. In the first time, I thought both files will be compiled and run in the same way. But in fact, both files are treated different by Tomcat. I have never come across on this little experiment before.

I did 3 experiments. In the first experiment, I went through the following steps:

  1. Create jsp a very simple jsp file. It only contains the html tag.
  2. Startup tomcat.
The above experiment come with the result that there is a file created by Tomcat. The filename is tldCache.ser. I am not really sure on this file, but I found some source saying that this file is used by Tomcat as a cache for tld tag defined in jsp. Thus, Tomcat doesnt read or scan the tag every time the request is meant to the jsp file.

The second experiment, I went through the following steps:
  1. Create a simple jsp file which contains html tag and several java operation (which is looping something). The filename is test.jsp
  2. startup Tomcat.
The result of this experiment is Tomcat produces java file and class file. The files are located in /work/. The files which are produced by Tomcat, are and test_jsp.class. The thing that I can get from the second experiment is, Tomcat produces java file which extends org.apache.jasper.runtime.HttpJspBase. It is completely different from what I had thought before.

In the third experiment, I went through the following steps:
  1. Create a very simple java class extends HttpServlet.
  2. Compile it to be ja va class.
  3. Create directory /work//WEB-INF/classes.
  4. Create mapping file.
  5. Startup Tomcat.
In the last experiment, I didnt see any files created by Tomcat. Which means that Tomcat will use it in memory directly without creating any files.

My bad that I didnt come across this experiment before. I have gone through the things that is too far such as playing around with spring and webwork but never think on this basic thing. I hope my experiments will be useful for all of the visitor.

Thursday, July 10, 2008

SQL server backup restoration

Several days ago, I tried to restore a SQL server backup file to a just-created DB in my local. Actually, I am not really good on SQL server. Even performing restoration or backup, I had never tried them before. Moreover, I really hate about this product because it takes a lot of resource (memory, hardisk space, cpu) in my computer thus, I dont have any chance to learn it.

However, in order to perform SQL backup, you can do it easily in SQL server Management studio. But for restoration, somehow it fails performing it in management studio. I got a very annoying error message. Thus, another way that i can think of is, through console. I perform backup through the following command.

restore database DatabaseName
from file ""
with replace

For more detail about the query, please refer to the microsoft's site. If you want to have the real script, I would be happy to provide it.

Wednesday, July 9, 2008

My Birthday

Today is my birthday. A lot of my friends give birthday greeting through friendster. Thanks for it. One special greeting was coming from my family. my sister sent me a birthday greeting last night. The thing that I really like from her wish is a wish to be a better man as a son, as a big brother and as a young brother and of course as a man who live in society.

I wish to be a better man as well for my family and for the people around me. I hope so. Amiieenn.....

Tuesday, July 8, 2008


Do you know guys an application named Crowd. Yesterday, I tried this stuff and I think the idea behind this application, is pretty much cool. With only 1 application, you can delegate your user management to this god damned application. Besides, this application can be used as an SSO (Single Sign On) application to all applications which have been integrated with Crowd.

You can centralize your user management to only 1 application. The user can be created, edited from Crowd. I have tried this on Confluence. Confluence is knowledge management system developed by Atlassian. When I was integrating Crowd and Confluence, I found that it is very easy to perform this integration.

But i am not sure to use a custom application to use it. not sure whether it works or not. Can this application manage any users from a custom application. If so, there should be a convention on developing a custom application.

Sunday, July 6, 2008

Pretty girl

Umm ... It is a bit funny, isnt it? From the title, you can see what will I write into this god damned blog. Huehue..... yeah man..... this afternoon I went to Mid Valley. Screwing around just for finding what my cousin "sepatu lucu". fuuh.... it is a bit hard for me as I have never bought such thing especially for a girl. But somehow I dont want to make her great day is screwed. I want to make that moment is as special as possible. Do you guys know what sort of moment is that? Marriage. Yeah this is once in a life moment. So, I would like to have such shoe. After calling her regarding the shoe that she order, I explained to her about a fashion shoe here. Listening to my explanation, he didnt want me to get it as it is not suitable for her. Do you know what is that? That is a high heel shoe.

I am screwing around all of the shops over there and got nothing. However, when I was in Jusco, I saw a pretty god damn girl. Waaww...... damn it. She is so much pretty. Her face is much more like arabian-malay. I like such face much. I have met such face two times. I hope very on getting such girl. But of course, her heart is much more important instead of her face. If I get a pretty god damn girl but her heart is pretty much bad. I would like her to die instead of being my ???? :P. Errmm..... what I did is only watching that girl, I cannot do much more than that. What a coward.

Today is a very tiring today and tomorrow as well. I have a lot of things on hand.....


See you all guys...