Package org.apache.wsdl

Examples of org.apache.wsdl.WSDLInterface


        if (mBag == null || mBag.isEmpty()) {
            //No metadata! So do some guess work!
            Map interfaceMap = desc.getWsdlInterfaces();
            if (!interfaceMap.isEmpty()) {
                Iterator interfaceIterator = interfaceMap.values().iterator();
                WSDLInterface wsdlInterface;
                while (interfaceIterator.hasNext()) {
                    wsdlInterface = (WSDLInterface) interfaceIterator.next();
                    Map opMap = wsdlInterface.getOperations();
                    if (!opMap.isEmpty()) {
                        Iterator opIterator = opMap.values().iterator();
                        WSDLOperation operation;
                        while (opIterator.hasNext()) {
                            operation = (WSDLOperation) opIterator.next();
View Full Code Here


     */
    protected void writePortTypes(WSDLDescription desc) throws XMLStreamException, IOException {
        Map interfaceMap = desc.getWsdlInterfaces();
        if (!interfaceMap.isEmpty()) {
            Iterator interfaceIterator = interfaceMap.values().iterator();
            WSDLInterface wsdlInterface;
            while (interfaceIterator.hasNext()) {
                wsdlInterface = (WSDLInterface) interfaceIterator.next();
                writer.writeStartElement(defaultWSDLPrefix, PORTTYPE_NAME, WSDL1_1_NAMESPACE_URI);
                writer.writeAttribute("name",
                        wsdlInterface.getName() == null ? "" : wsdlInterface.getName().getLocalPart());
                //write extensibility attributes
                handleExtensibilityAttributes(wsdlInterface.getExtensibilityAttributes());
                //write the operations
                writePorttypeOperations(wsdlInterface);

                writer.writeEndElement();

View Full Code Here

        namspaceMap.put("xs", "http://www.w3.org/2001/XMLSchema");
        womDescription.setNamespaces(namspaceMap);
        womDescription.setTargetNameSpace(targentNamespece);

        //generating port type
        WSDLInterface portType = generatePortType(womDescription, wsdlComponentFactory, documentElement);
        womDescription.addInterface(portType);

        QName bindingName = new QName(targentNamespece, serviceName + "Binding"
                , targetNamespecheprefix);
        //generating binding
View Full Code Here

                        ExtensionConstants.SCHEMA);
        wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
        schemaExtensibilityElement.setElement(documentElement);
        womDescription.setTypes(wsdlTypes);

        WSDLInterface portType = womDescription.createInterface();
        portType.setName(new QName(serviceName + "Port"));

        //adding message refs
        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            //creating WSDLOperation
            WSDLOperation operation = womDescription.createOperation();
            operation.setName(new QName(jmethod.getSimpleName()));

            MessageReference messageRefinput = wsdlComponentFactory.createMessageReference();
            QName typeName = table.getComplexScheamType(jmethod.getSimpleName() +
                    SchemaGenerator.METHOD_REQUEST_WRAPPER);
            messageRefinput.setElementQName(typeName);
            messageRefinput.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
            operation.setInputMessage(messageRefinput);
            portType.setOperation(operation);

            if (!jmethod.getReturnType().isVoidType()) {
                MessageReference messageRefiout = wsdlComponentFactory.createMessageReference();
                messageRefiout.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
                        SchemaGenerator.METHOD_RESPONSE_WRAPPER));
View Full Code Here

        // copy it to the
        //WOM's WSDLInterface Components

        Iterator portTypeIterator = wsdl4JDefinition.getPortTypes().values()
                .iterator();
        WSDLInterface wsdlInterface;
        PortType portType;
        while (portTypeIterator.hasNext()) {
            wsdlInterface = this.wsdlComponentFactory.createInterface();
            portType = (PortType) portTypeIterator.next();
            //////////////////////////
View Full Code Here

                                  Binding wsdl4JBinding, Definition wsdl4jDefinition) {

        //Copy attributes
        wsdlBinding.setName(wsdl4JBinding.getQName());
        QName interfaceName = wsdl4JBinding.getPortType().getQName();
        WSDLInterface wsdlInterface =
                this.womDefinition.getInterface(interfaceName);

        //FIXME Do We need this eventually???
        if (null == wsdlInterface)
            throw new WSDLProcessingException("Interface/PortType not found for the Binding :"
                    + wsdlBinding.getName());
        wsdlBinding.setBoundInterface(wsdlInterface);
        Iterator bindingoperationsIterator =
                wsdl4JBinding.getBindingOperations().iterator();
        WSDLBindingOperation wsdlBindingOperation;
        BindingOperation wsdl4jBindingOperation;
        while (bindingoperationsIterator.hasNext()) {
            wsdlBindingOperation =
                    this.wsdlComponentFactory.createWSDLBindingOperation();
            wsdl4jBindingOperation =
                    (BindingOperation) bindingoperationsIterator.next();
            this.populateBindingOperation(wsdlBindingOperation,
                    wsdl4jBindingOperation,
                    wsdl4JBinding.getQName().getNamespaceURI(), wsdl4jDefinition);
            wsdlBindingOperation.setOperation(
                    wsdlInterface.getOperation(
                            wsdl4jBindingOperation.getOperation().getName()));
            copyExtensibleElements(
                    wsdl4jBindingOperation.getExtensibilityElements(),
                    wsdlBindingOperation, wsdl4jDefinition);
            wsdlBinding.addBindingOperation(wsdlBindingOperation);
View Full Code Here

//If there are more than one interface available... For the time being
// create a
// new interface and set all those existing interfaces as
// superinterfaces of it
// and return.
        WSDLInterface newBoundInterface = this.womDefinition.createInterface();
        newBoundInterface.setName(
                new QName(service.getNamespace(),
                        service
                                .getName()
                                .getLocalPart()
                                + BOUND_INTERFACE_NAME));
        Iterator interfaceIterator = this.womDefinition.getWsdlInterfaces()
                .values().iterator();
        while (interfaceIterator.hasNext()) {
            newBoundInterface
                    .addSuperInterface(
                            (WSDLInterface) interfaceIterator.next());
        }
        return newBoundInterface;
    }
View Full Code Here

        HashMap namspaceMap = loadNamespaces();
        womDescription.setNamespaces(namspaceMap);
        womDescription.setTargetNameSpace(targetNamespace);

        //generating port type
        WSDLInterface portType = generatePortType(womDescription, wsdlComponentFactory, documentElement);
        womDescription.addInterface(portType);

        QName bindingName = new QName(targetNamespace, serviceName + BINDING_NAME_SUFFIX
                , targetNamespacePrefix);
View Full Code Here

                        ExtensionConstants.SCHEMA);
        wsdlTypes.addExtensibilityElement(schemaExtensibilityElement);
        schemaExtensibilityElement.setElement(documentElement);
        womDescription.setTypes(wsdlTypes);

        WSDLInterface portType = womDescription.createInterface();
        portType.setName(new QName(serviceName + PORT_TYPE_SUFFIX));

        //adding message refs
        for (int i = 0; i < method.length; i++) {
            JMethod jmethod = method[i];
            //creating WSDLOperation
            WSDLOperation operation = womDescription.createOperation();
            operation.setName(new QName(jmethod.getSimpleName()));

            MessageReference messageRefinput = wsdlComponentFactory.createMessageReference();
            QName typeName = table.getComplexSchemaType(jmethod.getSimpleName() +
                    SchemaGenerator.METHOD_REQUEST_WRAPPER);
            messageRefinput.setElementQName(typeName);
            messageRefinput.setDirection(org.apache.wsdl.WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
            operation.setInputMessage(messageRefinput);
            portType.setOperation(operation);

            if (!jmethod.getReturnType().isVoidType()) {
                MessageReference messageRefiout = wsdlComponentFactory.createMessageReference();
                messageRefiout.setElementQName(table.getQNamefortheType(jmethod.getSimpleName() +
                        SchemaGenerator.METHOD_RESPONSE_WRAPPER));
View Full Code Here

    addPolicyAsExtElements(description, policyList, wsdlEndpoint,
        policyInclude);

    WSDLBinding wsdlBinding = wsdlEndpoint.getBinding();
    populatePolicy(description, wsdlBinding, axisService);
    WSDLInterface wsdlInterface = wsdlBinding.getBoundInterface();
    populatePolicy(description, wsdlInterface, axisService);

  }
View Full Code Here

TOP

Related Classes of org.apache.wsdl.WSDLInterface

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.