Examples of OperationDescription


Examples of org.apache.axis2.jaxws.description.OperationDescription

                    log.debug("An error occured while invoking the method: " + e.getMessage());
                }
                throw ExceptionFactory.makeWebServiceException(e);
            }
        } else {
            OperationDescription operationDesc =
                    endpointDesc.getEndpointInterfaceDescription().getOperation(method);
            if (isMethodExcluded(operationDesc)) {
                throw ExceptionFactory.makeWebServiceException(
                        Messages.getMessage("proxyExcludedMethod", method.getName()));
            }
View Full Code Here

Examples of org.apache.axis2.jaxws.description.OperationDescription

    private Object invokeSEIMethod(Method method, Object[] args) throws Throwable {
        if (log.isDebugEnabled()) {
            log.debug("Attempting to invoke SEI Method " + method.getName());
        }

        OperationDescription operationDesc =
                endpointDesc.getEndpointInterfaceDescription().getOperation(method);

        // Create and configure the request MessageContext
        InvocationContext requestIC = InvocationContextFactory.createInvocationContext(null);
        MessageContext request = createRequest(method, args);
        request.setEndpointDescription(getEndpointDescription());
        request.setOperationDescription(operationDesc);

        // Enable MTOM on the Message if the property was set on the SOAPBinding.
        Binding bnd = (Binding) getBinding();
        if (bnd != null && bnd instanceof SOAPBinding) {
            if (((SOAPBinding)bnd).isMTOMEnabled()) {
                Message requestMsg = request.getMessage();
                requestMsg.setMTOMEnabled(true);
            }
        }
       
        /*
         * TODO: review: make sure the handlers are set on the InvocationContext
         * This implementation of the JAXWS runtime does not use Endpoint, which
         * would normally be the place to initialize and store the handler list.
         * In lieu of that, we will have to intialize and store them on the
         * InvocationContext.  also see the InvocationContextFactory.  On the client
         * side, the binding is not yet set when we call into that factory, so the
         * handler list doesn't get set on the InvocationContext object there.  Thus
         * we gotta do it here.
         */
       
        // be sure to use whatever handlerresolver is registered on the Service
        requestIC.setHandlers(bnd.getHandlerChain());

        requestIC.setRequestMessageContext(request);
        requestIC.setServiceClient(serviceDelegate.getServiceClient(endpointDesc.getPortQName()));
       
        // Migrate the properties from the client request context bag to
        // the request MessageContext.
        ApplicationContextMigratorUtil.performMigrationToMessageContext(
                Constants.APPLICATION_CONTEXT_MIGRATOR_LIST_ID,
                getRequestContext(), request);

        // Perform the WebServiceFeature configuration requested by the user.
        bnd.configure(request, this);

        // We'll need an InvocationController instance to send the request.
        InvocationControllerFactory icf = (InvocationControllerFactory) FactoryRegistry.getFactory(InvocationControllerFactory.class);
        controller = icf.getInvocationController();
       
        if (controller == null) {
            throw new WebServiceException(Messages.getMessage("missingInvocationController"));
        }
       
        // Check if the call is OneWay, Async or Sync
        if (operationDesc.isOneWay()) {
            if (log.isDebugEnabled()) {
                log.debug("OneWay Call");
            }
            controller.invokeOneWay(requestIC);

            // Check to see if we need to maintain session state
            checkMaintainSessionState(request, requestIC);
        }

        if (method.getReturnType() == Future.class) {
            if (log.isDebugEnabled()) {
                log.debug("Async Callback");
            }

            //Get AsyncHandler from Objects and sent that to InvokeAsync
            AsyncHandler asyncHandler = null;
            for (Object obj : args) {
                if (obj != null && AsyncHandler.class.isAssignableFrom(obj.getClass())) {
                    asyncHandler = (AsyncHandler)obj;
                    break;
                }
            }

            // Don't allow the invocation to continue if the invocation requires a callback
            // object, but none was supplied.
            if (asyncHandler == null) {
                throw ExceptionFactory
                        .makeWebServiceException(Messages.getMessage("proxyNullCallback"));
            }
            AsyncResponse listener = createProxyListener(args, operationDesc);
            requestIC.setAsyncResponseListener(listener);

            if ((serviceDelegate.getExecutor() != null) &&
                    (serviceDelegate.getExecutor() instanceof ExecutorService)) {
                ExecutorService es = (ExecutorService)serviceDelegate.getExecutor();
                if (es.isShutdown()) {
                    // the executor service is shutdown and won't accept new tasks
                    // so return an error back to the client
                    throw ExceptionFactory
                            .makeWebServiceException(Messages.getMessage("ExecutorShutdown"));
                }
            }

            requestIC.setExecutor(serviceDelegate.getExecutor());

            Future<?> future = controller.invokeAsync(requestIC, asyncHandler);

            //Check to see if we need to maintain session state
            checkMaintainSessionState(request, requestIC);

            return future;
        }

        if (method.getReturnType() == Response.class) {
            if (log.isDebugEnabled()) {
                log.debug("Async Polling");
            }
            AsyncResponse listener = createProxyListener(args, operationDesc);
            requestIC.setAsyncResponseListener(listener);
            requestIC.setExecutor(serviceDelegate.getExecutor());

            Response response = controller.invokeAsync(requestIC);

            //Check to see if we need to maintain session state
            checkMaintainSessionState(request, requestIC);

            return response;
        }

        if (!operationDesc.isOneWay()) {
            InvocationContext responseIC = controller.invoke(requestIC);

            //Check to see if we need to maintain session state
            checkMaintainSessionState(request, requestIC);

View Full Code Here

Examples of org.apache.axis2.jaxws.description.OperationDescription

    protected MessageContext createRequest(Method method, Object[] args) throws Throwable {
        if (log.isDebugEnabled()) {
            log.debug("Creating a new Message using the request parameters.");
        }

        OperationDescription operationDesc =
                endpointDesc.getEndpointInterfaceDescription().getOperation(method);

        Message message = MethodMarshallerFactory.getMarshaller(operationDesc, true, null)
                .marshalRequest(args, operationDesc);
View Full Code Here

Examples of org.jboss.ws.extensions.security.OperationDescription

      target = new QNameTarget(name);
      targets.add(target);
      targets.add(new WsuIdTarget("timestamp"));

      LinkedList operations = new LinkedList();
      operations.add(new OperationDescription(TimestampOperation.class, null, null, "300", null));
      operations.add(new OperationDescription(SignatureOperation.class, targets, "wsse", null, null));

      name = new QName("http://org.jboss.ws/2004", "someHeader");
      target = new QNameTarget(name);
      targets = new ArrayList();
      targets.add(target);

      name = new QName("http://org.jboss.ws/2004", "echoString2");
      target = new QNameTarget(name, true);
      targets.add(target);

      operations.add(new OperationDescription(EncryptionOperation.class, targets, "wsse", null, null));
      operations.add(new OperationDescription(SendUsernameOperation.class, null, "hi", "there", null));

      return operations;
   }
View Full Code Here

Examples of org.omg.CORBA.OperationDescription

        for (int i = 0; i < exceptions.length; ++i) {
            Description d = exceptions[i].describe();
            exds[i] = ExceptionDescriptionHelper.extract(d.value);
        }

        OperationDescription od;
        od = new OperationDescription(name, id, defined_in_id, version, typeCode,
                mode(), contexts(), params(), exds);

        Any any = getORB().create_any();

        OperationDescriptionHelper.insert(any, od);
View Full Code Here

Examples of org.omg.CORBA.OperationDescription

    {
        final Request _request = typedPullSupplier_._request(operation);

        final NVList _args = _request.arguments();

        final OperationDescription _operationDescription = getOperationDescription(operation);

        for (int x = 0; x < _operationDescription.parameters.length; ++x)
        {
            final Any _any = getORB().create_any();
View Full Code Here

Examples of org.omg.CORBA.OperationDescription

        return _fullQualifiedName;
    }

    private NVList getExpectedParamList(String operation)
    {
        final OperationDescription _operation = getOperationDescription(operation);

        final NVList _expectedParams = getORB().create_list(_operation.parameters.length);

        for (int x = 0; x < _operation.parameters.length; ++x)
        {
View Full Code Here

Examples of org.omg.CORBA.OperationDescription

            Hashtable ops = new Hashtable();

            for( int c = 0; c < op_defs.length; c++ )
            {
                OperationDescription operation = op_defs[c].describe_operation();
                ops.put( operation.name, operation );
            }

            /* get operation descriptions from super types, potentially duplicate
               descriptions due to diamond inheritance are removed by hashing
             */

            for( int baseOps = 0; baseOps < baseDescriptions.length; baseOps++ )
            {
                for( int bbaseOps = 0;
                     bbaseOps < baseDescriptions[baseOps].operations.length;
                     bbaseOps++ )
                {
                    OperationDescription base_op =
                        baseDescriptions[baseOps].operations[bbaseOps];

                    if( !ops.containsKey( base_op.name ))
                        ops.put( base_op.name, base_op );
                }
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.service.OperationDescription

            if (serviceDescription.getTargetNSPrefix() == null) {
                serviceDescription.setTargetNSPrefix(TARGET_NAMESPACE_PREFIX);
            }
        } else if (OperationDescription.TYPE.equals(extensibleConfiguration.geType())) {

            OperationDescription operationDescription =
                    (OperationDescription) extensibleConfiguration;
            operationDescription.setForceInOnly(true);
            CEPOperationExtensionDescription extensionDescription =
                    new CEPOperationExtensionDescription();

            QName parentQName = element.getQName();
            QNameFactory qNameFactory = QNameFactory.getInstance();

            QName inStreamQName = qNameFactory.createQName(CommonsConstants.ELE_INPUT_EVENT_STREAM,
                    parentQName);
            OMElement inStreamElement = element.getFirstChildWithName(inStreamQName);
            if (inStreamElement != null) {
                EventStreamDescription streamDescription =
                        EventStreamDescriptionFactory.create(inStreamElement, xPathFactory);
                extensionDescription.setInputEventStream(streamDescription);
            }

            QName outStreamQName = qNameFactory.createQName(CommonsConstants.ELE_OUTPUT_EVENT_STREAM,
                    parentQName);
            OMElement outStreamElement = element.getFirstChildWithName(outStreamQName);
            if (outStreamElement != null) {
                EventStreamDescription streamDescription =
                        EventStreamDescriptionFactory.create(outStreamElement, xPathFactory);
                extensionDescription.setOutputEventStream(streamDescription);
            }
            operationDescription.setExtensionDescription(extensionDescription);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.rulecep.commons.descriptions.service.OperationDescription

                parent.addChild(ruleSetElement);
            }
            return parent;
        } else if (OperationDescription.TYPE.equals(configuration.geType())) {

            OperationDescription operationDescription = (OperationDescription) configuration;
            CEPOperationExtensionDescription extensionDescription =
                    (CEPOperationExtensionDescription)
                            operationDescription.getExtensionDescription();

            if (extensionDescription != null) {
                OMNamespaceFactory omNamespaceFactory = OMNamespaceFactory.getInstance();
                OMNamespace omNamespace = omNamespaceFactory.createOMNamespace(
                        parent.getNamespace().getNamespaceURI(), "");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.