Package com.ibm.wsdl

Examples of com.ibm.wsdl.PortTypeImpl


      fact = WSDLFactory.newInstance();
      read = fact.newWSDLReader();
      def = read.readWSDL(wsdlURI);
      map = def.getPortTypes();

      PortType p = new PortTypeImpl() ;
      QName qname = p.getQName();
      //Operation op = p.getOperation(wsdlURI, wsdlURI, wsdlURI);
      //op.getName()

      PortTypeImplm portType;
      OperationImplm operation;
View Full Code Here


//            {
//                table = createMessageTable(serviceMap, typens, methods);
//            }

            // Create port types (only first port type)
            PortTypeImpl portType = addPortTypes(def, dImpl, portTypes, serviceQName);
            Binding binding = addBinding(def, nameSpaceURI, portType, serviceLevelPolicRef,dImpl);

            Vector methodDesc = WSDLGenUtil.getMethodDescriptions(serviceMap);
            for(int i = 0; i < methods.length; ++i)
            {
                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;
                    UnknownExtensibilityElement wsOutPolicyRef = null;
View Full Code Here

                                      DOMImplementation dImpl,
                                      PortTypeType[] portTypes,
                                      QName serviceQName)
    {
        // create port type
        PortTypeImpl portType = (PortTypeImpl) def.createPortType();
        portType.setQName(serviceQName);
        portType.setUndefined(false);

        // create documentation for this port type
        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.getDocumentElement();
        documentation.appendChild(doc.createTextNode(portTypes[0].getPortDescription()));
        portType.setDocumentationElement(documentation);
        return portType;
    }
View Full Code Here

     */
    private TModelInstanceDetails constructTModelInstanceDetails(PortImpl port) {

        TModelInstanceDetails tModelInstanceDetails = new TModelInstanceDetails();
        BindingImpl binding = (BindingImpl) port.getBinding();
        PortTypeImpl portType = (PortTypeImpl) binding.getPortType();

        String tModelKey = publishPortTypeTModels(portType, tModelInstanceDetails);
        publishBindingTModel(binding, tModelKey, port.getName(), tModelInstanceDetails);

        if (businessServiceInfo.getDocuments() != null) {
View Full Code Here

            // {
            // table = createMessageTable(serviceDesc, typens, operation);
            // }

            // Create port types (only first port type)
            PortTypeImpl wsdlPortType = addPortTypes(def, dImpl, portType, serviceQName);
            Binding binding = addBinding(def, nameSpaceURI, wsdlPortType, serviceLevelPolicRef, dImpl);

            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 elem;
    }

    private PortTypeImpl addPortTypes(Definition def, DOMImplementation dImpl, PortTypeType portType, QName serviceQName) {
        // create port type
        PortTypeImpl wsdlPortType = (PortTypeImpl) def.createPortType();
        wsdlPortType.setQName(serviceQName);
        wsdlPortType.setUndefined(false);

        // create documentation for this port type
        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.getDocumentElement();
        documentation.appendChild(doc.createTextNode(portType.getPortDescription()));
        wsdlPortType.setDocumentationElement(documentation);
        return wsdlPortType;
    }
View Full Code Here

            // {
            // table = createMessageTable(serviceDesc, typens, operation);
            // }

            // Create port types (only first port type)
            PortTypeImpl wsdlPortType = addPortTypes(def, dImpl, portType, serviceQName);
            Binding binding = addBinding(def, nameSpaceURI, wsdlPortType, serviceLevelPolicRef, dImpl);

            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 elem;
    }

    private PortTypeImpl addPortTypes(Definition def, DOMImplementation dImpl, PortTypeType portType, QName serviceQName) {
        // create port type
        PortTypeImpl wsdlPortType = (PortTypeImpl) def.createPortType();
        wsdlPortType.setQName(serviceQName);
        wsdlPortType.setUndefined(false);

        // create documentation for this port type
        Document doc = dImpl.createDocument(WSDL_NAMEPSPACE, WSDL_DOCUMENTATION, null);
        Element documentation = doc.getDocumentElement();
        documentation.appendChild(doc.createTextNode(portType.getPortDescription()));
        wsdlPortType.setDocumentationElement(documentation);
        return wsdlPortType;
    }
View Full Code Here

        try {
            ClassLoader classLoader = axisService.getClassLoader();
            String serviceClassName = (String) axisService.getParameter("ServiceClass").getValue();

            // create PortType with class name
            PortType portType = new PortTypeImpl();
            portType.setQName(axisService.getName());
            definition.addPortType(portType);
            portType.setUndefined(false);

            Class serviceImplementation = classLoader.loadClass(serviceClassName);
            Method[] methods = serviceImplementation.getMethods();

            // add messages to the definition and operations to the port type
            Operation wsdlOperation;
            Input wsdlOperationInput;
            Output wsdlOperationOutput;

            Iterator operationDescIter = axisService.getOperations().values().iterator();
            while (operationDescIter.hasNext()) {
                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();
                Message message = getMessage(mappings, returnType);
                definition.addMessage(message);

                // add the same message as the output of the axisOperation
                wsdlOperationOutput = new OutputImpl();
                wsdlOperationOutput.setMessage(message);
                wsdlOperation.setOutput(wsdlOperationOutput);

                Class[] parameterTypes = method.getParameterTypes();
                for (int i = 0; i < parameterTypes.length; i++) {
                    Class aClass = parameterTypes[i];
                    message = getMessage(mappings, aClass);
                    wsdlOperationInput = new InputImpl();
                    wsdlOperationInput.setMessage(message);
                    definition.addMessage(message);
                    wsdlOperation.setInput(wsdlOperationInput);
                }
                portType.addOperation(wsdlOperation);
            }


        } catch (ClassNotFoundException e) {
            log.error("Can not load the service " + axisService + " from the given class loader");
View Full Code Here

TOP

Related Classes of com.ibm.wsdl.PortTypeImpl

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.