<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Changshin Lee&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/" />
<modified>2007-01-03T15:02:35Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/iasandcb/315</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2007, iasandcb</copyright>
<entry>
<title>JWS 2.1 vs JWS 2.0</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2007/01/jws_21_vs_jws_2.html" />
<modified>2007-01-03T15:02:35Z</modified>
<issued>2007-01-03T15:02:29Z</issued>
<id>tag:weblogs.java.net,2007:/blog/iasandcb/315.6243</id>
<created>2007-01-03T15:02:29Z</created>
<summary type="text/plain">JWS (Java Web Services) 2.1 updates JAXB and JAX-WS to 2.1 and adds WSIT to its basic layer. Now JWS 2.1 is supported by GlassFish v2 while JWS 2.0 is built in JDK 6. One typical issue is definitely how...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>JWS (Java Web Services) 2.1 updates JAXB and JAX-WS to 2.1 and adds WSIT to its basic layer. Now JWS 2.1 is supported by GlassFish v2 while JWS 2.0 is built in JDK 6.</p>

<p>One typical issue is definitely how to use JWS 2.1 on JDK 6. It's well known that you can rely on Standard Endorsed Mechanism provided by Java SE, how about updating JWS from 2.0 to 2.1 for JDK 6u1? Comparing with WCF from .NET Framework 3.0, JDK 6 doesn't support WS-* by default. JDK 7 may be a solution, but it will take long. </p>]]>

</content>
</entry>
<entry>
<title>Trying JNI with NetBeans C/C++ Pack on Linux</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/12/trying_jni_with.html" />
<modified>2006-12-17T09:05:47Z</modified>
<issued>2006-12-17T09:04:56Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.6185</id>
<created>2006-12-17T09:04:56Z</created>
<summary type="text/plain">I started to read http://www.netbeans.org/kb/55/beginning-jni-part1.html and soon realized that the article was for Windows while my main development machine is Ubuntu. OK, so it means that I don&apos;t need to install cygwin and the rest of the instructions in the...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>J2SE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>I started to read http://www.netbeans.org/kb/55/beginning-jni-part1.html and soon realized that the article was for Windows while my main development machine is Ubuntu. OK, so it means that I don't need to install cygwin and the rest of the instructions in the article should work fine, right? (Un)fortunately, you need more than the difference in case you're a unixer (including Mac OS X). Here are what I've found during driving the course:</p>

<p>1. First of all, yes! you don't need to install cygwin :-)</p>

<p>2. "Press Ctrl - F11 to clean and build the project" doesn't work for my Linux. Shift - F11 does.</p>

<p>3. <JAVA_HOME>/include/win32 -> <JAVA_HOME>/include/linux</p>

<p>4. No options for compilation. Simply don't apply -mno-cygwin -Wl,--add-stdcall-alias -shared -m32. FYI, -shared is automatically added as the project is designed for dynamic library.</p>

<p>5. Make sure that your output file ends with not ".dll" but ".so".</p>

<p>These are all except adding -fPIC option for #4 when you work on a 64-bit machine because without the option the compiler complains "/usr/bin/ld: build/Debug/GNU-Linux-x86/HelloWorldNative.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC"</p>

<p>To be honest, this is my first time to create a JNI project. (No wonder I "was" a Java purist ;-) As I began working on Ruby (on Rails) and Python (on Django), I came to get some interest in using other languages than Java. I think that NetBeans C/C++ Pack opens a nice possibility to develop extensions for Java beyond the language itself.</p>

<p></p>

<p> </p>]]>

</content>
</entry>
<entry>
<title>What I found during struggling for REST on GlassFish</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/10/what_i_found_du.html" />
<modified>2006-10-11T05:52:07Z</modified>
<issued>2006-10-11T05:51:33Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5710</id>
<created>2006-10-11T05:51:33Z</created>
<summary type="text/plain">Maybe I need to post these issues to GF or JAX-WS projects, but would like to share first with this blog. I simply wanted to demonstrate a service exposed as both SOAP and REST. 1. Firstly, I started with GlassFish...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>Maybe I need to post these issues to GF or JAX-WS projects, but would like to share first with this blog.</p>

<p>I simply wanted to demonstrate a service exposed as both SOAP and REST.</p>

<p>1. Firstly, I started with GlassFish V2 M2 with JAX-WS 2.1M1. I declared a service with @WebServiceProvider as a servlet (and a servlet mappping for that as well), and unfortunately GF recognized it as a plain servlet, so any request toward the service failed. A possible workaround is using a JAX-WS descriptor (sun-jaxws.xml) in order for GlassFish to detect the service. In my opinion, this issue should be fixed.</p>

<p>2. Once I worked around issue #1, I viewed the admin console page and there was no entry in "Web Services" category.</p>

<p>3. When I browsed my web application on the admin console, "General" tab showed me a servlet that I didn't register on web.xml. Intererestingly, the name of the servlet is exactly the same as the fully qualifed class name of the @WebServiceProvider service.</p>

<p>4. I tried to test "restful" sample in JAX-WS 2.1, and (unfortunately again) failed to execute "ant run", which actually ran a client for a RESTful service via Dispatch. The client-side error message is:</p>

<p>run:<br />
     [java] Invoking Restful GET Request with query string ?num1=30&num2=20<br />
     [java] Exception in thread "main" java.lang.NullPointerException<br />
     [java]     at com.sun.xml.ws.client.dispatch.SourceDispatch.toReturnValue(SourceDispatch.java:67)<br />
     [java]     at com.sun.xml.ws.client.dispatch.SourceDispatch.toReturnValue(SourceDispatch.java:54)<br />
     [java]     at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:180)<br />
     [java]     at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:184)<br />
     [java]     at restful.client.DispatchAddNumbersClient.main(Unknown Source)<br />
     [java] Java Result: 1</p>

<p>On the other hand, the server-side error is:<br />
Query String = null<br />
PathInfo = null<br />
javax.xml.ws.http.HTTPException<br />
        at restful.server.AddNumbersImpl.invoke(Unknown Source)<br />
        at restful.server.AddNumbersImpl.invoke(Unknown Source)<br />
        at com.sun.xml.ws.api.server.InstanceResolver$1.invokeProvider(InstanceResolver.java:132)<br />
        at com.sun.xml.ws.server.provider.ProviderInvokerPipe.process(ProviderInvokerPipe.java:62)<br />
        at com.sun.xml.ws.server.WSEndpointImpl$1.process(WSEndpointImpl.java:156)<br />
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:156)<br />
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:238)<br />
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)<br />
        at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:161)<br />
        at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:49)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)<br />
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)<br />
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)<br />
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:246)<br />
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)<br />
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)<br />
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)<br />
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)<br />
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)<br />
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:619)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:550)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:780)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:251)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:205)<br />
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)<br />
        at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)</p>

<p>"ant run-url" worked fine. Just out of curiousity, I opened the same URLs on a firefox web browser as "run-url" client called but met the following server-side error:</p>

<p>The log message is null.<br />
java.lang.NullPointerException<br />
        at com.sun.xml.ws.encoding.XMLHTTPBindingCodec.compareStrings(XMLHTTPBindingCodec.java:227)<br />
        at com.sun.xml.ws.encoding.XMLHTTPBindingCodec.isMultipartRelated(XMLHTTPBindingCodec.java:210)<br />
        at com.sun.xml.ws.encoding.XMLHTTPBindingCodec.decode(XMLHTTPBindingCodec.java:180)<br />
        at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:154)<br />
        at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:238)<br />
        at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)<br />
        at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:124)<br />
        at com.sun.xml.ws.transport.http.servlet.WSServlet.doGet(WSServlet.java:56)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)<br />
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)<br />
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)<br />
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:246)<br />
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)<br />
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)<br />
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)<br />
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)<br />
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)<br />
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)<br />
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:619)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:550)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:780)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:251)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:205)<br />
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)<br />
        at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)</p>

<p>It seems that when you request through a browser, Content-Type request header is not set. Probably JAX-WS should check out first whether the header string is not null. This problem is not shown in JAX-WS 2.0.1, which is built in GF V2 M1.</p>

<p>OK, nothing is perfect, so I'm looking forward to any progress for that :-)</p>]]>

</content>
</entry>
<entry>
<title>Web Services 2.0</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/10/web_services_20.html" />
<modified>2006-10-10T06:51:51Z</modified>
<issued>2006-10-10T06:51:46Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5705</id>
<created>2006-10-10T06:51:46Z</created>
<summary type="text/plain">After introducing &quot;Java Web Services 2.0&quot; at http://weblogs.java.net/blog/iasandcb/archive/2006/03/java_web_servic.html, I made up my mind to broaden the notion :-) First of all, I felt I had to revise JWS 2.0 because JAX-WS 2.1 and WSIT came up. JWS 2.0 is a...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>After introducing "Java Web Services 2.0" at http://weblogs.java.net/blog/iasandcb/archive/2006/03/java_web_servic.html, I made up my mind to broaden the notion :-) </p>

<p>First of all, I felt I had to revise JWS 2.0 because JAX-WS 2.1 and WSIT came up. JWS 2.0 is a set of:</p>

<p>SAAJ 1.3<br />
JAXB 2.1 + JAX-WS 2.1<br />
WSIT</p>

<p>Secondly, .NET Web Services 2.0 is WCF in .NET framework 3.0. Thirdly, Interoperability 2.0 is shown by Sun and Microsoft via WSIT and WCF. </p>

<p>Finally, Web Services 2.0 is a combination of:</p>

<p>JWS 2.0<br />
NWS 2.0<br />
Interop 2.0</p>

<p>OK, as Vista and Mustang (Java SE 6) comes into the final stage, we will be happily able to enjoy WS 2.0 with MTOM, WS-*, and ease of development and use.<br />
</p>]]>

</content>
</entry>
<entry>
<title>When you (and actually I) want to develop a Java application on a Windows PDA</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/08/when_you_and_ac.html" />
<modified>2006-08-14T08:09:43Z</modified>
<issued>2006-08-14T08:09:36Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5340</id>
<created>2006-08-14T08:09:36Z</created>
<summary type="text/plain">I have to admit that this combination, Windows PDA and Java ME, isn&apos;t that easy to approach in terms of both quality and quantity. Firstly, there isn&apos;t so-called &quot;RI (Reference Implementation)&quot; of CLDC or CDC on the (obviously) hostile platform...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>J2ME</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>I have to admit that this combination, Windows PDA and Java ME, isn't that easy to approach in terms of both quality and quantity. Firstly, there isn't so-called "RI (Reference Implementation)" of CLDC or CDC on the (obviously) hostile platform against Java. There used to be one historical software, PersonalJava targeted at Windows CE, but got obsolete as CDC came up with several profiles such as FP, PBP, and PP to replace it.</p>

<p>Secondly, we fall into confusion when it comes to adoption among feasible candidates. See "Java Support on Pocket PC" at http://www.comp.lancs.ac.uk/computing/users/fittond/ppcjava.html and you will soon speak to yourself, "what should I do?" "Java on PocketPC" at http://blog.vikdavid.com/2004/12/java_on_pocketp.html has more updated information specific to Windows, but it makes me feel that "still, what should I do again?" </p>

<p>What I exactly want to do is to create a simple web service client on top of a pretty new PDA of which OS is Windows Mobile 5. Of course, I might be able to program the client with .NET, but you know, I'm a Java guy, so I insist on using Java somewhat :-) Development and deployment can be separated: you can now develop CDC/PP applications with NetBeans 5.5 as desribed at http://www.netbeans.org/kb/55/developing-savaje.html. In order to run  your applications, IBM WebSphere Everyplace Micro Environment (http://www-128.ibm.com/developerworks/websphere/zones/wireless/weme_eval_runtimes.html) seems like the best choice except the undeniable fact that it's not free. Some discussion thread at http://forum.java.sun.com/thread.jspa?messageID=4251943#4251943 also points out the selection.</p>

<p>OK, so I'll start to work on them, and continue writing about this tiny project, particularly how this "end-to-end" application can be built upon CDC 1.1 and Java EE 5.</p>]]>

</content>
</entry>
<entry>
<title>The first adoption of &quot;Java Web Services 2.0&quot;</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/07/the_first_adopt.html" />
<modified>2006-07-28T08:38:45Z</modified>
<issued>2006-07-28T08:38:32Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5267</id>
<created>2006-07-28T08:38:32Z</created>
<summary type="text/plain">While reading NetBeans 5.5 Beta 2 Release Information at http://www.netbeans.org/community/releases/55/index.html, I found that (Java) Web Services 2.0 was used to introduce JAX-WS. Although the line left &quot;Java&quot; out, I felt really glad to see the term as I suggested at...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>While reading NetBeans 5.5 Beta 2 Release Information at http://www.netbeans.org/community/releases/55/index.html, I found that (Java) Web Services 2.0 was used to introduce JAX-WS. </p>

<p>Although the line left "Java" out, I felt really glad to see the term as I suggested at my previous blog at http://weblogs.java.net/blog/iasandcb/archive/2006/03/java_web_servic.html. Of course, I hope Java Web Services 2.0 would be widely adopted with the brand-new name ;-)</p>]]>

</content>
</entry>
<entry>
<title>Truth about &quot;format-pretty-output&quot;</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/06/truth_about_for.html" />
<modified>2006-06-16T10:21:34Z</modified>
<issued>2006-06-16T07:08:52Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5029</id>
<created>2006-06-16T07:08:52Z</created>
<summary type="text/plain">I got so much feedback from my recent blog at http://weblogs.java.net/blog/iasandcb/archive/2006/06/serializing_xml.html, and it inspired me to write another. The most noticeable comment on the blog is to use JAXP transformer to serialize Document, and in fact I couldn&apos;t agree on...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>I got so much feedback from my recent blog at http://weblogs.java.net/blog/iasandcb/archive/2006/06/serializing_xml.html, and it inspired me to write another. </p>

<p>The most noticeable comment on the blog is to use JAXP transformer to serialize Document, and in fact I couldn't agree on the solution more because I also used it. </p>

<p>Apart from its standard feature, transformer gives you one more nice option: make your Document more human-readable with so-called "pretty-output". The option is so popular that it is almost essential when the output should be seen by a human being, not a machine. </p>

<p>Transformer is basically designed to visualize abstract XML infosets, so it is no wonder to have a diversity of presentations. Even though we do canonicalization on occasion, some want 2 spaces for indentation, and some want no self-closing tags, and so on.</p>

<p>That strength really works for serialization of Document. On the other hand, DOM L3 LSSerializer also supports "format-pretty-output", but unfortunately you can't expect it from JAXP RI, which is also built in Java SE 5 and 6. There's an issue posted for the problem and a possible solution at https://jaxp.dev.java.net/issues/show_bug.cgi?id=6. The patch was actually applied to Apache Xerces, so the option is supported by Xerces 2.8.0.</p>

<p>To sum them up, Transformer can be your friend if you like to control your outputs in details. In addition to that, it's worthwhile considering taking advantage of brevity from LSSerializer. </p>]]>

</content>
</entry>
<entry>
<title>The world&apos;s first Java EE 5 compatible implementation</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/06/the_worlds_firs.html" />
<modified>2006-06-16T03:08:48Z</modified>
<issued>2006-06-16T03:08:27Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5039</id>
<created>2006-06-16T03:08:27Z</created>
<summary type="text/plain">TmaxSoft (yes, where I work now) achieved it (of course except the Sun RI :-). See http://java.sun.com/javaee/overview/compatibility.jsp for more details. We are planning to release some preview as well. Thank you all for your great help, especially Alan, Arthur, and...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>J2EE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>TmaxSoft (yes, where I work now) achieved it (of course except the Sun RI :-). See http://java.sun.com/javaee/overview/compatibility.jsp for more details. We are planning to release some preview as well. </p>

<p>Thank you all for your great help, especially Alan, Arthur, and Stephen from the Sun CTS team. I couldn't forget such a beautiful weather in Boston.</p>

<p>P.S. More about this to come, so stay tuned! </p>]]>

</content>
</entry>
<entry>
<title>Serializing XML, not printing XML</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/06/serializing_xml.html" />
<modified>2006-06-16T07:52:18Z</modified>
<issued>2006-06-15T05:49:11Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.5028</id>
<created>2006-06-15T05:49:11Z</created>
<summary type="text/plain">Suppose you have an org.w3c.dom.Document instance to output, for example, to a web browser screen or just simply on a Console, then hmm... unfortunately, we used to have no standard way within DOM API (used, not now). Even though we...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>Suppose you have an org.w3c.dom.Document instance to output, for example, to a web browser screen or just simply on a Console, then hmm... unfortunately, we used to have no standard way within DOM API (used, not now). </p>

<p>Even though we can take advantage of DOM L3 Load/Save from JAXP 1.3, it doesn't mean that everybody is happy with that mainly because JAXP 1.3 is fairly new and you might have no choice but to stick to JAXP 1.2 and earlier.</p>

<p>One fine day, I encountered an outstanding snippet of code:</p>

<p>System.out.println(doc);</p>

<p>where doc is of Document.</p>

<p>And the result? Yes! it works! </p>

<p><root><br />
  <element1> ...</p>

<p><br />
OK, then can we generalize this? Again unfortunately, in this case Document.toString() method implementation is overriden but Document API doesn't require so. In other words, behaviors of Document.toString() vary from implementation to implementation, so you can't expect it to work always.</p>

<p>Therefore, I'd like to recommend two things:</p>

<p>1. Use the DOM L3 Save feature as long as you can.<br />
If you use JDK 5 and later, you don't have to pay a penny for that. If you need to use JDK 4 and earlier, consider that your system is able to allow you to endorse the new JAXP set.</p>

<p>Here's a short example of how-to.</p>

<p>DOMImplementation implementation= DOMImplementationRegistry.newInstance()<br />
                    .getDOMImplementation("XML 3.0");<br />
DOMImplementationLS feature = (DOMImplementationLS) implementation.getFeature("LS",<br />
                    "3.0");<br />
LSSerializer serializer = feature.createLSSerializer();<br />
LSOutput output = feature.createLSOutput();<br />
output.setByteStream(System.out);<br />
serializer.write(doc, output);</p>

<p>2. If your situation is inevitable, choose XMLSerializer in Xerces without depending on Document.toString(). Although it's not a standard approach, it has been working since its inception for many XML guys :-)</p>

<p>Here's also a short example of how-to.</p>

<p>XMLSerializer serializer = new XMLSerializer();<br />
serializer.setOutputByteStream(System.out);<br />
serializer.serialize(doc);</p>

<p>3. I got valuable input from commentators. It's very coincidental that I just recognized that I used the same method as them :-)</p>

<p>TransformerFactory transformerFactory = TransformerFactory<br />
            .newInstance();<br />
            Transformer transformer = transformerFactory.newTransformer();<br />
            transformer.setOutputProperty("indent", "yes");<br />
            transformer.transform(new DOMSource(node), new StreamResult(System.out));</p>

<p>#1 and #3 uses JAXP API, so if you're concerned about portability of your code, those choices can help you.</p>]]>

</content>
</entry>
<entry>
<title>JAXB 2.0 TCK</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/04/jaxb_20_tck.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-19T06:43:11Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.4529</id>
<created>2006-04-19T06:43:11Z</created>
<summary type="text/plain">You can download it from https://jaxb.dev.java.net/tck.html . It&apos;s still beta, but I hope we can see a final version as JAXB 2.0 spec and RI is also finalized (very soon)....</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>You can download it from https://jaxb.dev.java.net/tck.html . It's still beta, but I hope we can see a final version as JAXB 2.0 spec and RI is also finalized (very soon).</p>]]>

</content>
</entry>
<entry>
<title>Terms in JWS 2.0 - PAWSDL vs PUWSDL and GISC vs GASC</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/04/pawsdl_puwsdl_g.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-14T08:26:38Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.4450</id>
<created>2006-04-14T08:26:38Z</created>
<summary type="text/plain">EWS 1.2 introduces two types of WSDL: PAckaged WSDL - PAWSDL (paw sdle): WSDL files packaged in a module. PUblished WSDL - PUWSDL (poo sdle): WSDL files published during deployment. While JAX-RPC uses interface (java.xml.rpc.Service) for clients, JAX-WS uses class:...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>EWS 1.2 introduces two types of WSDL:</p>

<p>PAckaged WSDL - PAWSDL (paw sdle): WSDL files packaged in a module.<br />
PUblished WSDL - PUWSDL (poo sdle): WSDL files published during deployment.</p>

<p>While JAX-RPC uses interface (java.xml.rpc.Service) for clients, JAX-WS uses class:<br />
 <br />
GenerIc Service Class - GISC (g sc): javax.xml.ws.Service<br />
GenerAted Service Class - GASC (gas c): generated service classes extending javax.xml.ws.Service</p>

<p>Let's talk about JWS with some efficiency :-)</p>]]>

</content>
</entry>
<entry>
<title>4 cases in packaing web service endpoints in Java EE 5</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/04/4_cases_in_pack.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-14T06:54:25Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.4500</id>
<created>2006-04-14T06:54:25Z</created>
<summary type="text/plain">Web services in Java EE 5, or JWS 2.0 changes a lot in packaging endpoints. There are 3 types in a web module: 1. Neither web.xml nor webservices.xml In this case, full annotations are required. 2. No web.xml but webservices.xml...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>Web services in Java EE 5, or JWS 2.0 changes a lot in packaging endpoints. There are 3 types in a web module:</p>

<p>1. Neither web.xml nor webservices.xml<br />
In this case, full annotations are required.</p>

<p>2. No web.xml but webservices.xml<br />
Annotations can be overriden by webservices.xml as defined by EWS (JSR 109) 1.2.</p>

<p>3. Partial web.xml and webservices.xml<br />
"Partial" here means that web.xml doesn't have any servlet declaration for endpoints because they can be detected by @WebService Annotation unlike plain Servlets. </p>

<p>4. Full web.xml and webservices.xml<br />
It's just like J2EE 1.4. </p>]]>

</content>
</entry>
<entry>
<title>JWS ME 2.0</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/04/jws_me_20.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-13T11:00:45Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.4490</id>
<created>2006-04-13T11:00:45Z</created>
<summary type="text/plain">While I introduced the term JWS (Java Web Services) 2.0, I realized that the same notion can be applied to Java ME, i.e. JWS ME 2.0: JWS ME 1.0 JSR 172 J2ME Web Services JWS ME 2.0 JSR 279 Service...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Web Services and XML</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>While I introduced the term JWS (Java Web Services) 2.0, I realized that the same notion can be applied to Java ME, i.e. JWS ME 2.0:</p>

<p>JWS ME 1.0</p>

<p>JSR 172 J2ME Web Services</p>

<p><br />
JWS ME 2.0</p>

<p>JSR 279 Service Connection API for Java ME<br />
JSR 280 XML API for Java ME</p>]]>

</content>
</entry>
<entry>
<title>Eclipse 3.2M6, WTP 1.5M5, and Callisto</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/04/eclipse_32m6_wt.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-04-03T05:47:58Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.4437</id>
<created>2006-04-03T05:47:58Z</created>
<summary type="text/plain">Eclipse 3.2M6 was out and is almost ready for the final. Eclipse 3.2 supports Java SE 5 as well as Java SE 6. Eclipse Web Tools project also unveiled WTP 1.5M5, which is aimed at Java EE 5 with Dali,...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>Tools</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>Eclipse 3.2M6 was out and is almost ready for the final. Eclipse 3.2 supports Java SE 5 as well as Java SE 6. </p>

<p>Eclipse Web Tools project also unveiled WTP 1.5M5, which is aimed at Java EE 5 with Dali, EJB 3 support and JSF. Once Eclipse 3.2 and WTP 1.5 cut the final simultaneously, you will be able to enjoy developing Java EE 5 applications on top of the full Eclipse support.  </p>

<p>When it comes to "simultaneity", Eclipse Callisto project may interest you. As a matter of fact, getting a right set for your overall purpose, for example, Java EE development, in Eclipse was quite tricky because there have been infra and component projects with different release plans in the Eclipse ecosystem. Callisto came up to solve the difficulty and already shows some sign for "good to go."</p>

<p>June this year would be great for Eclipse users :-)  </p>]]>

</content>
</entry>
<entry>
<title>Java Web Services (JWS) 2.0</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/iasandcb/archive/2006/03/java_web_servic.html" />
<modified>2006-06-09T00:45:50Z</modified>
<issued>2006-03-30T12:14:11Z</issued>
<id>tag:weblogs.java.net,2006:/blog/iasandcb/315.4411</id>
<created>2006-03-30T12:14:11Z</created>
<summary type="text/plain">While I was working on preparing slides for my session on TmaxDay 2006 (http://www.tmax.co.kr/tmaxday/), I came up with some idea of grouping and classifying Java web services technologies: Java Web Services 1.0 (adopted by J2EE 1.4) JAXP 1.2 SAAJ 1.2...</summary>
<author>
<name>iasandcb</name>

<email>iasandcb@gmail.com</email>
</author>
<dc:subject>J2EE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/iasandcb/">
<![CDATA[<p>While I was working on preparing slides for my session on TmaxDay 2006 (http://www.tmax.co.kr/tmaxday/), I came up with some idea of grouping and classifying Java web services technologies:</p>

<p>Java Web Services 1.0 (adopted by J2EE 1.4)</p>

<p>JAXP 1.2<br />
SAAJ 1.2<br />
JAX-RPC 1.1<br />
(Optional) EWS (JSR 109) 1.1</p>

<p>Java Web Services 2.0 (adopted by Java EE 5 and Java SE 6)</p>

<p>JAXP 1.3 + StAX 1.0 (= JAXP 1.4)<br />
SAAJ 1.3<br />
JAXB 2.0 + JAX-WS 2.0 (JSR 181 included)<br />
(Optional) EWS 1.2</p>

<p>Instead of calling each Java XML and Web Services technology for a certain level or time of Java EE, we can simply say "JWS (pronounced "J Wiz") 1.0" for the former set and "JWS 2.0" for the latter set. Actually this idea was inspired by Sun's i-Stack that emcompasses JAXB, JAX-RPC, JAX-WS, and so on.</p>

<p>Yeah, I also have to admit that JWS 2.0 is another wave of "2.0" just like Web 2.0 :-)</p>]]>

</content>
</entry>

</feed>