The Artima Developer Community
Sponsored Link

Articles Forum
Three Minutes to a Web Service

6 replies on 1 page. Most recent reply: Mar 5, 2009 1:28 PM by Jim Goodwin

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 6 replies on 1 page
Admin Admin

Posts: 39
Nickname: admin
Registered: Jan, 2002

Three Minutes to a Web Service Posted: May 22, 2005 9:00 PM
Reply to this message Reply
Advertisement
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


Luigi

Posts: 1
Nickname: gix
Registered: May, 2005

Re: Three Minutes to a Web Service Posted: May 23, 2005 5:19 AM
Reply to this message Reply
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

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Three Minutes to a Web Service Posted: May 23, 2005 12:59 PM
Reply to this message Reply
> 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.

daryoush mehrtash

Posts: 1
Nickname: dmehrtash
Registered: Jul, 2005

Re: Three Minutes to a Web Service Posted: Jul 6, 2005 1:54 PM
Reply to this message Reply
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

Andi Wijaya

Posts: 1
Nickname: andiwijaya
Registered: Apr, 2006

Re: Three Minutes to a Web Service Posted: Apr 24, 2006 6:49 PM
Reply to this message Reply
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

anson zheng

Posts: 1
Nickname: zhxt
Registered: Apr, 2008

Re: Three Minutes to a Web Service Posted: Apr 13, 2008 7:26 PM
Reply to this message Reply
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.

Jim Goodwin

Posts: 1
Nickname: jimgoodwin
Registered: Mar, 2009

Re: Three Minutes to a Web Service Posted: Mar 5, 2009 1:28 PM
Reply to this message Reply
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.

Flat View: This topic has 6 replies on 1 page
Topic: The Asynchronous Web Previous Topic   Next Topic Topic: Your C++ Wish List

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use