dev@jax-ws.java.net

Re: Getting to WSDLBoundOperation from a message

From: Arun Gupta <Arun.Gupta_at_Sun.COM>
Date: Thu, 09 Feb 2006 18:14:18 -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 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().

WS-A pipe has to look up so that correct default wsa:Action can be
generated over the wire. I'd think similarly security pipe would need to
know the operation name so that they can apply security policy.

>
>> 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?
I see this as a convenience method on the framework you started on.

-Arun
>
>> 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.
>>
>
>

-- 
got Web Services ?
Download Java Web Services Developer Pack from
http://java.sun.com/webservices