Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
WSDDJavaMuleProvider |
|
| 1.6666666666666667;1.667 |
1 | /* | |
2 | * $Id: WSDDJavaMuleProvider.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 org.mule.providers.soap.axis.AxisConnector; | |
14 | ||
15 | import org.apache.axis.EngineConfiguration; | |
16 | import org.apache.axis.deployment.wsdd.WSDDConstants; | |
17 | import org.apache.axis.deployment.wsdd.WSDDProvider; | |
18 | import org.apache.axis.deployment.wsdd.WSDDService; | |
19 | ||
20 | /** | |
21 | * <code>WSDDJavaMuleProvider</code> is a factory class for creating the | |
22 | * MuleProvider. | |
23 | * | |
24 | * @see MuleRPCProvider | |
25 | */ | |
26 | public class WSDDJavaMuleProvider extends WSDDProvider | |
27 | { | |
28 | private AxisConnector connector; | |
29 | ||
30 | public WSDDJavaMuleProvider(AxisConnector connector) | |
31 | 50 | { |
32 | 50 | this.connector = connector; |
33 | 50 | } |
34 | ||
35 | /** | |
36 | * Factory method for creating an <code>MuleRPCProvider</code>. | |
37 | * | |
38 | * @param wsddService a <code>WSDDService</code> value | |
39 | * @param engineConfiguration an <code>EngineConfiguration</code> value | |
40 | * @return a <code>Handler</code> value | |
41 | * @exception Exception if an error occurs | |
42 | */ | |
43 | public org.apache.axis.Handler newProviderInstance(WSDDService wsddService, | |
44 | EngineConfiguration engineConfiguration) | |
45 | throws Exception | |
46 | { | |
47 | 0 | String serviceStyle = wsddService.getStyle().toString(); |
48 | 0 | if (serviceStyle.equals("message")) |
49 | { | |
50 | 0 | return new MuleMsgProvider(connector); |
51 | } | |
52 | 0 | return new MuleRPCProvider(connector); |
53 | } | |
54 | ||
55 | /** | |
56 | * @return String | |
57 | * @see org.apache.axis.deployment.wsdd.WSDDProvider#getName() | |
58 | */ | |
59 | public String getName() | |
60 | { | |
61 | 0 | return WSDDConstants.PROVIDER_RPC; |
62 | } | |
63 | } |