On Fri, Aug 28, 2009 at 10:54 PM, Deepal jayasinghe <deep...@gmail.com>wrote:

>
> >
> > Yes. If a subdirectory contains a services XML, it is sent to be
> > deployed. Otherwise it is sent through another iteration to find
> > services in the sub directory. Is it wrong? Am I missing something?
> if by accident if I have two services.xml then I might have some
> problem. The reason I am telling this is we have the services.xml in
> source tree that will compiled to where it has, and then using some
> build tools we will copy that into some other location. So we will have
> two services.xml. For example have a look at version service in Axis2.


I think you are asking about something like the following structure.

-- services
     -- versionService
           -- META-INF/services.xml
           -- foo/services.xml

Even in this scenario, when the RepositoryListener identifies that there is
a META-INF/services.xml file in the versionService directory and sends it to
be deployed. versionService folder is not iterated for it's sub directories
any more. Therefore foo/services.xml is simply ignored in exactly the same
way it happens in the existing code.

See the code below..

if (!(servicesDir && "lib".equalsIgnoreCase(file.getName()))) {
                        File servicesXML = new File(file,
DeploymentConstants.SERVICES_XML);
                        if (!servicesXML.exists()) {
                            servicesXML =
                                    new File(file,
DeploymentConstants.SERVICES_XML.toLowerCase());
                        }
                        if (servicesXML.exists()) {
                            addFileToDeploy(file,
deploymentEngine.getServiceDeployer(),
                                    WSInfo.TYPE_SERVICE);
                        } else {
                            findServicesInDirectory(file);
                        }
                        noServicesXML = false;
                    }

Please correct me if I'm missing something.

Thanks,
~Isuru


>
>
>
> https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/samples/version
> >
> > I think it is the way already existing code treats directory bases
> > services. It checks for the service XML and if it is not found, throws
> > and exception saying "no services XML found". Just look at the code in
> > the processServiceGroup method of the ArchiveReader class.
> Yes, it is correct since are only check the first level directories.
>



-- 
Senior Software Engineer,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Reply via email to