1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.geronimo.ews.ws4j2ee.context.webservices.client;
17
18 import org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferanceContext;
19 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFHandler;
20
21 import javax.xml.namespace.QName;
22 import java.util.Vector;
23
24 /***
25 * @author Srinath Perera(hemapani@opensource.lk)
26 * @see org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferance;
27 */
28 public class ServiceReferanceImpl implements ServiceReferanceContext {
29 /***
30 * Service Reference Name. This defines a logical name for the
31 * reference that is used in the client source code. It is recommended,
32 * but not required that the name begin with service/*.
33 */
34 private String servicerefName;
35 /***
36 * Service type: The service-interface element defines the
37 * fully qualified name of the JAXRPC Service Interface class
38 * returned by the JNDI lookup.
39 */
40 private String serviceInterface;
41 /***
42 * WSDL definition (optional). The wsdl-file element specifies a
43 * location of the WSDL description of the service. The location
44 * is relative to the root of the module. The WSDL description may
45 * be a partial WSDL, but must at least include the portType and
46 * binding elements. The WSDL description provided by the developer
47 * is considered a template that must be preserved by the
48 * assembly/deployment process. In other words, the WSDL description contains
49 * a declaration of the application?s dependency on portTypes, bindings, and QNames.
50 * The WSDL document must be fully specified, including the service and port elements,
51 * if the application is dependent on port QNames
52 * (e.g. uses the Service.getPort(QName,Class) method). The developer must
53 * specify the wsdl-file if any of the Service methods declared
54 * in section 4.2.2.4 or 4.2.2.5 are used
55 */
56 private String wsdlFile;
57
58 private String sei;
59 /***
60 * Service Port. If the specified wsdl-file has more than
61 * one service element, the developer must specify the service-qname.
62 */
63 private QName servcieQName;
64 /***
65 * Ports. The developer declares requirements for container
66 * managed port resolution using the portcomponent-ref element.
67 * The port-component-ref elements are resolved to a WSDLport by
68 * the container. See Chapter 4 for a discussion of container
69 * managed port access.
70 */
71 private String portComponetlink;
72 /***
73 * JAX-RPC Mapping. The developer specifies the correlation
74 * of the WSDL definition to the interfaces using the jaxrpc-mapping-file element.
75 * The location is relative to the root of the module. The same mapping file must
76 * be used for all interfaces associated with a wsdl-file. The developer must
77 * specify the jaxrpc-mapping-file if the wsdl-file is specified.
78 */
79 private String jaxrpcmappingFile;
80 /***
81 * Handlers. A developer may optionally specify handlers associated with the
82 * service-ref using the handler element.
83 */
84 private Vector handlers = new Vector();
85
86 /***
87 * @return
88 */
89 public String getJaxrpcmappingFile() {
90 return jaxrpcmappingFile;
91 }
92
93 /***
94 * @return
95 */
96 public QName getServcieQName() {
97 return servcieQName;
98 }
99
100 /***
101 * @return
102 */
103 public String getServiceInterface() {
104 return serviceInterface;
105 }
106
107 /***
108 * @return
109 */
110 public String getServicerefName() {
111 return servicerefName;
112 }
113
114 /***
115 * @return
116 */
117 public String getWsdlFile() {
118 return wsdlFile;
119 }
120
121 /***
122 * @param string
123 */
124 public void setJaxrpcmappingFile(String string) {
125 jaxrpcmappingFile = string;
126 }
127
128 /***
129 * @param name
130 */
131 public void setServcieQName(QName name) {
132 servcieQName = name;
133 }
134
135 /***
136 * @param string
137 */
138 public void setServiceInterface(String string) {
139 serviceInterface = string;
140 }
141
142 /***
143 * @param string
144 */
145 public void setServicerefName(String string) {
146 servicerefName = string;
147 }
148
149 /***
150 * @param string
151 */
152 public void setWsdlFile(String string) {
153 wsdlFile = string;
154 }
155
156
157
158
159 public void addHandler(WSCFHandler handler) {
160 this.handlers.add(handler);
161 }
162
163
164
165
166 public WSCFHandler[] getHandlers() {
167 WSCFHandler[] wscfhandlers = new WSCFHandler[handlers.size()];
168 for (int i = 0; i < wscfhandlers.length; i++) {
169 wscfhandlers[i] = (WSCFHandler) handlers.get(i);
170 }
171 return wscfhandlers;
172 }
173
174 }