dev@jax-ws.java.net

Getting to WSDLBoundOperation from a message

From: Kohsuke Kawaguchi <kohsuke.kawaguchi_at_sun.com>
Date: Thu, 09 Feb 2006 17:49:58 -0800

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 think we should provide a method on Message that returns
WSDLBoundOperation like this:

class Message {
     WSDLBoundOperation getOperation(WSDLPort port);
}

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.

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.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com