Package com.sun.xml.rpc.spi.tools

Examples of com.sun.xml.rpc.spi.tools.NoMetadataModelInfo


    private NoMetadataModelInfo createNoMetadataModelInfo
        (WebService webService, JaxrpcMappingDescriptor mappingDesc)
        throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFileUrl = webService.getWsdlFileUrl();

        Collection endpoints = webService.getEndpoints();
        if( endpoints.size() != 1 ) {
            throw new GeneratorException
                ("Deployment code generation error for webservice " +
                 webService.getName() + ". " +
                 " jaxrpc-mapping-file is required if web service has " +
                 "multiple endpoints");
        }

        WebServiceEndpoint endpoint = (WebServiceEndpoint)
            endpoints.iterator().next();

        modelInfo.setLocation(wsdlFileUrl.toExternalForm());
        modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface());
        modelInfo.setPortName(endpoint.getWsdlPort());

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here


    private NoMetadataModelInfo createNoMetadataModelInfo
        (ServiceReferenceDescriptor serviceRef,
         JaxrpcMappingDescriptor mappingDesc) throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFile = serviceRef.hasWsdlOverride() ?
            serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl();
        modelInfo.setLocation(wsdlFile.toExternalForm());

        // Service endpoint interface is required.  Parse generated
        // service interface for it since we can't count on SEI
        // having been listed in standard deployment information.
        WsUtil wsUtil = new WsUtil();
        String serviceInterfaceName = serviceRef.getServiceInterface();
       
        ClassLoader cl = context.getDescriptor().getClassLoader();
        if (cl instanceof EJBClassLoader) {
            List moduleList = EJBClassPathUtils.getApplicationClassPath((Application) context.getDescriptor(), context.getSrcDir().getAbsolutePath());
            for (Iterator itr=moduleList.iterator();itr.hasNext();) {               
                ((EJBClassLoader) cl).appendURL((new File((String) itr.next())));
            }
        }
       
        Class serviceInterface = cl.loadClass(serviceInterfaceName);
        Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface);

        if( seis.size() == 0 ) {
            throw new GeneratorException("Invalid Generated Service Interface "
                                         + serviceInterfaceName + " . ");
        } else if( seis.size() > 1 ) {
            throw new GeneratorException("Deployment error : If no " +
                                         "jaxrpc-mapping file is provided, " +
                                         "Generated Service Interface must have"
                                         +" only 1 Service Endpoint Interface");
        }

        String serviceEndpointInterface = (String) seis.iterator().next();
        modelInfo.setInterfaceName(serviceEndpointInterface);

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }   
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (WebService webService, JaxrpcMappingDescriptor mappingDesc)
            throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFileUrl = webService.getWsdlFileUrl();

        Collection endpoints = webService.getEndpoints();
        if( endpoints.size() != 1 ) {
            throw new Exception
                    ("Deployment code generation error for webservice " +
                            webService.getName() + ". " +
                            " jaxrpc-mapping-file is required if web service has " +
                            "multiple endpoints");
        }

        WebServiceEndpoint endpoint = (WebServiceEndpoint)
                endpoints.iterator().next();

        modelInfo.setLocation(wsdlFileUrl.toExternalForm());
        modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface());
        modelInfo.setPortName(endpoint.getWsdlPort());

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (ServiceReferenceDescriptor serviceRef,
             JaxrpcMappingDescriptor mappingDesc) throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFile = serviceRef.hasWsdlOverride() ?
                serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl();
        modelInfo.setLocation(wsdlFile.toExternalForm());

        // Service endpoint interface is required.  Parse generated
        // service interface for it since we can't count on SEI
        // having been listed in standard deployment information.
        WsUtil wsUtil = new WsUtil();
        String serviceInterfaceName = serviceRef.getServiceInterface();

        ClassLoader cl = context.getModuleMetaData(Application.class).getClassLoader();
        if (cl instanceof ASURLClassLoader) {
            String modClassPath = ASClassLoaderUtil.getModuleClassPath(habitat, context);
            List<URL> moduleList = ASClassLoaderUtil.getURLsFromClasspath(modClassPath, File.pathSeparator, null);
            for (Iterator<URL> itr=moduleList.iterator();itr.hasNext();) {
                ((ASURLClassLoader) cl).appendURL(itr.next());
            }
        }

        Class serviceInterface = cl.loadClass(serviceInterfaceName);
        Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface);

        if( seis.size() == 0 ) {
            throw new Exception("Invalid Generated Service Interface "
                    + serviceInterfaceName + " . ");
        } else if( seis.size() > 1 ) {
            throw new Exception("Deployment error : If no " +
                    "jaxrpc-mapping file is provided, " +
                    "Generated Service Interface must have"
                    +" only 1 Service Endpoint Interface");
        }

        String serviceEndpointInterface = (String) seis.iterator().next();
        modelInfo.setInterfaceName(serviceEndpointInterface);

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (WebService webService, JaxrpcMappingDescriptor mappingDesc)
            throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFileUrl = webService.getWsdlFileUrl();

        Collection endpoints = webService.getEndpoints();
        if( endpoints.size() != 1 ) {
            throw new Exception
                    ("Deployment code generation error for webservice " +
                            webService.getName() + ". " +
                            " jaxrpc-mapping-file is required if web service has " +
                            "multiple endpoints");
        }

        WebServiceEndpoint endpoint = (WebServiceEndpoint)
                endpoints.iterator().next();

        modelInfo.setLocation(wsdlFileUrl.toExternalForm());
        modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface());
        modelInfo.setPortName(endpoint.getWsdlPort());

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (ServiceReferenceDescriptor serviceRef,
             JaxrpcMappingDescriptor mappingDesc) throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFile = serviceRef.hasWsdlOverride() ?
                serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl();
        modelInfo.setLocation(wsdlFile.toExternalForm());

        // Service endpoint interface is required.  Parse generated
        // service interface for it since we can't count on SEI
        // having been listed in standard deployment information.
        WsUtil wsUtil = new WsUtil();
        String serviceInterfaceName = serviceRef.getServiceInterface();

        ClassLoader cl = context.getModuleMetaData(Application.class).getClassLoader();
        if (cl instanceof ASURLClassLoader) {
            String modClassPath = ASClassLoaderUtil.getModuleClassPath(habitat, context);
            List<URL> moduleList = ASClassLoaderUtil.getURLsFromClasspath(modClassPath, File.pathSeparator, null);
            for (Iterator<URL> itr=moduleList.iterator();itr.hasNext();) {
                ((ASURLClassLoader) cl).appendURL(itr.next());
            }
        }

        Class serviceInterface = cl.loadClass(serviceInterfaceName);
        Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface);

        if( seis.size() == 0 ) {
            throw new Exception("Invalid Generated Service Interface "
                    + serviceInterfaceName + " . ");
        } else if( seis.size() > 1 ) {
            throw new Exception("Deployment error : If no " +
                    "jaxrpc-mapping file is provided, " +
                    "Generated Service Interface must have"
                    +" only 1 Service Endpoint Interface");
        }

        String serviceEndpointInterface = (String) seis.iterator().next();
        modelInfo.setInterfaceName(serviceEndpointInterface);

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (WebService webService, JaxrpcMappingDescriptor mappingDesc)
            throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFileUrl = webService.getWsdlFileUrl();

        Collection endpoints = webService.getEndpoints();
        if( endpoints.size() != 1 ) {
            throw new Exception
                    ("Deployment code generation error for webservice " +
                            webService.getName() + ". " +
                            " jaxrpc-mapping-file is required if web service has " +
                            "multiple endpoints");
        }

        WebServiceEndpoint endpoint = (WebServiceEndpoint)
                endpoints.iterator().next();

        modelInfo.setLocation(wsdlFileUrl.toExternalForm());
        modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface());
        modelInfo.setPortName(endpoint.getWsdlPort());

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (ServiceReferenceDescriptor serviceRef,
             JaxrpcMappingDescriptor mappingDesc) throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFile = serviceRef.hasWsdlOverride() ?
                serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl();
        modelInfo.setLocation(wsdlFile.toExternalForm());

        // Service endpoint interface is required.  Parse generated
        // service interface for it since we can't count on SEI
        // having been listed in standard deployment information.
        WsUtil wsUtil = new WsUtil();
        String serviceInterfaceName = serviceRef.getServiceInterface();

        ClassLoader cl = context.getModuleMetaData(Application.class).getClassLoader();
        if (cl instanceof ASURLClassLoader) {
            String modClassPath = ASClassLoaderUtil.getModuleClassPath(habitat, context);
            List<URL> moduleList = ASClassLoaderUtil.getURLsFromClasspath(modClassPath, File.pathSeparator, null);
            for (Iterator<URL> itr=moduleList.iterator();itr.hasNext();) {
                ((ASURLClassLoader) cl).appendURL(itr.next());
            }
        }

        Class serviceInterface = cl.loadClass(serviceInterfaceName);
        Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface);

        if( seis.size() == 0 ) {
            throw new Exception("Invalid Generated Service Interface "
                    + serviceInterfaceName + " . ");
        } else if( seis.size() > 1 ) {
            throw new Exception("Deployment error : If no " +
                    "jaxrpc-mapping file is provided, " +
                    "Generated Service Interface must have"
                    +" only 1 Service Endpoint Interface");
        }

        String serviceEndpointInterface = (String) seis.iterator().next();
        modelInfo.setInterfaceName(serviceEndpointInterface);

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (WebService webService, JaxrpcMappingDescriptor mappingDesc)
            throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFileUrl = webService.getWsdlFileUrl();

        Collection endpoints = webService.getEndpoints();
        if( endpoints.size() != 1 ) {
            throw new Exception
                    ("Deployment code generation error for webservice " +
                            webService.getName() + ". " +
                            " jaxrpc-mapping-file is required if web service has " +
                            "multiple endpoints");
        }

        WebServiceEndpoint endpoint = (WebServiceEndpoint)
                endpoints.iterator().next();

        modelInfo.setLocation(wsdlFileUrl.toExternalForm());
        modelInfo.setInterfaceName(endpoint.getServiceEndpointInterface());
        modelInfo.setPortName(endpoint.getWsdlPort());

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

    private NoMetadataModelInfo createNoMetadataModelInfo
            (ServiceReferenceDescriptor serviceRef,
             JaxrpcMappingDescriptor mappingDesc) throws Exception {

        NoMetadataModelInfo modelInfo = rpcFactory.createNoMetadataModelInfo();
        URL wsdlFile = serviceRef.hasWsdlOverride() ?
                serviceRef.getWsdlOverride() : serviceRef.getWsdlFileUrl();
        modelInfo.setLocation(wsdlFile.toExternalForm());

        // Service endpoint interface is required.  Parse generated
        // service interface for it since we can't count on SEI
        // having been listed in standard deployment information.
        WsUtil wsUtil = new WsUtil();
        String serviceInterfaceName = serviceRef.getServiceInterface();

        ClassLoader cl = context.getModuleMetaData(Application.class).getClassLoader();
        if (cl instanceof ASURLClassLoader) {
            String modClassPath = ASClassLoaderUtil.getModuleClassPath(habitat, context);
            List<URL> moduleList = ASClassLoaderUtil.getURLsFromClasspath(modClassPath, File.pathSeparator, null);
            for (Iterator<URL> itr=moduleList.iterator();itr.hasNext();) {
                ((ASURLClassLoader) cl).appendURL(itr.next());
            }
        }

        Class serviceInterface = cl.loadClass(serviceInterfaceName);
        Collection seis = wsUtil.getSEIsFromGeneratedService(serviceInterface);

        if( seis.size() == 0 ) {
            throw new Exception("Invalid Generated Service Interface "
                    + serviceInterfaceName + " . ");
        } else if( seis.size() > 1 ) {
            throw new Exception("Deployment error : If no " +
                    "jaxrpc-mapping file is provided, " +
                    "Generated Service Interface must have"
                    +" only 1 Service Endpoint Interface");
        }

        String serviceEndpointInterface = (String) seis.iterator().next();
        modelInfo.setInterfaceName(serviceEndpointInterface);

        addNamespaceMappingRegistry(modelInfo, mappingDesc);

        return modelInfo;
    }
View Full Code Here

TOP

Related Classes of com.sun.xml.rpc.spi.tools.NoMetadataModelInfo

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.