On 9/12/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
>
> Mike Edwards wrote:
> > Folks,
> >
> > Comments inline
> >
> > Yours,  Mike.
> >
> > ant elder wrote:
> >> Had this over on the user list about how the binding.ws uri is
> >> ignored if
> >> you use wsdlElement with #wsdl.port. We used to throw an exception in
> >> that
> >> case which I think makes things much clearer but that code has been
> >> changed
> >> so that no longer happens. Was that removed intentionally or could i
> >> add it
> >> back?
> >>
> >>    ...ant
> >>
> >
> > So, the question is that if both the URI and a WSDL are used, then
> > they can conflict?
> >
> > From what you say, the WSDL wins "silently" in the current code.  As a
> > result, looking at the URI in the SCDL does not help - it is confusing.
> >
> > I think that at least a warning is called for.  Whether an exception
> > is the right thing, I'm less sure.  The general rule with SCA WS
> > binding is that once you start using WSDL, then it is taken as
> > gospel.  That is true for all kinds of metadata that can live in the
> > WSDL.
> >
> > Only serious conflicts such as mismatch of interfaces or inability to
> > satisfy specified intents should really cause exceptions.  However,
> > warnings of conflicts seem useful since it will bring the user's
> > attention to what may indeed be a problem.
> >
> >> ---------- Forwarded message ----------
> >> From: ant elder <[EMAIL PROTECTED]>
> >> Date: Sep 12, 2007 8:46 AM
> >> Subject: Re: uri of binding.ws should be used restrictedly
> >> To: [EMAIL PROTECTED]
> >>
> >>
> >>
> >> On 9/12/07, shaoguang geng <[EMAIL PROTECTED]> wrote:
> >>> Hello every one,
> >>>
> >>> uri attribute of <binding.ws/> is much convenient to attach a WS in.
> >>>
> >>> But it works only within a few circumstances, such as another java
> >>> generated WS provided by Tuscany, JAXWS.
> >>>
> >>> But much more WS is complecated, such as JBoss or even a Tuscany WS
> >>> when
> >>> the wsdl becomes delicate.
> >
> > I love the phrasing here.  "WSDL becomes delicate" - may rather be
> > said that the poor programmer's brain becomes delicate, once the WSDL
> > gets complex.  I'd far rather not deal with the WSDL, but I accept
> > that is not practical for some cases.  In these cases, you hope that
> > the programmer can simply pick up the WSDL for some remote web service
> > and use it without having to inspect it.  The only thing they should
> > need to do is run WSDL2Java against it to render a nice Java interface
> > for the service that they use in their code.  Otherwise, it's an
> > opaque cookie.
> >
> >>>
> >>> Under these circumstances, pre loading wsdl (locally save the wsdl)
> and
> >>> use "wsdlElement" will do most of them. Up to now, I have gone over
> >>> it with
> >>> JBoss and ODE.
> >>>
> >>> So I just think, to make things frank, I would suggest that Tuscany
> >>> user
> >>> should be warned of uri's limitation, and encouraged of using wsdl
> >>> preloading.
> >>
> >>
> >> The uri attribute should always get used unless the wsdlElement is
> >> pointing
> >> at the port (ie using "#wsdl.port") in which case the uri attribute is
> >> ignored. So you can use both uri and pre loaded wsdl as long as you use
> >> #wsdl.binding within the wsdlElement.
> >>
> >> I agree its confusing that the uri can get completely ignored, the
> >> code did
> >> used to throw an exception in that case so it was obvious there was a
> >> conflict, i'll bring it up on the dev list to see if we can add that
> >> back.
> >>
> >>    ...ant
> >>
> >
>
> Having the WSDL "win" is as  per the spec.


The spec doesn't clearly define what to do in this exact situation, I think
thats a bug in the spec. And it doesn't seem very user friendly to just
ignore a users input whether or not we give a warning as thats likely to
just get buried in a log somewhere, so i'd prefer and exception. Isn't that
what we agreed last time this came up -
http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200707.mbox/browser.

   ...ant

Reply via email to