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

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


            Port port = def.getService(ei.getService().getName()).getPort(ei.getName().getLocalPart());
            List<?> exts = port.getExtensibilityElements();
            if (exts.size() > 0) {
                ExtensibilityElement el = (ExtensibilityElement)exts.get(0);
                if (SOAPBindingUtil.isSOAPAddress(el)) {
                    SoapAddress add = SOAPBindingUtil.getSoapAddress(el);
                    add.setLocationURI(request.getRequestURL().toString());
                }
                if (el instanceof AddressType) {
                    AddressType add = (AddressType)el;
                    add.setLocation(request.getRequestURL().toString());
                }
            }

            wsdlWriter.writeWSDL(def, os);
            response.getOutputStream().flush();
View Full Code Here


        String address = null;
        while (it.hasNext()) {
            Object obj = it.next();
                       
            if (SOAPBindingUtil.isSOAPAddress(obj)) {
                SoapAddress soapAddress = SOAPBindingUtil.getSoapAddress(obj);
                address = soapAddress.getLocationURI();
            }
            if (obj instanceof JMSAddress) {
                address = ((JMSAddress)obj).getAddress();
            }
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))) {
            JMSAddress jmsAddress = null;
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

                URI serviceURI = new URI(requestURI.getScheme(), null,
                                         requestURI.getHost(), requestURI.getPort(),
                                         requestURI.getPath(), null, null);
                ExtensibilityElement el = (ExtensibilityElement) exts.get(0);
                if (SOAPBindingUtil.isSOAPAddress(el)) {
                    SoapAddress add = SOAPBindingUtil.getSoapAddress(el);
                    add.setLocationURI(serviceURI.toString());
                }
                if (el instanceof AddressType) {
                    AddressType add = (AddressType) el;
                    add.setLocation(serviceURI.toString());
                }
            }
        }

        wsdlWriter.writeWSDL(def, response.getOutputStream());
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

                   request.getParameter("xsd") != null || request.getParameter("XSD") != null) {
            GeronimoQueryHandler queryHandler = new GeronimoQueryHandler(this.bus);
            URI requestURI = request.getURI();
            EndpointInfo ei = this.destination.getEndpointInfo();
            // update service port location on each request
            SoapAddress address = ei.getExtensor(SoapAddress.class);
            address.setLocationURI(getBaseUri(requestURI));
            OutputStream out = response.getOutputStream();
            String baseUri = requestURI.toString();
            response.setContentType("text/xml");
            queryHandler.writeResponse(baseUri, null, ei, out);
        } else if (endpoint.isSOAP11()) {
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)) {
                    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

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.