Examples of TargetService


Examples of org.wso2.carbon.discovery.messages.TargetService

            epr  = EndpointReferenceHelper.fromString(eprAttr);
        } else {
            epr = new EndpointReference(service.getId());
        }

        TargetService targetService = new TargetService(epr);
        String[] types = service.getAttributes(DiscoveryConstants.ATTR_TYPES);
        if (types != null) {
            targetService.setTypes(Util.toQNameArray(types));
        }

        String[] scopes = service.getAttributes(DiscoveryConstants.ATTR_SCOPES);
        if (scopes != null) {
            targetService.setScopes(Util.toURIArray(scopes));
        }

        String[] xAddresses = service.getAttributes(DiscoveryConstants.ATTR_XADDRESSES);
        if (xAddresses != null) {
            targetService.setXAddresses(Util.toURIArray(xAddresses));
        }

        String mdv = service.getAttribute(DiscoveryConstants.ATTR_METADATA_VERSION);
        if (mdv != null) {
            targetService.setMetadataVersion(Integer.valueOf(mdv));
        } else {
            // Set a default metadata version
            targetService.setMetadataVersion(1);
        }

        return targetService;
    }
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.