Package javax.wsdl

Examples of javax.wsdl.Port


    }
   
    protected ServerTransport createTransport(EndpointReferenceType ref) throws WSDLException, IOException {
       
        try {
            Port port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), ref);
            List<?> exts = port.getExtensibilityElements();
            if (exts.size() > 0) {               
                ExtensibilityElement el = (ExtensibilityElement)exts.get(0);
                TransportFactory tf =
                    bus.getTransportFactoryManager().
                        getTransportFactory(el.getElementType().getNamespaceURI());
View Full Code Here


        Definition wsdlDef = EndpointReferenceUtils.getWSDLDefinition(bus.getWSDLManager(), reference);
        assertNotNull(wsdlDef);
        QName wsdlName = new QName("http://objectweb.org/hello_world_xml_http/bare", "HelloWorld");
        assertEquals(wsdlDef.getQName(), wsdlName);
       
        Port port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), reference);
        assertNotNull(port);
        Binding b = port.getBinding();
        assertNotNull(b);
        BindingOperation operation = b.getBindingOperation("sayHi", "sayHiRequest", "sayHiResponse");
        assertNotNull(operation);
        BindingInput input = operation.getBindingInput();
        assertNotNull(input);
View Full Code Here

        return context;
    }

    private void setUpUsingAddressing(LogicalMessageContext context,
                                      boolean usingAddressing) {
        Port port = control.createMock(Port.class);
        aggregator.clientTransport = control.createMock(ClientTransport.class);
        aggregator.clientTransport.getPort();
        EasyMock.expectLastCall().andReturn(port);
        List portExts = control.createMock(List.class);
        port.getExtensibilityElements();
        EasyMock.expectLastCall().andReturn(portExts);
        Iterator portItr = control.createMock(Iterator.class);
        portExts.iterator();
        EasyMock.expectLastCall().andReturn(portItr);
        Binding binding = control.createMock(Binding.class);
        port.getBinding();
        EasyMock.expectLastCall().andReturn(binding);
        List bindingExts = control.createMock(List.class);
        binding.getExtensibilityElements();
        EasyMock.expectLastCall().andReturn(bindingExts);
        Iterator bindingItr = control.createMock(Iterator.class);
View Full Code Here

            Definition model = generator.generateCORBABinding();               
            QName name = new QName("http://schemas.apache.org/idl/datetime.idl",
                                     "BaseCORBAService", "tns");
            Service service = model.getService(name);
            Port port = service.getPort("BaseCORBAPort");
            AddressType addressType = (AddressType)port.getExtensibilityElements().get(0);
            String address = addressType.getLocation();
            assertEquals("file:./Base.ref", address);           
           
            generator.setAddress("corbaloc::localhost:40000/hw");
            model = generator.generateCORBABinding();
            service = model.getService(name);
            port = service.getPort("BaseCORBAPort");
            addressType = (AddressType)port.getExtensibilityElements().get(0);
            address = addressType.getLocation();
            assertEquals("corbaloc::localhost:40000/hw", address);
        } finally {
            new File("datetime-corba.wsdl").deleteOnExit();
        }
View Full Code Here

            Definition model = generator.generateCORBABinding();               
            QName name = new QName("http://schemas.apache.org/idl/datetime.idl",
                                     "BaseCORBAService", "tns");
            Service service = model.getService(name);
            Port port = service.getPort("BaseCORBAPort");
            AddressType addressType = (AddressType)port.getExtensibilityElements().get(0);
            String address = addressType.getLocation();
            assertEquals("file:./Base.ref", address);           
           
            URL idl = getClass().getResource("/wsdl/addressfile.txt");
            String filename = new File(idl.toURI()).getAbsolutePath();
            generator.setAddressFile(filename);
            model = generator.generateCORBABinding();
            service = model.getService(name);
            port = service.getPort("BaseCORBAPort");
            addressType = (AddressType)port.getExtensibilityElements().get(0);
            address = addressType.getLocation();
            assertEquals("corbaloc::localhost:60000/hw", address);
        } finally {
            new File("datetime-corba.wsdl").deleteOnExit();
        }
View Full Code Here

        binding.addBindingOperation(bindingOperation);
        PortType portType = definition.createPortType();
        portType.setQName(new QName(NAMESPACE, "MockPort"));
        portType.addOperation(bindingOperation.getOperation());
        binding.setPortType(portType);
        Port port = definition.createPort();
        port.setName("MockPort");
        //add soap:address
        SOAPAddress soapAddress = (SOAPAddress) extensionRegistry.createExtension(Port.class, new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address"));
        soapAddress.setLocationURI("http://127.0.0.1:8080/foo");
        port.addExtensibilityElement(soapAddress);
        port.setBinding(binding);
        javax.wsdl.Service service = definition.createService();
        service.setQName(new QName(NAMESPACE, "MockService"));
        service.addPort(port);
        definition.addService(service);
        return definition;
View Full Code Here

            Map wsdlPortMap = service.getPorts();
            for (Iterator iterator = wsdlPortMap.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry = (Map.Entry) iterator.next();
                String portName = (String) entry.getKey();
                Port port = (Port) entry.getValue();

                GerPortType gerPort = portMap.get(portName);

                URL location = (gerPort == null) ? getAddressLocation(port) : getLocation(gerPort);
                // skip non-soap ports
                if (location == null) {
                    continue;
                }
                String credentialsName = (gerPort == null) ? null : getCredentialsName(gerPort);
               
                Binding binding = port.getBinding();
                if (binding == null) {
                    throw new DeploymentException("No binding for port: " + portName);
                }
               
                PortType portType = binding.getPortType();
View Full Code Here

            Iterator portIterator = ports.entrySet().iterator();
            while (portIterator.hasNext()) {
                Map.Entry portEntry = (Map.Entry) portIterator.next();
                String currPortName = (String) portEntry.getKey();
                if (currPortName.equals(portName)) {
                    Port port = (Port) portEntry.getValue();
                    updatePortLocation(port, baseUri);
                    updated = true;
                } else {
                    portsToRemove.add(currPortName);
                }
View Full Code Here

            Map wsdlPortMap = service.getPorts();
            for (Iterator iterator = wsdlPortMap.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry = (Map.Entry) iterator.next();
                String portName = (String) entry.getKey();
                Port port = (Port) entry.getValue();

                GerPortType gerPort = (GerPortType) portMap.get(portName);

                URL location = gerPort == null ? getAddressLocation(port) : getLocation(gerPort);
                //skip non-soap ports
                if (location == null) {
                    continue;
                }
                String credentialsName = gerPort == null || gerPort.getCredentialsName() == null ? null : gerPort.getCredentialsName().trim();

                Binding binding = port.getBinding();

                mapBinding(binding, mapping, serviceQName, classLoader, soapVersion, schemaInfoBuilder, portName, location, handlerInfos, seiPortNameToFactoryMap, seiClassNameToFactoryMap, credentialsName, exceptionMap);
            }
        }
    }
View Full Code Here

        return new ServiceInfo(serviceDesc, handlerInfos, wsdlMap);
    }

    public static JavaServiceDesc createServiceDesc(PortInfo portInfo, ClassLoader classLoader) throws DeploymentException {

        Port port = portInfo.getPort();

        Class serviceEndpointInterface = null;
        try {
            serviceEndpointInterface = classLoader.loadClass(portInfo.getServiceEndpointInterfaceName());
        } catch (ClassNotFoundException e) {
            throw (DeploymentException) new DeploymentException("Unable to load the service-endpoint interface for port-component " + portInfo.getPortComponentName()).initCause(e);
        }

        Map exceptionMap = WSDescriptorParser.getExceptionMap(portInfo.getJavaWsdlMapping());
        SchemaInfoBuilder schemaInfoBuilder = portInfo.getSchemaInfoBuilder();
        Map schemaTypeKeyToSchemaTypeMap = schemaInfoBuilder.getSchemaTypeKeyToSchemaTypeMap();

        JavaServiceDesc serviceDesc = new JavaServiceDesc();
        String serviceName =  portInfo.getPortQName().toString();
        String location = getAddressLocation(port);
        serviceDesc.setName(serviceName);
        serviceDesc.setEndpointURL(location);
        serviceDesc.setWSDLFile(portInfo.getWsdlLocation());
        Binding binding = port.getBinding();

        serviceDesc.setStyle(getStyle(binding));


        BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput();
View Full Code Here

TOP

Related Classes of javax.wsdl.Port

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.