1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.kandula.wscoor;
18
19 import org.apache.axiom.om.OMElement;
20 import org.apache.axiom.soap.SOAPEnvelope;
21 import org.apache.axis2.AxisFault;
22 import org.apache.axis2.description.AxisOperation;
23 import org.apache.axis2.engine.DependencyManager;
24 import org.apache.kandula.Constants;
25
26 /***
27 * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
28 */
29 public class ActivationPortTypeRawXMLSyncMessageReceiver extends
30 org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver {
31
32 public void invokeBusinessLogic(
33 org.apache.axis2.context.MessageContext msgContext,
34 org.apache.axis2.context.MessageContext newMsgContext)
35 throws org.apache.axis2.AxisFault {
36
37 try {
38
39
40 Object obj = getTheImplementationObject(msgContext);
41
42
43 DependencyManager.configureBusinessLogicProvider(obj, msgContext
44 .getOperationContext());
45
46 ActivationPortTypeRawXMLSkeleton skel = (ActivationPortTypeRawXMLSkeleton) obj;
47
48 SOAPEnvelope envelope = null;
49
50 AxisOperation op = msgContext.getOperationContext()
51 .getAxisOperation();
52
53 String methodName;
54 if (op.getName() != null
55 & (methodName = op.getName().getLocalPart()) != null) {
56 if (("createCoordinationContextOperation").equals(methodName)) {
57 OMElement response = null;
58
59
60 response = skel
61 .createCoordinationContextOperation((OMElement) msgContext
62 .getEnvelope().getBody().getFirstElement()
63 .detach());
64
65
66 envelope = getSOAPFactory(msgContext).getDefaultEnvelope();
67
68
69 envelope.getBody().setFirstChild(response);
70 }
71 newMsgContext.setEnvelope(envelope);
72 newMsgContext
73 .setWSAAction(Constants.WS_COOR_CREATE_COORDINATIONCONTEXT_RESPONSE);
74 newMsgContext.setRelationships(null);
75 }
76 } catch (Exception e) {
77 throw AxisFault.makeFault(e);
78 }
79
80 }
81
82 }