You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2005/12/29 12:07:29 UTC
svn commit: r359773 - in /webservices/axis2/trunk/c: include/
modules/core/deployment/ modules/platforms/unix/ modules/util/
Author: damitha
Date: Thu Dec 29 03:07:11 2005
New Revision: 359773
URL: http://svn.apache.org/viewcvs?rev=359773&view=rev
Log:
Added a file hander header file and implementation for it.
Moved axis2_dir_handler.h from c/modules/util to include
Added:
webservices/axis2/trunk/c/include/axis2_dir_handler.h
- copied, changed from r359729, webservices/axis2/trunk/c/modules/util/axis2_dir_handler.h
webservices/axis2/trunk/c/include/axis2_file_handler.h
webservices/axis2/trunk/c/modules/util/file_handler.c
Removed:
webservices/axis2/trunk/c/modules/util/axis2_dir_handler.h
Modified:
webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h
webservices/axis2/trunk/c/modules/util/Makefile.am
webservices/axis2/trunk/c/modules/util/dir_handler.c
Copied: webservices/axis2/trunk/c/include/axis2_dir_handler.h (from r359729, webservices/axis2/trunk/c/modules/util/axis2_dir_handler.h)
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_dir_handler.h?p2=webservices/axis2/trunk/c/include/axis2_dir_handler.h&p1=webservices/axis2/trunk/c/modules/util/axis2_dir_handler.h&r1=359729&r2=359773&rev=359773&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/axis2_dir_handler.h (original)
+++ webservices/axis2/trunk/c/include/axis2_dir_handler.h Thu Dec 29 03:07:11 2005
@@ -51,7 +51,7 @@
typedef struct axis2_arch_file
{
axis2_char_t *name;
- time_t time_stamp;
+ AXIS2_TIME_T time_stamp;
} axis2_arch_file_t;
Added: webservices/axis2/trunk/c/include/axis2_file_handler.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_file_handler.h?rev=359773&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_file_handler.h (added)
+++ webservices/axis2/trunk/c/include/axis2_file_handler.h Thu Dec 29 03:07:11 2005
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain count copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_FILE_HANDLER_H
+#define AXIS2_FILE_HANDLER_H
+
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_string.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+/**
+ * @defgroup axis2_file_handler File Handler
+ * @ingroup axis2_util
+ * @{
+ */
+
+/**
+ * open a file for read according to the file options given
+ * @param file_name file to be opened
+ * @param options file options given.
+ * @return status code
+ */
+AXIS2_DECLARE(void *)
+axis2_file_handler_open(const char *file_name,
+ const char *options,
+ axis2_env_t **env);
+
+/**
+ * close a file
+ * @param file_ptr file pointer of the file need to be closed
+ * @return status code
+ */
+AXIS2_DECLARE(axis2_status_t)
+axis2_file_handler_close (void *file_ptr);
+
+/**
+ * determine accessibility of file
+ * checks the named file for accessibility according to mode
+ * @param path path name naming a file
+ * @param mode
+ * AXIS2_R_OK
+ * - test for read permission
+ * AXIS2_W_OK
+ * - test for write permission
+ * AXIS2_X_OK
+ * - test for execute or search permission
+ * AXIS2_F_OK
+ * - test whether the directories leading to the file can be searched and the
+ * file exists
+ * @return returns: 0 on success, -1 on failure
+ */
+AXIS2_DECLARE(int)
+axis2_file_handler_access(axis2_char_t *path,
+ int mode);
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_FILE_HANDLER_H */
Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=359773&r1=359772&r2=359773&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Thu Dec 29 03:07:11 2005
@@ -96,3 +96,342 @@
return AXIS2_SUCCESS;
}
+
+/**
+ * To create a ServiceDescrption <code>AxisService</code> using given wsdl.
+ * If the service.wsdl is there in the arcive file AxisService will be creted
+ * using that, else default AxisService will be created
+ * @param file
+ * @return
+ */
+struct axis2_svc *AXIS2_CALL
+axis2_arch_reader_create_svc(axis2_arch_reader_t *arch_reader,
+ axis2_env_t **env,
+ struct axis2_arch_file_data *file)
+{
+ struct axis2_svc *svc = NULL;
+ axis2_bool_t found_svc = AXIS2_FALSE;
+
+ /* TODO comment this until WOM implementation is done */
+ /*InputStream in = file.getClassLoader().getResourceAsStream(
+ AXIS2_SVC_WSDL_WITH_FOLDER);
+ if (in != null)
+ {
+ WOMBuilder builder = WOMBuilderFactory.getBuilder(WSDLConstants.WSDL_1_1);
+ WSDLVersionWrapper wsdlVersionWrapper = builder.build(in,
+ new AxisDescWSDLComponentFactory());
+ WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
+ Iterator iterator = womDescription.getServices().keySet()
+ .iterator();
+ if (iterator.hasNext()) {
+ foundservice = true;
+ // remove <wsdl:service> and <wsdl:binding> elements from the service
+ // description we read in as we will be replacing them anyway.
+
+ WSDLServiceImpl serviceimpl = (WSDLServiceImpl) womDescription.
+ getServices().get(iterator.next());
+ service = new AxisService(serviceimpl);
+ }
+ if (!foundservice) {
+ service = new AxisService();
+ }
+ service.setWSDLDefinition(wsdlVersionWrapper.getDefinition());
+ in.close();
+ } else {
+ */
+ svc = axis2_svc_create(env);
+ /*TODO log */
+ /*log.info(Messages.getMessage(DeploymentErrorMsgs.WSDL_FILE_NOT_FOUND,
+ file.getName()));
+ */
+
+ return svc;
+}
+
+/* TODO comment this until WOM implementation is done */
+/*
+private void processWSDLFile(InputStream in , DeploymentEngine depengine)
+{
+ try {
+ WOMBuilder builder = WOMBuilderFactory.getBuilder(WSDLConstants.WSDL_1_1);
+ WSDLVersionWrapper wsdlVersionWrapper = builder.build(in,
+ new AxisDescWSDLComponentFactory());
+ WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
+
+ //removing binding
+ Map bindings = wsdlVersionWrapper.getDefinition().getBindings();
+ Iterator binfingIterator = bindings.keySet().iterator();
+ while (binfingIterator.hasNext()) {
+ Object o = binfingIterator.next();
+ bindings.remove(o) ;
+
+ }
+
+ Iterator iterator = womDescription.getServices().keySet()
+ .iterator();
+ if (iterator.hasNext()) {
+ // remove <wsdl:service> and <wsdl:binding> elements from the service
+ // description we read in as we will be replacing them anyway.
+ WSDLServiceImpl serviceimpl = (WSDLServiceImpl)
+ womDescription.getServices().get(iterator.next());
+ AxisService service = new AxisService(serviceimpl);
+ service.setName(serviceimpl.getName());
+ service.setWSDLDefinition(wsdlVersionWrapper.getDefinition());
+ depengine.getCurrentFileItem().addService(service);
+ }
+ } catch (WSDLException e) {
+ throw new DeploymentException(e);
+ }
+}
+*/
+
+/**
+ * To create service objects out form wsdls file inside a service archive file
+ * @param file <code>ArchiveFileData</code>
+ * @param depengine <code>DeploymentEngine</code>
+ * @throws DeploymentException <code>DeploymentException</code>
+ */
+ /* TODO comment this until WOM implementation is done */
+/*
+public void processWSDLs(ArchiveFileData file , DeploymentEngine depengine) throws DeploymentException {
+ File serviceFile = file.getFile();
+ boolean isDirectory = serviceFile.isDirectory();
+ if(isDirectory){
+ try {
+ File meta_inf = new File(serviceFile,META_INF);
+ if(meta_inf.exists()){
+ File files [] = meta_inf.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ File file1 = files[i];
+ String fileName = file1.getName();
+ if(fileName.endsWith(".wsdl") || fileName.endsWith(".WSDL")){
+ InputStream in = new FileInputStream(file1);
+ processWSDLFile(in,depengine);
+ try {
+ in.close();
+ } catch (IOException e) {
+ log.info(e);
+ }
+ }
+ }
+ } else {
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_SERVICE));
+ }
+ } catch (FileNotFoundException e) {
+ throw new DeploymentException(e);
+ } catch (IOException e) {
+ throw new DeploymentException(e);
+ }
+ } else {
+
+ ZipInputStream zin;
+ try {
+ zin = new ZipInputStream(new FileInputStream(serviceFile));
+ ZipEntry entry;
+ byte[] buf = new byte[1024];
+ int read;
+ ByteArrayOutputStream out ;
+ while ((entry = zin.getNextEntry()) != null) {
+ String entryName = entry.getName();
+ if ((entryName.startsWith(META_INF) ||
+ entryName.startsWith(META_INF.toLowerCase()))
+ && (entryName.endsWith(".wsdl")
+ || entryName.endsWith(".WSDL"))) {
+ out = new ByteArrayOutputStream();
+ while ((read = zin.read(buf)) > 0) {
+ out.write(buf, 0, read);
+ }
+ ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+ processWSDLFile(in,depengine);
+ }
+ }
+ try {
+ zin.close();
+ } catch (IOException e) {
+ log.info(e);
+ }
+ } catch (FileNotFoundException e) {
+ throw new DeploymentException(e);
+ } catch (IOException e) {
+ throw new DeploymentException(e);
+ }
+ }
+
+}
+*/
+/**
+ * it take two arguments filename and refereance to DeployEngine
+ *
+ * @param filename
+ * @param engine
+ */
+axis2_status_t AXIS2_CALL
+axis2_arch_reader_process_svc_grp(axis2_arch_reader_t *arch_reader,
+ axis2_env_t **env,
+ axis2_char_t *file_path
+ struct axis2_dep_engine *engine,
+ struct axis2_svc_grp *svc_grp)
+{
+ axis2_char_t *file_name = NULL;
+ int len = 0;
+ file_name = AXIS2_STRACAT(file_path, AXIS2_SVC_XML, env);
+ if(NULL != file_name)
+ {
+ InputStream in ;
+ in = new FileInputStream(file);
+ buildServiceGroup(in,engine,axisServiceGroup);
+ axisServiceGroup.setServiceGroupName(engine.getCurrentFileItem().getName());
+
+ }
+ } else
+ {
+ AXIS2_ERROR_SET((*env)->error,
+ throw new DeploymentException(
+ Messages.getMessage(DeploymentErrorMsgs.SERVICE_XML_NOT_FOUND));
+ }
+}
+
+private void buildServiceGroup(InputStream zin, DeploymentEngine engine,
+ AxisServiceGroup axisServiceGroup)
+ throws XMLStreamException, DeploymentException {
+ DescriptionBuilder builder;
+ String rootelementName;
+ builder = new DescriptionBuilder(zin, engine);
+ OMElement services = builder.buildOM();
+ rootelementName = services.getLocalName();
+ if(SERVICE_ELEMENT.equals(rootelementName)){
+ AxisService axisService = engine.getCurrentFileItem().
+ getService(DescriptionBuilder.getShortFileName(
+ engine.getCurrentFileItem().getName()));
+ if(axisService == null){
+ axisService = new AxisService(
+ new QName(DescriptionBuilder.getShortFileName(
+ engine.getCurrentFileItem().getName())));
+ engine.getCurrentFileItem().addService(axisService);
+ }
+ axisService.setParent(axisServiceGroup);
+ axisService.setClassLoader(engine.getCurrentFileItem().getClassLoader());
+ ServiceBuilder serviceBuilder = new ServiceBuilder(engine,axisService);
+ serviceBuilder.populateService(services);
+ engine.getCurrentFileItem().getDeploybleServices().add(axisService);
+ } else if(SERVICE_GROUP_ELEMENT.equals(rootelementName)){
+ ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(services,engine);
+ groupBuilder.populateServiceGroup(axisServiceGroup);
+ }
+}
+
+public void readModuleArchive(String filename,
+ DeploymentEngine engine,
+ ModuleDescription module , boolean explodedDir)
+ throws DeploymentException {
+ // get attribute values
+ boolean foundmoduleXML = false;
+ if (!explodedDir) {
+ ZipInputStream zin;
+ try {
+ zin = new ZipInputStream(new FileInputStream(filename));
+ ZipEntry entry;
+ while ((entry = zin.getNextEntry()) != null) {
+ if (entry.getName().equals(MODULEXML)) {
+ foundmoduleXML = true;
+ ModuleBuilder builder = new ModuleBuilder(zin, engine, module);
+ builder.populateModule();
+ break;
+ }
+ }
+ zin.close();
+ if (!foundmoduleXML) {
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.MODULEXML_NOT_FOUND_FOR_THE_MODULE, filename));
+ }
+ } catch (Exception e) {
+ throw new DeploymentException(e);
+ }
+ } else {
+ File file = new File(filename, MODULEXML);
+ if (file.exists()) {
+ InputStream in;
+ try {
+ in = new FileInputStream(file);
+ ModuleBuilder builder = new ModuleBuilder(in, engine, module);
+ builder.populateModule();
+ } catch (FileNotFoundException e) {
+ throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FNF_WITH_E
+ ,e.getMessage()));
+ }
+ } else {
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.MODULEXML_NOT_FOUND_FOR_THE_MODULE, filename));
+ }
+
+ }
+}
+
+
+/**
+ * This method first check whether the given module is there in the user home dirctory if so return
+ * that , else try to read the given module form classpath (from resources ) if found first get the module.mar
+ * file from the resourceStream and write that into user home/axis2home/nodule directory
+ *
+ * @param moduleName
+ * @return
+ * @throws DeploymentException
+ */
+public File creatModuleArchivefromResource(String moduleName,
+ String axis2repository) throws DeploymentException {
+ File modulearchiveFile;
+ File modules;
+ try {
+ int BUFFER = 2048;
+ if (axis2repository == null) {
+ String userHome = System.getProperty("user.home");
+ File userHomedir = new File(userHome);
+ File repository = new File(userHomedir, ".axis2home");
+ modules = new File(repository, "modules");
+ } else {
+ modules = new File(axis2repository, "modules");
+ }
+ String modulearchiveName = moduleName + ".mar";
+ modulearchiveFile = new File(modules, modulearchiveName);
+ if (modulearchiveFile.exists()) {
+ return modulearchiveFile;
+ }
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ InputStream in = cl.getResourceAsStream("modules/" + moduleName + ".mar");
+ if (in == null) {
+ in = cl.getResourceAsStream("modules/" + moduleName + ".jar");
+ }
+ if (in == null) {
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.MODULEXML_NOT_FOUND_FOR_THE_MODULE, moduleName));
+ } else {
+ if(!modules.exists()) {
+ modules.mkdirs();
+ }
+ modulearchiveFile.createNewFile();
+ FileOutputStream dest = new
+ FileOutputStream(modulearchiveFile);
+ ZipOutputStream out = new ZipOutputStream(new
+ BufferedOutputStream(dest));
+ byte data[] = new byte[BUFFER];
+ ZipInputStream zin;
+ zin = new ZipInputStream(in);
+ ZipEntry entry;
+ while ((entry = zin.getNextEntry()) != null) {
+ ZipEntry zip = new ZipEntry(entry);
+ out.putNextEntry(zip);
+ int count;
+ while ((count = zin.read(data, 0, BUFFER)) != -1) {
+ out.write(data, 0, count);
+ }
+ }
+ out.close();
+ zin.close();
+ }
+
+ } catch (Exception e) {
+ throw new DeploymentException(e);
+ }
+ return modulearchiveFile;
+}
Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=359773&r1=359772&r2=359773&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Thu Dec 29 03:07:11 2005
@@ -117,6 +117,14 @@
return NULL;
}
+ desc_builder_impl->file_name = AXIS2_STRDUP(file_name, env);
+ if(!desc_builder_impl->file_name)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ desc_builder_impl->engine = engine;
+
desc_builder_impl->desc_builder.ops = NULL;
desc_builder_impl->desc_builder.ops =
@@ -156,17 +164,24 @@
axis2_desc_builder_free (axis2_desc_builder_t *desc_builder,
axis2_env_t **env)
{
- axis2_desc_builder_impl_t *feature_impl = NULL;
+ axis2_desc_builder_impl_t *desc_builder_impl = NULL;
AXIS2_FUNC_PARAM_CHECK(desc_builder, env, AXIS2_FAILURE);
- feature_impl = AXIS2_INTF_TO_IMPL(desc_builder);
+ desc_builder_impl = AXIS2_INTF_TO_IMPL(desc_builder);
+
+ if(!desc_builder_impl->file_name)
+ {
+ AXIS2_FREE((*env)->allocator, desc_builder_impl->file_name);
+ desc_builder_impl->file_name = NULL;
+ }
+ desc_builder_impl->engine = NULL;
if(NULL != desc_builder->ops)
AXIS2_FREE((*env)->allocator, desc_builder->ops);
- AXIS2_FREE((*env)->allocator, feature_impl);
- feature_impl = NULL;
+ AXIS2_FREE((*env)->allocator, desc_builder_impl);
+ desc_builder_impl = NULL;
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h?rev=359773&r1=359772&r2=359773&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h Thu Dec 29 03:07:11 2005
@@ -153,6 +153,20 @@
*/
#define AXIS2_PATH_SEP_CHAR "/"
+/**
+ * Platform specific time
+ */
+#define AXIS2_TIME_T time_t
+
+/**
+ * Platform specific file handling
+ */
+#define AXIS2_R_OK R_OK /* test for read permission */
+#define AXIS2_W_OK W_OK /* test for write permission */
+#define AXIS2_X_OK X_OK /* test for execute or search permission */
+#define AXIS2_F_OK F_OK /* test whether the directories leading to the file can be
+ searched and the file exists */
+
/** @} */
#ifdef __cplusplus
}
Modified: webservices/axis2/trunk/c/modules/util/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/Makefile.am?rev=359773&r1=359772&r2=359773&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/util/Makefile.am Thu Dec 29 03:07:11 2005
@@ -13,6 +13,7 @@
linked_list.c \
utils.c \
dir_handler.c \
+ file_handler.c \
class_loader.c
libaxis2_util_la_LIBADD =
Modified: webservices/axis2/trunk/c/modules/util/dir_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/dir_handler.c?rev=359773&r1=359772&r2=359773&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/dir_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/dir_handler.c Thu Dec 29 03:07:11 2005
@@ -22,14 +22,6 @@
axis2_dir_handler_list_dir(axis2_env_t **env,
axis2_char_t *pathname);
-/*int main(void)
-{
- char *pathname = NULL;
- pathname = strdup("/home/damitha/projects/c/install/lib");
- list_dir(pathname);
-}
-*/
-
/**
* List the .zip or tar.gz files in the given path
* @param pathname path to the directory where your modules or services are
Added: webservices/axis2/trunk/c/modules/util/file_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/file_handler.c?rev=359773&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/util/file_handler.c (added)
+++ webservices/axis2/trunk/c/modules/util/file_handler.c Thu Dec 29 03:07:11 2005
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <axis2_file_handler.h>
+
+void* AXIS2_CALL
+axis2_file_handler_open(const axis2_char_t *file_name,
+ const axis2_char_t *options,
+ axis2_env_t **env)
+{
+ FILE *file_ptr;
+ axis2_char_t *f_opt;
+ axis2_char_t *f_name = (axis2_char_t*) AXIS2_STRDUP(file_name, env);
+ if(!f_name) return NULL;
+ f_opt = (axis2_char_t*) AXIS2_STRDUP(options, env);
+ if(!f_opt) return NULL;
+
+ file_ptr = fopen (f_name, f_opt);
+ return file_ptr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_file_handler_close(void *file_ptr)
+{
+ if(!file_ptr) return -1;
+ return (axis2_status_t) fclose(file_ptr);
+}
+
+int AXIS2_CALL
+axis2_file_handler_access(axis2_char_t *path,
+ int mode)
+{
+ return access(path, mode);
+}