Campana Jr., Salvatore J wrote:
Bruno,

WSDL 1.0 doesn't include inheritance..That is the issue.  That is why
you copy and paste what you want into your wsdl....
I think that's answering part of your question...

Indeed it does. I was using two ports in a single service to circumvent this limitation.


We generate based on port because the port references the binding which
references the portType which contains the operations....The ports seem
like the obvious place to separate the endpoints...That being said,
there is no reason you couldn't alter the generated interface and code
to contain all the operations and map the resource to a single
type....You can do this to meet your needs.  The thing to watch out for
is common operations in portTypes...If you had the same operation
defined in two portTypes and you collapse this to one, does it still
make sense for you?

Bottom line is you can do it.  I do not, however think we should
generate one class just for the service as opposed to generating on the
ports...

If I can make an analogy between WS and Java (I'm aware I'm entering a dangerous ground), I would consider the portTypes to be equivalent to interfaces (which seems to make sense with respect to the WSDL 2.0 recommendations) and services/bindings to be equivalent to classes (and this is indeed a short cut). That's obviously arguable and I can see where it would pose some problems, in particular if there were several bindings for a single instance of the "class" behind. In this case, the workaround I've used to have something similar to inheritance in WSDL wouldn't work. I think collapsing two port types wouldn't cause more problems that implementing in the same class two Java interfaces containing two methods of the same name would (it's mostly a input/output type problem, which may itself depend on the limitations of the language used to implement the service). Yet, if we assume everybody uses a SOAP over HTTP binding, it seems fine, and it would make sense to generate interfaces for the portTypes and classes for the services. I must admit it really depends on the interpretation made by the tooling behind the WSDL specification. I'm not quite sure if WSDL 2.0 is so much better in that respect (I haven't really explored it, and it's a bit late to make objections to the working group anyway).


This being said, there might be a simpler way out of this in the context of WSRF (well, simpler for the user at least): having a transformation that generates the WSDL for a WSRF service from a WSDL that only contains the custom operations. This could be another ant task with parameters to select which operations to include.



Bruno.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to