示例#1
0
  /**
   * Creates {@link BindingImpl} for this {@link PortInfo}.
   *
   * @param webServiceFeatures User-specified features.
   * @param portInterface Null if this is for dispatch. Otherwise the interface the proxy is going
   *     to implement
   */
  public BindingImpl createBinding(WebServiceFeature[] webServiceFeatures, Class<?> portInterface) {
    WebServiceFeatureList r = new WebServiceFeatureList(webServiceFeatures);
    if (portModel != null)
      // merge features from WSDL
      r.mergeFeatures(portModel, portInterface == null /*if dispatch, true*/, false);

    // merge features from interceptor
    for (WebServiceFeature wsf : owner.serviceInterceptor.preCreateBinding(this, portInterface, r))
      r.add(wsf);

    BindingImpl bindingImpl = BindingImpl.create(bindingId, r.toArray());
    owner.getHandlerConfigurator().configureHandlers(this, bindingImpl);

    return bindingImpl;
  }