beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Merz" <mm...@bea.com>
Subject RE: endpoint interface
Date Fri, 01 Oct 2004 16:29:54 GMT
Hi Wolfgang,

According to JSR-181, the endpointInterface property of the @WebService
annotation specifies a file that contains all annotations except for
@WebService. More specifically, a file annotated with @WebService that
specifies an endpointInterface must not have any other annotations.

In your example, Foo.java provides an implementation for the
endpointInterface defined in Cheetorama. Thus, it must not have any
other annotations. Instead, all other annotations would be defined in
Cheetorama.java.

In other words, the object model that you would get from
WsmAnnotationProcessor or WsmReflectionAnnotationProcessor would have
the data from the union of the annotation sets of both files Foo and
Cheetorama; there would only be one object model and the caller would
only invoke the annotation processor (apt or reflection) once
(explicitly).

I think Cheetorama could be compiled (and its annotations would be
processed) as a side effect of handling the @WebService annotation in
Foo. As a result the service invocation has to deal with two files in
the case of an endpointInterface being specified -- the implementation
file with the code and the interface file with the annotations.

Does this help/make sense?

Cheers,

-michael

-----Original Message-----
From: wolfgang127us@yahoo.co.jp [mailto:wolfgang127us@yahoo.co.jp] 
Sent: Wednesday, September 29, 2004 11:56 AM
To: Beehive Developers
Subject: Re: endpoint interface

Hi Michael,

> I am trying to find out how to do that as part of the switch from
> reflection/byte-code processing to apt. Stay tuned...

okay, please let me know when you make it.

I'm thinking to implement the service endpoint interface for 
the WsmReflectionAnnotationProcessor.java as well.
But before doing that, I wanna make sure one thing.

How does the caller retrieve the object model of the service 
endpoint interface ?

For example, Foo.java (in svn) specifies "Cheetorama" as its
@WebService.endpointInterface.
Using the last code I sent you, the caller gotta follow the procedures
below.

First: 
The caller uses the com.sun.tools.apt.Main class to get an object model
of the Foo.java.
(Like in
drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProce
ssorTest.java )

   String[] _args = {
     "-factory",
 
"org.apache.beehive.wsm.jsr181.processor.apt.WsmAnnotationProcessorFacto
ry",
      ...
   };

   int status = new Main().compile(_args);
   ...
   this.objectModel = WsmAnnotationProcessor.getObjectModel("Foo");


Second:
The object model(this.objectModel) of the Foo.java is in the caller's
hands now, 
so the caller now gotta check whether the endpointInterface exists in
the object model.
In this case, it exists and specifies "Cheetorama".

Third:
The caller finally can get the object model of the Cheetorama by
invoking 
WsmAnnotationProcessor.getObjectModel("Cheetorama");

Is this sequence right ?

or
When WsmAnnotationProcessor.getObjectModel("Foo"); is invoked in the
First part,
Is the object model of "Cheetorama" actually returned ?
(So the caller doesn't need to care whether Foo.java has the service
endpoing interface.
If the Foo.java doesn't have the service endpoint interface, the object
model of Foo.java 
will be returned.)

Even though I implemented WsmAnnotationProcessorFactory as former way,
somehow I think 
latter way looks correct to me according to JSR-181. (not sure though)

But by the latter way, we can never get the object model of Foo.java if
the service 
endpoint interface exists. Foo's object model will be overrided by the
one of the service 
endpoing interface (Cheetorama).

Former or latter way, which is correct ??

Thanks in advance.

Wolfgang.






Mime
View raw message