dev@jax-ws.java.net

Re: Propagating FastInfosetFeature from the WSDLBoundPortType to the WSBinding

From: Rama Pulavarthi <Rama.Pulavarthi_at_Sun.COM>
Date: Wed, 18 Oct 2006 12:20:23 -0700

> Yes, i noticed all this the respective code, it ain't pretty.
>
>
>>> It seems there could be some generic code for the cases where
>>> specific overriding logic is not required (e.g. for addressing) such
>>> that by default all features get propagated. I did not modify to
>>> make it generic because i want to check if that is the right thing
>>> to do.
I agree its not pretty. I will see if it can be made generic.
As I look at it now, all features are not same, in the sense they don't
have the same representation or interpretation.
For example,
Addressing feature in dispatch case needs to plugged in only if it has
wsdl:required=true.
MtomFeature does n't even appear in wsdl as a wsdl extension, its
controlled through policy.
MTOMFeature does n't have required attribute at all.

Lets say you populate WSDLModel with FooFeature, Should n't it complain
that RI does n't understand that.
There should be some introspection at someplace. As per Spec in
somecase, we have to throw error if we don't understand a particular
wsdl:extension.
I don't think that code is not there .This examination has to be done at
some place.

Making it generic is a good idea. We will relook in to the code.

thanks,
Rama Pulavarthi



>> It really depends on the feature. Such as addressing can be turned on
>> using wsdl extension or using a policy. Not sure what kind of generic
>> behavior can be applied.
>>
>
> The code for FI and MTOM feature propagation is equivalent modulo the
> ID used (see below).
>
> If other features get added, it would be easier to have something
> generic so that we do not have to modify this code unless it deviates
> from the default.
>
> Paul.
>
> PortInfo:
>
> WebServiceFeature wsdlMTOMFeature =
> portModel.getFeature(MTOMFeature.ID);
> if (wsdlMTOMFeature != null) {
> wsdlFeatures.add(wsdlMTOMFeature);
> }
>
> WebServiceFeature wsdlFastInfosetFeature =
> portModel.getFeature(FastInfosetFeature.ID);
> if (wsdlFastInfosetFeature != null) {
> wsdlFeatures.add(wsdlFastInfosetFeature);
> }
>
>
> SEIPortInfo:
>
> WebServiceFeature wsdlMTOMFeature =
> portModel.getFeature(MTOMFeature.ID);
> if (wsdlMTOMFeature != null) {
> wsdlFeatures.add(wsdlMTOMFeature);
> }
>
> WebServiceFeature wsdlFastInfosetFeature =
> portModel.getFeature(FastInfosetFeature.ID);
> if (wsdlFastInfosetFeature != null) {
> wsdlFeatures.add(wsdlFastInfosetFeature);
> }
>
>
> EndpointFactory:
>
> WebServiceFeature wsdlMTOMFeature =
> wsdlPort.getFeature(MTOMFeature.ID);
> if (wsdlMTOMFeature != null &&
> binding.getFeature(wsdlMTOMFeature.getID()) ==
> null) {
> wsdlFeatures.add(wsdlMTOMFeature);
> }
>
> WebServiceFeature wsdlFastInfosetFeature =
> wsdlPort.getFeature(FastInfosetFeature.ID);
> if (wsdlFastInfosetFeature != null &&
> binding.getFeature(FastInfosetFeature.ID) == null) {
> wsdlFeatures.add(wsdlFastInfosetFeature);
> }
>
> Paul.
>