1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.kandula.wsat.completion;
18
19 import org.apache.axis2.AxisFault;
20 import org.apache.axis2.addressing.EndpointReference;
21 import org.apache.axis2.description.AxisOperation;
22 import org.apache.axis2.description.AxisService;
23 import org.apache.axis2.description.OutOnlyAxisOperation;
24 import org.apache.kandula.Constants;
25 import org.apache.kandula.faults.AbstractKandulaException;
26 import org.apache.kandula.wsat.AbstractATNotifierStub;
27
28 /***
29 * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
30 */
31 public class CompletionCoordinatorPortTypeRawXMLStub extends
32 AbstractATNotifierStub {
33 public static final String AXIS2_HOME = ".";
34
35 /***
36 * Constructor
37 *
38 * @throws AxisFault
39 */
40 public CompletionCoordinatorPortTypeRawXMLStub(String axis2Home,
41 String axis2Xml, EndpointReference targetEndpoint)
42 throws AbstractKandulaException {
43 super(axis2Home, axis2Xml, new AxisService(
44 "CompletionCoordinatorPortType"));
45 this.toEPR = targetEndpoint;
46
47
48 AxisOperation operation;
49 operations = new AxisOperation[2];
50
51 operation = new OutOnlyAxisOperation();
52 operation.setName(new javax.xml.namespace.QName(Constants.WS_AT,
53 "commitOperation"));
54 operations[0] = operation;
55 service.addOperation(operation);
56
57 operation = new OutOnlyAxisOperation();
58 operation.setName(new javax.xml.namespace.QName(Constants.WS_AT,
59 "rollbackOperation"));
60 operations[1] = operation;
61 service.addOperation(operation);
62 }
63
64 public void commitOperation() throws AbstractKandulaException {
65
66 this.notify("Commit", Constants.WS_AT_COMMIT, 0, null);
67
68 }
69
70 public void rollbackOperation() throws AbstractKandulaException {
71
72 this.notify("Rollback", Constants.WS_AT_ROLLBACK, 1, null);
73
74 }
75
76 }