001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common Development
008: * and Distribution License("CDDL") (collectively, the "License"). You
009: * may not use this file except in compliance with the License. You can obtain
010: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
011: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
012: * language governing permissions and limitations under the License.
013: *
014: * When distributing the software, include this License Header Notice in each
015: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
016: * Sun designates this particular file as subject to the "Classpath" exception
017: * as provided by Sun in the GPL Version 2 section of the License file that
018: * accompanied this code. If applicable, add the following below the License
019: * Header, with the fields enclosed by brackets [] replaced by your own
020: * identifying information: "Portions Copyrighted [year]
021: * [name of copyright owner]"
022: *
023: * Contributor(s):
024: *
025: * If you wish your version of this file to be governed by only the CDDL or
026: * only the GPL Version 2, indicate your decision by adding "[Contributor]
027: * elects to include this software in this distribution under the [CDDL or GPL
028: * Version 2] license." If you don't indicate a single choice of license, a
029: * recipient has the option to distribute your version of this file under
030: * either the CDDL, the GPL Version 2 or to extend the choice of license to
031: * its licensees as provided above. However, if you add GPL Version 2 code
032: * and therefore, elected the GPL Version 2 license, then the option applies
033: * only if the new code is made subject to such option by the copyright
034: * holder.
035: */
036: package com.sun.xml.ws.tx.common;
037:
038: import javax.xml.namespace.QName;
039:
040: /**
041: * This class contains useful namespace uri constants
042: *
043: * @author Ryan.Shoemaker@Sun.COM, Joeseph.Fialli@Sun.COM
044: * @version $Revision: 1.9 $
045: * @since 1.0
046: */
047: public class Constants {
048: /**
049: * XML namespace uri
050: */
051: public static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/";
052:
053: /**
054: * WS-Coordination SOAP namespace uri
055: */
056: public static final String WSCOOR_SOAP_NSURI = "http://schemas.xmlsoap.org/ws/2004/10/wscoor";
057:
058: /**
059: * WS-AtomicTransaction SOAP namespace uri
060: */
061: public static final String WSAT_SOAP_NSURI = "http://schemas.xmlsoap.org/ws/2004/10/wsat";
062:
063: public static final String WSAT_2004_PROTOCOL = WSAT_SOAP_NSURI;
064:
065: /**
066: * WS-Coordination OASIS namespace uri
067: */
068: public static final String WSCOOR_OASIS_NSURI = "http://docs.oasis-open.org/ws-tx/wscoor/2006/06";
069:
070: /**
071: * WS-AtomicTransaction OASIS namespace uri
072: */
073: public static final String WSAT_OASIS_NSURI = "http://docs.oasis-open.org/ws-tx/wsat/2006/06";
074:
075: /**
076: * WS-Coordination RI namespace uri
077: */
078: public static final String WSCOOR_SUN_URI = "http://java.sun.com/xml/ns/wsit/coord";
079:
080: /**
081: * WS-Policy namespace uri and wsp:optional
082: * <p/>
083: * Note: both of these are defined in PolicyConstants, hence the deprecation
084: */
085: @Deprecated
086: public static final String WSP_URI = "http://schemas.xmlsoap.org/ws/2004/09/policy";
087:
088: // patch for wsit 419
089: public static final QName WSP2002_OPTIONAL = new QName(
090: "http://schemas.xmlsoap.org/ws/2002/12/policy", "Optional");
091:
092: @Deprecated
093: public static final QName WSP_OPTIONAL = new QName(WSP_URI,
094: "optional");
095:
096: // Currently supported standard.
097: public static final String WSAT_NS = WSAT_SOAP_NSURI;
098:
099: public static final String WSAT_PREFIX = WSAT_NS + "/";
100:
101: /**
102: * QName object for wsat:ATAssertion - propogation of atomic transaction with a request
103: */
104: public static final QName AT_ASSERTION = new QName(WSAT_SOAP_NSURI,
105: "ATAssertion");
106:
107: /**
108: * QName object for wsat:ATAlwaysCapability - create atomic transaction context if one not propogated
109: */
110: public static final QName AT_ALWAYS_CAPABILITY = new QName(
111: WSAT_SOAP_NSURI, "ATAlwaysCapability");
112:
113: public static final String WSAT_COMPLETION_PROTOCOL = WSAT_PREFIX
114: + "Completion";
115:
116: public static final String WSAT_DURABLE2PC_PROTOCOL = WSAT_PREFIX
117: + "Durable2PC";
118:
119: public static final String WSAT_VOLATILE2PC_PROTOCOL = WSAT_PREFIX
120: + "Volatile2PC";
121:
122: /**
123: * SOAP Namespace URI
124: */
125: public static final String SOAP_NSURI = "http://www.w3.org/2003/05/soap-envelope";
126:
127: /**
128: * SOAP Namespace URI Prefix
129: */
130: public static final String SOAP_PREFIX = "soap";
131:
132: public static final String COORDINATION_CONTEXT = "CoordinationContext";
133:
134: public static final String PREPARED_ACTION = WSAT_PREFIX
135: + "/Prepared";
136: public static final String READONLY_ACTION = WSAT_PREFIX
137: + "/ReadOnly";
138: public static final String ABORTED_ACTION = WSAT_PREFIX
139: + "/Aborted";
140: public static final String COMMITTED_ACTION = WSAT_PREFIX
141: + "/Committed";
142:
143: // use as key for transaction resource that references wsat transactional context
144: public static final String WSAT_TRANSACTION_CONTEXT = "wsatTransactionContext";
145:
146: public static final String WSAT_FAULT_ACTION_URI = "http://schemas.xmlsoap.org/ws/2004/10/wsat/fault";
147: public static final String WSCOOR_FAULT_ACTION_URI = "http://schemas.xmlsoap.org/ws/2004/10/wscoor/fault";
148:
149: public static final String UNKNOWN_ID = "-1";
150:
151: }
|