Source Code Cross Referenced for XMLFault.java in  » Web-Services-AXIS2 » jax-ws » org » apache » axis2 » jaxws » message » 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 » Web Services AXIS2 » jax ws » org.apache.axis2.jaxws.message 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */
019:        package org.apache.axis2.jaxws.message;
020:
021:        import javax.xml.namespace.QName;
022:
023:        /**
024:         * This is a value class that is an agnostic representation of a fault. The XMLFault can be added to
025:         * or queried from a Message/XMLPart.
026:         * <p/>
027:         * Even though XMLFault is SOAP 1.1/SOAP 1.2 agnostic, SOAP 1.2 terms will be used. For example,
028:         * "reason" means SOAP 1.2 Reason or SOAP 1.1 faultstring.
029:         *
030:         * @see XMLFaultUtils
031:         */
032:        public class XMLFault {
033:
034:            // Here is a sample comprehensive SOAP 1.2 fault which will help you understand the
035:            // structure of XMLFault.
036:            // <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
037:            //               xmlns:m="http://www.example.org/timeouts"
038:            //               xmlns:xml="http://www.w3.org/XML/1998/namespace">
039:            //   <env:Body>
040:            //      <env:Fault>
041:            //        <env:Code>
042:            //          <env:Value>env:Sender</env:Value>
043:            //          <env:Subcode>
044:            //            <env:Value>m:MessageTimeout</env:Value>
045:            //          </env:Subcode>
046:            //        </env:Code>
047:            //        <env:Reason>
048:            //          <env:Text xml:lang="en">Sender Timeout</env:Text>
049:            //          <env:Text xml:lang="de">Sender Timeout</env:Text>
050:            //        </env:Reason>
051:            //        <env:Node>http://my.example.org/Node</env:Node>
052:            //        <env:Role>http://my.example.org/Role</env:Role>
053:            //        <env:Detail>
054:            //          <m:MaxTime>P5M</m:MaxTime>
055:            //        </env:Detail>    
056:            //      </env:Fault>
057:            //   </env:Body>
058:            // </env:Envelope>
059:
060:            // Here is the same information rendered as a SOAP 1.1 fault.  Notice
061:            // that this is a subset of information.
062:            // <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
063:            //               xmlns:m="http://www.example.org/timeouts"
064:            //               xmlns:xml="http://www.w3.org/XML/1998/namespace">
065:            //  <env:Body>
066:            //      <env:Fault>
067:            //        <faultcode>env.Client</faultcode>
068:            //        <faultstring>Sender Timeout</faultstring>
069:            //        <actor>http://my.example.org/Role</actor>
070:            //        <detail>
071:            //          <m:MaxTime>P5M</m:MaxTime>
072:            //        <detail>    
073:            //      </env:Fault>
074:            //   </env:Body>
075:            // </env:Envelope>
076:
077:            // The required information (necessary for both SOAP 1.1 and SOAP 1.2)
078:            private XMLFaultCode code;
079:            private XMLFaultReason reason;
080:            private Block[] detailBlocks;
081:
082:            // The optional information (can be set on XMLFault, but only rendered in SOAP 1.2 Faults)
083:            private String role;
084:            private String node;
085:            private QName[] subCodes = null; // The subCodes are user-defined.  The values are not defined by a specification
086:            private XMLFaultReason[] secondaryReasons = null;
087:
088:            /**
089:             * Construct Application XMLFault with minimum required information
090:             *
091:             * @param code         - XMLFaultCode or null if default XMLFaultCode
092:             * @param reason       - String reason
093:             * @param detailBlocks - Block[] or null if no detailBlocks
094:             */
095:            public XMLFault(XMLFaultCode code, XMLFaultReason reason,
096:                    Block[] detailBlocks) {
097:                if (code == null) {
098:                    code = XMLFaultCode.RECEIVER;
099:                }
100:                this .code = code;
101:                this .reason = reason;
102:                this .detailBlocks = detailBlocks;
103:            }
104:
105:            /**
106:             * Construct System XMLFault with minimum required information
107:             *
108:             * @param code   - XMLFaultCode or null if default XMLFaultCode
109:             * @param reason - String reason
110:             */
111:            public XMLFault(XMLFaultCode code, XMLFaultReason reason) {
112:                this (code, reason, null);
113:            }
114:
115:            /** @return Returns the code. */
116:            public XMLFaultCode getCode() {
117:                return code;
118:            }
119:
120:            /** @return Returns the detailBlocks. */
121:            public Block[] getDetailBlocks() {
122:                return detailBlocks;
123:            }
124:
125:            /** @return Returns the reason. */
126:            public XMLFaultReason getReason() {
127:                return reason;
128:            }
129:
130:            /** @return Returns the node. */
131:            public String getNode() {
132:                return node;
133:            }
134:
135:            /** @param node The node to set. */
136:            public void setNode(String node) {
137:                this .node = node;
138:            }
139:
140:            /** @return Returns the role. */
141:            public String getRole() {
142:                return role;
143:            }
144:
145:            /** @param role The role to set. */
146:            public void setRole(String role) {
147:                this .role = role;
148:            }
149:
150:            /** @return Returns the secondaryReasons. */
151:            public XMLFaultReason[] getSecondaryReasons() {
152:                return secondaryReasons;
153:            }
154:
155:            /** @param secondaryReasons The secondaryReasons to set. */
156:            public void setSecondaryReasons(XMLFaultReason[] secondaryReasons) {
157:                this .secondaryReasons = secondaryReasons;
158:            }
159:
160:            /** @return Returns the subCodes. */
161:            public QName[] getSubCodes() {
162:                return subCodes;
163:            }
164:
165:            /** @param subCodes The subCodes to set. */
166:            public void setSubCodes(QName[] subCodes) {
167:                this.subCodes = subCodes;
168:            }
169:
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.