Package javax.wsdl

Examples of javax.wsdl.PortType


        // Create definition
        Definition def = createImportDef(definition, targetNamespace, importUri);

        // Iterator through port types
        for (Iterator<?> it = definition.getPortTypes().values().iterator(); it.hasNext();) {
            PortType portType = (PortType) it.next();
            decorate(def, portType, locationUri);
        }
        return def;
    }
View Full Code Here


        }

        String inputPartName = BPEComponent.PART_PAYLOAD;
        String outputPartName = BPEComponent.PART_PAYLOAD;
        if (exchange.getOperation() != null) {
            PortType pt = getDefinition().getPortType(getInterfaceName());
            Operation oper = pt.getOperation(exchange.getOperation().getLocalPart(), null, null);
            if (oper.getInput() != null && oper.getInput().getMessage() != null) {
                Map parts = oper.getInput().getMessage().getParts();
                inputPartName = (String) parts.keySet().iterator().next();
            }
            if (oper.getOutput() != null && oper.getOutput().getMessage() != null) {
View Full Code Here

            c.setModelResolver(new ExtensibleModelResolver(c, registry.getExtensionPoint(ModelResolverExtensionPoint.class), fep));
           
            WSDLDefinition wd = aproc.read(null, new URI("temp.wsdl"), wsdlFile.toURI().toURL(), ctx, WSDLDefinition.class);
            c.getModelResolver().addModel(wd, ctx);
            c.getModelResolver().resolveModel(WSDLDefinition.class, wd, ctx);
            PortType pt = (PortType)wd.getDefinition().getAllPortTypes().values().iterator().next();
           
            WSDLFactory wsdlFactory = registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(WSDLFactory.class);
            WSDLInterface nwi = wsdlFactory.createWSDLInterface(pt, wd, c.getModelResolver(), null);
            nwi.setWsdlDefinition(wd);
            WSDLInterfaceContract wsdlIC = wsdlFactory.createWSDLInterfaceContract();
View Full Code Here

        assertNotNull(definition);

        Map portTypes = definition.getPortTypes();
        assertEquals(1, portTypes.size());

        PortType portType = (PortType)portTypes.values().iterator().next();
        assertEquals("HelloWorldPortType", portType.getQName().getLocalPart());
        assertEquals("http://java2wsdl.wsdl.interfacedef.sca.tuscany.apache.org", portType.getQName().getNamespaceURI());

        List<?> ops = portType.getOperations();
        assertEquals(1, ops.size());

        Operation operation = (Operation)ops.get(0);
        assertEquals("sayHello", operation.getName());
    }
View Full Code Here

        wsdlInterface.setWsdlDefinition(wsdlDefinition);
        wsdlInterface.setRemotable(true);
        wsdlInterface.setConversational(contract.getInterface().isConversational());
        wsdlInterface.setUnresolved(false);
        wsdlInterface.setRemotable(true);
        PortType portType = (PortType)def.getAllPortTypes().values().iterator().next();
        wsdlInterface.setPortType(portType);

        readInlineSchemas(wsdlFactory, wsdlDefinition, def, new XmlSchemaCollection());

        try {
            for (Operation op : iface.getOperations()) {
                javax.wsdl.Operation wsdlOp = portType.getOperation(op.getName(), null, null);
                WSDLOperationIntrospectorImpl opx =
                    new WSDLOperationIntrospectorImpl(wsdlFactory, wsdlOp, wsdlDefinition, null, null);
               
                wsdlInterface.getOperations().add(opx.getOperation());
View Full Code Here

    private static void processNoArgAndVoidReturnMethods(Definition definition, Class javaInterface) {
        String namespaceURI = definition.getTargetNamespace();
        String prefix = definition.getPrefix(namespaceURI);
        String xsPrefix = definition.getPrefix("http://www.w3.org/2001/XMLSchema");
        PortType portType = (PortType)definition.getAllPortTypes().values().iterator().next();

        Element schema = null;
        Document document = null;
        Types types = definition.getTypes();
        if (types != null) {
            for (Object ext : types.getExtensibilityElements()) {
                if (ext instanceof Schema) {
                    Element element = ((Schema)ext).getElement();
                    if (element.getAttribute("targetNamespace").equals(namespaceURI)) {
                        schema = element;
                        document = schema.getOwnerDocument();
                        break;
                    }
                }
            }
        }
        if (document == null) {
            return;
        }

        // look at each operation in the port type to see if it needs fixing up
        for (Object oper : portType.getOperations()) {
            javax.wsdl.Operation operation = (javax.wsdl.Operation)oper;
            String opName = operation.getName();

            // if input message has no parts, add one containing an empty wrapper
            Input input = operation.getInput();
View Full Code Here

                        model.setBinding(port.getBinding());
                    }
                }
            }

            PortType portType = getPortType(model);
            if (portType != null) {
                WSDLInterfaceContract interfaceContract = wsdlFactory.createWSDLInterfaceContract();
                WSDLInterface wsdlInterface;
                try {
                    wsdlInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver);
View Full Code Here

            policyProcessor.resolvePolicies(confOp, resolver);
        }
    }

    private PortType getPortType(WebServiceBinding model) {
        PortType portType = null;
        if (model.getPort() != null) {
            portType = model.getPort().getBinding().getPortType();
        } else if (model.getEndpoint() != null) {
            portType = model.getPort().getBinding().getPortType();
        } else if (model.getBinding() != null) {
View Full Code Here

            String portName = p.getName();
            if (!JavaUtils.isJavaId(portName)) {
                portName = Utils.xmlNameToJavaClass(portName);
            }

            PortType portType = binding.getPortType();
            PortTypeEntry ptEntry =
                    symbolTable.getPortTypeEntry(portType.getQName());

            writeComment(pw, p.getDocumentationElement());
            writeServiceTestCode(pw, portName, portType, ptEntry, binding, bEntry);
        }
    } // writeFileBody
View Full Code Here

    /**
     * Write the body of the binding's stub file.
     */
    protected void writeFileBody(PrintWriter pw) throws IOException {
        PortType portType = binding.getPortType();

        HashSet types = getTypesInPortType(portType);
        boolean hasMIME = Utils.hasMIME(bEntry);
        if (types.size() > || hasMIME) {
            pw.println("    private java.util.Vector cachedSerClasses = new java.util.Vector();");
View Full Code Here

TOP

Related Classes of javax.wsdl.PortType

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.