Package org.apache.cxf.binding.corba.wsdl

Examples of org.apache.cxf.binding.corba.wsdl.AddressType


        Port servicePort = def.createPort();
        servicePort.setName(portName);
        servicePort.setBinding(binding);

        try {
            AddressType addressType =
                (AddressType) def.getExtensionRegistry().createExtension(Port.class,
                                                                         CorbaConstants.NE_CORBA_ADDRESS);

            String addr = null;
            if (getAddressFile() != null) {
                try {
                    File addrFile = new File(getAddressFile());
                    FileReader fileReader = new FileReader(addrFile);
                    BufferedReader bufferedReader = new BufferedReader(fileReader);
                    addr = bufferedReader.readLine();
                } catch (Exception ex) {
                    throw new ToolException(ex.getMessage(), ex);
                }
            } else {
                addr = getAddress();
            }
            if (addr == null) {
                addr = "file:./" + interfaceName + ".ref";
            }
            addressType.setLocation(addr);
            servicePort.addExtensibilityElement(addressType);
        } catch (WSDLException ex) {
            throw new Exception("Failed to create CORBA address for service", ex);
        }
View Full Code Here


        Port servicePort = def.createPort();
        servicePort.setName(portName);
        servicePort.setBinding(binding);

        try {
            AddressType addressType =
                (AddressType) def.getExtensionRegistry().createExtension(Port.class,
                                                                         CorbaConstants.NE_CORBA_ADDRESS);

            String addr = null;
            if (getAddressFile() != null) {
                BufferedReader bufferedReader = null;
                try {
                    File addrFile = new File(getAddressFile());
                    FileReader fileReader = new FileReader(addrFile);
                    bufferedReader = new BufferedReader(fileReader);
                    addr = bufferedReader.readLine();
                } catch (Exception ex) {
                    throw new ToolException(ex.getMessage(), ex);
                } finally {
                    if (bufferedReader != null) {
                        bufferedReader.close();
                    }
                }
            } else {
                addr = getAddress();
            }
            if (addr == null) {
                addr = "file:./" + interfaceName + ".ref";
            }
            addressType.setLocation(addr);
            servicePort.addExtensibilityElement(addressType);
        } catch (WSDLException ex) {
            throw new Exception("Failed to create CORBA address for service", ex);
        }
View Full Code Here

                    def.addService(service);
                }
            }
            Port port = def.createPort();
            port.setName(portTypeName.getLocalPart() + "CORBAPort");
            AddressType address =
                (AddressType) def.getExtensionRegistry().createExtension(Port.class,
                                                                         CorbaConstants.NE_CORBA_ADDRESS);
           
            String addr = null;
            String addrFileName = (String) env.get(ToolCorbaConstants.CFG_ADDRESSFILE);
            if (addrFileName != null) {
                BufferedReader bufferedReader = null;
                try {
                    File addrFile = new File(addrFileName);
                    FileReader fileReader = new FileReader(addrFile);
                    bufferedReader = new BufferedReader(fileReader);
                    addr = bufferedReader.readLine();
                } catch (Exception ex) {
                    throw new ToolException(ex.getMessage(), ex);
                } finally {
                    if (bufferedReader != null) {
                        bufferedReader.close();
                    }
                }
            } else {
                addr = (String) env.get(ToolCorbaConstants.CFG_ADDRESS);
            }
            if (addr == null) {
                addr = "IOR:";
            }
            address.setLocation(addr);
            port.addExtensibilityElement(address);
            service.addPort(port);
            port.setBinding(bindings[i]);
        }
    }
View Full Code Here

        }
    }
    public void prepare(Message message) throws IOException {   
        try {
            prepareOrb();
            AddressType address = endpointInfo.getExtensor(AddressType.class);

            if (address == null) {
                LOG.log(Level.SEVERE, "Unable to locate a valid CORBA address");
                throw new CorbaBindingException("Unable to locate a valid CORBA address");
            }
            String ref = (String)message.get(Message.ENDPOINT_ADDRESS);
            org.omg.CORBA.Object targetObject;
            // A non-null endpoint address from the message means that we want to invoke on a particular
            // object reference specified by the endpoint reference type.  If the reference is null, then
            // we want to invoke on the default location as specified in the WSDL.
            if (ref != null) {
                targetObject = CorbaUtils.importObjectReference(orb, ref);
            } else {
                targetObject = CorbaUtils.importObjectReference(orb, address.getLocation());
            }
            message.put(CorbaConstants.ORB, orb);
            message.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, targetObject);
            message.setContent(OutputStream.class,
                               new CorbaOutputStream(message));
View Full Code Here

        }
    }
    public void prepare(Message message) throws IOException {   
        try {
            prepareOrb();
            AddressType address = endpointInfo.getExtensor(AddressType.class);

            if (address == null) {
                LOG.log(Level.SEVERE, "Unable to locate a valid CORBA address");
                throw new CorbaBindingException("Unable to locate a valid CORBA address");
            }
            String ref = (String)message.get(Message.ENDPOINT_ADDRESS);
            org.omg.CORBA.Object targetObject;
            // A non-null endpoint address from the message means that we want to invoke on a particular
            // object reference specified by the endpoint reference type.  If the reference is null, then
            // we want to invoke on the default location as specified in the WSDL.
            if (ref != null) {
                targetObject = CorbaUtils.importObjectReference(orb, ref);
            } else {
                targetObject = CorbaUtils.importObjectReference(orb, address.getLocation());
            }
            message.put(CorbaConstants.ORB, orb);
            message.put(CorbaConstants.CORBA_ENDPOINT_OBJECT, targetObject);
            message.setContent(OutputStream.class,
                               new CorbaOutputStream(message));
View Full Code Here

            String address = null;
            if (target != null) {
                address = target.getAddress().getValue();
            }
            if (address == null) {
                AddressType ad = endpointInfo.getExtensor(AddressType.class);
                if (ad != null) {
                    address = ad.getLocation();
                }
            }
            String ref = (String)message.get(Message.ENDPOINT_ADDRESS);
            if (ref != null) {
                // A non-null endpoint address from the message means that we want to invoke on a particular
View Full Code Here

        try {
            Servant servant = bindingPOA.id_to_servant(objectId);
            org.omg.CORBA.Object objRef
                = bindingPOA.create_reference_with_id(id.getBytes(),
                                               servant._all_interfaces(bindingPOA, objectId)[0]);
            AddressType addr = new AddressType();
            orbConfig.exportObjectReference(orb, objRef,
                                            address.getLocation(),
                                            addr);
            ref = EndpointReferenceUtils.getEndpointReference(addr.getLocation());
            EndpointInfo ei = getEndPointInfo();
            if (ei.getService() != null) {
                EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(),
                                                             ei.getName().getLocalPart());
            }
View Full Code Here

        try {
            Servant servant = bindingPOA.id_to_servant(objectId);
            org.omg.CORBA.Object objRef
                = bindingPOA.create_reference_with_id(id.getBytes(),
                                               servant._all_interfaces(bindingPOA, objectId)[0]);
            AddressType addr = new AddressType();
            orbConfig.exportObjectReference(orb, objRef,
                                            address.getLocation(),
                                            addr);
            ref = EndpointReferenceUtils.getEndpointReference(addr.getLocation());
            EndpointInfo ei = getEndPointInfo();
            if (ei.getService() != null) {
                EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(),
                                                             ei.getName().getLocalPart());
            }
View Full Code Here

            String address = null;
            if (target != null) {
                address = target.getAddress().getValue();
            }
            if (address == null) {
                AddressType ad = endpointInfo.getExtensor(AddressType.class);
                if (ad != null) {
                    address = ad.getLocation();
                }
            }
            String ref = (String)message.get(Message.ENDPOINT_ADDRESS);
            if (ref != null) {
                // A non-null endpoint address from the message means that we want to invoke on a particular
View Full Code Here

            String address = null;
            if (target != null) {
                address = target.getAddress().getValue();
            }
            if (address == null) {
                AddressType ad = endpointInfo.getExtensor(AddressType.class);
                if (ad != null) {
                    address = ad.getLocation();
                }
            }
            String ref = (String)message.get(Message.ENDPOINT_ADDRESS);
            if (ref != null) {
                // A non-null endpoint address from the message means that we want to invoke on a particular
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.corba.wsdl.AddressType

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.