Summary:
A key aim of JAX-RPC 2.0 (JSR 224) is to simplify Java Web service development. Currently in early draft review stage in the JCP, an early access JAX-RPC 2.0 reference implementation is available from the Java Web services community site on java.net. This article provides a brief preview of writing a JAX-RPC 2.0-based Web service with that reference implementation, and highlights how Java annotations simplify Web service development.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: March 5, 2009 1:28 PM by
Jim
|
JAX-RPC 2.0 is the next-generation XML-based RPC mechanism in Java. What do you think of JAX-RPC's use of annotations and simplified programming model? Will this API contribute to developers writing more Java Web services? Read the JAX-RPC 2.0 tutorial here: http://www.artima.com/lejava/articles/threeminutes.html
|
|
|
nice article! and ... what about invoking web services? is there a lightweight process to invoke and receive messages without dealing with the "dirty" xml/soap/etc code? bye! GiGi
|
|
|
> nice article! > and ... what about invoking web services? > is there a lightweight process to invoke and receive > messages without dealing with the "dirty" xml/soap/etc > code? > bye! > GiGi
Yes, the RAX-RPC 2.0 reference implementation includes code examples for doing just that.
|
|
|
Frank, in the article you say:
"Generate Web service artifacts, including a WSDL file, by applying annotations to that source file. This step is performed with the help of the apt tool, which is part of JDK 1.5."
How can you generate WSDL from source file? Specifically, the type section of the wsdl that would need the schema of the serialized object. I don't see how this could be ever done by APT-ing the source files.
thanks,
Daryoush
|
|
|
Hi,
I use JWSDP 2 to compile this sample program. But, I've got the following error when I compile the server:
setup: [mkdir] Created dir: C:\Documents and Settings\Administrator\My Documents\My Downloads\14981\JohnJYates JAX-WS article 1_13_2006\simpleExample\build [mkdir] Created dir: C:\Documents and Settings\Administrator\My Documents\My Downloads\14981\JohnJYates JAX-WS article 1_13_2006\simpleExample\build\classes
[mkdir] Created dir: C:\Documents and Settings\Administrator\My Documents\My Downloads\14981\JohnJYates JAX-WS article 1_13_2006\simpleExample\build\war
build-server-java: [apt] warning: Annotation types without processors: [javax.xml.bind.annota tion.XmlRootElement, javax.xml.bind.annotation.XmlAccessorType, javax.xml.bind.a nnotation.XmlType, javax.xml.bind.annotation.XmlElement] [apt] error: Could not get TypeDeclaration for: simpleexample.server.Simpl eJAXWS in apt round: 2 [apt] Problem encountered during annotation processing; [apt] see stacktrace below for more information. [apt] java.lang.NullPointerException [apt] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.co mpleteModel(WebSe rviceAP.java:357) [apt] at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.pr ocess(WebServiceA P.java:225) [apt] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationPr ocessor.process(A nnotationProcessors.java:60) [apt] at com.sun.tools.apt.comp.Apt.main(Apt.java:454) [apt] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java :448) [apt] at com.sun.tools.apt.main.Main.compile(Main.java:1075) [apt] at com.sun.tools.apt.main.Main.compile(Main.java:938) [apt] at com.sun.tools.apt.Main.processing(Main.java:95) [apt] at com.sun.tools.apt.Main.process(Main.java:43) [apt] at com.sun.tools.apt.Main.main(Main.java:34)
Can somebody tell me how to fix the error?
Thank you in advance, Andi
|
|
|
it is a bug and root cause is that some lib files are not added in the war. check , properties->build->packaging, those files should be seen war content table, otherwise add it manaually.
|
|
|
I know this is an old topic but...
First, I want my three minutes back.
Then, I want the 3 hours back that I spent dicking around trying to understand just WTH apt is and how to generate WS code using it.
Does the JDK provide an implementation of this apt stuff?
I'm tired. And I need a nap.
|
|