Hi Anne. Thanks a lot for the reply. I still have some questions though...

> I'm not sure I understand the issue. If your clients have 
> access to the WSDL document, then they have the service 
> endpoints for all of your services. There's no need for them 
> to perform any type of "magical discovery".

True if the only endpoints you want to use are the ones published in the
WSDL file - already a discovery mechanism (though not magical). On the other
hand, we auto-generate our client stubs and give the user ability to provide
the endpoint they want to contact. So we would need a way to have different
portTypes "associated" somewhere. We could do it, but having one single
endpoint seems cleaner.

> In any case, even if you can't expose a single port that 
> implements three different portTypes, you can specify the 
> same endpoint in three different ports.

This sounds a lot better.

> Axis won't support this directly -- Axis will always create a 
> different endpoint for each port. But you can implement a 
> proxy (also known as a gateway) that accepts requests for all 
> three types of services and then redirects the requests to 
> the appropriate endpoints.
> This proxy can do lots of other things besides routing, such 
> as validation, transformation, monitoring, auditing, 
> security, etc. This is the way most web services management 
> products work.

I think i understand the concept, but i'm not sure i know how to do it. 

If for my service i publish one WSDL file with the different porttypes, i
will get (correct me if i'm wrong) auto-generated by Axis:
- on the client side one interface, service, service locator and stub class
for each portType
- on the server side one interface, service, service locator, skeleton and
implementation class for each portType

So there is no way to have the proxy classes auto-generated. Is this what
you mean when saying Axis won't support it directly?

As i described before, we could generate a WSDL that puts everything on one
portType and generate the server side stubs from it. This would not be the
one published for clients though. Just a way to get everything pointing to
the same implementation class.

Would you do it differently? I can see the option of auto-generating the
implementation classes per portType and doing the proxy by hand just for the
redirection. But it would be nice to have it automated somehow.

Thanks,
  Ricardo

> 
> Anne
> 
> On 6/15/05, Ricardo Brito Da Rocha <[EMAIL PROTECTED]> wrote:
> > Hi all. We've been thinking on how to properly have porttype 
> > composition defined in WSDL and implemented in a web service, with 
> > some practical restrictions of our own. The reason we post 
> the issue 
> > here is that we would like to understand how Axis deals with the 
> > limitations of WSDL 1.1 we found, and how the Java2WSDL 
> tool can be a help.
> > 
> > Please make additional comments on our approach and possible 
> > alternatives if you have some.
> > 
> > Thanks in advance,
> >   Ricardo
> > 
> > Question: how to compose portTypes?
> > 
> > Goal: have one endpoint implementing multiple portTypes.
> > 
> > Constraints:
> >     We have several portTypes, describing various aspects
> >     of a service:
> >       - ServiceBase with a getVersion() method
> >       - File with create() and readDir() methods
> >       - Delegation with a doDelegation() method
> > 
> >     To simplify the life of the clients we only want to have
> >     _one_ endpoint exposed. We cannot assume that all clients
> >     would use our client code with some magical discovery of
> >     associated endpoints.
> > 
> >     ServiceBase and Delegation is described by WSDL files.
> > 
> >     File is described by a Java class and we use Axis 1.2's
> >     Java2WSDL to generate WSDL from it.
> > 
> > Discussion:
> >     According to our understanding of WSDL 1.1 (
> >     implemented by Axis and gSOAP) portType cannot extend
> >     other portTypes (it is a feature coming in WSDL 2.0).
> >     Also a port cannot have multiple portTypes (as it is linked with
> >     one binding, which is linked with one portType), so an
> >     endpoint can have only one portType associated with it.
> > 
> >     Given these constraints we need a single portType,
> >     which merges the methods of ServiceBase, File and
> >     Delegation.
> > 
> > 
> >     According to our understading we cannot do this merge
> >     in pure WSDL, so we need to do some pre-processing
> >     (see Globus Toolkit 4 also).
> > 
> >     The question is if it is worth doing at WSDL level,
> >     using some funny XSLT?
> >     Or is it possible to do this merge using Axis'
> >     Java2WSDL --input or --importSchema options?
> > 
> > 
> >
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to