Examples of SOAPAddress


Examples of javax.wsdl.extensions.soap.SOAPAddress

        String portStyleString = soapBinding.getStyle();
        return Style.getStyle(portStyleString);
    }

    private URL getAddressLocation(Port port) throws DeploymentException {
        SOAPAddress soapAddress;
        try {
            soapAddress = (SOAPAddress) SchemaInfoBuilder.getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
        } catch (DeploymentException e) {
            //a http: protocol REST service.  Skip it.
            return null;
        }
        String locationURIString = soapAddress.getLocationURI();
        URL location;
        try {
            location = new URL(locationURIString);
        } catch (MalformedURLException e) {
            throw new DeploymentException("Could not construct web service location URL from " + locationURIString);
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

            ExtensibilityElement el = (ExtensibilityElement) exts.get(0);
            if(el instanceof SOAP12Address){
                SOAP12Address add = (SOAP12Address)el;
                add.setLocationURI(serviceURI.toString());
            } else if (el instanceof SOAPAddress) {
                SOAPAddress add = (SOAPAddress)el;
                add.setLocationURI(serviceURI.toString());
            }
        }
    }
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

        String portStyleString = soapBinding.getStyle();
        return Style.getStyle(portStyleString);
    }

    private URL getAddressLocation(Port port) throws DeploymentException {
        SOAPAddress soapAddress;
        try {
            soapAddress = (SOAPAddress) SchemaInfoBuilder.getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
        } catch (DeploymentException e) {
            //a http: protocol REST service.  Skip it.
            return null;
        }
        String locationURIString = soapAddress.getLocationURI();
        URL location;
        try {
            location = new URL(locationURIString);
        } catch (MalformedURLException e) {
            throw new DeploymentException("Could not construct web service location URL from " + locationURIString);
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

        URL location = getURL(locationURIString);
        return location;
    }

    private URL getAddressLocation(Port port) throws DeploymentException {
        SOAPAddress soapAddress =
            (SOAPAddress) getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
        URL location = null;
        if (soapAddress != null) {
            String locationURIString = soapAddress.getLocationURI();
            location = getURL(locationURIString);
        }
        return location;
    }
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

        String portStyleString = soapBinding.getStyle();
        return Style.getStyle(portStyleString);
    }

    private URL getAddressLocation(Port port) throws DeploymentException {
        SOAPAddress soapAddress;
        try {
            soapAddress = (SOAPAddress) SchemaInfoBuilder.getExtensibilityElement(SOAPAddress.class, port.getExtensibilityElements());
        } catch (DeploymentException e) {
            //a http: protocol REST service.  Skip it.
            return null;
        }
        String locationURIString = soapAddress.getLocationURI();
        URL location;
        try {
            location = new URL(locationURIString);
        } catch (MalformedURLException e) {
            throw new DeploymentException("Could not construct web service location URL from " + locationURIString);
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

        List list = port.getExtensibilityElements();
        for ( int i = 0 ; list != null && i < list.size() ; i++ ) {
            Object obj = list.get(i);
            if ( obj instanceof SOAPAddress ) {
                try {
                    SOAPAddress addr = (SOAPAddress) obj ;
                    URL         url  = new URL(addr.getLocationURI());
                    this.setTargetEndpointAddress(url);
                }
                catch(Exception exp) {
                    throw new JAXRPCException(
                            Messages.getMessage("cantSetURI00", "" + exp) );
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

        service.setQName(new QName(def.getTargetNamespace(), serviceName));
        Port port = def.createPort();
        port.setName(portName);
        port.setBinding(binding);
        if (soap11) {
            SOAPAddress address = new SOAPAddressImpl();
            address.setLocationURI(locationUri);
            port.addExtensibilityElement(address);
        } else {
            SOAP12Address address = new SOAP12AddressImpl();
            address.setLocationURI(locationUri);
            port.addExtensibilityElement(address);
        }
        service.addPort(port);
        def.addService(service);
    }
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

            setEndpoint(port.getName());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService()
                            + "' must contain a single port definition");
        }
        SOAPAddress soapAddress = WSDLUtils.getExtension(port, SOAPAddress.class);
        if (soapAddress != null) {
            soapAddress.setLocationURI(getLocationURI());
        } else {
            SOAP12Address soap12Address = WSDLUtils.getExtension(port, SOAP12Address.class);
            if (soap12Address != null) {
                soap12Address.setLocationURI(getLocationURI());
            }
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

            setEndpoint(port.getName());
        } else {
            throw new DeploymentException("If endpoint is not set, the WSDL service '" + getService() + "' "
                                             + "must contain a single port definition");
        }
        SOAPAddress sa11 = WSDLUtils.getExtension(port, SOAPAddress.class);
        SOAP12Address sa12 = WSDLUtils.getExtension(port, SOAP12Address.class);
        if (sa11 != null) {
            marshaler.setBaseUrl(sa11.getLocationURI());
        } else if (sa12 != null) {
            marshaler.setBaseUrl(sa12.getLocationURI());
        } else {
            throw new DeploymentException("No SOAP address defined on port '" + port.getName() + "'");
        }
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

        Wsdl1SoapBindingImpl binding = new Wsdl1SoapBindingImpl(Soap11.getInstance());
        // Find infos from port
        for (Iterator iter = wsdlPort.getExtensibilityElements().iterator(); iter.hasNext();) {
            ExtensibilityElement element = (ExtensibilityElement) iter.next();
            if (element instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) element;
                binding.setLocationURI(soapAddress.getLocationURI());
            } else {
                //throw new IllegalStateException("Unrecognized extension: " + QNameUtil.toString(element.getElementType()));
            }
        }
        javax.wsdl.Binding wsdlBinding = wsdlPort.getBinding();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.