1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.transport.soap.axis.extensions; 8 9 import javax.xml.namespace.QName; 10 11 import org.apache.axis.ConfigurationException; 12 import org.apache.axis.configuration.FileProvider; 13 import org.apache.axis.handlers.soap.SOAPService; 14 15 /** 16 * Override the File provider to stop exceptions being thrown in Axis if the service 17 * does not exist. Mule adds services after the WSDD has been loaded. 18 */ 19 public class WSDDFileProvider extends FileProvider 20 { 21 /** 22 * Constructor which accesses a file in the current directory of the engine or at 23 * an absolute path. 24 */ 25 public WSDDFileProvider(String filename) 26 { 27 super(filename); 28 } 29 30 /** 31 * Constructor which accesses a file relative to a specific base path. 32 */ 33 public WSDDFileProvider(String basepath, String filename) throws ConfigurationException 34 { 35 super(basepath, filename); 36 } 37 38 /** 39 * retrieve an instance of the named service 40 * 41 * @param qname the name of the service 42 * @return the service object or null if it doesn't exist 43 * @throws org.apache.axis.ConfigurationException 44 */ 45 public SOAPService getService(QName qname) throws ConfigurationException 46 { 47 return getDeployment().getService(qname); 48 } 49 }