Examples of SOAPAddress


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

        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

        List<ExtensibilityElement> extensions = port.getExtensibilityElements();
        for (Iterator<ExtensibilityElement> i = extensions.iterator();
                i.hasNext();) {
            ExtensibilityElement ext = i.next();
            if (ext instanceof SOAPAddress) {
                SOAPAddress addr = (SOAPAddress) ext;
                endpoint = addr.getLocationURI();
            }
        }
        return endpoint;
    }
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

        Port port = def.createPort();
        port.setBinding(binding);
        // Probably should use the end of the location Url
        port.setName(getServicePortName());

        SOAPAddress addr = new SOAPAddressImpl();
        addr.setLocationURI(locationUrl);

        port.addExtensibilityElement(addr);

        service.addPort(port);
    }
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());
                    call.setTargetEndpointAddress(url);
                }
                catch(Exception exp) {
                    throw new ServiceException(
                            Messages.getMessage("cantSetURI00", "" + exp) );
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

        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, e);
View Full Code Here

Examples of javax.wsdl.extensions.soap.SOAPAddress

            if (port != null) {
                List ext = port.getExtensibilityElements();
                for (int i = 0; i < ext.size(); i++) {
                    Object o = ext.get(i);
                    if (o instanceof SOAPAddress) {
                        SOAPAddress address = (SOAPAddress) o;
                        serviceURL = address.getLocationURI();
                        format = SynapseConstants.FORMAT_SOAP11;
                        break;
                    } else if (o instanceof SOAP12Address) {
                        SOAP12Address address = (SOAP12Address) o;
                        serviceURL = address.getLocationURI();
                        format = SynapseConstants.FORMAT_SOAP12;
                        break;
                    }
                }
            }
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.