Source Code Cross Referenced for DetailImpl.java in  » Web-Services-AXIS2 » saaj » org » apache » axis2 » saaj » 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 » saaj » org.apache.axis2.saaj 
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.saaj;
020:
021:        import org.apache.axiom.om.impl.dom.ElementImpl;
022:        import org.apache.axiom.soap.SOAPFaultDetail;
023:
024:        import javax.xml.namespace.QName;
025:        import javax.xml.soap.Detail;
026:        import javax.xml.soap.DetailEntry;
027:        import javax.xml.soap.Name;
028:        import javax.xml.soap.SOAPElement;
029:        import javax.xml.soap.SOAPException;
030:        import java.util.ArrayList;
031:        import java.util.Collection;
032:        import java.util.Iterator;
033:
034:        /**
035:         * A container for <code>DetailEntry</code> objects. <code>DetailEntry</code> objects give detailed
036:         * error information that is application-specific and related to the <code>SOAPBody</code> object
037:         * that contains it.
038:         * <p/>
039:         * A <code>Detail</code> object, which is part of a <code>SOAPFault</code> object, can be retrieved
040:         * using the method <code>SOAPFault.getDetail</code>. The <code>Detail</code> interface provides two
041:         * methods. One creates a new <code>DetailEntry</code> object and also automatically adds it to the
042:         * <code>Detail</code> object. The second method gets a list of the <code>DetailEntry</code> objects
043:         * contained in a <code>Detail</code> object.
044:         * <p/>
045:         * The following code fragment, in which <i>sf</i> is a <code>SOAPFault</code> object, gets its
046:         * <code>Detail</code> object (<i>d</i>), adds a new <code>DetailEntry</code> object to <i>d</i>,
047:         * and then gets a list of all the <code>DetailEntry</code> objects in <i>d</i>. The code also
048:         * creates a <code>Name</code> object to pass to the method <code>addDetailEntry</code>. The
049:         * variable <i>se</i>, used to create the <code>Name</code> object, is a <code>SOAPEnvelope</code>
050:         * object. <PRE> Detail d = sf.getDetail(); Name name = se.createName("GetLastTradePrice", "WOMBAT",
051:         * "http://www.wombat.org/trader"); d.addDetailEntry(name); Iterator it = d.getDetailEntries();
052:         * </PRE>
053:         */
054:        public class DetailImpl extends SOAPFaultElementImpl implements  Detail {
055:
056:            //    private SOAPFaultDetail faultDetail;
057:
058:            /** @param element  */
059:            public DetailImpl(SOAPFaultDetail element) {
060:                super ((ElementImpl) element);
061:                //        faultDetail = element;
062:            }
063:
064:            /**
065:             * Creates a new <code>DetailEntry</code> object with the given name and adds it to this
066:             * <code>Detail</code> object.
067:             *
068:             * @param name a <code>Name</code> object identifying the new <code>DetailEntry</code> object
069:             * @return DetailEntry.
070:             * @throws SOAPException thrown when there is a problem in adding a DetailEntry object to this
071:             *                       Detail object.
072:             */
073:            public DetailEntry addDetailEntry(Name name) throws SOAPException {
074:                SOAPElementImpl childElement = (SOAPElementImpl) addChildElement(name);
075:                DetailEntryImpl detailEntry = new DetailEntryImpl(
076:                        childElement.element);
077:                childElement.element.setUserData(SAAJ_NODE, detailEntry, null);
078:                return detailEntry;
079:            }
080:
081:            /**
082:             * Gets a list of the detail entries in this <code>Detail</code> object.
083:             *
084:             * @return an <code>Iterator</code> object over the <code>DetailEntry</code> objects in this
085:             *         <code>Detail</code> object
086:             */
087:            public Iterator getDetailEntries() {
088:                final Iterator detailEntriesIter = element.getChildElements();
089:                Collection details = new ArrayList();
090:                while (detailEntriesIter.hasNext()) {
091:                    details.add(new DetailEntryImpl(
092:                            (ElementImpl) detailEntriesIter.next()));
093:                }
094:                return details.iterator();
095:            }
096:
097:            /**
098:             * Creates a new DetailEntry object with the given name and adds it to this Detail object.
099:             *
100:             * @param name - a Name object identifying the new DetailEntry object
101:             * @throws SOAPException - thrown when there is a problem in adding a DetailEntry object to this
102:             *                       Detail object.
103:             */
104:            public DetailEntry addDetailEntry(QName qname) throws SOAPException {
105:                SOAPElementImpl childElement = (SOAPElementImpl) addChildElement(qname);
106:                DetailEntryImpl detailEntry = new DetailEntryImpl(
107:                        childElement.element);
108:                childElement.element.setUserData(SAAJ_NODE, detailEntry, null);
109:                return detailEntry;
110:            }
111:
112:            public SOAPElement addAttribute(QName qname, String value)
113:                    throws SOAPException {
114:                return super .addAttribute(qname, value);
115:            }
116:
117:            public SOAPElement addChildElement(QName qname)
118:                    throws SOAPException {
119:                return super .addChildElement(qname);
120:            }
121:
122:            public QName createQName(String localName, String prefix)
123:                    throws SOAPException {
124:                return super .createQName(localName, prefix);
125:            }
126:
127:            public Iterator getAllAttributesAsQNames() {
128:                return super .getAllAttributesAsQNames();
129:            }
130:
131:            public String getAttributeValue(QName qname) {
132:                return super .getAttributeValue(qname);
133:            }
134:
135:            public Iterator getChildElements(QName qname) {
136:                return super .getChildElements(qname);
137:            }
138:
139:            public QName getElementQName() {
140:                return super .getElementQName();
141:            }
142:
143:            public boolean removeAttribute(QName qname) {
144:                return super .removeAttribute(qname);
145:            }
146:
147:            public SOAPElement setElementQName(QName newName)
148:                    throws SOAPException {
149:                return super.setElementQName(newName);
150:            }
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.