KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > deployment > wsdd > providers > WSDDBsfProvider


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis.deployment.wsdd.providers;
17
18 import org.apache.axis.EngineConfiguration;
19 import org.apache.axis.Handler;
20 import org.apache.axis.deployment.wsdd.WSDDConstants;
21 import org.apache.axis.deployment.wsdd.WSDDProvider;
22 import org.apache.axis.deployment.wsdd.WSDDService;
23 import org.apache.axis.encoding.SerializationContext;
24 import org.apache.axis.providers.BSFProvider;
25
26 import java.io.IOException JavaDoc;
27
28
29 /**
30  *
31  */

32 public class WSDDBsfProvider
33     extends WSDDProvider
34 {
35     public String JavaDoc getName() {
36         return WSDDConstants.PROVIDER_BSF;
37     }
38
39     public Handler newProviderInstance(WSDDService service,
40                                        EngineConfiguration registry)
41         throws Exception JavaDoc
42     {
43         Handler provider = new org.apache.axis.providers.BSFProvider();
44         
45         String JavaDoc option = service.getParameter("language");
46
47         if (!option.equals("")) {
48             provider.setOption(BSFProvider.OPTION_LANGUAGE, option);
49         }
50
51         option = service.getParameter("src");
52
53         if (!option.equals("")) {
54             provider.setOption(BSFProvider.OPTION_SRC, option);
55         }
56
57         // !!! What to do here?
58
//option = XMLUtils.getInnerXMLString(prov);
59

60         if (!option.equals("")) {
61             provider.setOption(BSFProvider.OPTION_SCRIPT, option);
62         }
63
64         return provider;
65     }
66
67     /**
68      * Write this element out to a SerializationContext
69      */

70     public void writeToContext(SerializationContext context)
71             throws IOException JavaDoc {
72     }
73 }
74
Popular Tags