KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > soap > jaxrpc > ServiceImpl


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Scott Ferguson
27  */

28
29 package com.caucho.soap.jaxrpc;
30
31 import com.caucho.log.Log;
32 import com.caucho.soap.wsdl.WSDLPort;
33 import com.caucho.soap.wsdl.WSDLService;
34 import com.caucho.util.L10N;
35
36 import javax.xml.namespace.QName JavaDoc;
37 import javax.xml.rpc.Call JavaDoc;
38 import javax.xml.rpc.Service JavaDoc;
39 import javax.xml.rpc.ServiceException JavaDoc;
40 import javax.xml.rpc.encoding.TypeMappingRegistry JavaDoc;
41 import javax.xml.rpc.handler.HandlerRegistry JavaDoc;
42 import java.net.URL JavaDoc;
43 import java.util.Iterator JavaDoc;
44 import java.util.logging.Logger JavaDoc;
45
46 /**
47  * Service
48  */

49 public class ServiceImpl implements Service {
50   private final static Logger JavaDoc log = Log.open(ServiceImpl.class);
51   private final static L10N L = new L10N(ServiceImpl.class);
52
53   private final QName JavaDoc _serviceName;
54   private WSDLService _service;
55
56   ServiceImpl(QName JavaDoc serviceName)
57   {
58     _serviceName = serviceName;
59   }
60
61   ServiceImpl(WSDLService service)
62   {
63     _serviceName = null;//service.getName();
64
_service = service;
65   }
66   
67   /**
68    * Creates a call.
69    */

70   public Call JavaDoc createCall()
71   {
72     throw new UnsupportedOperationException JavaDoc();
73   }
74   
75   /**
76    * Creates a call.
77    */

78   public Call JavaDoc createCall(QName JavaDoc portName)
79   {
80     throw new UnsupportedOperationException JavaDoc();
81   }
82   
83   /**
84    * Creates a call.
85    */

86   public Call JavaDoc createCall(QName JavaDoc portName, QName JavaDoc opName)
87     throws ServiceException JavaDoc
88   {
89     /*
90     WSDLPort port = getPort(portName);
91     WSDLOperation op = port.getOperation(opName);
92
93     if (op == null)
94       throw new ServiceException(L.l("{0} is an unknown operation in {1}",
95                                      portName, opName));
96
97     return new CallImpl(port, op);
98     */

99     throw new UnsupportedOperationException JavaDoc();
100   }
101   
102   /**
103    * Creates a call.
104    */

105   public Call JavaDoc createCall(QName JavaDoc portName, String JavaDoc operationName)
106   {
107     throw new UnsupportedOperationException JavaDoc();
108   }
109   
110   /**
111    * Creates a call.
112    */

113   public Call JavaDoc []getCalls(QName JavaDoc portName)
114   {
115     throw new UnsupportedOperationException JavaDoc();
116   }
117
118   /**
119    * Creates a call.
120    */

121   public HandlerRegistry JavaDoc getHandlerRegistry()
122   {
123     throw new UnsupportedOperationException JavaDoc();
124   }
125
126   /**
127    * Creates a port.
128    */

129   public java.rmi.Remote JavaDoc getPort(Class JavaDoc serviceEndpointInterface)
130   {
131     throw new UnsupportedOperationException JavaDoc();
132   }
133
134   /**
135    * Creates a port.
136    */

137   public java.rmi.Remote JavaDoc getPort(QName JavaDoc portName,
138                                  Class JavaDoc serviceEndpointInterface)
139   {
140     throw new UnsupportedOperationException JavaDoc();
141   }
142
143   /**
144    * Returns the list of ports.
145    */

146   public Iterator JavaDoc getPorts()
147   {
148     throw new UnsupportedOperationException JavaDoc();
149     //return _service.getPortNames();
150
}
151
152   /**
153    * Returns the name of the service.
154    */

155   public QName JavaDoc getServiceName()
156   {
157     return _serviceName;
158   }
159
160   /**
161    * Returns the type mapping registry.
162    */

163   public TypeMappingRegistry JavaDoc getTypeMappingRegistry()
164   {
165     throw new UnsupportedOperationException JavaDoc();
166   }
167
168   /**
169    * Returns the location of the WSDL
170    */

171   public URL JavaDoc getWSDLDocumentLocation()
172   {
173     throw new UnsupportedOperationException JavaDoc();
174   }
175
176   /**
177    * Returns the port.
178    */

179   private WSDLPort getPort(QName JavaDoc portName)
180     throws ServiceException JavaDoc
181   {
182     throw new UnsupportedOperationException JavaDoc();
183     /*
184     WSDLPort port = _service.getPort(portName);
185
186     if (port == null)
187       throw new ServiceException(L.l("'{0}' is an unknown port in service '{1}'",
188                                      portName, getServiceName()));
189
190     return port;*/

191   }
192
193   /**
194    * Returns the id.
195    */

196   public String JavaDoc toString()
197   {
198     return "ServiceImpl[" + getServiceName() + "]";
199   }
200 }
201
202
203
Popular Tags