dev@jax-ws.java.net

Re: Propagating FastInfosetFeature from the WSDLBoundPortType to the WSBinding

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 18 Oct 2006 18:32:13 +0200

Vivek Pandey wrote:
> [added dev_at_jax-ws.dev.java.net]
>

I am seeing double :-)


> Paul Sandoz wrote:
>> Hi,
>>
>> I have modified JAX-WS code for PortInfo, SEIPortInfo and
>> EndpointFactory to propagate the FastInfosetFeature from the
>> WSDLBoundPortType to the WSBinding.
>>
>> I basically copied what was done for MTOM on the presumption that it
>> is correct :-)
>>
> I guess, it should be fine, except MTOM is little different as the
> defaulting rules are different. Such as mtom can be enabled/disabled
> using DD, BindingType, @MTOMFeature annotation and also using jaxws apis!
>

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

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109