Archive for September, 2008

h1

Eclipse RCP Development 2

September 27, 2008

Although I use Eclipse for Java application development, I have never used Eclipse as the base development. Basically, I do not know anything about technologies used under Eclipse. If you visit http://www.eclipse.org/resources/?category=Getting%20Started, you can find three Rich Client Tutorials. They are so simple that we won’t learn much. About a couple of years ago, I bought a book, “Eclipse Rich Client Platform: Designing, Coding, and Packaging Java™ Applications”. It was expensive and still it is, but somehow I got another more interesting so that I did not read it. As I opened this book again, I was concerned about oldness of the content. This is because the current Eclipse is version 3.4. This book is written for 3.1. Making long story short, it was not the issue. I saw one generated class, Application, has a different implementation because of update, but it was not issue at all as I have read so far till chapter 8. I also went to the book site and downloaded updated code in the attached CD. Be careful. Its companion plugin for this book example does not work on Eclipse 3.4; however, the example code works. So, you install it but you go to the plugin directory and find out the chapter source code there.

 

This book is pretty good. I would recommend someone who would like to study Eclipse RCP first time. Some Java classes need more refactored so that I’m doing it myself. Also, String values are hard coded due to the book’s example, but in the early chapter, it shows how to externalize the hard coded Strings. 

 

日ごろの開発には、Eclipseを使用しているが、それを元にしたアプリケーションは製作したことがない。だから、Eclipseがどのようにつくられているかぜんぜん知らない。ここhttp://www.eclipse.org/resources/?category=Getting%20Startedに行くと、チュートリアルがある。しかし、簡単すぎて、役に立たない。2年ほど前に、“Eclipse Rich Client Platform: Designing, Coding, and Packaging Java™ Applications”という本を買う。高かった。いまだに高い。何か他の興味がわき、読まなかったのだ。もう一度この本を見てみると、古さが気になった。今Eclipseは3.4.この本は3.1.結論を言うと、それは問題ではなかった。ひとつのJavaクラスは、異なる(ふるい)インターフェースを使っていたが、全然問題ない。現在8章めだけれど。この本のWebサイトに行って新しいコードをダウンロード。注意しなくてはいけないことは、本についてくるPluginは、Eclipse 3.4では、動かない。しかし、動かないことを知りながら、インストールして、Pluginディレクトリに行き、ソースコードを使うことをお勧め。

 

この本はすごくいい。Eclipse RCPの開発をしたことない人にお勧めだ。あるJavaクラスはもっとリファクタが出来るので自分でそうする。それから、Stringの値がハードコードされている。多分本の例のため。本のはじめの方で、それをExternalizeする方法が書かれている。

h1

Eclipse RCP Development 1

September 25, 2008

I recently started studying Eclipse as a platform for rich client application development. It is usually called Eclipse RCP. As I did for web service development, I would like to describe how I can be an Eclipse RCP developer. It seems it would take more time than the web service.

 

Today, I would like to explain why I pick up Eclipse RCP. It seems to me that Eclipse has the future. The software I develop is very structured but needs sophistication in the functionality. It needs strong engineering mechanism in the software. I studied Flex development. It is pretty good, but I feel some lack of engineering mechanism. I also strongly feel that Eclipse would be the best tool to provide GUI based development than meta-data based development.

 

最近、Eclipseの勉強をクライアントアプリケーション開発のために始めた。Eclipse RCPと呼ばれている。Web Serviceの開発を勉強したように、ここでまた、どうやって、Eclipse RCPの開発者になっていけるかということを書いてみたい。Web Serviceの時より、難しそうだ。

 

今日は、どうしてこれを選んだかを書いてみたい。というのは、Eclipseには将来性があると思うから。開発するソフトウェアは、かなり、決まりきっていて、詳細な機能を必要とする。高度に技術的な構造を必要とする。Flexを勉強した。すごくいいシステムだ。でも、何かその技術的な構造に不服を感じる。Eclipseは、テキストからなるメタデータの開発環境から、GUIによる開発環境の開発に適していると思う。

 

h1

Dell Laptop Purchase Experience デルのラップトップの購入

September 23, 2008

 Today, it was my lucky day with purchase of Dell laptop computer. I have been selecting a laptop for my family. My price range was $600 to $700. Since I have purchased three computers from Dell, some time last week, I went to their web site and selected one Inspiron 1420. It has Intel Core 2 Duo T5750 2.0GHz, 14.1 LCD (1440X900), 3 GB memory, and 250 GB hard disk. I think it was $743 in my shopping cart last night. This is a bit higher price than the one like Toshiba or HP laptops in Best Buy. However, those batteries are not so strong like about 1 hour and 30 minutes or so, but my selection could be alive for about three hours. When I saw the shopping cart last night, it said this discount would expire tomorrow, which is today. I decided to buy it tomorrow.

 

Next day, when I opened the web site and saw the shopping cart. I was surprised to see the price was $663. About $80 more discount!! I upgraded the monitor from 1280 X 800 to 1440 X 900 resolution, and the price became $713. It is still cheaper than yesterday. In addition, I had my company discount of 2% from Dell; it ended up about $699.   I also have 2.0 MP webcam and built-in Bluetooth as well with this laptop.

 

Lesson learned. Don’t buy computer immediately when you selected it. Wait for the expiration day of the discount.

 

今日は、デルのラップトップの購入で、幸運であった。家族のラップトップを先週から選んでいた。購入価格は6から7万円。もう3台もデルからPCを買っているので、先週、デルのWebサイトに行き、Inspiron 1420を選ぶ。これは、Intel Core 2 Duo T57502.0GHz, 14.1 LCD (1440 x 900), 3GB memory, 250 GB ディスクである。ショッピングカートには、$743だったと思う。これはちょっとベストバイの東芝とかHPのラップトップと較べると高い。しかし、これらのものは、バッテリーがよくない。だいたい1時間半くらい。Dellのは、3時間近く持つ。昨日の夜もう1度ショッピングカートを確認すると、この価格は明日までとのこと。じゃーあしたにしようと決心。

 

次の日、デルのWebサイトに行き、ショッピングカートを見ると、驚くべきことに、$663となっていた。$80くらい安い。LCDL1440 X 900 にアップグレード。それでも、$713で、昨日よりまだ安い。それに加えて、うちの会社のデルのディスカウントが2%付く。結局約$699.このラップトップには、Webcam とBluetoothも付いている。

 

学んだことは、すぐにコンピュータは買わないこと。ディスカウントの最後の日まで待つこと!

 

h1

Horrible Hotel とんでもないホテル

September 20, 2008

A couple of weeks ago, we went to the North Carolina. It’s near the industrial park. It was a just one day trip. My wife picked up a good deal hotel on the web; in other words, cheap one. It was one of pretty famous chain hotels such as Holiday-In, Budget-In, etc. Everyone knows it so that I felt comfortable although it’s cheap…until I saw the hotel.

When we got out of highway exit, we certainly followed the direction from their web site, but we lost. My wife called the hotel and figured it out. The direction on the web site was wrong, and we were supposed to exit XXX-A instead of XXX-B. After getting out of the highway correctly, we could not find the hotel easily because it was behind the newer hotel. Okay; we finally found it. When we saw it, I said “is it really open or not. It is as if ghost hotel…” My son said, “let’s not stay here.” However, it was late and today, hurricane “Hanna” was supposed to pass over here. Anyways, we got into the hotel. Although Hanna was not here yet, hotel’s light stand on the roof was broken down next to the parking-lot.

We were at the front desk, and my son said “let’s not stay here” again and “there are strange people.” Well, it was too late, and we got a key. As we walked to the room, we found that stairs are worn out and could see cement. Since we are second-floor and could see all buildings. It was a big hotel, but very old and not maintained well. My wife said “I picked up this hotel because it says renovated recently.” Well, lesson learned. “Don’t believe a word “renovated” as we select a hotel. Actually, inside of the room was better than outside of building. We checked the hot water because we wanted to take a bath before sleeping. Just in case. We ran 5 minutes of hot water, but hot water did not come out. I went to the front desk and asked. He said “Please wait 15 minutes or so.” Well, I went back to the room and continued to run it. Finally, the mild hot water came out. I have never stayed a hotel like this. Fortunately, Internet was at least working.

Next morning, due to the hurricane, it was raining. We went to the front building to eat breakfast. Water like a pond prevented us from going there. We took a different rout, but rain came down from the roof all over. Finally, we got into the room where we were going to eat breakfast. It was huge room but much cleaner. Comparing to our experience here, this room makes me so uncomfortable although it is much better than our room because we are the only ones who are eating here. Anyway, we ate breakfast and left this hotel.

2週間ほど前、ノースキャロライナへ行く。インダストリアルパークの近くだ。一泊の旅。妻が、いいホテル、つまり、安いホテルをWebで見つける。ホリデーインとか、バジェットインとか、そのような、かなり知名度の高いホテルだ。皆が知ってるホテルなので、安くても、安心だった。そのホテルを見るまでは。

ハイウェイの出口を出て、Webサイトで見た指示どうり、しかし、迷ってしまった。妻がホテルに電話すると、すぐにわかる。Webサイトの指示が間違っていた。出口BではなくAであった。ハイウェイを出て、なかなか簡単にホテルが見つからなかった。というのも、もうひとつ新しいホテルの裏にあったからだ。やっとみつけた。そして、ホテルを見ると、「ここのホテル開いてるのか?」と自分が言う。「まるで、幽霊ホテルのようだ。」息子が、「ここやめよう」という。しかしもうおそいし、今日はハリケーン“ハンナ”がくるしと、とにかく、ホテルに入る。ハンナはまだ来ていなかったが、ホテルの電気の看板が屋根から、落ちて、駐車場のよこに落ちている。

フロントで、息子が、「やっぱりいやだ」とまた言う。「変な人がいるし」もう予約してたので、鍵をもらう。部屋に行く時、階段が磨耗して、中のセメントが見えている。自分たちの部屋は2階で全部の建物を見ることが出来た。大きなホテルだ。しかし古くて、管理がされていない。妻が言うには、ホテルが新しく作り変えられたと書いてあったからここにした、と。実際、部屋の中に入ると、外よりはましだった。寝る前に、お風呂に入りたかったので、お湯がでるかと5分間ほどを出してみる。熱いお湯が出てこないので、フロントへ行く。彼が言うには15分ぐらい出してほしいという。また部屋に戻って続けてだすとようやく出てくる。こんなホテルに泊まったのは初めてだ。幸運にもインターネットは動いていた。

次の朝、ハリケーンの通過で雨だった。朝食をとるためにフロントの建物へ行く。池みたいな水たまりが邪魔してその建物へいけない。違う行き方をとるが、今度は、屋根から、雨がいっぱい落ちてくる。やっとのことで、朝食をとる場所へ行く。とてもでかい部屋、しかし、きれいであった。今までのこのホテルでの経験をくらべると、この部屋は(異様で)気持ちいいとはいえない。とってもいい部屋なんだけど。それに、食べているのは私たちだけ。とにかく、朝食をとって、急いでホテルを出た。

h1

Learning Web Service 6

September 16, 2008

As I was working for setting up Metro web service development environment in Eclipse, I have learned several things I would like to share.

 

The first one is related to literal and wrapped styles. Previously, I wrote we should use soapAction attribute to distinguish one method to another. Actually, it was not so correct. This option is vendor-specific. Some vendor may distinguish one method to another, but others may not. Therefore, we should not use soapAction. When I added a method that has the same parameter with another method, I got the following error from wsimport.

 

“[ERROR] Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signaure on the wire for successful dispatch. In port wordDictionarySOAPPort, Operations “lookupWord” and “addWord” have the same request body block {http://cgifederal.com/stakehar/ws/metro/tutorial/wordDictionary/word/}word. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction”

 

By the way, I think a word “signaure” is typo in wsimport. There are two solutions for this problem. One is to use wrapped style. The other way is to define a new element for the method. Personally, I don’t like wrapped style because JAXB generates unused domain classes. Therefore, I define the new element as I have the same parameters in the new method.

 

The second one is that I learned that you cannot add fault to the method that does not return any response. You will get some error as you do wsimport.

 

Lastly, there is one thing interesting. Generated code in literal and wrapped is quite different. Especially, if some of parameters take input and output, wrapped style generated code will have Holder classes; on the other hand, literal style, there is no such input output parameters because parameters in the element are contained in a generated class. I like literal style in this aspect, too.

 

 Eclipseで、Metroの開発環境をセットアップしている時にいろいろ学ぶ。

 

最初は、LiteralWrappedスタイルに関係している。前にSoapActionアトリビュートは、メソッドを区別するのに使われると書いた。実際、これは正しくない。このオプションは、ベンダーごとに異なっている。あるベンダーはそうするかもしれないが、他のベンダーはそうしないかもしれない。こんなオプションは使わない方がいい。新たなメソッドがすでに定義されているメソッドのパラメターがいっしょの時、次のようなWSIMPORTエラーが見られる。

 

“[ERROR] Non unique body parts! In a port, as per BP 1.1 R2710 operations must have unique operation signaure on the wire for successful dispatch. In port wordDictionarySOAPPort, Operations “lookupWord” and “addWord” have the same request body block {http://cgifederal.com/stakehar/ws/metro/tutorial/wordDictionary/word/}word. Try running wsimport with -extension switch, runtime will try to dispatch using SOAPAction”

 

ところで、signaureは間違いに違いない。二つの解法がある。ひとつはWrappedスタイルを使うこと。もうひとつは、新しいElementを定義すること。個人的には、Wrappedスタイルは好きじゃない。使わないJAXBのクラスが生成されるから。私は、新しいElementを定義する。

 

次は、Responseを返さないWeb Serviceは、Faultを定義することが出来ない。そのようにWSDLで定義すると、WSIMPORTでエラーが発生する。

最後に、面白いことは、LiteralWrappedスタイルでは、生成されるコードにかなり違いがあること。特にパラメターが入出力である場合、Wrappedスタイルでは、Holderクラスが生成される。一方Literalスタイルでは、そのようなクラスは定義されない。なぜなら、パラメターはひとつのElementのクラスに含まれるから。この点でも、Literalスタイルの方が好きだ。

 

h1

Lost Eight More Chickens  今度は8匹やられる

September 13, 2008

Oh my god…I lost 8 chickens, and this time, it is different. This is definitely attacked by raccoon. He does not eat but kill and play with it. Initially, I could not find where he got into the net. My son told me at the roof. Yes, roof has a hole because a three go there. Carefully, I investigated it and confirmed that was the place he got into. I was very shocked because we just lost 5 chickens by unknown animal. I cut trees and fixed these holes. He attacked the coop for the roosters. I lost all except one. He also attacked hen’s coop from the net and killed two (one rooster and one hen). It happened because hen’s coop is next to rooster’s one separated by a net. I found this in the morning. It was a bad day all day long. Of course, we failed to catch the unknown animal.

 

げーっ!8匹も鶏が!今回は違う。狸の野郎だ!彼は、食べなくて、殺して遊ぶ。最初はどこから進入してきたのか分からなかった。息子が、屋根からだと。確かに、屋根には穴がある。そこに木が生えているからだ。よく調べてそれを確認。昨日5匹やられて今日は8匹。ショックは大きい。狸は雄の鶏小屋を襲った。1匹残して全部殺す。それから、雌の鶏小屋を襲う。2匹、雄雌一匹ずつやられる。雄の小屋と雌のは、隣同士ネットでしきられているだけ。このことを朝判る。一日中気分が悪かった。もちろん、狙ってた動物は捕らえることは出来なかった。

h1

Lost Five Chickens 5匹の鶏を失う

September 12, 2008

Day before yesterday’s night, we lost five chickens. We had about 25 chickens. Therefore, we lost about 1/5. It was lucky because last time a fat raccoon attacked and killed all chickens. We might have had 10 chickens or so at that time. At this time, I don’t know what animal attacked. At least what I know is that it is not a raccoon. It’s much smarter one. Last night, we set a rabbit catcher because we had it. It may be a bit small for the unknown animal. I checked it midnight. The meat used for the bait was gone. The rabbit catcher did not work; well, actually, I think the animal could manage it without touching sensing device except the meat. I tried another meat. Next morning, the catcher worked, but the meat is gone and no animal in the catcher. I guess the size of the catcher was not enough big to catch the animal. Since sensing device is in the middle of catcher, I put the meat near sensing device. Tonight, I put the meat at the other edge so that animal could be within the catcher. Will see.

 

2日前の夜、5匹の鶏を失う。約25匹飼ってたので、5分の1も失ってしまった。今回は幸運だった。というのも前回は、太った狸に全部の鶏を殺されてしまった。10匹ぐらいいただろうか。今回どの動物かわからない。少なくとも、狸ではない。もっと賢いやつ。昨日の夜、ウサギを取る籠仕掛ける。これはちょっとその分からない動物には小さいかも。真夜中に確認する。肉へんの餌はなくなっていた。ウサギを取る籠は動いていなかった。やられた!もう一度試す。次の朝見に行くと、肉へんはなくなって、籠はちゃんと動作していたが、中には、何もいなかった。たぶんこの籠はちょっと小さいのだろう。餌は籠の真ん中にあるセンサーの近くに置いた。今夜は、一方の端に餌を置く。その動物が籠に入るかもしれない。どうなるかな?

 

 

h1

Learning Web Service 5

September 10, 2008

Actually, I added one more method add2 in addition to myarch’s example. The followings are what I have learned.

  • Understood how JAXB classes generated and used clearly (main objective)
  •  To distinguish one method to another, we should add soapAction attribute operation element in the binding definition in WSDL file. (sub objective)
  • Currently JAXB classes are generated in person package, but you can change by adding <xjcarg/> in wsimport ANT task. For example, if you add the followings, package will be myarch.person.
 <target name="build-server-wsdl" depends="setup">
        <wsimport
            debug="${debug}"
            verbose="${verbose}"
            keep="${keep}"
            extension="${extension}"
            destdir="${build.classes.home}"
            wsdl="${basedir}/${server.wsdl}">
            <binding dir="${basedir}/etc" includes="${server.binding}"/>
            <xjcarg value="-p"/>
            <xjcarg  value="myarch.person"/>
        </wsimport>
        <javac 

One correction: we should remove <property name=”extension” value=”switch”/> from build.xml file.

Once we come to this stage, it will be a matter of generalization of this specific process, which you would find by yourself.

 

実際、add2と言うメソッドをMyarchの例に新たに付け足した。この実験で次のことを学ぶ。 

  • JAXBの使い方がはっきりと分かる。
  • Web Serviceのメソッドを確かに区別するために、soapActionアトリビュートをbindingの定義の際に使うこと。
  • この実験では、JAXBのクラスはperson package になるが、<xjcarg/> をwsimport ANT taskで使用すると、変えることが出来る。たとえば次の例ではmyarch.personとなる。 

<target name="build-server-wsdl" depends="setup">
        <wsimport
            debug="${debug}"
            verbose="${verbose}"
            keep="${keep}"
            extension="${extension}"
            destdir="${build.classes.home}"
            wsdl="${basedir}/${server.wsdl}">
            <binding dir="${basedir}/etc" includes="${server.binding}"/>
            <xjcarg value="-p"/>
            <xjcarg  value="myarch.person"/>
        </wsimport>
        <javac 

ひとつ訂正:<property name=”extension” value=”switch”/>build.xml ファイルから削ってください。 

ここまで来ると、後はこのプロセスを一般的にするだけ。それは、各自にお任せします。

h1

Learning Web Service 4 – Create JAX-WS Service in 30 Minutes

September 8, 2008

My decision was correct. I finally made myarch’s example run. I also proved that the article http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/  was correct. If you don’t use literal wrapped style, web service can’t distinguish one method from another. However, I found a way to distinguish it even if you use literal style. In this blog, I would like to show the complete steps of how to run myarch’s example with Sun’s Metro.

 

Some of readers may not read my past blogs. I starts from a really beginning. The followings are the system software I used. Java SDK 1.6.04, Tomcat 5.5.26, Sun Metro 1.3, and ANT 1.6.5. The order of installation is first Java SDK, and then Tomcat, and finally Metro 1.3. The Metro provides Ant script to install Metro into the Tomcat. https://metro.dev.java.net/1.2/docs/install.html   I used Eclipse 3.4 IDE. Since I rely on the Ant script in this experiment, you can use any IDE or editor.

 

First, to make sure Metro is running on Tomcat, use this “From-WSDL example”: https://metro.dev.java.net/getting-started/basic.html and follow the instruction steps on that page. As you see, this example does not use JAXB practically. Including myself, web service beginners would like to see more complex examples, but I could not find any example on the Internet (maybe, you could.)

 

Next, please review myarch’s example: http://myarch.com/create-jax-ws-service-in-5-minutes and download the complete schema file and WSDL file on that page. Create a directory for this experiment and copy downloaded files. Also create build, etc, and src directories. Copy all files in etc directory of the Metro’s basic example you run to the etc directory you created. Finally, copy build.xml file in the basic example to the new directory you created.

 

When you see the contents in your etc directories, you will see the following files:

  • AddNumber.wsdl
  • build.properties
  • custom-client.xml
  • custom-server.xml
  • person.xsd
  • personService.wsdl
  • sun-jaxws.xml
  • web.xml

We are going to update 4 files: custom-client, custom-server, sun-jaxws, and web xml files as well as build.properties and ../build.xml files. In addition, we create PersonServiceImpl.java and PersonServiceClient.java classes. You can download all files already updated from http://sites.google.com/site/takechanweb/Home/learning-web-service-4 . Please download Java source files into the appropriate package.

 

After you downloaded, open Command Window and move to your directory you created and run the following commands.

  • ant –Duse.tomcat=true server
  • ant –Duse.tomcat=true client
  • ant –Duse-tomcat=true run

You should see the following result.

 

     [java] Invoking add method…

     [java] result = [Hey there, I'm a person!]

     [java] Invoking add2 method…

     [java] result2 = [1000]

 

If you open your Tomcat stdout log file, you will see

 

First name = [Shigeru]

Last name = [Takehara]

Name = [hitotsume]

 

I will comment about this experiment in the next blog.

 

自分の選択は正しかった。やっと、Myarchの例を動かすことが出来た。それから、この記事http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/  も正しいことが分かる。もしLiteral/Wrappedスタイルをつかわないと、Web Serviceは、メソッドを正しく認識できない時がある。(パラメーターのタイプが全く同じ時)でも、その区別の仕方が分かる。ここでは、Myarchの例をサンのメトロの上で、動かすことを紹介する。

 

読者の中で、私の前のブログを読んでいない人がいるかも。では最初から。次のシステムソフトウェを使う:Java SDK 1.6.04, Tomcat 5.5.26Sun Metro 1.3, ANT 1.6.5. インスタレーションの順序は、Java SDK, Tomcat, Metroの順。Metroは、自身をTomcatに組み込むANT Scriptがある。. https://metro.dev.java.net/1.2/docs/install.htmlエディターには、 Eclispe3.4を使う。主にANT Scriptを使うから、どの IDEでも良い。

 

最初にMetroTomcatで動いていることを、“From-WSDL example”:  https://metro.dev.java.net/getting-started/basic.htmlでステップに従って動作を確認する。見てのとおり、この例は、JAXBを実装しているとはいえない。私を含めて、Web Serviceの出始めの人たちは、もっと複雑な例が見たい。けれども、インターネットで探しても見当たらない。

 

次にMyarchの例を見直そう http://myarch.com/create-jax-ws-service-in-5-minutes そして完全なShemaファイルとWSDLファイルをダウンロードすること。この実験のためのディレクトリをつくり、ダウンロードしたファイルをそこにコピーする。そして、build, etc, srcのディレクトリもつくる。Metroのベーシックの例のetc ディレクトリの中のすべてのファイルをetcディレクトリにコピー。最後にbuild.xmlファイルを最初につくったディレクトリにコピーする。

 

Etcのディレクトリの中を見ると、次のファイルがある。

  • AddNumber.wsdl
  • build.properties
  • custom-client.xml
  • custom-server.xml
  • person.xsd
  • personService.wsdl
  • sun-jaxws.xml
  • web.xml

この中から4つのファイル:: custom-client, custom-server, sun-jaxws, web xml それから、build.properties ../build.xmlファイルを書き換える。それから、PersonServiceImpl.java PersonServiceClient.java クラスを作成。書き換えられたファイルはfrom http://sites.google.com/site/takechanweb/Home/learning-web-service-4から、ダウンロードして下さい。Javaのソースファイルはパッケージ名に注意して下さい。

 

ファイルをダウンロードしたら、コマンドWindowをあけて、この実験のディレクトリに移り、次のコマンドを実行する。

  • ant –Duse.tomcat=true server
  • ant –Duse.tomcat=true client
  • ant –Duse-tomcat=true run

 次のような結果が表示

     [java] Invoking add method…

     [java] result = [Hey there, I'm a person!]

     [java] Invoking add2 method…

     [java] result2 = [1000]

Tomcatstdout ログファイルをみると、

 First name = [Shigeru]

Last name = [Takehara]

Name = [hitotsume]

 

この実験のコメントは次回のブログで。

 

h1

Learning Web Service 3

September 8, 2008

I just leave my current problem and decided to generate web service code from myarch’s wsdl file with NetBean IDE. It generated it without problems. I verified it good, too. Now, when I try to deploy it with glassfish server, I got an exception error. Deploy build says successful, but glassfish server’s output show the failure of deployment. Considering my skill  and knowledge, there is no way to solve this exception. I decided to move back to the Metro’s basic example and try to make myarch’s example run. Let’s what will happen. One thing I noticed at verify was that it said this web service uses JAX-RPC although wsdl uses document/literal style. It is strange.

 

前回のブログの問題はおいといて、NetBean IDEを使って、MyarchWSDLから、Web Serviceのコードを作成することにする。問題なくうまく作成された。ヴェリファイもうまくいく。Glassfishサーバーにディプロイしようとすると、エラーが起こる。NetBean IDEのディプロイBuildでは、成功というが、Glassfishサーバーの、Output には、Exceptionエラーが見える。この問題を解くには、自分の技能は、足りないので、メトロのベーシックサンプルにもどってMyarchの例を動かしてみよう。どうなるか?もうひとつ気になることは、ヴェリファイの時、Web Serviceは、JAX-RPCを使用というではないか。WSDL では、Document/Literalスタイルを使っているのに。