Package com.ibm.wsdl

Examples of com.ibm.wsdl.OperationImpl


            {
                String methodName = methods[i].getMethodName();
                Vector outParams = WSDLGenUtil.getOutParams(serviceMap, methodName);
               
               
                OperationImpl operation = addOperation(def, dImpl, methodName, (String) methodDesc.get(i),typens,outParams);
                portType.addOperation(operation);
               
                if(!abstractWSDL)
                {
                    UnknownExtensibilityElement wsInPolicyRef = null;
View Full Code Here


                                       String methodName,
                                       String methodDesc,
                                       String typens,
                                       Vector outputparameter)
    {
        OperationImpl operation = (OperationImpl) def.createOperation();
        operation.setUndefined(false);
        operation.setName(methodName);
        if(outputparameter.size() == 0)
        {
            operation.setStyle(OperationType.ONE_WAY);
        }else{
            operation.setStyle(OperationType.REQUEST_RESPONSE);
        }

        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.createElement(WSDL_DOCUMENTATION);
        documentation.appendChild(doc.createTextNode(methodDesc));
        operation.setDocumentationElement(documentation);
       
       
        MessageImpl inputMessage = (MessageImpl) def.createMessage();
        String inputMessageName = methodName + GFacConstants.SERVICE_REQ_MSG_SUFFIX+"_" +UUID.randomUUID();

        inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
        inputMessage.setUndefined(false);

        PartImpl inPart = (PartImpl) def.createPart();
        inPart.setName(PART_NAME);
        String inputElementName = methodName + GFacConstants.SERVICE_IN_PARAMS_SUFFIX;
        inPart.setElementName(new QName(typens, inputElementName));
        inputMessage.addPart(inPart);

        def.addMessage(inputMessage);
        InputImpl ip = (InputImpl) def.createInput();
        ip.setName(inputMessageName);
        ip.setMessage(inputMessage);
       
        operation.setInput(ip);
       
        if(outputparameter.size() > 0){
            MessageImpl outputMessage = (MessageImpl) def.createMessage();
            String outputMessageName = methodName + GFacConstants.SERVICE_RESP_MSG_SUFFIX +"_" +UUID.randomUUID();
            outputMessage.setQName(new QName(def.getTargetNamespace(),outputMessageName));
            outputMessage.setUndefined(false);

            PartImpl part = (PartImpl) def.createPart();
            part.setName(PART_NAME);
            String outputElementName = methodName + GFacConstants.SERVICE_OUT_PARAMS_SUFFIX;

            part.setElementName(new QName(typens, outputElementName));
            outputMessage.addPart(part);
            def.addMessage(outputMessage);

            OutputImpl op = (OutputImpl) def.createOutput();
            op.setName(outputMessageName);
            op.setMessage(outputMessage);
            operation.setOutput(op);
        }
        return operation;
    }
View Full Code Here

            String methodDesc = serviceDesc.getPortType().getMethod().getMethodDescription();
            String methodName = serviceDesc.getPortType().getMethod().getMethodName();
            OutputParameterType[] outputParams = serviceDesc.getOutputParametersArray();

            OperationImpl operation = addOperation(def, dImpl, methodName, methodDesc, typens, outputParams);
            wsdlPortType.addOperation(operation);

            if (!abstractWSDL) {
                UnknownExtensibilityElement wsInPolicyRef = null;
                UnknownExtensibilityElement wsOutPolicyRef = null;
View Full Code Here

        return wsdlPortType;
    }

    private OperationImpl addOperation(Definition def, DOMImplementation dImpl, String methodName, String methodDesc,
            String typens, OutputParameterType[] outputParameterTypes) {
        OperationImpl operation = (OperationImpl) def.createOperation();
        operation.setUndefined(false);
        operation.setName(methodName);
        if (outputParameterTypes.length == 0) {
            operation.setStyle(OperationType.ONE_WAY);
        } else {
            operation.setStyle(OperationType.REQUEST_RESPONSE);
        }

        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.createElement(WSDL_DOCUMENTATION);
        documentation.appendChild(doc.createTextNode(methodDesc));
        operation.setDocumentationElement(documentation);

        MessageImpl inputMessage = (MessageImpl) def.createMessage();
        String inputMessageName = methodName + GFacSchemaConstants.SERVICE_REQ_MSG_SUFFIX + "_" + UUID.randomUUID();

        inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
        inputMessage.setUndefined(false);

        PartImpl inPart = (PartImpl) def.createPart();
        inPart.setName(PART_NAME);
        String inputElementName = methodName + GFacSchemaConstants.SERVICE_IN_PARAMS_SUFFIX;
        inPart.setElementName(new QName(typens, inputElementName));
        inputMessage.addPart(inPart);

        def.addMessage(inputMessage);
        InputImpl ip = (InputImpl) def.createInput();
        ip.setName(inputMessageName);
        ip.setMessage(inputMessage);

        operation.setInput(ip);

        if (outputParameterTypes.length > 0) {
            MessageImpl outputMessage = (MessageImpl) def.createMessage();
            String outputMessageName = methodName + GFacSchemaConstants.SERVICE_RESP_MSG_SUFFIX + "_"
                    + UUID.randomUUID();
            outputMessage.setQName(new QName(def.getTargetNamespace(), outputMessageName));
            outputMessage.setUndefined(false);

            PartImpl part = (PartImpl) def.createPart();
            part.setName(PART_NAME);
            String outputElementName = methodName + GFacSchemaConstants.SERVICE_OUT_PARAMS_SUFFIX;

            part.setElementName(new QName(typens, outputElementName));
            outputMessage.addPart(part);
            def.addMessage(outputMessage);

            OutputImpl op = (OutputImpl) def.createOutput();
            op.setName(outputMessageName);
            op.setMessage(outputMessage);
            operation.setOutput(op);
        }
        return operation;
    }
View Full Code Here

            String methodDesc = serviceDesc.getPortType().getMethod().getMethodDescription();
            String methodName = serviceDesc.getPortType().getMethod().getMethodName();
            OutputParameterType[] outputParams = serviceDesc.getOutputParametersArray();

            OperationImpl operation = addOperation(def, dImpl, methodName, methodDesc, typens, outputParams);
            wsdlPortType.addOperation(operation);

            if (!abstractWSDL) {
                UnknownExtensibilityElement wsInPolicyRef = null;
                UnknownExtensibilityElement wsOutPolicyRef = null;
View Full Code Here

        return wsdlPortType;
    }

    private OperationImpl addOperation(Definition def, DOMImplementation dImpl, String methodName, String methodDesc,
            String typens, OutputParameterType[] outputParameterTypes) {
        OperationImpl operation = (OperationImpl) def.createOperation();
        operation.setUndefined(false);
        operation.setName(methodName);
        if (outputParameterTypes.length == 0) {
            operation.setStyle(OperationType.ONE_WAY);
        } else {
            operation.setStyle(OperationType.REQUEST_RESPONSE);
        }

        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.createElement(WSDL_DOCUMENTATION);
        documentation.appendChild(doc.createTextNode(methodDesc));
        operation.setDocumentationElement(documentation);

        MessageImpl inputMessage = (MessageImpl) def.createMessage();
        String inputMessageName = methodName + GFacSchemaConstants.SERVICE_REQ_MSG_SUFFIX + "_" + UUID.randomUUID();

        inputMessage.setQName(new QName(def.getTargetNamespace(), inputMessageName));
        inputMessage.setUndefined(false);

        PartImpl inPart = (PartImpl) def.createPart();
        inPart.setName(PART_NAME);
        String inputElementName = methodName + GFacSchemaConstants.SERVICE_IN_PARAMS_SUFFIX;
        inPart.setElementName(new QName(typens, inputElementName));
        inputMessage.addPart(inPart);

        def.addMessage(inputMessage);
        InputImpl ip = (InputImpl) def.createInput();
        ip.setName(inputMessageName);
        ip.setMessage(inputMessage);

        operation.setInput(ip);

        if (outputParameterTypes.length > 0) {
            MessageImpl outputMessage = (MessageImpl) def.createMessage();
            String outputMessageName = methodName + GFacSchemaConstants.SERVICE_RESP_MSG_SUFFIX + "_"
                    + UUID.randomUUID();
            outputMessage.setQName(new QName(def.getTargetNamespace(), outputMessageName));
            outputMessage.setUndefined(false);

            PartImpl part = (PartImpl) def.createPart();
            part.setName(PART_NAME);
            String outputElementName = methodName + GFacSchemaConstants.SERVICE_OUT_PARAMS_SUFFIX;

            part.setElementName(new QName(typens, outputElementName));
            outputMessage.addPart(part);
            def.addMessage(outputMessage);

            OutputImpl op = (OutputImpl) def.createOutput();
            op.setName(outputMessageName);
            op.setMessage(outputMessage);
            operation.setOutput(op);
        }
        return operation;
    }
View Full Code Here

                AxisOperation axisOperation = (AxisOperation) operationDescIter.next();
                QName methodName = axisOperation.getName();
                Method method = getMethod(methods, methodName.getLocalPart());

                // create axisOperation
                wsdlOperation = new OperationImpl();
                wsdlOperation.setName(methodName.getLocalPart());
                wsdlOperation.setUndefined(false);

                // create Output message and add that to the definition
                Class returnType = method.getReturnType();
View Full Code Here

TOP

Related Classes of com.ibm.wsdl.OperationImpl

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.