KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > jbi > serviceengine > util > soap > MessageDenormalizer


1 // Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.
2

3 /*
4  * MessageDenormalizer.java
5  *
6  * SUN PROPRIETARY/CONFIDENTIAL.
7  * This software is the proprietary information of Sun Microsystems, Inc.
8  * Use is subject to license terms.
9  *
10  */

11 package com.sun.enterprise.jbi.serviceengine.util.soap;
12
13 import javax.jbi.messaging.Fault;
14 import javax.jbi.messaging.NormalizedMessage;
15
16
17 /**
18  * This object is used by <code>MessageProcessor</code> implementations to
19  * denormalize a JBI NormalizedMessage and convert it into a SOAP Message.
20  * The object maps the Normalized Message's message content to SOAP:Body element in the
21  * SOAP Message. The SOAP:header elements are extracted from a Normalized Message's
22  * message context property "SoapHeader".
23  *
24  * @author Sun Microsystems, Inc.
25  */

26 public interface MessageDenormalizer
27 {
28     /**
29      * Converts a normalized message to a SOAP Message.
30      *
31      * @param normalizedMessage message to be denormalized.
32      * @param operation operation invoked
33      * @param isResponse indicates if a response messages needs to be generated
34      *
35      * @return the SOAP Message.
36      */

37     SOAPWrapper denormalizeMessage(
38         NormalizedMessage normalizedMessage, Operation operation, boolean isResponse);
39
40     /**
41      * Converts a fault mesage to a SOAP Message using the specified fault code.
42      *
43      * @param faultMessage fault message.
44      *
45      * @return a new SOAPWrapper instance which contains the SOAP fault Message.
46      */

47     SOAPWrapper denormalizeFaultMessage(Fault faultMessage);
48
49     /**
50      * Converts an exception to a SOAP Message. It uses the Server fault code in the soap
51      * namespace.
52      *
53      * @param exception exception instance
54      *
55      * @return denormalized exception instance.
56      */

57     SOAPWrapper denormalizeMessage(Exception JavaDoc exception);
58
59     /**
60      * Converts an exception to a SOAP Message. It uses the faultCode passed. The code
61      * expects the faultcode passed to be part of the soap namespace.
62      *
63      * @param exception exception instance
64      * @param faultCode fault code
65      *
66      * @return denormalized exception instance.
67      */

68     SOAPWrapper denormalizeMessage(Exception JavaDoc exception, String JavaDoc faultCode);
69 }
70
Popular Tags