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