Package org.apache.cxf.tools.common.extensions.soap

Examples of org.apache.cxf.tools.common.extensions.soap.SoapAddress


    private void createSoapExtensors(EndpointInfo ei, SoapBindingInfo bi, boolean isSoap12) {
        try {
            // We need to populate the soap extensibilityelement proxy for soap11 and soap12
            ExtensionRegistry extensionRegistry = WSDLFactory.newInstance().newPopulatedExtensionRegistry();
           
            SoapAddress soapAddress = SOAPBindingUtil.createSoapAddress(extensionRegistry, isSoap12);
            String address = ei.getAddress();
            if (address == null) {
                address = "http://localhost:9090";
            }

            soapAddress.setLocationURI(address);
            ei.addExtensor(soapAddress);
           
            SoapBinding soapBinding = SOAPBindingUtil.createSoapBinding(extensionRegistry, isSoap12);
            soapBinding.setStyle(bi.getStyle());
            soapBinding.setTransportURI(bi.getTransportURI());
View Full Code Here


        List ees = port.getExtensibilityElements();
        for (Iterator itr = ees.iterator(); itr.hasNext();) {
            Object extensor = itr.next();

            if (SOAPBindingUtil.isSOAPAddress(extensor)) {
                final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor);

                SoapBindingInfo sbi = (SoapBindingInfo)b;
                EndpointInfo info = new EndpointInfo(serviceInfo, sbi.getTransportURI()) {
                    public void setAddress(String s) {
                        super.setAddress(s);
                        sa.setLocationURI(s);
                    }
                };
                info.setAddress(sa.getLocationURI());
                return info;
            }
        }

        return null;
View Full Code Here

        port.setName(wmodel.getPortName());
        Binding binding = definition.createBinding();
        String targetNameSpace = wmodel.getTargetNameSpace();
        binding.setQName(new QName(targetNameSpace, wmodel.getPortTypeName() + "Binding"));
        port.setBinding(binding);
        SoapAddress soapAddress = null;
        try {
            soapAddress = SOAPBindingUtil.createSoapAddress(extensionRegistry, isSOAP12);
            soapAddress.setLocationURI(getAddressName());
        } catch (WSDLException e) {
            throw new ToolException(e.getMessage(), e);
        }
        port.addExtensibilityElement(soapAddress);
        service.addPort(port);
View Full Code Here

        ExtensionRegistry extReg = this.wsdlReader.getExtensionRegistry();
        if (extReg == null) {
            extReg = wsdlFactory.newPopulatedExtensionRegistry();
        }
        if ("http".equalsIgnoreCase((String)env.get(ToolConstants.CFG_TRANSPORT))) {
            SoapAddress soapAddress = null;
            try {
                soapAddress = SOAPBindingUtil.createSoapAddress(extReg, isSOAP12());
            } catch (WSDLException wse) {
                Message msg = new Message("FAIL_TO_CREATE_SOAPADDRESS", LOG);
                throw new ToolException(msg, wse);
            }
           
            if (env.get(ToolConstants.CFG_ADDRESS) != null) {
                soapAddress.setLocationURI((String)env.get(ToolConstants.CFG_ADDRESS));
            } else {
                soapAddress.setLocationURI(HTTP_PREFIX + "/" + env.get(ToolConstants.CFG_SERVICE) + "/"
                                           + env.get(ToolConstants.CFG_PORT));
            }
            port.addExtensibilityElement(soapAddress);
        } else if ("jms".equalsIgnoreCase((String)env.get(ToolConstants.CFG_TRANSPORT))) {
            AddressType jmsAddress = null;
View Full Code Here

            List ees = port.getExtensibilityElements();
            for (Iterator itr = ees.iterator(); itr.hasNext();) {
                Object extensor = itr.next();
   
                if (SOAPBindingUtil.isSOAPAddress(extensor)) {
                    final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor);
   
                    EndpointInfo info = new SoapEndpointInfo(serviceInfo, transportURI);
                    info.addExtensor(sa);
                    info.setAddress(sa.getLocationURI());
                    return info;
                }
            }
        }
        return new SoapEndpointInfo(serviceInfo, transportURI);
View Full Code Here

        List ees = port.getExtensibilityElements();
        for (Iterator itr = ees.iterator(); itr.hasNext();) {
            Object extensor = itr.next();

            if (SOAPBindingUtil.isSOAPAddress(extensor)) {
                SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor);

                SoapBindingInfo sbi = (SoapBindingInfo)b;
                EndpointInfo info = new EndpointInfo(serviceInfo, sbi.getTransportURI());
                info.setAddress(sa.getLocationURI());
                return info;
            }
        }

        return null;
View Full Code Here

    private void updatePortLocation(Port port, String baseUri) {
        List<?> exts = port.getExtensibilityElements();
        if (exts != null && exts.size() > 0) {
            ExtensibilityElement el = (ExtensibilityElement) exts.get(0);
            if (SOAPBindingUtil.isSOAPAddress(el)) {
                SoapAddress add = SOAPBindingUtil.getSoapAddress(el);
                add.setLocationURI(baseUri);
            }
            if (el instanceof AddressType) {
                AddressType add = (AddressType) el;
                add.setLocation(baseUri);
            }
        }
    }
View Full Code Here

        if (ees != null) {
            for (Iterator itr = ees.iterator(); itr.hasNext();) {
                Object extensor = itr.next();
   
                if (SOAPBindingUtil.isSOAPAddress(extensor)) {
                    final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor);
   
                    info.addExtensor(sa);
                    info.setAddress(sa.getLocationURI());
                    if (isJMSSpecAddress(sa.getLocationURI())) {
                        info.setTransportId(SoapJMSConstants.SOAP_JMS_SPECIFICIATION_TRANSPORTID);
                    }
                } else {
                    info.addExtensor(extensor);
                }
View Full Code Here

            List ees = port.getExtensibilityElements();
            for (Iterator itr = ees.iterator(); itr.hasNext();) {
                Object extensor = itr.next();
   
                if (SOAPBindingUtil.isSOAPAddress(extensor)) {
                    final SoapAddress sa = SOAPBindingUtil.getSoapAddress(extensor);
   
                    EndpointInfo info = new SoapEndpointInfo(serviceInfo, transportURI);
                    info.addExtensor(sa);
                    info.setAddress(sa.getLocationURI());
                    return info;
                }
            }
        }
        return new SoapEndpointInfo(serviceInfo, transportURI);
View Full Code Here

    private void updatePortLocation(Port port, String baseUri) {
        List<?> exts = port.getExtensibilityElements();
        if (exts != null && exts.size() > 0) {
            ExtensibilityElement el = (ExtensibilityElement) exts.get(0);
            if (SOAPBindingUtil.isSOAPAddress(el)) {
                SoapAddress add = SOAPBindingUtil.getSoapAddress(el);
                add.setLocationURI(baseUri);
            }
            if (el instanceof AddressType) {
                AddressType add = (AddressType) el;
                add.setLocation(baseUri);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.common.extensions.soap.SoapAddress

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.