01: /* SharkWebServiceImpl.java */
02:
03: package org.enhydra.shark.wfxml;
04:
05: import org.enhydra.shark.admin.repositorymanagement.RepositoryManager;
06: import org.enhydra.shark.api.RootError;
07: import org.enhydra.shark.api.admin.RepositoryMgr;
08: import org.enhydra.shark.client.utilities.SharkInterfaceWrapper;
09:
10: /**
11: * @author V.Puskas, S.Bojanic
12: * @version 0.2
13: */
14: public class SharkServiceImpl extends
15: org.enhydra.shark.asap.SharkServiceImpl {
16:
17: public static final String QSPN_ACTIVITY_INSTANCE = "actInst=";
18:
19: public static void main(String[] argv) {
20: try {
21: SharkInterfaceWrapper.setProperties(argv[0], true);
22: SharkInterfaceWrapper.setProperty(
23: "ASAP.FactoryBindingWSDDServiceName",
24: new SharkWebServiceLocator()
25: .getwfxmlFactoryBindingWSDDServiceName());
26: SharkInterfaceWrapper.setProperty(
27: "ASAP.InstanceBindingWSDDServiceName",
28: new SharkWebServiceLocator()
29: .getwfxmlInstanceBindingWSDDServiceName());
30: SharkInterfaceWrapper.getShark();
31:
32: // QName xmlType = new
33: // javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
34: // "anyType");
35: // DefaultTypeMappingImpl.getSingleton()
36: // .register(String.class,
37: // xmlType,
38: // new SimpleSerializerFactory(String.class,
39: // new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
40: // "string")),
41: // new AltBeanDeserializerFactory(String.class,
42: // new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema",
43: // "string")));
44:
45: String[] args = new String[argv.length - 1];
46: for (int n = 1; n < argv.length; ++n) {
47: args[n - 1] = argv[n];
48: }
49: if (args.length > 1) {
50: System.out
51: .println("Shark AXIS WfXML Service Running on Port "
52: + args[1]);
53: }
54: Class.forName(
55: "org.apache.axis.transport.http.SimpleAxisServer")
56: .getDeclaredMethod("main",
57: new Class[] { args.getClass() }).invoke(
58: null, new Object[] { args });
59: } catch (Exception e) {
60: throw new RootError(e);
61: }
62: }
63:
64: public static RepositoryMgr getRepositoryMgr() {
65: return RepositoryManager.getInstance();
66: }
67:
68: }
|