Source Code Cross Referenced for SAAJResult.java in  » 6.0-JDK-Modules » saaj » javax » xml » soap » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » saaj » javax.xml.soap 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $Id: SAAJResult.java,v 1.5 2006/03/30 00:59:39 ofung Exp $
003:         */
004:
005:        /*
006:         * The contents of this file are subject to the terms
007:         * of the Common Development and Distribution License
008:         * (the License).  You may not use this file except in
009:         * compliance with the License.
010:         * 
011:         * You can obtain a copy of the license at
012:         * https://glassfish.dev.java.net/public/CDDLv1.0.html.
013:         * See the License for the specific language governing
014:         * permissions and limitations under the License.
015:         * 
016:         * When distributing Covered Code, include this CDDL
017:         * Header Notice in each file and include the License file
018:         * at https://glassfish.dev.java.net/public/CDDLv1.0.html.
019:         * If applicable, add the following below the CDDL Header,
020:         * with the fields enclosed by brackets [] replaced by
021:         * you own identifying information:
022:         * "Portions Copyrighted [year] [name of copyright owner]"
023:         * 
024:         * Copyright 2006 Sun Microsystems Inc. All Rights Reserved
025:         */
026:
027:        package javax.xml.soap;
028:
029:        import javax.xml.transform.dom.DOMResult;
030:
031:        /**
032:         * Acts as a holder for the results of a JAXP transformation or a JAXB 
033:         * marshalling, in the form of a SAAJ tree. These results should be accessed
034:         * by using the {@link #getResult()} method. The {@link DOMResult#getNode()}
035:         * method should be avoided in almost all cases. 
036:         *
037:         * @author XWS-Security Development Team
038:         * 
039:         * @since SAAJ 1.3
040:         */
041:        public class SAAJResult extends DOMResult {
042:
043:            /**
044:             * Creates a <code>SAAJResult</code> that will present results in the form
045:             * of a SAAJ tree that supports the default (SOAP 1.1) protocol. 
046:             * <p>
047:             * This kind of <code>SAAJResult</code> is meant for use in situations where the 
048:             * results will be used as a parameter to a method that takes a parameter 
049:             * whose type, such as <code>SOAPElement</code>, is drawn from the SAAJ 
050:             * API. When used in a transformation, the results are populated into the 
051:             * <code>SOAPPart</code> of a <code>SOAPMessage</code> that is created internally.
052:             * The <code>SOAPPart</code> returned by {@link DOMResult#getNode()} 
053:             * is not guaranteed to be well-formed.
054:             * 
055:             * @throws SOAPException if there is a problem creating a <code>SOAPMessage</code>
056:             * 
057:             * @since SAAJ 1.3
058:             */
059:            public SAAJResult() throws SOAPException {
060:                this (MessageFactory.newInstance().createMessage());
061:            }
062:
063:            /**
064:             * Creates a <code>SAAJResult</code> that will present results in the form
065:             * of a SAAJ tree that supports the specified protocol. The 
066:             * <code>DYNAMIC_SOAP_PROTOCOL</code> is ambiguous in this context and will
067:             * cause this constructor to throw an <code>UnsupportedOperationException</code>. 
068:             * <p>
069:             * This kind of <code>SAAJResult</code> is meant for use in situations where the 
070:             * results will be used as a parameter to a method that takes a parameter 
071:             * whose type, such as <code>SOAPElement</code>, is drawn from the SAAJ 
072:             * API. When used in a transformation the results are populated into the 
073:             * <code>SOAPPart</code> of a <code>SOAPMessage</code> that is created 
074:             * internally. The <code>SOAPPart</code> returned by {@link DOMResult#getNode()} 
075:             * is not guaranteed to be well-formed.
076:             * 
077:             * @param protocol - the name of the SOAP protocol that the resulting SAAJ 
078:             *                      tree should support
079:             *  
080:             * @throws SOAPException if a <code>SOAPMessage</code> supporting the 
081:             *             specified protocol cannot be created
082:             * 
083:             * @since SAAJ 1.3
084:             */
085:            public SAAJResult(String protocol) throws SOAPException {
086:                this (MessageFactory.newInstance(protocol).createMessage());
087:            }
088:
089:            /**
090:             * Creates a <code>SAAJResult</code> that will write the results into the
091:             * <code>SOAPPart</code> of the supplied <code>SOAPMessage</code>. 
092:             * In the normal case these results will be written using DOM APIs and, 
093:             * as a result, the finished <code>SOAPPart</code> will not be guaranteed 
094:             * to be well-formed unless the data used to create it is also well formed. 
095:             * When used in a transformation the validity of the <code>SOAPMessage</code> 
096:             * after the transformation can be guaranteed only by means outside SAAJ 
097:             * specification.
098:             *
099:             * @param message - the message whose <code>SOAPPart</code> will be 
100:             *                  populated as a result of some transformation or 
101:             *                  marshalling operation
102:             * 
103:             * @since SAAJ 1.3
104:             */
105:            public SAAJResult(SOAPMessage message) {
106:                super (message.getSOAPPart());
107:            }
108:
109:            /**
110:             * Creates a <code>SAAJResult</code> that will write the results as a 
111:             * child node of the <code>SOAPElement</code> specified. In the normal
112:             * case these results will be written using DOM APIs and as a result may
113:             * invalidate the structure of the SAAJ tree. This kind of 
114:             * <code>SAAJResult</code> should only be used when the validity of the
115:             * incoming data can be guaranteed by means outside of the SAAJ 
116:             * specification.
117:             * 
118:             * @param rootNode - the root to which the results will be appended
119:             * 
120:             * @since SAAJ 1.3
121:             */
122:            public SAAJResult(SOAPElement rootNode) {
123:                super (rootNode);
124:            }
125:
126:            /**
127:             * @return the resulting Tree that was created under the specified root Node.
128:             * @since SAAJ 1.3
129:             */
130:            public javax.xml.soap.Node getResult() {
131:                return (javax.xml.soap.Node) super.getNode().getFirstChild();
132:            }
133:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.