Examples of WSDLModel


Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

        Source wsdl = new StreamSource(wsdlLocation);
        WSDLService service = null;

        try {
            URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId());
            WSDLModel model = parseWSDL(url, wsdl, sei);
            service = model.getService(this.serviceName);
            if (service == null)
                throw new WebServiceException(
                        ClientMessages.INVALID_SERVICE_NAME(this.serviceName,
                                buildNameList(model.getServices().keySet())));
        } catch (MalformedURLException e) {
            throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId()));
        }
        return service;
    }
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

   
    @NotNull
    static ConnectionManagementSettings createSettingsInstance(final @NotNull WSDLPort port) {
        try {
            WSDLModel model = port.getBinding().getOwner();
            PolicyMap policyMap = model.getPolicyMap();
            if (policyMap != null) {
                PolicyMapKey endpointKey = PolicyMap.createWsdlEndpointScopeKey(com.sun.xml.ws.transport.tcp.util.TCPConstants.SERVICE_CHANNEL_WS_NAME,
                        com.sun.xml.ws.transport.tcp.util.TCPConstants.SERVICE_CHANNEL_WS_PORT_NAME);
                Policy policy = policyMap.getEndpointEffectivePolicy(endpointKey);
                if (policy != null && policy.contains(TCPConstants.TCPTRANSPORT_CONNECTION_MANAGEMENT_ASSERTION)) {
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

        }
    }
   
    private static int retrieveCustomTCPPort(WSDLPort port) {
        try {
            WSDLModel model = port.getBinding().getOwner();
            PolicyMap policyMap = model.getPolicyMap();
            if (policyMap != null) {
                PolicyMapKey endpointKey = PolicyMap.createWsdlEndpointScopeKey(port.getOwner().getName(), port.getName());
                Policy policy = policyMap.getEndpointEffectivePolicy(endpointKey);

                if (policy != null && policy.contains(com.sun.xml.ws.transport.tcp.wsit.TCPConstants.TCPTRANSPORT_POLICY_ASSERTION)) {
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

    }
   
    private static WSDLModel tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException {
        ArrayList<Throwable> exceptions = new ArrayList<Throwable>();
        try {
            WSDLModel wsdlModel = wsdlParser.parseUsingMex(wsdlLoc, resolver, isClientSide, container, serviceClass, policyResolver,extensions);
            if(wsdlModel == null){
                throw new WebServiceException(ClientMessages.FAILED_TO_PARSE(wsdlLoc.toExternalForm(), e.getMessage()), e);
            }
            return wsdlModel;
        } catch (URISyntaxException e1) {
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

    public static PolicyMap parse(final String configFileIdentifier, final Container container, final PolicyMapMutator... mutators)
            throws PolicyException {
        LOGGER.entering(configFileIdentifier, container, mutators);
        PolicyMap map = null;
        try {
            WSDLModel configModel= parseModel(configFileIdentifier, container, mutators);
            //configModel is null in absense of wsit configuration file.
            if(configModel!= null)
                map = configModel.getPolicyMap();
            return map;
        } finally {
            LOGGER.exiting(map);
        }
    }
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

     */
    public static WSDLModel parseModel(final String configFileIdentifier, final Container container, final PolicyMapMutator... mutators)
            throws PolicyException {
        LOGGER.entering(configFileIdentifier, container, mutators);
        final URL configFileUrl = findConfigFile(configFileIdentifier, container);
        final WSDLModel model;
        if (configFileUrl != null) {
            model = parseModel(configFileUrl, PolicyConstants.CLIENT_CONFIGURATION_IDENTIFIER.equals(configFileIdentifier), mutators);
            LOGGER.info(LocalizationMessages.WSP_5018_LOADED_WSIT_CFG_FILE(configFileUrl.toExternalForm()));
        }
        else {
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

     * @throws IllegalArgumentException in case {@code configFileUrl} parameter is {@code null}.
     */
    public static WSDLModel parseModel(final URL configFileUrl, final boolean isClient, final PolicyMapMutator... mutators)
            throws PolicyException, IllegalArgumentException {
        LOGGER.entering(configFileUrl, isClient, mutators);
        WSDLModel model = null;
        try {
            if (null == configFileUrl) {
                throw LOGGER.logSevereException(new IllegalArgumentException(
                        LocalizationMessages.WSP_5007_FAILED_TO_READ_NULL_WSIT_CFG()));
            }
View Full Code Here

Examples of com.sun.xml.ws.api.model.wsdl.WSDLModel

     */
    public static WSDLModel getWsdlModel(URL resourceUrl, boolean isClient)
            throws IOException, XMLStreamException, SAXException {
        final SDDocumentSource doc = SDDocumentSource.create(resourceUrl);
        final Parser parser = new Parser(doc);
        final WSDLModel model = WSDLModel.WSDLParser.parse(parser,
                                                           new PolicyEntityResolver(),
                                                           isClient,
                                                           Container.NONE,
                                                           PolicyResolverFactory.DEFAULT_POLICY_RESOLVER,
                                                           new WSDLParserExtension[] {});
View Full Code Here

Examples of org.apache.cxf.tools.common.model.WSDLModel

    private ToolContext penv;
    private Class seiClass;

    public void process() throws ToolException {
        try {
            model = new WSDLModel();
        } catch (Exception e) {
            Message msg = new Message("FAIL_TO_BUILD_WSDLMODEL", LOG);
            LOG.log(Level.SEVERE, msg.toString());
            throw new ToolException(msg);
        }
View Full Code Here

Examples of org.apache.cxf.tools.common.model.WSDLModel

    private ToolContext penv;
    private Class seiClass;

    public void process() throws ToolException {
        try {
            model = new WSDLModel();
        } catch (Exception e) {
            Message msg = new Message("FAIL_TO_BUILD_WSDLMODEL", LOG);
            LOG.log(Level.SEVERE, msg.toString());
            throw new ToolException(msg);
        }
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.