01: package net.sf.crispy.sample.wortschatz;
02:
03: import java.util.Properties;
04:
05: import net.sf.crispy.Property;
06: import net.sf.crispy.impl.JaxRpcExecutor;
07: import net.sf.crispy.impl.ServiceManager;
08: import net.sf.crispy.impl.jaxrpc.BeanTypeMappingFactory;
09: import net.sf.crispy.impl.jaxrpc.TypeMappingFactory;
10:
11: public class WortschatzServiceManager extends ServiceManager {
12:
13: public WortschatzServiceManager() {
14: this (new Properties());
15: }
16:
17: public WortschatzServiceManager(Properties pvProperties) {
18: Properties prop = null;
19: if (pvProperties == null) {
20: prop = new Properties();
21: } else {
22: prop = pvProperties;
23: }
24:
25: prop.put(Property.REMOTE_URL_AND_PORT, prop.getProperty(
26: Property.REMOTE_URL_AND_PORT,
27: "http://wortschatz.uni-leipzig.de/axis/services"));
28: prop.put(Property.EXECUTOR_CLASS, prop
29: .getProperty(Property.EXECUTOR_CLASS,
30: JaxRpcExecutor.class.getName()));
31: prop.put(Property.MODIFIER_CLASS, ParameterModifier.class
32: .getName());
33:
34: prop.put(Property.SECURITY_USER, prop.getProperty(
35: Property.SECURITY_USER, "anonymous"));
36: prop.put(Property.SECURITY_PASSWD, prop.getProperty(
37: Property.SECURITY_PASSWD, "anonymous"));
38:
39: prop.put(TypeMappingFactory.PROPERTY_TYPE_MAPPING_FACTORY,
40: BeanTypeMappingFactory.class.getName() + ","
41: + DataMatrix.class.getName());
42: prop.put(TypeMappingFactory.PROPERTY_TYPE_MAPPING_FACTORY_2,
43: BeanTypeMappingFactory.class.getName() + ","
44: + DataVector.class.getName());
45: prop.put(TypeMappingFactory.PROPERTY_TYPE_MAPPING_FACTORY_3,
46: BeanTypeMappingFactory.class.getName() + ","
47: + RequestParameter.class.getName());
48: prop.put(TypeMappingFactory.PROPERTY_TYPE_MAPPING_FACTORY
49: + "_4", BeanTypeMappingFactory.class.getName() + ","
50: + ResponseParameter.class.getName());
51:
52: init(prop);
53: }
54:
55: }
|