Package org.apache.axis

Examples of org.apache.axis.Handler


    protected ReceivedMessageDispatchPolicy getReceivedMessageDispatchPolicy() {
        return new FirstComeFirstServeDispatchPolicy(RECEIVE, RECEIVE_REQUESTS);
    }

    public Handler getSendHandler() {
      Handler h = super.getSendHandler();
      if (h == null && handler instanceof TargetedChain) {
        h = ((TargetedChain)handler).getRequestHandler();
      }
      return h;
    }
View Full Code Here


      }
      return h;
    }
   
    public Handler getReceiveHandler() {
      Handler h = super.getReceiveHandler();
      if (h == null && handler instanceof TargetedChain) {
        h = ((TargetedChain)handler).getResponseHandler();
      }
      return h;
    }
View Full Code Here

    public SerializationContextImpl(Writer writer, MessageContext msgContext)
    {
        this.writer = writer;
        this.msgContext = msgContext;

        Handler optionSource = null ;
        if ( msgContext != null ) {
            soapConstants = msgContext.getSOAPConstants();

            // optionSource = msgContext.getService();
            if (optionSource == null)
                optionSource = msgContext.getAxisEngine();

            // Use whatever schema is associated with this MC
            schemaVersion = msgContext.getSchemaVersion();

            Boolean shouldSendDecl = (Boolean)optionSource.getOption(
                                                  AxisEngine.PROP_XML_DECL);
            if (shouldSendDecl != null)
                sendXMLDecl = shouldSendDecl.booleanValue();

            Boolean shouldSendMultiRefs =
                  (Boolean)msgContext.getProperty(AxisEngine.PROP_DOMULTIREFS);

            if (shouldSendMultiRefs == null)
                shouldSendMultiRefs =
                        (Boolean)optionSource.getOption(AxisEngine.PROP_DOMULTIREFS);

            if (shouldSendMultiRefs != null)
                doMultiRefs = shouldSendMultiRefs.booleanValue();

            // The SEND_TYPE_ATTR and PROP_SEND_XSI options indicate
            // whether the elements should have xsi:type attributes.
            // Only turn this off is the user tells us to
            if ( !msgContext.isPropertyTrue(Call.SEND_TYPE_ATTR, true ))
                sendXSIType = false ;

            Boolean opt = (Boolean)optionSource.getOption(AxisEngine.PROP_SEND_XSI);
            if ((opt != null) && (opt.equals(Boolean.FALSE))) {
                    sendXSIType = false ;
            }

            // A Document-style service overrides the above settings. Don't
View Full Code Here

    public SerializationContextImpl(Writer writer, MessageContext msgContext)
    {
        this.writer = writer;
        this.msgContext = msgContext;

        Handler optionSource = null ;
        if ( msgContext != null ) {
            soapConstants = msgContext.getSOAPConstants();

            // optionSource = msgContext.getService();
            if (optionSource == null)
                optionSource = msgContext.getAxisEngine();

            // Use whatever schema is associated with this MC
            schemaVersion = msgContext.getSchemaVersion();

            Boolean shouldSendDecl = (Boolean)optionSource.getOption(
                                                  AxisEngine.PROP_XML_DECL);
            if (shouldSendDecl != null)
                sendXMLDecl = shouldSendDecl.booleanValue();

            Boolean shouldSendMultiRefs =
                  (Boolean)msgContext.getProperty(AxisEngine.PROP_DOMULTIREFS);

            if (shouldSendMultiRefs == null)
                shouldSendMultiRefs =
                        (Boolean)optionSource.getOption(AxisEngine.PROP_DOMULTIREFS);

            if (shouldSendMultiRefs != null)
                doMultiRefs = shouldSendMultiRefs.booleanValue();

            // The SEND_TYPE_ATTR and PROP_SEND_XSI options indicate
            // whether the elements should have xsi:type attributes.
            // Only turn this off is the user tells us to
            if ( !msgContext.isPropertyTrue(Call.SEND_TYPE_ATTR, true ))
                sendXSIType = false ;

            Boolean opt = (Boolean)optionSource.getOption(AxisEngine.PROP_SEND_XSI);
            if ((opt != null) && (opt.equals(Boolean.FALSE))) {
                    sendXSIType = false ;
            }

            // A Document-style service overrides the above settings. Don't
View Full Code Here

         */

        /** For now, though - make sure we can only admin from our own
         * IP, unless the remoteAdmin option is set.
         */
        Handler serviceHandler = msgContext.getService();
        if (serviceHandler != null  &&
            !JavaUtils.isTrueExplicitly(serviceHandler.getOption("enableRemoteAdmin"))) {
               
            String remoteIP = msgContext.getStrProp(Constants.MC_REMOTE_ADDR);
            if (remoteIP != null  &&
                !remoteIP.equals("127.0.0.1")) {
                   
View Full Code Here

    }

    public void undo(MessageContext msgContext) {
        try {
            Handler serviceHandler = msgContext.getService();
            String filename = (String) getOption("filename");
            if ((filename == null) || (filename.equals("")))
                throw new AxisFault("Server.NoLogFile",
                        "No log file configured for the LogHandler!",
                        null, null);
View Full Code Here

    {
        Chain c = new org.apache.axis.SimpleChain();
       
        for (int n = 0; n < handlers.size(); n++) {
            WSDDHandler handler = (WSDDHandler)handlers.get(n);
            Handler h = handler.getInstance(registry);
            if ( h != null )
              c.addHandler(h);
            else
              throw new ConfigurationException("Can't find handler name:'" +
                                               handler.getQName() + "' type:'"+
View Full Code Here

    {
        if (cachedService != null) {
            return cachedService;
        }

        Handler reqHandler = null;
        WSDDChain request = getRequestFlow();

        if (request != null) {
            reqHandler = request.getInstance(registry);
        }

        Handler providerHandler = null;

        if (providerQName != null) {
            try {
                providerHandler = WSDDProvider.getInstance(providerQName,
                                                           this,
                                                           registry);
            } catch (Exception e) {
                throw new ConfigurationException(e);
            }
            if (providerHandler == null)
                throw new WSDDException(
                          JavaUtils.getMessage("couldntConstructProvider00"));
        }

        Handler respHandler = null;
        WSDDChain response = getResponseFlow();

        if (response != null) {
            respHandler = response.getInstance(registry);
        }

        SOAPService service = new SOAPService(reqHandler, providerHandler,
                                              respHandler);
        service.setStyle(style);
        service.setHighFidelityRecording(!streaming);
        service.setSendType(sendType);

        if ( getQName() != null )
            service.setName(getQName().getLocalPart());
        service.setOptions(getParametersTable());

        service.setEngine(((WSDDDeployment)registry).getEngine());

        if (style != Style.RPC) {
            // No Multirefs/xsi:types
            service.setOption(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
            service.setOption(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
        }

  // Set handlerInfoChain
  if (_wsddHIchain != null) {
            HandlerInfoChainFactory hiChainFactory = _wsddHIchain.getHandlerChainFactory();

      service.setOption(Constants.ATTR_HANDLERINFOCHAIN, hiChainFactory);
  }

        AxisEngine.normaliseOptions(service);

        initTMR();
        tmr.delegate(registry.getTypeMappingRegistry());

        WSDDFaultFlow [] faultFlows = getFaultFlows();
        if (faultFlows != null && faultFlows.length > 0) {
            FaultableHandler wrapper = new FaultableHandler(service);
            for (int i = 0; i < faultFlows.length; i++) {
                WSDDFaultFlow flow = faultFlows[i];
                Handler faultHandler = flow.getInstance(registry);
                wrapper.setOption("fault-" + flow.getQName().getLocalPart(),
                                  faultHandler);
            }
        }
View Full Code Here

     * @throws ConfigurationException XXX
     */
    public Handler makeNewInstance(EngineConfiguration registry)
        throws ConfigurationException
    {
        Handler reqHandler = null;

        WSDDChain req = getRequestFlow();
        if (req != null)
            reqHandler = req.getInstance(registry);
       
        Handler pivot = null;
        if (pivotQName != null) {
            if (URI_WSDD_JAVA.equals(pivotQName.getNamespaceURI())) {
                try {
                    pivot = (Handler)ClassUtils.forName(pivotQName.getLocalPart()).newInstance();
                } catch (InstantiationException e) {
                    throw new ConfigurationException(e);
                } catch (IllegalAccessException e) {
                    throw new ConfigurationException(e);
                } catch (ClassNotFoundException e) {
                    throw new ConfigurationException(e);
                }
            } else {
                pivot = registry.getHandler(pivotQName);
            }
        }
       
        Handler respHandler = null;
        WSDDChain resp = getResponseFlow();
        if (resp != null)
            respHandler = resp.getInstance(registry);

        return new org.apache.axis.SimpleTargetedChain(reqHandler, pivot,
View Full Code Here

                                SOAPEnvelope reqEnv,
                                SOAPEnvelope resEnv,
                                Object obj)
        throws Exception
    {
        Handler targetService = msgContext.getService();
        OperationDesc operation = msgContext.getOperation();
        Method method = operation.getMethod();

        // is this service a body-only service?
        // if true, we expect to pass a Vector of body Elements (as DOM) and
        //   get back an array of DOM Elements for the return body, OR
        //   to pass a Document and get back a Document.
        //
        // if false, the service expects just one MessageContext argument,
        //   and looks at the entire request envelope in the MessageContext
        //   (hence it's a "FullMessageService").
        //
        // Q (Glen) : Why would you ever do the latter instead of just defining
        //            a Handler provider yourself?  I think we should change
        //            this to simply pass the whole SOAP envelope as a Document
        //            and get back a Document.  Or even SOAPEnvelope/
        //            SOAPEnvelope...
        boolean bodyOnlyService = true;
        if (targetService.getOption("FullMessageService") != null) {
            bodyOnlyService = false;
        }

        // Collect the types so we know what we're dealing with in the target
        // method.
View Full Code Here

TOP

Related Classes of org.apache.axis.Handler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.