dev@jax-ws.java.net

Re: Getting to WSDLBoundOperation from a message

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Thu, 09 Feb 2006 18:08:28 -0800

Kohsuke Kawaguchi wrote:
>
> I think a lot of pipes want to get to a WSDLBoundOperation for the
> current message, so I think it's worth doing efficiently.
>
> Today the way it's done is most likely for each pipe to create a QName
> that represents the payload name, then do a map look up to get to
> WSDLBoundOperation.
>
I didnt understand why do pipes have to do the lookup? Can they not do
something like: WSDLPort.getOperation(nsURI, localName), where tag name
is Message.getLocalName() and Message.getNamespaceURI().

> I think we should provide a method on Message that returns
> WSDLBoundOperation like this:
>
> class Message {
> WSDLBoundOperation getOperation(WSDLPort port);
> }
>
Hmm. Ofcourse we can but how is it different from the above. Is it more
of convenience or something else that I dont see?
> Since the payload is read-only, we can cache the computed
> WSDLBoundOperation, avoiding multiple lookup.
>
> To do this we also need payload->op look up at WSDLBoundPortType. Arun
> told me that Vivek is planning to do this.
>
I started doing sometime back and should be working on it tomorrow. This
is the expensive thing to do, ofcourse its done only one time, but would
require reading all the Message parts from the abstract portion and then
look in the binding section to figure out which part is bound to body to
mark which part is bound to body or is a payload.

-vivek.
> Would this make sense? Or can someone think of a better way to do this?
>
> The only thing that I don't like about this is that it's likely many
> pipes will still have to look up their own map from WSDLBoundOperation
> to their own data structure.
>


-- 
Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc.