Package com.sun.tools.ws.processor.model

Examples of com.sun.tools.ws.processor.model.Operation


                                        document,
                                        hasOverloadedOperations,
                                        headers);


                        Operation operation;
                        if(soapBinding != null)
                            operation = processSOAPOperation();
                        else{
                            operation = processNonSOAPOperation();
                        }
View Full Code Here


    /**
     * Returns an operation purely from abstract operation
     */
    private Operation processNonSOAPOperation() {
        Operation operation =
                new Operation(new QName(null, info.bindingOperation.getName()), info.bindingOperation);

        setDocumentationIfPresent(
                operation,
                info.portTypeOperation.getDocumentation());

View Full Code Here

    /* (non-Javadoc)
     * @see WSDLModelerBase#processSOAPOperation()
     */
    protected Operation processSOAPOperation() {
        Operation operation =
                new Operation(new QName(null, info.bindingOperation.getName()), info.bindingOperation);

        setDocumentationIfPresent(
                operation,
                info.portTypeOperation.getDocumentation());

        if (info.portTypeOperation.getStyle()
                != OperationStyle.REQUEST_RESPONSE
                && info.portTypeOperation.getStyle() != OperationStyle.ONE_WAY) {
            if (options.isExtensionMode()) {
                warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName()));
                return null;
            } else {
                error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName(),
                        info.port.resolveBinding(document).resolvePortType(document).getName()));
            }
        }

        SOAPStyle soapStyle = info.soapBinding.getStyle();

        // find out the SOAP operation extension, if any
        SOAPOperation soapOperation =
                (SOAPOperation) getExtensionOfType(info.bindingOperation,
                        SOAPOperation.class);

        if (soapOperation != null) {
            if (soapOperation.getStyle() != null) {
                soapStyle = soapOperation.getStyle();
            }
            if (soapOperation.getSOAPAction() != null) {
                operation.setSOAPAction(soapOperation.getSOAPAction());
            }
        }

        operation.setStyle(soapStyle);

        String uniqueOperationName =
                getUniqueName(info.portTypeOperation, info.hasOverloadedOperations);
        if (info.hasOverloadedOperations) {
            operation.setUniqueName(uniqueOperationName);
        }

        info.operation = operation;
        info.uniqueOperationName = uniqueOperationName;

View Full Code Here

        Iterator<Block> bb = request.getBodyBlocks();
        QName body = VOID_BODYBLOCK;
        QName opName = null;

        Operation thatOp;
        if (bb.hasNext()) {
            body = bb.next().getName();
            thatOp = uniqueBodyBlocks.get(body);
        } else {
            //there is no body block
            body = VOID_BODYBLOCK;
            thatOp = uniqueBodyBlocks.get(VOID_BODYBLOCK);
        }

        if(thatOp != null){
            if(options.isExtensionMode()){
                warning(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_WARNING(info.port.getName(), info.operation.getName(), thatOp.getName(), body));
            }else{
                error(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_ERROR(info.port.getName(), info.operation.getName(), thatOp.getName(), body));
            }
        }else{
            uniqueBodyBlocks.put(body, info.operation);
        }
View Full Code Here

    /**
     * @param styleAndUse
     */
    private void addAsyncOperations(Operation syncOperation, StyleAndUse styleAndUse) {
        Operation operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.POLLING);
        if (operation != null)
            info.modelPort.addOperation(operation);

        operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.CALLBACK);
        if (operation != null)
View Full Code Here

                                        document,
                                        hasOverloadedOperations,
                                        headers);


                        Operation operation;
                        if (soapBinding != null) {
                            operation = processSOAPOperation();
                        } else {
                            operation = processNonSOAPOperation();
                        }
View Full Code Here

    /**
     * Returns an operation purely from abstract operation
     */
    private Operation processNonSOAPOperation() {
        Operation operation =
                new Operation(new QName(null, info.bindingOperation.getName()), info.bindingOperation);

        setDocumentationIfPresent(
                operation,
                info.portTypeOperation.getDocumentation());

View Full Code Here

    /* (non-Javadoc)
     * @see WSDLModelerBase#processSOAPOperation()
     */
    protected Operation processSOAPOperation() {
        Operation operation =
                new Operation(new QName(null, info.bindingOperation.getName()), info.bindingOperation);

        setDocumentationIfPresent(
                operation,
                info.portTypeOperation.getDocumentation());

        if (info.portTypeOperation.getStyle()
                != OperationStyle.REQUEST_RESPONSE
                && info.portTypeOperation.getStyle() != OperationStyle.ONE_WAY) {
            if (options.isExtensionMode()) {
                warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName()));
                return null;
            } else {
                error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_NOT_SUPPORTED_STYLE(info.portTypeOperation.getName(),
                        info.port.resolveBinding(document).resolvePortType(document).getName()));
            }
        }

        SOAPStyle soapStyle = info.soapBinding.getStyle();

        // find out the SOAP operation extension, if any
        SOAPOperation soapOperation =
                (SOAPOperation) getExtensionOfType(info.bindingOperation,
                        SOAPOperation.class);

        if (soapOperation != null) {
            if (soapOperation.getStyle() != null) {
                soapStyle = soapOperation.getStyle();
            }
            if (soapOperation.getSOAPAction() != null) {
                operation.setSOAPAction(soapOperation.getSOAPAction());
            }
        }

        operation.setStyle(soapStyle);

        String uniqueOperationName =
                getUniqueName(info.portTypeOperation, info.hasOverloadedOperations);
        if (info.hasOverloadedOperations) {
            operation.setUniqueName(uniqueOperationName);
        }

        info.operation = operation;

        //attachment
View Full Code Here

            info.operation.setResponse(response);
        }

        Iterator<Block> bb = request.getBodyBlocks();
        QName body;
        Operation thatOp;
        if (bb.hasNext()) {
            body = bb.next().getName();
            thatOp = uniqueBodyBlocks.get(body);
        } else {
            //there is no body block
            body = VOID_BODYBLOCK;
            thatOp = uniqueBodyBlocks.get(VOID_BODYBLOCK);
        }

        if(thatOp != null){
            if(options.isExtensionMode()){
                warning(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_WARNING(info.port.getName(), info.operation.getName(), thatOp.getName(), body));
            }else{
                error(info.port, ModelerMessages.WSDLMODELER_NON_UNIQUE_BODY_ERROR(info.port.getName(), info.operation.getName(), thatOp.getName(), body));
            }
        }else{
            uniqueBodyBlocks.put(body, info.operation);
        }
View Full Code Here

    /**
     * @param styleAndUse
     */
    private void addAsyncOperations(Operation syncOperation, StyleAndUse styleAndUse) {
        Operation operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.POLLING);
        if (operation != null) {
            info.modelPort.addOperation(operation);
        }

        operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.CALLBACK);
View Full Code Here

TOP

Related Classes of com.sun.tools.ws.processor.model.Operation

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.