Hi Shane,
I would like to share some points we had
in mind while we were developing the JAX-WS model tools toolset within SAP.
A web service always has an endpoint
interface (this is the java representation of the wsdl porttype). It does not
matter whether this interface exists as java artifact (ISomething.java) or not.
WS DOM tools work with the JSR-181
annotations and the endpoint interface is specified via the “endpointInterface”
parameter of the @WebService annotation. Here is what JSR-181, section 4.1.1, states
about this parameter (I am not copy-pasting directly the PDF content due to
formatting reasons):
Member-Value
|
Meaning
|
Default
|
endpointInterface
|
The complete name of
the service endpoint
interface defining the
service’s abstract Web
Service contract. This
annotation allows the
developer to separate
the interface contract
from the
implementation. If this annotation is
present, the service endpoint
interface is used
to determine the
abstract WSDL contract
(portType and
bindings). The service endpoint
interface MAY include
JSR-181 annotations to
customize the mapping
from Java to WSDL.
The service
implementation bean MAY
implement the service endpoint
interface, but
is not REQUIRED to do
so.
Not allowed on interfaces.
|
None – the Web
Service contract is
generated from
annotations on the
service
implementation
bean. If a service
endpoint interface
is required by the
target
environment, it
will be generated
into an
implementationdefined
package
with an
implementationdefined
name.
|
As you can see, the “endpointInterface”
is optional, but the web service after all always does have a porttype (and
endpoint interface). Also note that if the “endpointInterface” is
specified, the implementation class is not required to implement the SEI via
the “implements” java keyword
The WS DOM tools consider this and recognize
two types of endpoint interfaces – explicit (if the “endpointInterface”
parameter is available) and implicit (when the “endpointInterface”
is missing)
The implementation of the wizard’s web
service runtime defines a dedicated page where the user has three service
endpoint interfaces (SEI) strategies:
- Do
not use explicit SEI (i.e. the “endpointInteface” parameter of
the @WebService annotation will not be set)
- Use
an existing SEI (the user is able to browse for existing java interface)
- Generate
a new SEI out of the methods which the user enabled for the web service
The wizard always starts with the implementation
class. Starting from the endpoint interface is not supported.
I am not convinced that it makes much
sense to start a bottom-up web service wizard from an interface. The reason is
that the development process (normally) starts with writing the implementation
class and then “exposing” the implementation as web service. I
cannot imagine that a developer would write the class, navigate to the
interface, start the wizard on the interface and browse back to the implementation
class… It would be simply lots of clicking J
Regards, Danail
From: wtp-incubator-dev-bounces@xxxxxxxxxxx
[mailto:wtp-incubator-dev-bounces@xxxxxxxxxxx] On Behalf Of shane clarke
Sent: Tuesday, August 25, 2009
3:38 PM
To: wtp-incubator-dev@xxxxxxxxxxx
Subject: [LIKELY JUNK]RE:
[wtp-incubator-dev] Should we drop the POJO web service type in the Web
Services wizard?
Hi Danail,
It's a good question.
The idea was to allow the user to start from an SEI and configure the
implementation they wished to use on the 2nd page of the wizard. The wizard
would
then update the implementation to point to the SEI before input to CXF java2ws.
If no implementation is selected it's possible to get CXF to generate a
skeleton implementation for you that you would have to fill in post wizard
finish.
It does need some work. The implementation selection is currently restricted to
the type hierarchy but it's possible to remove that restriction and i'll open a
bug for that.
The wizard ties up all the pieces into a configuration file.
Anyone think that isn't an acceptable scenario / use case to fit into the Web
Services wizard?
Shane
With Windows Live, you can organize, edit, and share your photos.