View Javadoc

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.geronimo.ews.ws4j2ee.toWs.wrapperWs;
17  
18  import org.apache.commons.logging.Log;
19  import org.apache.commons.logging.LogFactory;
20  import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
21  import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
22  import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
23  import org.apache.geronimo.ews.ws4j2ee.toWs.Writer;
24  
25  /***
26   * <p>This genarated theWrapper WS required in the
27   * Axis.</p>
28   *
29   * @author Srinath Perera(hemapani@opensource.lk)
30   */
31  public class WrapperWsGenerator implements Generator {
32      private J2EEWebServiceContext j2eewscontext;
33      private Writer writer;
34      protected static Log log =
35              LogFactory.getLog(WrapperWsGenerator.class.getName());
36  
37      public WrapperWsGenerator(J2EEWebServiceContext j2eewscontext) throws GenerationFault {
38          this.j2eewscontext = j2eewscontext;
39          writer = WrapperClassGeneratorFactory.createInstance(j2eewscontext);
40      }
41  
42      public void generate() throws GenerationFault {
43          writer.write();
44      }
45  }