KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > providers > soap > axis > extensions > WSDDJavaMuleProvider


1 /*
2  * $Id: WSDDJavaMuleProvider.java 3798 2006-11-04 04:07:14Z aperepel $
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 MuleSource MPL
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.apache.axis.EngineConfiguration;
14 import org.apache.axis.deployment.wsdd.WSDDConstants;
15 import org.apache.axis.deployment.wsdd.WSDDProvider;
16 import org.apache.axis.deployment.wsdd.WSDDService;
17 import org.mule.providers.soap.axis.AxisConnector;
18
19 /**
20  * <code>WSDDJavaMuleProvider</code> is a factory class for creating the
21  * MuleProvider
22  *
23  * @see MuleRPCProvider
24  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
25  * @version $Revision: 3798 $
26  */

27 public class WSDDJavaMuleProvider extends WSDDProvider
28 {
29     private AxisConnector connector;
30
31     public WSDDJavaMuleProvider(AxisConnector connector)
32     {
33         this.connector = connector;
34     }
35
36     /**
37      * Factory method for creating an <code>MuleRPCProvider</code>.
38      *
39      * @param wsddService a <code>WSDDService</code> value
40      * @param engineConfiguration an <code>EngineConfiguration</code> value
41      * @return a <code>Handler</code> value
42      * @exception Exception if an error occurs
43      */

44     public org.apache.axis.Handler newProviderInstance(WSDDService wsddService,
45                                                        EngineConfiguration engineConfiguration)
46         throws Exception JavaDoc
47     {
48         String JavaDoc serviceStyle = wsddService.getStyle().toString();
49         if (serviceStyle.equals("message"))
50         {
51             return new MuleMsgProvider(connector);
52         }
53         return new MuleRPCProvider(connector);
54     }
55
56     /**
57      * @return String
58      * @see org.apache.axis.deployment.wsdd.WSDDProvider#getName()
59      */

60     public String JavaDoc getName()
61     {
62         return WSDDConstants.PROVIDER_RPC;
63     }
64 }
65
Popular Tags