01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2007 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: ISoapConsumerMarshaller.java 9708 2007-10-23 19:52:06Z mpreston $
23: */
24: package com.bostechcorp.cbesb.runtime.ccsl.lib;
25:
26: import javax.jbi.messaging.Fault;
27: import javax.jbi.messaging.MessageExchange;
28: import javax.jbi.messaging.MessagingException;
29: import javax.jbi.messaging.NormalizedMessage;
30:
31: import org.apache.axiom.soap.SOAPFactory;
32: import org.apache.axis2.context.MessageContext;
33:
34: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.ServiceDescriptionHandler;
35:
36: /**
37: * ISoapConsumerMarshaller performs the conversion between SOAP messages
38: * and Normalized Messages for consumer endpoints.
39: */
40: public interface ISoapConsumerMarshaller {
41:
42: /**
43: * Converts from a SOAP message to a NormalizedMessage.
44: * This converts the inbound SOAP request into the
45: * "in" message of a new MessageExchange.
46: * @param soapMsgContext The Axis MessageContext containing the Soap Envelope
47: * @param message The NormalizedMessage to populate
48: * @param msgExchange The MessageExchange that contains message.
49: * @param svcDescHandler The ServiceDescriptionHandler of the component.
50: * This can be used by the NormalizedMessageHandler class to populate the
51: * proper JBI wsdl 1.1 wrapper.
52: */
53: public void SoapToNormalizedMessage(MessageContext soapMsgContext,
54: NormalizedMessage message, MessageExchange msgExchange,
55: ServiceDescriptionHandler svcDescHandler, boolean useMTOM,
56: boolean useSwA) throws MessagingException;
57:
58: /**
59: * Converts from a NormalizedMessage to a SOAP message.
60: * This converts the "out" message from a returning
61: * MessageExchange into a SOAP Envelope.
62: * @param message The NormalizedMessage
63: * @param soapMsgContext The Axis MessageContext to populate
64: * @param msgExchange The MessageExchange that contains message
65: * @param soapFactory The Axis SoapFactory to use for create SOAPEnvelope,
66: * SOAPBody and OMElement, etc objects.
67: */
68: public void NormalizedMessageToSoap(NormalizedMessage message,
69: MessageContext soapMsgContext, MessageExchange msgExchange,
70: SOAPFactory soapFactory, boolean useMTOM, boolean useSwA)
71: throws MessagingException;
72:
73: /**
74: * Converts from a JBI Fault in a message Exchange to a SOAP Message.
75: * Used when a MessageExchange returns with
76: * ERROR status (In-Out MEP only).
77: * @param fault The JBI Fault from the MessageExchange
78: * @param soapMsgContext The Axis MessageContext to populate
79: * @param msgExchange The MessageExchange that contains fault
80: * @param soapFactory The Axis SoapFactory to use for create SOAPEnvelope,
81: * SOAPBody and OMElement, etc objects.
82: */
83: public void FaultToSoap(Fault fault, MessageContext soapMsgContext,
84: MessageExchange msgExchange, SOAPFactory soapFactory)
85: throws MessagingException;
86:
87: }
|