01: /**
02: * Copyright 2003 Sun Microsystems, Inc. All
03: * rights reserved. Use of this product is subject
04: * to license terms. Federal Acquisitions:
05: * Commercial Software -- Government Users
06: * Subject to Standard License Terms and
07: * Conditions.
08: *
09: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
10: * are trademarks or registered trademarks of Sun Microsystems,
11: * Inc. in the United States and other countries.
12: */package com.sun.portal.providers.simplewebservice.rpc;
13:
14: import javax.xml.rpc.Service;
15:
16: /**
17: *
18: * User: Ravikiran
19: * Date: Oct 12, 2003
20: * Time: 4:54:37 PM
21: */
22: public class TypeHandlerFactory {
23:
24: private TypeHandlerFactory() {
25: };
26:
27: public static SimpleTypeHandler getSimpleTypeHandler(
28: Service service, String encoding) {
29: if (encoding.equals(DocumentLiteralEncoding)) {
30: return new DocLiteralSimpleTypeHandler(service, encoding);
31: } else {
32: return new RPCSimpleTypeHandler(service, encoding);
33: }
34: }
35:
36: public static ComplexTypeHandler getComplexTypeHandler(
37: Service service, String encoding) {
38: if (encoding.equals(DocumentLiteralEncoding)) {
39: return new DocLiteralComplexTypeHandler(service, encoding);
40: } else {
41:
42: return new RPCComplexTypeHandler(service, encoding);
43: }
44: }
45:
46: private static final String DocumentLiteralEncoding = "";
47: }
|