Tuesday, 13 March 2012

An Analysis of JAX-WS usage of NetBeans 1.2.2 (Anaysis of the webclient)

An Analysis of JAX-WS usage of NetBeans 1.2.2 (Anaysis of the webclient)

I will compare the files and folders created at the 4 phases of webclient here.

1. The initial phase. This is the beginning condition of the project without any WS import.

The project window can be seen at "An Analysis of JAX-WS usage of NetBeans 1.2.1 (Production of the webclient)" number 1.

The wsimport phase is realized in "An Analysis of JAX-WS usage of NetBeans 1.2.1 (Production of the webclient)" number 2.

The wsimport process is realized at number 3. Picture 3.5 shows the final status of the project window after the wsimport.

You can find the comparison of recursive dir outputs between the initial and post-wsimport status of the project.



As seen above, a new build folder is created although we have not done a project build operation. Also a catalog.xml file is created.

Directory of C:\Users\ars\Desktop\webclientARS\build

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> generated
03/11/2012 07:24 PM <DIR> generated-sources
0 File(s) 0 bytes

As seen above two new folders named generated and generated-sources are created in the new build folder. These folders contain the generated java files related with the webservice. These files have to be transmitted as XML files and converted via JAXB to generate the java sources but to prove this we will have to wait till the second phase of our small researh when we wil study the contents of the files psecially build xmls.

Directory of C:\Users\ars\Desktop\webclientARS\build\generated

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> jax-wsCache
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\generated\jax-wsCache

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> HelloService
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\generated\jax-wsCache\HelloService

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> webclient
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\generated\jax-wsCache\HelloService\webclient

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:22 PM 1,751 Hello.java
03/11/2012 07:22 PM 745 HelloResponse.java
03/11/2012 07:22 PM 2,957 HelloService.java
03/11/2012 07:22 PM 718 Hello_Type.java
03/11/2012 07:22 PM 3,693 ObjectFactory.java
03/11/2012 07:22 PM 103 package-info.java
03/11/2012 07:22 PM 1,347 SayHello.java
03/11/2012 07:22 PM 1,481 SayHelloResponse.java
8 File(s) 12,795 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\generated-sources

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> jax-ws
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\generated-sources\jax-ws

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> webclient
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\generated-sources\jax-ws\webclient

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:22 PM 1,751 Hello.java
03/11/2012 07:22 PM 745 HelloResponse.java
03/11/2012 07:22 PM 2,957 HelloService.java
03/11/2012 07:22 PM 718 Hello_Type.java
03/11/2012 07:22 PM 3,693 ObjectFactory.java
03/11/2012 07:22 PM 103 package-info.java
03/11/2012 07:22 PM 1,347 SayHello.java
03/11/2012 07:22 PM 1,481 SayHelloResponse.java
8 File(s) 12,795 bytes

Also, the nbproject folder has changed similar to the webservice creation phase. There is a new Jaxws-build.xml and jax-ws.xml addition.



The last change is xml-resources folder created newly in the /src/conf/ folder as seen below:



Directory of C:\Users\ars\Desktop\webclientARS\src\conf\xml-resources

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> web-service-references
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\src\conf\xml-resources\web-service-references

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> HelloService
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\src\conf\xml-resources\web-service-references\HelloService

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> wsdl
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\src\conf\xml-resources\web-service-references\HelloService\wsdl

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> ars-PC_8080
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\src\conf\xml-resources\web-service-references\HelloService\wsdl\ars-PC_8080

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:24 PM <DIR> helloservice
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\src\conf\xml-resources\web-service-references\HelloService\wsdl\ars-PC_8080\helloservice

03/11/2012 07:24 PM <DIR> .
03/11/2012 07:24 PM <DIR> ..
03/11/2012 07:22 PM 2,593 HelloService.wsdl
03/11/2012 07:22 PM 1,024 HelloService.xsd_1.xsd
2 File(s) 3,617 bytes

The folder above contains the WSDL files.



Also the WEB-INF folder contains the WSDL files related to the ars-PC_8080/helloservice/Hello folders.


2. The comparison of the output of the build phase to the WS-IMPORT phase. As expected the build phase creates the dist folder which contains the distribution WAR. It also creates the web folder in the build folder.




It creates an empty ap-source-output folder in the /build/generated-sources folder.



Newly created:
Directory of C:\Users\ars\Desktop\webclientARS\build\web

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM 368 index.jsp
03/11/2012 08:18 PM <DIR> META-INF
03/11/2012 08:18 PM <DIR> WEB-INF
1 File(s) 368 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\META-INF

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM 25 MANIFEST.MF
1 File(s) 25 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\WEB-INF

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM <DIR> classes
03/11/2012 08:18 PM 521 glassfish-web.xml
03/11/2012 08:18 PM 411 jax-ws-catalog.xml
03/11/2012 08:18 PM <DIR> wsdl
2 File(s) 932 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\WEB-INF\classes

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM <DIR> webclient
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\WEB-INF\classes\webclient

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM 1,183 Hello.class
03/11/2012 08:18 PM 507 HelloResponse.class
03/11/2012 08:18 PM 2,691 HelloService.class
03/11/2012 08:18 PM 2,611 HelloServlet.class
03/11/2012 08:18 PM 490 Hello_Type.class
03/11/2012 08:18 PM 2,778 ObjectFactory.class
03/11/2012 08:18 PM 244 package-info.class
03/11/2012 08:18 PM 757 SayHello.class
03/11/2012 08:18 PM 863 SayHelloResponse.class
9 File(s) 12,124 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\WEB-INF\wsdl

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM <DIR> ars-PC_8080
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\WEB-INF\wsdl\ars-PC_8080

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM <DIR> helloservice
0 File(s) 0 bytes

Directory of C:\Users\ars\Desktop\webclientARS\build\web\WEB-INF\wsdl\ars-PC_8080\helloservice

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM 2,593 HelloService.wsdl
03/11/2012 08:18 PM 1,024 HelloService.xsd_1.xsd
2 File(s) 3,617 bytes

Directory of C:\Users\ars\Desktop\webclientARS\dist

03/11/2012 08:18 PM <DIR> .
03/11/2012 08:18 PM <DIR> ..
03/11/2012 08:18 PM 20,287 webclientARS.war
1 File(s) 20,287 bytes



Nbproject folder shows some changes at genfiles.properties, which may be trivial but we will see.


3. The comparison of the outcome of the execution phase to the build phase in terms of the files’ and folders’ of the project follows:

The execution output at the NetBeans IDE:



The only change can be observed at the classes folder. Two new files have been created .netbeans_automatic_build and .netbeans_update_resources of length 0 each.



Please notice the lengths of Hello.class and HelloServlet.class have increased.