コード例 #1
0
 /** creates a {@link Tube} that validates messages against schema */
 public Tube createValidationTube(Tube next) {
   if (binding instanceof SOAPBinding
       && binding.isFeatureEnabled(SchemaValidationFeature.class)
       && wsdlModel != null)
     return new ServerSchemaValidationTube(endpoint, binding, seiModel, wsdlModel, next);
   else return next;
 }
コード例 #2
0
  /** Creates a {@link Tube} that invokes protocol and logical handlers. */
  public @NotNull Tube createHandlerTube(@NotNull Tube next) {
    if (!binding.getHandlerChain().isEmpty()) {
      HandlerTube cousin = new ServerLogicalHandlerTube(binding, seiModel, wsdlModel, next);
      next = cousin;
      if (binding instanceof SOAPBinding) {
        // Add SOAPHandlerTube
        next = cousin = new ServerSOAPHandlerTube(binding, next, cousin);

        // Add MessageHandlerTube
        next = new ServerMessageHandlerTube(seiModel, binding, next, cousin);
      }
    }
    return next;
  }
コード例 #3
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;
  }