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

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.soap 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * $Id: SOAPElementFactory.java,v 1.4.2.7 2004/08/27 19:00:36 goodwin Exp $
003         * $Revision: 1.4.2.7 $
004         * $Date: 2004/08/27 19:00:36 $
005         */
006
007        /*
008         * Copyright 2005-2006 Sun Microsystems, Inc.  All Rights Reserved.
009         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
010         *
011         * This code is free software; you can redistribute it and/or modify it
012         * under the terms of the GNU General Public License version 2 only, as
013         * published by the Free Software Foundation.  Sun designates this
014         * particular file as subject to the "Classpath" exception as provided
015         * by Sun in the LICENSE file that accompanied this code.
016         *
017         * This code is distributed in the hope that it will be useful, but WITHOUT
018         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
019         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
020         * version 2 for more details (a copy is included in the LICENSE file that
021         * accompanied this code).
022         *
023         * You should have received a copy of the GNU General Public License version
024         * 2 along with this work; if not, write to the Free Software Foundation,
025         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
026         *
027         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
028         * CA 95054 USA or visit www.sun.com if you need additional information or
029         * have any questions.
030         */
031
032        package javax.xml.soap;
033
034        /**
035         * <code>SOAPElementFactory</code> is a factory for XML fragments that
036         * will eventually end up in the SOAP part. These fragments
037         * can be inserted as children of the <code>SOAPHeader</code> or
038         * <code>SOAPBody</code> or <code>SOAPEnvelope</code>.
039         *
040         * <p>Elements created using this factory do not have the properties
041         * of an element that lives inside a SOAP header document. These
042         * elements are copied into the XML document tree when they are
043         * inserted.
044         * @deprecated - Use <code>javax.xml.soap.SOAPFactory</code> for creating SOAPElements.
045         * @see javax.xml.soap.SOAPFactory
046         */
047        public class SOAPElementFactory {
048
049            private SOAPFactory soapFactory;
050
051            private SOAPElementFactory(SOAPFactory soapFactory) {
052                this .soapFactory = soapFactory;
053            }
054
055            /**
056             * Create a <code>SOAPElement</code> object initialized with the
057             * given <code>Name</code> object.
058             *
059             * @param name a <code>Name</code> object with the XML name for
060             *             the new element
061             *
062             * @return the new <code>SOAPElement</code> object that was
063             *         created
064             *
065             * @exception SOAPException if there is an error in creating the
066             *            <code>SOAPElement</code> object
067             *
068             * @deprecated Use
069             * javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
070             * instead
071             *
072             * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.soap.Name)
073             * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.namespace.QName)
074             */
075            public SOAPElement create(Name name) throws SOAPException {
076                return soapFactory.createElement(name);
077            }
078
079            /**
080             * Create a <code>SOAPElement</code> object initialized with the
081             * given local name.
082             *
083             * @param localName a <code>String</code> giving the local name for
084             *             the new element
085             *
086             * @return the new <code>SOAPElement</code> object that was
087             *         created
088             *
089             * @exception SOAPException if there is an error in creating the
090             *            <code>SOAPElement</code> object
091             *
092             * @deprecated Use
093             * javax.xml.soap.SOAPFactory.createElement(String localName) instead
094             *
095             * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String)
096             */
097            public SOAPElement create(String localName) throws SOAPException {
098                return soapFactory.createElement(localName);
099            }
100
101            /**
102             * Create a new <code>SOAPElement</code> object with the given
103             * local name, prefix and uri.
104             *
105             * @param localName a <code>String</code> giving the local name
106             *                  for the new element
107             * @param prefix the prefix for this <code>SOAPElement</code>
108             * @param uri a <code>String</code> giving the URI of the
109             *            namespace to which the new element belongs
110             *
111             * @exception SOAPException if there is an error in creating the
112             *            <code>SOAPElement</code> object
113             *
114             * @deprecated Use
115             * javax.xml.soap.SOAPFactory.createElement(String localName,
116             *                      String prefix,
117             *                      String uri)
118             * instead
119             *
120             * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String, java.lang.String, java.lang.String)
121             */
122            public SOAPElement create(String localName, String prefix,
123                    String uri) throws SOAPException {
124                return soapFactory.createElement(localName, prefix, uri);
125            }
126
127            /**
128             * Creates a new instance of <code>SOAPElementFactory</code>.
129             *
130             * @return a new instance of a <code>SOAPElementFactory</code>
131             *
132             * @exception SOAPException if there was an error creating the
133             *            default <code>SOAPElementFactory</code>
134             */
135            public static SOAPElementFactory newInstance() throws SOAPException {
136                try {
137                    return new SOAPElementFactory(SOAPFactory.newInstance());
138                } catch (Exception ex) {
139                    throw new SOAPException(
140                            "Unable to create SOAP Element Factory: "
141                                    + ex.getMessage());
142                }
143            }
144        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.