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  
17  package org.apache.geronimo.ews.ws4j2ee.context;
18  
19  import org.apache.axis.wsdl.symbolTable.BindingEntry;
20  import org.apache.axis.wsdl.symbolTable.PortTypeEntry;
21  import org.apache.axis.wsdl.symbolTable.ServiceEntry;
22  import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
23  
24  import javax.wsdl.Operation;
25  import javax.wsdl.Port;
26  import javax.xml.namespace.QName;
27  import java.io.InputStream;
28  import java.io.Writer;
29  
30  /***
31   * <p>This is the interface which is shared by the application as the
32   * jaxrpcmapper</p>
33   *
34   * @author Srinath Perera(hemapani@opensource.lk)
35   */
36  public interface JaxRpcMapperContext {
37      /***
38       * how the excpetion type map to the java class
39       *
40       * @param messageQName
41       * @return
42       */
43      public abstract String getExceptionType(QName messageQName);
44  
45      /***
46       * how the wsdl operation name map to the java method name
47       *
48       * @param bEntry
49       * @param operation
50       * @return
51       */
52      public abstract String getJavaMethodName(BindingEntry bEntry,
53                                               Operation operation);
54  
55      /***
56       * how the parameters in the wsdl opration map to the java method parameters.
57       *
58       * @param bEntry
59       * @param operation
60       * @param position
61       * @return
62       */
63      public abstract String getJavaMethodParamType(BindingEntry bEntry,
64                                                    Operation operation,
65                                                    int position, QName type);
66  
67      /***
68       * how the return type in the wsdl opration map to the java method return type.
69       *
70       * @param bEntry
71       * @param operation
72       * @return
73       */
74      public abstract String getJavaMethodReturnType(BindingEntry bEntry,
75                                                     Operation operation);
76  
77      /***
78       * QName to java type mapping
79       *
80       * @param typeQName
81       * @return
82       */
83      public abstract String getJavaType(QName typeQName);
84  
85      public int getPackageMappingCount();
86  
87      public String getPackageMappingClassName(int index);
88  
89      public String getPackageMappingURI(int index);
90  
91      /***
92       * get the name of the port used in this webservice
93       *
94       * @param port
95       * @return
96       */
97      public abstract String getPortName(Port port);
98  
99      /***
100      * how port type maps to the java class
101      *
102      * @param ptEntry
103      * @param bEntry
104      * @return
105      */
106     public abstract String getServiceEndpointInterfaceName(PortTypeEntry ptEntry,
107                                                            BindingEntry bEntry);
108 
109     /***
110      * @param entry
111      * @return
112      */
113     public abstract String getServiceInterfaceName(ServiceEntry entry);
114 
115     /***
116      * @param path
117      */
118     public abstract void loadMappingFromDir(String path) throws GenerationFault;
119 
120     /***
121      * @param is
122      */
123     public abstract void loadMappingFromInputStream(InputStream is) throws GenerationFault;
124 
125     public void serialize(Writer out) throws GenerationFault;
126 }