# HG changeset patch # User minqi # Date 1421610610 28800 # Node ID 9a2e5d1036952a11dbf9709132248a9a76ebb45a # Parent cb15fc6cc03865a82774c06075236270283438d8# Parent 6b55dd30a0ba717b14bbb8dd5f36cc1d6cbe5319 Merge diff -r cb15fc6cc038 -r 9a2e5d103695 .hgtags --- a/.hgtags Thu Jan 15 11:18:14 2015 +0100 +++ b/.hgtags Sun Jan 18 11:50:10 2015 -0800 @@ -287,3 +287,4 @@ 3107be2ba9c6e208a0b86bc7100a141abbc5b5fb jdk9-b42 6494b13f88a867026ee316b444d9a4fa589dd6bd jdk9-b43 abbfccd659b91a7bb815d5e36fed635dcdd40f31 jdk9-b44 +bfc24ae2b900187585079bb11e66e459d1e525fe jdk9-b45 diff -r cb15fc6cc038 -r 9a2e5d103695 .hgtags-top-repo --- a/.hgtags-top-repo Thu Jan 15 11:18:14 2015 +0100 +++ b/.hgtags-top-repo Sun Jan 18 11:50:10 2015 -0800 @@ -287,3 +287,4 @@ f7c11da0b0481d49cc7a65a453336c108191e821 jdk9-b42 02ee8c65622e8bd97496d584e22fc7dcf0edc4ae jdk9-b43 8994f5d87b3bb5e8d317d4e8ccb326da1a73684a jdk9-b44 +3dd628fde2086218d548841022ee8436b6b88185 jdk9-b45 diff -r cb15fc6cc038 -r 9a2e5d103695 Makefile --- a/Makefile Thu Jan 15 11:18:14 2015 +0100 +++ b/Makefile Sun Jan 18 11:50:10 2015 -0800 @@ -54,8 +54,11 @@ # Duplication of global targets, needed before ParseConfAndSpec in case we have # no configurations. help: - # If CONF is not set, look for all available configurations - CONF?= + # If both CONF and SPEC are unset, look for all available configurations by + # setting CONF to the empty string. + ifeq ($(SPEC), ) + CONF?= + endif endif # ... and then we can include our helper functions diff -r cb15fc6cc038 -r 9a2e5d103695 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Thu Jan 15 11:18:14 2015 +0100 +++ b/common/autoconf/generated-configure.sh Sun Jan 18 11:50:10 2015 -0800 @@ -4329,7 +4329,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1418395009 +DATE_WHEN_GENERATED=1420811523 ############################################################################### # @@ -27408,8 +27408,8 @@ # The trailing space for everyone except PATH is no typo, but is needed due # to trailing \ in the Windows paths. These will be stripped later. $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE diff -r cb15fc6cc038 -r 9a2e5d103695 common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Thu Jan 15 11:18:14 2015 +0100 +++ b/common/autoconf/spec.gmk.in Sun Jan 18 11:50:10 2015 -0800 @@ -690,10 +690,15 @@ # Images directory definitions JDK_IMAGE_SUBDIR:=jdk JRE_IMAGE_SUBDIR:=jre + # Colon left out to be able to override output dir for bootcycle-images JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR) +# Test image, as above +TEST_IMAGE_SUBDIR:=test +TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR) + # Macosx bundles directory definitions JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents diff -r cb15fc6cc038 -r 9a2e5d103695 common/autoconf/toolchain_windows.m4 --- a/common/autoconf/toolchain_windows.m4 Thu Jan 15 11:18:14 2015 +0100 +++ b/common/autoconf/toolchain_windows.m4 Sun Jan 18 11:50:10 2015 -0800 @@ -173,8 +173,8 @@ # The trailing space for everyone except PATH is no typo, but is needed due # to trailing \ in the Windows paths. These will be stripped later. $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE - $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE + $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE diff -r cb15fc6cc038 -r 9a2e5d103695 common/bin/unshuffle_list.txt --- a/common/bin/unshuffle_list.txt Thu Jan 15 11:18:14 2015 +0100 +++ b/common/bin/unshuffle_list.txt Sun Jan 18 11:50:10 2015 -0800 @@ -26,10 +26,8 @@ corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl : corba/src/share/classes/com/sun/tools/corba/se/idl corba/src/java.corba/share/classes/javax/activity : corba/src/share/classes/javax/activity corba/src/java.corba/share/classes/javax/rmi : corba/src/share/classes/javax/rmi -corba/src/java.corba/share/classes/javax/transaction : corba/src/share/classes/javax/transaction corba/src/java.corba/share/classes/org/omg : corba/src/share/classes/org/omg corba/src/java.corba/share/classes/sun/corba : corba/src/share/classes/sun/corba -corba/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa corba/src/jdk.rmic/share/classes/sun/rmi/rmic/iiop : corba/src/share/classes/sun/rmi/rmic/iiop jaxp/src/java.xml/share/classes/com/sun/java_cup/internal/runtime : jaxp/src/com/sun/java_cup/internal/runtime jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal : jaxp/src/com/sun/org/apache/bcel/internal @@ -66,8 +64,8 @@ jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/org : jaxws/src/share/jaxws_classes/com/sun/xml/internal/org jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/txw2 : jaxws/src/share/jaxws_classes/com/sun/xml/internal/txw2 jaxws/src/java.xml.bind/share/classes/javax/xml/bind : jaxws/src/share/jaxws_classes/javax/xml/bind -jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging -jaxws/src/java.xml.soap/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap +jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging : jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging +jaxws/src/java.xml.ws/share/classes/javax/xml/soap : jaxws/src/share/jaxws_classes/javax/xml/soap jaxws/src/java.xml.ws/share/classes/com/oracle/webservices/internal : jaxws/src/share/jaxws_classes/com/oracle/webservices/internal jaxws/src/java.xml.ws/share/classes/com/oracle/xmlns/internal : jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal jaxws/src/java.xml.ws/share/classes/com/sun/org/glassfish : jaxws/src/share/jaxws_classes/com/sun/org/glassfish @@ -1245,6 +1243,8 @@ jdk/src/java.sql.rowset/share/classes/javax/sql/rowset : jdk/src/share/classes/javax/sql/rowset jdk/src/java.sql/share/classes/java/sql : jdk/src/share/classes/java/sql jdk/src/java.sql/share/classes/javax/sql : jdk/src/share/classes/javax/sql +jdk/src/java.sql/share/classes/javax/transaction/xa : corba/src/share/classes/javax/transaction/xa +jdk/src/java.transaction/share/classes/javax/transaction : corba/src/share/classes/javax/transaction jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security : jdk/src/share/classes/com/sun/org/apache/xml/internal/security jdk/src/java.xml.crypto/share/classes/javax/xml/crypto : jdk/src/share/classes/javax/xml/crypto jdk/src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal : jdk/src/share/classes/org/jcp/xml/dsig/internal diff -r cb15fc6cc038 -r 9a2e5d103695 corba/.hgtags --- a/corba/.hgtags Thu Jan 15 11:18:14 2015 +0100 +++ b/corba/.hgtags Sun Jan 18 11:50:10 2015 -0800 @@ -287,3 +287,4 @@ 078bb11af876fe528d4b516f33ad4dd9bb60549e jdk9-b42 9645e35616b60c5c07b4fdf11a132afc8081dfa8 jdk9-b43 1f57bd728c9e6865ccb9d43ccd80a1c11230a32f jdk9-b44 +9e3f2bed80c0e5a84a256ce41f1d10c5ade48466 jdk9-b45 diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java --- a/corba/src/java.corba/share/classes/javax/transaction/InvalidTransactionException.java Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package javax.transaction; - -/** - * This exception indicates that the request carried an invalid transaction - * context. For example, this exception could be raised if an error - * occured when trying to register a resource. - */ -public class InvalidTransactionException extends java.rmi.RemoteException -{ - public InvalidTransactionException() - { - super(); - } - - public InvalidTransactionException(String msg) - { - super(msg); - } -} diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java --- a/corba/src/java.corba/share/classes/javax/transaction/TransactionRequiredException.java Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package javax.transaction; - -/** - * This exception indicates that a request carried a null transaction context, - * but the target object requires an activate transaction. - */ -public class TransactionRequiredException extends java.rmi.RemoteException -{ - public TransactionRequiredException() - { - super(); - } - - public TransactionRequiredException(String msg) - { - super(msg); - } -} diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java --- a/corba/src/java.corba/share/classes/javax/transaction/TransactionRolledbackException.java Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -/* - * Licensed Materials - Property of IBM - * RMI-IIOP v1.0 - * Copyright IBM Corp. 1998 1999 All Rights Reserved - * - */ - -package javax.transaction; - -/** - * This exception indicates that the transaction associated with processing - * of the request has been rolled back, or marked to roll back. Thus the - * requested operation either could not be performed or was not performed - * because further computation on behalf of the transaction would be - * fruitless - */ -public class TransactionRolledbackException extends java.rmi.RemoteException -{ - public TransactionRolledbackException() - { - super(); - } - - public TransactionRolledbackException(String msg) - { - super(msg); - } -} diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.corba/share/classes/javax/transaction/package.html --- a/corba/src/java.corba/share/classes/javax/transaction/package.html Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - -
- - - - - -Contains three exceptions thrown by the ORB machinery during unmarshalling. -
-@since 1.3
-
-
diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/XAException.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
- * The XAException is thrown by the Resource Manager (RM) to inform the
- * Transaction Manager of an error encountered by the involved transaction.
- *
- */
-public class XAException extends java.lang.Exception {
-
- /**
- * The error code with which to create the SystemException.
- *
- * @serial The error code for the exception
- */
-
- public int errorCode;
-
- /**
- * Create an XAException.
- */
- public XAException()
- {
- super();
- }
-
- /**
- * Create an XAException with a given string.
- *
- * @param s The String
object containing the exception
- * message.
- */
- public XAException(String s)
- {
- super(s);
- }
-
- /**
- * Create an XAException with a given error code.
- *
- * @param errcode The error code identifying the exception.
- */
- public XAException(int errcode)
- {
- super();
- errorCode = errcode;
- }
-
- /**
- * The inclusive lower bound of the rollback codes.
- */
- public final static int XA_RBBASE = 100;
-
- /**
- * Indicates that the rollback was caused by an unspecified reason.
- */
- public final static int XA_RBROLLBACK = XA_RBBASE;
-
- /**
- * Indicates that the rollback was caused by a communication failure.
- */
- public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
-
- /**
- * A deadlock was detected.
- */
- public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
-
- /**
- * A condition that violates the integrity of the resource was detected.
- */
- public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
-
- /**
- * The resource manager rolled back the transaction branch for a reason
- * not on this list.
- */
- public final static int XA_RBOTHER = XA_RBBASE + 4;
-
- /**
- * A protocol error occurred in the resource manager.
- */
- public final static int XA_RBPROTO = XA_RBBASE + 5;
-
- /**
- * A transaction branch took too long.
- */
- public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
-
- /**
- * May retry the transaction branch.
- */
- public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
-
- /**
- * The inclusive upper bound of the rollback error code.
- */
- public final static int XA_RBEND = XA_RBTRANSIENT;
-
- /**
- * Resumption must occur where the suspension occurred.
- */
- public final static int XA_NOMIGRATE = 9;
-
- /**
- * The transaction branch may have been heuristically completed.
- */
- public final static int XA_HEURHAZ = 8;
-
- /**
- * The transaction branch has been heuristically committed.
- */
- public final static int XA_HEURCOM = 7;
-
- /**
- * The transaction branch has been heuristically rolled back.
- */
- public final static int XA_HEURRB = 6;
-
- /**
- * The transaction branch has been heuristically committed and
- * rolled back.
- */
- public final static int XA_HEURMIX = 5;
-
- /**
- * Routine returned with no effect and may be reissued.
- */
- public final static int XA_RETRY = 4;
-
- /**
- * The transaction branch was read-only and has been committed.
- */
- public final static int XA_RDONLY = 3;
-
- /**
- * There is an asynchronous operation already outstanding.
- */
- public final static int XAER_ASYNC = -2;
-
- /**
- * A resource manager error has occurred in the transaction branch.
- */
- public final static int XAER_RMERR = -3;
-
- /**
- * The XID is not valid.
- */
- public final static int XAER_NOTA = -4;
-
- /**
- * Invalid arguments were given.
- */
- public final static int XAER_INVAL = -5;
-
- /**
- * Routine was invoked in an inproper context.
- */
- public final static int XAER_PROTO = -6;
-
- /**
- * Resource manager is unavailable.
- */
- public final static int XAER_RMFAIL = -7;
-
- /**
- * The XID already exists.
- */
- public final static int XAER_DUPID = -8;
-
- /**
- * The resource manager is doing work outside a global transaction.
- */
- public final static int XAER_OUTSIDE = -9;
-
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/XAResource.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
The XAResource interface is a Java mapping of the industry standard - * XA interface based on the X/Open CAE Specification (Distributed - * Transaction Processing: The XA Specification). - * - *
The XA interface defines the contract between a Resource Manager - * and a Transaction Manager in a distributed transaction processing - * (DTP) environment. A JDBC driver or a JMS provider implements - * this interface to support the association between a global transaction - * and a database or message service connection. - * - *
The XAResource interface can be supported by any transactional
- * resource that is intended to be used by application programs in an
- * environment where transactions are controlled by an external
- * transaction manager. An example of such a resource is a database
- * management system. An application may access data through multiple
- * database connections. Each database connection is enlisted with
- * the transaction manager as a transactional resource. The transaction
- * manager obtains an XAResource for each connection participating
- * in a global transaction. The transaction manager uses the
- * start
method
- * to associate the global transaction with the resource, and it uses the
- * end
method to disassociate the transaction from
- * the resource. The resource
- * manager is responsible for associating the global transaction to all
- * work performed on its data between the start and end method invocations.
- *
- *
At transaction commit time, the resource managers are informed by - * the transaction manager to prepare, commit, or rollback a transaction - * according to the two-phase commit protocol.
- * - */ - -public interface XAResource -{ - /** Commits the global transaction specified by xid. - * - * @param xid A global transaction identifier - * - * @param onePhase If true, the resource manager should use a one-phase - * commit protocol to commit the work done on behalf of xid. - * - * @exception XAException An error has occurred. Possible XAExceptions - * are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, - * XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO. - * - *If the resource manager did not commit the transaction and the - * paramether onePhase is set to true, the resource manager may throw - * one of the XA_RB* exceptions. Upon return, the resource manager has - * rolled back the branch's work and has released all held resources. - */ - - void commit(Xid xid, boolean onePhase) throws XAException; - - - /** Ends the work performed on behalf of a transaction branch. - * The resource manager disassociates the XA resource from the - * transaction branch specified and lets the transaction - * complete. - * - *
If TMSUSPEND is specified in the flags, the transaction branch
- * is temporarily suspended in an incomplete state. The transaction
- * context is in a suspended state and must be resumed via the
- * start
method with TMRESUME specified.
If TMFAIL is specified, the portion of work has failed. - * The resource manager may mark the transaction as rollback-only
- * - *If TMSUCCESS is specified, the portion of work has completed - * successfully.
- * - * @param xid A global transaction identifier that is the same as - * the identifier used previously in thestart
method.
- *
- * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND.
- *
- * @exception XAException An error has occurred. Possible XAException
- * values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL,
- * XAER_PROTO, or XA_RB*.
- */
-
- void end(Xid xid, int flags) throws XAException;
-
-
- /** Tells the resource manager to forget about a heuristically
- * completed transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
- * XAER_PROTO.
- */
-
- void forget(Xid xid) throws XAException;
-
- /** Obtains the current transaction timeout value set for this
- * XAResource instance. If XAResource.setTransactionTimeout
- * was not used prior to invoking this method, the return value
- * is the default timeout set for the resource manager; otherwise,
- * the value used in the previous setTransactionTimeout
- * call is returned.
- *
- * @return the transaction timeout value in seconds.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- */
- int getTransactionTimeout() throws XAException;
-
- /** This method is called to determine if the resource manager
- * instance represented by the target object is the same as the
- * resouce manager instance represented by the parameter xares.
- *
- * @param xares An XAResource object whose resource manager instance
- * is to be compared with the resource manager instance of the
- * target object.
- *
- * @return true if it's the same RM instance; otherwise
- * false.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are XAER_RMERR and XAER_RMFAIL.
- *
- */
- boolean isSameRM(XAResource xares) throws XAException;
-
- /** Ask the resource manager to prepare for a transaction commit
- * of the transaction specified in xid.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred. Possible exception
- * values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL,
- * or XAER_PROTO.
- *
- * @return A value indicating the resource manager's vote on the
- * outcome of the transaction. The possible values are: XA_RDONLY
- * or XA_OK. If the resource manager wants to roll back the
- * transaction, it should do so by raising an appropriate XAException
- * in the prepare method.
- */
-
- int prepare(Xid xid) throws XAException;
-
-
- /** Obtains a list of prepared transaction branches from a resource
- * manager. The transaction manager calls this method during recovery
- * to obtain the list of transaction branches that are currently in
- * prepared or heuristically completed states.
- *
- * @param flag One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS. TMNOFLAGS
- * must be used when no other flags are set in the parameter.
- *
- * @exception XAException An error has occurred. Possible values are
- * XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.
- *
- * @return The resource manager returns zero or more XIDs of the
- * transaction branches that are currently in a prepared or
- * heuristically completed state. If an error occurs during the
- * operation, the resource manager should throw the appropriate
- * XAException.
- *
- */
-
- Xid[] recover(int flag) throws XAException;
-
-
- /** Informs the resource manager to roll back work done on behalf
- * of a transaction branch.
- *
- * @param xid A global transaction identifier.
- *
- * @exception XAException An error has occurred.
- */
-
- void rollback(Xid xid) throws XAException;
-
-
- /** Sets the current transaction timeout value for this XAResource
- * instance. Once set, this timeout value is effective until
- * setTransactionTimeout
is invoked again with a different
- * value. To reset the timeout value to the default value used by the resource
- * manager, set the value to zero.
- *
- * If the timeout operation is performed successfully, the method returns
- * true; otherwise false. If a resource manager does not
- * support explicitly setting the transaction timeout value, this method
- * returns false.
- *
- * @param seconds The transaction timeout value in seconds.
- *
- * @return true if the transaction timeout value is set successfully;
- * otherwise false.
- *
- * @exception XAException An error has occurred. Possible exception values
- * are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.
- */
- boolean setTransactionTimeout(int seconds) throws XAException;
-
-
- /** Starts work on behalf of a transaction branch specified in
- * xid
.
- *
- * If TMJOIN is specified, the start applies to joining a transaction
- * previously seen by the resource manager. If TMRESUME is specified,
- * the start applies to resuming a suspended transaction specified in the
- * parameter xid
.
- *
- * If neither TMJOIN nor TMRESUME is specified and the transaction
- * specified by xid
has previously been seen by the resource
- * manager, the resource manager throws the XAException exception with
- * XAER_DUPID error code.
- *
- * @param xid A global transaction identifier to be associated
- * with the resource.
- *
- * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME.
- *
- * @exception XAException An error has occurred. Possible exceptions
- * are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE,
- * XAER_NOTA, XAER_INVAL, or XAER_PROTO.
- *
- */
- void start(Xid xid, int flags) throws XAException;
-
-
- /**
- * Ends a recovery scan.
- */
- public final static int TMENDRSCAN = 0x00800000;
-
- /**
- * Disassociates the caller and marks the transaction branch
- * rollback-only.
- */
- public final static int TMFAIL = 0x20000000;
-
- /**
- * Caller is joining existing transaction branch.
- */
- public final static int TMJOIN = 0x00200000;
-
- /**
- * Use TMNOFLAGS to indicate no flags value is selected.
- */
- public final static int TMNOFLAGS = 0x00000000;
-
- /**
- * Caller is using one-phase optimization.
- */
- public final static int TMONEPHASE = 0x40000000;
-
- /**
- * Caller is resuming association with a suspended
- * transaction branch.
- */
- public final static int TMRESUME = 0x08000000;
-
- /**
- * Starts a recovery scan.
- */
- public final static int TMSTARTRSCAN = 0x01000000;
-
-
- /**
- * Disassociates caller from a transaction branch.
- */
- public final static int TMSUCCESS = 0x04000000;
-
-
- /**
- * Caller is suspending (not ending) its association with
- * a transaction branch.
- */
- public final static int TMSUSPEND = 0x02000000;
-
- /**
- * The transaction branch has been read-only and has been committed.
- */
- public final static int XA_RDONLY = 0x00000003;
-
- /**
- * The transaction work has been prepared normally.
- */
- public final static int XA_OK = 0;
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.sql/share/classes/javax/transaction/xa/Xid.java
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/Xid.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.transaction.xa;
-
-/**
- * The Xid interface is a Java mapping of the X/Open transaction identifier
- * XID structure. This interface specifies three accessor methods to
- * retrieve a global transaction format ID, global transaction ID,
- * and branch qualifier. The Xid interface is used by the transaction
- * manager and the resource managers. This interface is not visible to
- * the application programs.
- */
-public interface Xid {
-
- /**
- * Maximum number of bytes returned by getGtrid.
- */
- final static int MAXGTRIDSIZE = 64;
-
- /**
- * Maximum number of bytes returned by getBqual.
- */
- final static int MAXBQUALSIZE = 64;
-
- /**
- * Obtain the format identifier part of the XID.
- *
- * @return Format identifier. O means the OSI CCR format.
- */
- int getFormatId();
-
- /**
- * Obtain the global transaction identifier part of XID as an array
- * of bytes.
- *
- * @return Global transaction identifier.
- */
- byte[] getGlobalTransactionId();
-
- /**
- * Obtain the transaction branch identifier part of XID as an array
- * of bytes.
- *
- * @return Global transaction identifier.
- */
- byte[] getBranchQualifier();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 corba/src/java.sql/share/classes/javax/transaction/xa/package.html
--- a/corba/src/java.sql/share/classes/javax/transaction/xa/package.html Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-
-
-
-@since 1.4
-
-
diff -r cb15fc6cc038 -r 9a2e5d103695 hotspot/.hgtags
--- a/hotspot/.hgtags Thu Jan 15 11:18:14 2015 +0100
+++ b/hotspot/.hgtags Sun Jan 18 11:50:10 2015 -0800
@@ -447,3 +447,4 @@
38cb4fbd47e3472bd1b5ebac83bda96fe4869c4f jdk9-b42
65a9747147b8090037541040ba67156ec914db6a jdk9-b43
43a44b56dca61a4d766a20f0528fdd8b5ceff873 jdk9-b44
+5dc8184af1e2bb30b0103113d1f1a58a21a80c37 jdk9-b45
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxp/.hgtags
--- a/jaxp/.hgtags Thu Jan 15 11:18:14 2015 +0100
+++ b/jaxp/.hgtags Sun Jan 18 11:50:10 2015 -0800
@@ -287,3 +287,4 @@
47b0d3fa4118b9d56870cf4004987438c501f5c0 jdk9-b42
40b242363040229a05224fbc5dc203a3f46a8f8f jdk9-b43
0cb0844b58924d6086d2850c22087d06679d5eef jdk9-b44
+0dab3e848229127c7aca4c58b98e2d90ba70372f jdk9-b45
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/.hgtags
--- a/jaxws/.hgtags Thu Jan 15 11:18:14 2015 +0100
+++ b/jaxws/.hgtags Sun Jan 18 11:50:10 2015 -0800
@@ -290,3 +290,4 @@
301ddb4478fb36d1f025d14e7e48c2a434e9e6ff jdk9-b42
edc13d27dc871be57d7ca77eef77e6d04972fee2 jdk9-b43
2a03baa4d849818ff6d635f110c2813b12fc2326 jdk9-b44
+e529374fbe526dbd668e5e98fc047b42b3bc6d33 jdk9-b45
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * LazyEnvelopeSource provides the source to create lazy Envelope
- *
- * @author shih-chang.chen@oracle.com
- */
-public interface LazyEnvelopeSource extends javax.xml.transform.Source {
- /**
- * Retrieve payload qname without materializing its contents
- * @return
- * @throws SOAPException
- */
- public QName getPayloadQName();
- public XMLStreamReader readToBodyStarTag() throws XMLStreamException;
- public XMLStreamReader readPayload();
- public void writePayloadTo(XMLStreamWriter writer)throws XMLStreamException;
- public boolean isPayloadStreamReader();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj;
-
-import java.io.PrintStream;
-import java.io.PrintWriter;
-
-import javax.xml.soap.SOAPException;
-
-/**
- * An exception that signals that a SOAP exception has occurred. A
- * SOAPExceptionImpl
object may contain a String
- * that gives the reason for the exception, an embedded
- * Throwable
object, or both. This class provides methods
- * for retrieving reason messages and for retrieving the embedded
- * Throwable
object.
- *
- *
Typical reasons for throwing a SOAPExceptionImpl
- * object are problems such as difficulty setting a header, not being
- * able to send a message, and not being able to get a connection with
- * the provider. Reasons for embedding a Throwable
- * object include problems such as input/output errors or a parsing
- * problem, such as an error in parsing a header.
- */
-public class SOAPExceptionImpl extends SOAPException {
- private Throwable cause;
-
- /**
- * Constructs a SOAPExceptionImpl
object with no
- * reason or embedded Throwable
object.
- */
- public SOAPExceptionImpl() {
- super();
- this.cause = null;
- }
-
- /**
- * Constructs a SOAPExceptionImpl
object with the given
- * String
as the reason for the exception being thrown.
- *
- * @param reason a description of what caused the exception
- */
- public SOAPExceptionImpl(String reason) {
- super(reason);
- this.cause = null;
- }
-
- /**
- * Constructs a SOAPExceptionImpl
object with the given
- * String
as the reason for the exception being thrown
- * and the given Throwable
object as an embedded
- * exception.
- *
- * @param reason a description of what caused the exception
- * @param cause a Throwable
object that is to
- * be embedded in this SOAPExceptionImpl
object
- */
- public SOAPExceptionImpl(String reason, Throwable cause) {
- super (reason);
- initCause(cause);
- }
-
- /**
- * Constructs a SOAPExceptionImpl
object initialized
- * with the given Throwable
object.
- */
- public SOAPExceptionImpl(Throwable cause) {
- super (cause.toString());
- initCause(cause);
- }
-
- /**
- * Returns the detail message for this SOAPExceptionImpl
- * object.
- *
- * If there is an embedded Throwable
object, and if the
- * SOAPExceptionImpl
object has no detail message of its
- * own, this method will return the detail message from the embedded
- * Throwable
object.
- *
- * @return the error or warning message for this
- * SOAPExceptionImpl
or, if it has none, the
- * message of the embedded Throwable
object,
- * if there is one
- */
- public String getMessage() {
- String message = super.getMessage ();
- if (message == null && cause != null) {
- return cause.getMessage();
- } else {
- return message;
- }
- }
-
- /**
- * Returns the Throwable
object embedded in this
- * SOAPExceptionImpl
if there is one. Otherwise, this method
- * returns null
.
- *
- * @return the embedded Throwable
object or null
- * if there is none
- */
-
- public Throwable getCause() {
- return cause;
- }
-
- /**
- * Initializes the cause
field of this SOAPExceptionImpl
- * object with the given Throwable
object.
- *
- * This method can be called at most once. It is generally called from
- * within the constructor or immediately after the constructor has
- * returned a new SOAPExceptionImpl
object.
- * If this SOAPExceptionImpl
object was created with the
- * constructor {@link #SOAPExceptionImpl(Throwable)} or
- * {@link #SOAPExceptionImpl(String,Throwable)}, meaning that its
- * cause
field already has a value, this method cannot be
- * called even once.
- *
- * @param cause the Throwable
object that caused this
- * SOAPExceptionImpl
object to be thrown. The value of this
- * parameter is saved for later retrieval by the
- * {@link #getCause()} method. A null value is
- * permitted and indicates that the cause is nonexistent or
- * unknown.
- * @return a reference to this SOAPExceptionImpl
instance
- * @throws IllegalArgumentException if cause
is this
- * Throwable
object. (A Throwable
object
- * cannot be its own cause.)
- * @throws IllegalStateException if this SOAPExceptionImpl
object
- * was created with {@link #SOAPExceptionImpl(Throwable)} or
- * {@link #SOAPExceptionImpl(String,Throwable)}, or this
- * method has already been called on this SOAPExceptionImpl
- * object
- */
- public synchronized Throwable initCause(Throwable cause)
- {
- if(this.cause != null) {
- throw new IllegalStateException("Can't override cause");
- }
- if(cause == this) {
- throw new IllegalArgumentException("Self-causation not permitted");
- }
- this.cause = cause;
-
- return this;
- }
-
- public void printStackTrace() {
- super.printStackTrace();
- if (cause != null) {
- System.err.println("\nCAUSE:\n");
- cause.printStackTrace();
- }
- }
-
- public void printStackTrace(PrintStream s) {
- super.printStackTrace(s);
- if (cause != null) {
- s.println("\nCAUSE:\n");
- cause.printStackTrace(s);
- }
- }
-
- public void printStackTrace(PrintWriter s) {
- super.printStackTrace(s);
- if (cause != null) {
- s.println("\nCAUSE:\n");
- cause.printStackTrace(s);
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,657 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.client.p2p;
-
-import java.io.*;
-import java.lang.reflect.Method;
-import java.net.*;
-import java.security.*;
-import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-
-/**
- * This represents a "connection" to the simple HTTP-based provider.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- * @author Rajiv Mordani (rajiv.mordani@sun.com)
- * @author Manveen Kaur (manveen.kaur@sun.com)
- *
- */
-class HttpSOAPConnection extends SOAPConnection {
-
- public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url");
- private static final String sunVmVendor = "http://java.sun.com/";
- private static final String ibmVmVendor = "http://www.ibm.com/";
- private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false;
- private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false;
- private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint";
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings");
-
-
- MessageFactory messageFactory = null;
-
- boolean closed = false;
-
- public HttpSOAPConnection() throws SOAPException {
-
- try {
- messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
- } catch (NoSuchMethodError ex) {
- //fallback to default SOAP 1.1 in this case for backward compatibility
- messageFactory = MessageFactory.newInstance();
- } catch (Exception ex) {
- log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex);
- throw new SOAPExceptionImpl("Unable to create message factory", ex);
- }
- }
-
- public void close() throws SOAPException {
- if (closed) {
- log.severe("SAAJ0002.p2p.close.already.closed.conn");
- throw new SOAPExceptionImpl("Connection already closed");
- }
-
- messageFactory = null;
- closed = true;
- }
-
- public SOAPMessage call(SOAPMessage message, Object endPoint)
- throws SOAPException {
- if (closed) {
- log.severe("SAAJ0003.p2p.call.already.closed.conn");
- throw new SOAPExceptionImpl("Connection is closed");
- }
-
- Class urlEndpointClass = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- try {
- if (loader != null) {
- urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
- } else {
- urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
- }
- } catch (ClassNotFoundException ex) {
- //Do nothing. URLEndpoint is available only when JAXM is there.
- if (log.isLoggable(Level.FINEST))
- log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
- }
-
- if (urlEndpointClass != null) {
- if (urlEndpointClass.isInstance(endPoint)) {
- String url = null;
-
- try {
- Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
- url = (String) m.invoke(endPoint, (Object[])null);
- } catch (Exception ex) {
- // TBD -- exception chaining
- log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex);
- throw new SOAPExceptionImpl(
- "Internal error: " + ex.getMessage());
- }
- try {
- endPoint = new URL(url);
- } catch (MalformedURLException mex) {
- log.log(Level.SEVERE,"SAAJ0005.p2p.", mex);
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
- }
-
- if (endPoint instanceof java.lang.String) {
- try {
- endPoint = new URL((String) endPoint);
- } catch (MalformedURLException mex) {
- log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex);
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
-
- if (endPoint instanceof URL)
- try {
- SOAPMessage response = post(message, (URL)endPoint);
- return response;
- } catch (Exception ex) {
- // TBD -- chaining?
- throw new SOAPExceptionImpl(ex);
- } else {
- log.severe("SAAJ0007.p2p.bad.endPoint.type");
- throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
- }
- }
-
- SOAPMessage post(SOAPMessage message, URL endPoint) throws SOAPException, IOException {
- boolean isFailure = false;
-
- URL url = null;
- HttpURLConnection httpConnection = null;
-
- int responseCode = 0;
- try {
- if (endPoint.getProtocol().equals("https"))
- //if(!setHttps)
- initHttps();
- // Process the URL
- URI uri = new URI(endPoint.toString());
- String userInfo = uri.getRawUserInfo();
-
- url = endPoint;
-
- if (dL > 0)
- d("uri: " + userInfo + " " + url + " " + uri);
-
- // TBD
- // Will deal with https later.
- if (!url.getProtocol().equalsIgnoreCase("http")
- && !url.getProtocol().equalsIgnoreCase("https")) {
- log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
- throw new IllegalArgumentException(
- "Protocol "
- + url.getProtocol()
- + " not supported in URL "
- + url);
- }
- httpConnection = (HttpURLConnection) createConnection(url);
-
- httpConnection.setRequestMethod("POST");
-
- httpConnection.setDoOutput(true);
- httpConnection.setDoInput(true);
- httpConnection.setUseCaches(false);
- httpConnection.setInstanceFollowRedirects(true);
-
- if (message.saveRequired())
- message.saveChanges();
-
- MimeHeaders headers = message.getMimeHeaders();
-
- Iterator it = headers.getAllHeaders();
- boolean hasAuth = false; // true if we find explicit Auth header
- while (it.hasNext()) {
- MimeHeader header = (MimeHeader) it.next();
-
- String[] values = headers.getHeader(header.getName());
- if (values.length == 1)
- httpConnection.setRequestProperty(
- header.getName(),
- header.getValue());
- else {
- StringBuffer concat = new StringBuffer();
- int i = 0;
- while (i < values.length) {
- if (i != 0)
- concat.append(',');
- concat.append(values[i]);
- i++;
- }
-
- httpConnection.setRequestProperty(
- header.getName(),
- concat.toString());
- }
-
- if ("Authorization".equals(header.getName())) {
- hasAuth = true;
- if (log.isLoggable(Level.FINE))
- log.fine("SAAJ0091.p2p.https.auth.in.POST.true");
- }
- }
-
- if (!hasAuth && userInfo != null) {
- initAuthUserInfo(httpConnection, userInfo);
- }
-
- OutputStream out = httpConnection.getOutputStream();
- try {
- message.writeTo(out);
- out.flush();
- } finally {
- out.close();
- }
-
- httpConnection.connect();
-
- try {
-
- responseCode = httpConnection.getResponseCode();
-
- // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- }
- //else if (responseCode != HttpURLConnection.HTTP_OK)
- //else if (!(responseCode >= HttpURLConnection.HTTP_OK && responseCode < 207))
- else if ((responseCode / 100) != 2) {
- log.log(Level.SEVERE,
- "SAAJ0008.p2p.bad.response",
- new String[] {httpConnection.getResponseMessage()});
- throw new SOAPExceptionImpl(
- "Bad response: ("
- + responseCode
- + httpConnection.getResponseMessage());
-
- }
- } catch (IOException e) {
- // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
- responseCode = httpConnection.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- } else {
- throw e;
- }
-
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.severe("SAAJ0009.p2p.msg.send.failed");
- throw new SOAPExceptionImpl("Message send failed", ex);
- }
-
- SOAPMessage response = null;
- InputStream httpIn = null;
- if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
- try {
- MimeHeaders headers = new MimeHeaders();
-
- String key, value;
-
- // Header field 0 is the status line so we skip it.
-
- int i = 1;
-
- while (true) {
- key = httpConnection.getHeaderFieldKey(i);
- value = httpConnection.getHeaderField(i);
-
- if (key == null && value == null)
- break;
-
- if (key != null) {
- StringTokenizer values =
- new StringTokenizer(value, ",");
- while (values.hasMoreTokens())
- headers.addHeader(key, values.nextToken().trim());
- }
- i++;
- }
-
- httpIn =
- (isFailure
- ? httpConnection.getErrorStream()
- : httpConnection.getInputStream());
-
- byte[] bytes = readFully(httpIn);
-
- int length =
- httpConnection.getContentLength() == -1
- ? bytes.length
- : httpConnection.getContentLength();
-
- // If no reply message is returned,
- // content-Length header field value is expected to be zero.
- if (length == 0) {
- response = null;
- log.warning("SAAJ0014.p2p.content.zero");
- } else {
- ByteInputStream in = new ByteInputStream(bytes, length);
- response = messageFactory.createMessage(headers, in);
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex);
- throw new SOAPExceptionImpl(
- "Unable to read response: " + ex.getMessage());
- } finally {
- if (httpIn != null)
- httpIn.close();
- httpConnection.disconnect();
- }
- }
- return response;
- }
-
- // Object identifies where the request should be sent.
- // It is required to support objects of type String and java.net.URL.
-
- public SOAPMessage get(Object endPoint) throws SOAPException {
- if (closed) {
- log.severe("SAAJ0011.p2p.get.already.closed.conn");
- throw new SOAPExceptionImpl("Connection is closed");
- }
- Class urlEndpointClass = null;
-
- try {
- urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint");
- } catch (Exception ex) {
- //Do nothing. URLEndpoint is available only when JAXM is there.
- }
-
- if (urlEndpointClass != null) {
- if (urlEndpointClass.isInstance(endPoint)) {
- String url = null;
-
- try {
- Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
- url = (String) m.invoke(endPoint, (Object[])null);
- } catch (Exception ex) {
- log.severe("SAAJ0004.p2p.internal.err");
- throw new SOAPExceptionImpl(
- "Internal error: " + ex.getMessage());
- }
- try {
- endPoint = new URL(url);
- } catch (MalformedURLException mex) {
- log.severe("SAAJ0005.p2p.");
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
- }
-
- if (endPoint instanceof java.lang.String) {
- try {
- endPoint = new URL((String) endPoint);
- } catch (MalformedURLException mex) {
- log.severe("SAAJ0006.p2p.bad.URL");
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
- }
- }
-
- if (endPoint instanceof URL)
- try {
- SOAPMessage response = doGet((URL)endPoint);
- return response;
- } catch (Exception ex) {
- throw new SOAPExceptionImpl(ex);
- } else
- throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
- }
-
- SOAPMessage doGet(URL endPoint) throws SOAPException, IOException {
- boolean isFailure = false;
-
- URL url = null;
- HttpURLConnection httpConnection = null;
-
- int responseCode = 0;
- try {
- /// Is https GET allowed??
- if (endPoint.getProtocol().equals("https"))
- initHttps();
- // Process the URL
- URI uri = new URI(endPoint.toString());
- String userInfo = uri.getRawUserInfo();
-
- url = endPoint;
-
- if (dL > 0)
- d("uri: " + userInfo + " " + url + " " + uri);
-
- // TBD
- // Will deal with https later.
- if (!url.getProtocol().equalsIgnoreCase("http")
- && !url.getProtocol().equalsIgnoreCase("https")) {
- log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
- throw new IllegalArgumentException(
- "Protocol "
- + url.getProtocol()
- + " not supported in URL "
- + url);
- }
- httpConnection = (HttpURLConnection) createConnection(url);
-
- httpConnection.setRequestMethod("GET");
-
- httpConnection.setDoOutput(true);
- httpConnection.setDoInput(true);
- httpConnection.setUseCaches(false);
- httpConnection.setFollowRedirects(true);
-
- httpConnection.connect();
-
- try {
-
- responseCode = httpConnection.getResponseCode();
-
- // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- } else if ((responseCode / 100) != 2) {
- log.log(Level.SEVERE,
- "SAAJ0008.p2p.bad.response",
- new String[] { httpConnection.getResponseMessage()});
- throw new SOAPExceptionImpl(
- "Bad response: ("
- + responseCode
- + httpConnection.getResponseMessage());
-
- }
- } catch (IOException e) {
- // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
- responseCode = httpConnection.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
- isFailure = true;
- } else {
- throw e;
- }
-
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.severe("SAAJ0012.p2p.get.failed");
- throw new SOAPExceptionImpl("Get failed", ex);
- }
-
- SOAPMessage response = null;
- InputStream httpIn = null;
- if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
- try {
- MimeHeaders headers = new MimeHeaders();
-
- String key, value;
-
- // Header field 0 is the status line so we skip it.
-
- int i = 1;
-
- while (true) {
- key = httpConnection.getHeaderFieldKey(i);
- value = httpConnection.getHeaderField(i);
-
- if (key == null && value == null)
- break;
-
- if (key != null) {
- StringTokenizer values =
- new StringTokenizer(value, ",");
- while (values.hasMoreTokens())
- headers.addHeader(key, values.nextToken().trim());
- }
- i++;
- }
-
- httpIn =
- (isFailure
- ? httpConnection.getErrorStream()
- : httpConnection.getInputStream());
- // If no reply message is returned,
- // content-Length header field value is expected to be zero.
- // java SE 6 documentation says :
- // available() : an estimate of the number of bytes that can be read
- //(or skipped over) from this input stream without blocking
- //or 0 when it reaches the end of the input stream.
- if ((httpIn == null )
- || (httpConnection.getContentLength() == 0)
- || (httpIn.available() == 0)) {
- response = null;
- log.warning("SAAJ0014.p2p.content.zero");
- } else {
- response = messageFactory.createMessage(headers, httpIn);
- }
-
- } catch (SOAPException ex) {
- throw ex;
- } catch (Exception ex) {
- log.log(Level.SEVERE,
- "SAAJ0010.p2p.cannot.read.resp",
- ex);
- throw new SOAPExceptionImpl(
- "Unable to read response: " + ex.getMessage());
- } finally {
- if (httpIn != null)
- httpIn.close();
- httpConnection.disconnect();
- }
- }
- return response;
- }
-
- private byte[] readFully(InputStream istream) throws IOException {
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- byte[] buf = new byte[1024];
- int num = 0;
-
- while ((num = istream.read(buf)) != -1) {
- bout.write(buf, 0, num);
- }
-
- byte[] ret = bout.toByteArray();
-
- return ret;
- }
-
- //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
- //private static String SSL_PROVIDER =
- // "com.sun.net.ssl.internal.ssl.Provider";
- private static final String SSL_PKG;
- private static final String SSL_PROVIDER;
-
- static {
- if (isIBMVM) {
- SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
- SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
- } else {
- //if not IBM VM default to Sun.
- SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
- SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
- }
- }
-
- private void initHttps() {
- //if(!setHttps) {
- String pkgs = SAAJUtil.getSystemProperty("java.protocol.handler.pkgs");
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0053.p2p.providers", new String[] { pkgs });
-
- if (pkgs == null || pkgs.indexOf(SSL_PKG) < 0) {
- if (pkgs == null)
- pkgs = SSL_PKG;
- else
- pkgs = pkgs + "|" + SSL_PKG;
- System.setProperty("java.protocol.handler.pkgs", pkgs);
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0054.p2p.set.providers",
- new String[] { pkgs });
- try {
- Class c = Class.forName(SSL_PROVIDER);
- Provider p = (Provider) c.newInstance();
- Security.addProvider(p);
- if (log.isLoggable(Level.FINE))
- log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider",
- new String[] { SSL_PROVIDER });
- //System.out.println("Added SSL_PROVIDER " + SSL_PROVIDER);
- //setHttps = true;
- } catch (Exception ex) {
- }
- }
- //}
- }
-
- private void initAuthUserInfo(HttpURLConnection conn, String userInfo) {
- String user;
- String password;
- if (userInfo != null) { // get the user and password
- //System.out.println("UserInfo= " + userInfo );
- int delimiter = userInfo.indexOf(':');
- if (delimiter == -1) {
- user = ParseUtil.decode(userInfo);
- password = null;
- } else {
- user = ParseUtil.decode(userInfo.substring(0, delimiter++));
- password = ParseUtil.decode(userInfo.substring(delimiter));
- }
-
- String plain = user + ":";
- byte[] nameBytes = plain.getBytes();
- byte[] passwdBytes = (password == null ? new byte[0] : password
- .getBytes());
-
- // concatenate user name and password bytes and encode them
- byte[] concat = new byte[nameBytes.length + passwdBytes.length];
-
- System.arraycopy(nameBytes, 0, concat, 0, nameBytes.length);
- System.arraycopy(
- passwdBytes,
- 0,
- concat,
- nameBytes.length,
- passwdBytes.length);
- String auth = "Basic " + new String(Base64.encode(concat));
- conn.setRequestProperty("Authorization", auth);
- if (dL > 0)
- d("Adding auth " + auth);
- }
- }
-
- private static final int dL = 0;
- private void d(String s) {
- log.log(Level.SEVERE,
- "SAAJ0013.p2p.HttpSOAPConnection",
- new String[] { s });
- System.err.println("HttpSOAPConnection: " + s);
- }
-
- private java.net.HttpURLConnection createConnection(URL endpoint)
- throws IOException {
- return (HttpURLConnection) endpoint.openConnection();
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.client.p2p;
-
-import javax.xml.soap.*;
-
-/**
- * Implementation of the SOAPConnectionFactory
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public class HttpSOAPConnectionFactory extends SOAPConnectionFactory {
-
- public SOAPConnection createConnection()
- throws SOAPException
- {
- return new HttpSOAPConnection();
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Unable to create Message Factory
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connection already closed (from close method)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connection already closed (from call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Internal error
-SAAJ0005.p2p.=SAAJ0005: Bad URL (endPoint instance of javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: Bad URL (endPoint instance of String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Bad endPoint type (endPoint instance of URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Bad Response; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Message send failed
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Unable to read response
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connection already closed (from get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get failed
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Invalid reply message. Content length of reply was zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Proxy host: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Proxy Port: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocol not supported in URL, must be http or https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Providers {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Setting Providers {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: Added SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint is available only when JAXM is there
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS Authorization in POST set to true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Nachrichten-Factory kann nicht erstellt werden
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Verbindung ist bereits beendet (mit close-Methode)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Verbindung ist bereits beendet (mit call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Interner Fehler
-SAAJ0005.p2p.=SAAJ0005: Ung\u00FCltige URL (endPoint-Instanz von javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: Ung\u00FCltige URL (endPoint-Instanz von Zeichenfolge)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Ung\u00FCltiger endPoint-Typ (endPoint-Instanz von URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Ung\u00FCltige Antwort; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Nachricht konnte nicht gesendet werden
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Antwort konnte nicht gelesen werden
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Verbindung ist bereits beendet (mit get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get-Vorgang nicht erfolgreich
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Ung\u00FCltige Antwortnachricht. Contentl\u00E4nge von Antwort war null.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Proxyhost: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Proxyport: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protokoll in URL nicht unterst\u00FCtzt, muss http oder https sein
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Provider {0} werden festgelegt
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} hinzugef\u00FCgt
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint ist nur verf\u00FCgbar, wenn JAXM vorhanden ist
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS-Autorisierung in POST auf "True" festgelegt
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: no se ha podido crear la f\u00E1brica de mensajes
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: la conexi\u00F3n ya est\u00E1 cerrada (desde el m\u00E9todo de cierre)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: la conexi\u00F3n ya est\u00E1 cerrada (desde la llamada)
-SAAJ0004.p2p.internal.err=SAAJ0004: error interno
-SAAJ0005.p2p.=SAAJ0005: URL err\u00F3nea (instancia endPoint de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL err\u00F3nea (instancia endPoint de String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo endPoint err\u00F3neo (instancia endPoint de URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: respuesta err\u00F3nea; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: fallo de env\u00EDo de mensaje
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: no se ha podido leer la respuesta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: la conexi\u00F3n ya est\u00E1 cerrada (desde la obtenci\u00F3n)
-SAAJ0012.p2p.get.failed=SAAJ0012: fallo de obtenci\u00F3n
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: mensaje de respuesta no v\u00E1lido. La longitud del contenido de respuesta es cero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Host de proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Puerto de proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: el protocolo no est\u00E1 soportado en la URL. Debe ser http o https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: proveedores {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: definici\u00F3n de Proveedores {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: se ha agregado SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint s\u00F3lo est\u00E1 disponible cuando JAXM est\u00E1 all\u00ED
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: la autorizaci\u00F3n de HTTPS en POST se ha definido en true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001 : impossible de cr\u00E9er une fabrique de messages
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode de fermeture)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de l'appel)
-SAAJ0004.p2p.internal.err=SAAJ0004 : erreur interne
-SAAJ0005.p2p.=SAAJ0005 : URL incorrecte (instance d'adresse de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006 : URL incorrecte (instance d'adresse de la cha\u00EEne)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007 : type d'adresse incorrect (instance d'adresse de l'URL)
-SAAJ0008.p2p.bad.response=SAAJ0008 : r\u00E9ponse incorrecte ; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009 : \u00E9chec de l'envoi du message
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010 : impossible de lire la r\u00E9ponse
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode get)
-SAAJ0012.p2p.get.failed=SAAJ0012 : \u00E9chec de la m\u00E9thode get
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013 : HttpSOAPConnection : {0}
-SAAJ0014.p2p.content.zero=SAAJ0014 : message de r\u00E9ponse non valide. La longueur du contenu de la r\u00E9ponse \u00E9tait de z\u00E9ro.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050 : h\u00F4te proxy : {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051 : port proxy : {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052 : protocole non pris en charge dans l'URL, il doit s'agir de http ou https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053 : fournisseurs {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054 : d\u00E9finition des fournisseurs {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055 : SSL_PROVIDER {0} ajout\u00E9
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090 : URLEndpoint est disponible uniquement lorsque JAXM est pr\u00E9sent
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091 : autorisation HTTPS dans POST d\u00E9finie sur True
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Impossibile creare il message factory
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connessione gi\u00E0 chiusa (dal metodo close)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connessione gi\u00E0 chiusa (dal metodo call)
-SAAJ0004.p2p.internal.err=SAAJ0004: Errore interno
-SAAJ0005.p2p.=SAAJ0005: URL non valido (istanza endPoint di javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL non valido (istanza endPoint di String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Tipo endPoint non valido (istanza endPoint dell'URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Risposta non valida; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: Invio del messaggio non riuscito
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Impossibile leggere la risposta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connessione gi\u00E0 chiusa (dal metodo get)
-SAAJ0012.p2p.get.failed=SAAJ0012: Metodo get non riuscito
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: Messaggio di risposta non valido. La lunghezza del contenuto della risposta era pari a zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: Host proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: Porta proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocollo non supportato nell'URL, deve essere http o https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: Impostazione dei provider {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} aggiunto
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: L'endpoint dell'URL \u00E8 disponibile solo quando \u00E8 presente JAXM
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: Autorizzazione HTTPS in POST impostata su true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: (close\u30E1\u30BD\u30C3\u30C9\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: (call\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u30A8\u30E9\u30FC
-SAAJ0005.p2p.=SAAJ0005: \u7121\u52B9\u306AURL (javax.xml.messaging.URLEndpoint\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: \u7121\u52B9\u306AURL (\u6587\u5B57\u5217\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u7121\u52B9\u306AendPoint\u30BF\u30A4\u30D7(URL\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u30E1\u30C3\u30BB\u30FC\u30B8\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: (get\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u5FDC\u7B54\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7121\u52B9\u3067\u3059\u3002\u5FDC\u7B54\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u9577\u304C\u30BC\u30ED\u3067\u3057\u305F\u3002
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DB\u30B9\u30C8: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u3059\u3002http\u307E\u305F\u306Fhttps\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u30D7\u30ED\u30D0\u30A4\u30C0{0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u30D7\u30ED\u30D0\u30A4\u30C0{0}\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u3059
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306FJAXM\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u3067\u3059
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\u306EHTTPS\u8A8D\u8A3C\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: close \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \uD638\uCD9C\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0004.p2p.internal.err=SAAJ0004: \uB0B4\uBD80 \uC624\uB958
-SAAJ0005.p2p.=SAAJ0005: URL(javax.xml.messaging.URLEndpoint\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL(\uBB38\uC790\uC5F4\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \uB05D\uC810 \uC720\uD615(URL\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0008.p2p.bad.response=SAAJ0008: \uC798\uBABB\uB41C \uC751\uB2F5: {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \uBA54\uC2DC\uC9C0 \uC804\uC1A1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \uC751\uB2F5\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \uAC00\uC838\uC624\uAE30\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0012.p2p.get.failed=SAAJ0012: \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \uD68C\uC2E0 \uBA54\uC2DC\uC9C0\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uD68C\uC2E0\uC758 \uCF58\uD150\uCE20 \uAE38\uC774\uAC00 0\uC785\uB2C8\uB2E4.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \uD504\uB85D\uC2DC \uD638\uC2A4\uD2B8: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \uD504\uB85D\uC2DC \uD3EC\uD2B8: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD504\uB85C\uD1A0\uCF5C\uC785\uB2C8\uB2E4. http \uB610\uB294 https\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: {0} \uC81C\uACF5\uC790
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: {0} \uC81C\uACF5\uC790\uB97C \uC124\uC815\uD558\uB294 \uC911
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\uC744(\uB97C) \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: JAXM\uC774 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC URLEndpoint\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\uC758 HTTPS \uAD8C\uD55C \uBD80\uC5EC\uAC00 true\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: n\u00E3o \u00E9 poss\u00EDvel criar a factory da mensagem
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: a conex\u00E3o j\u00E1 foi fechada (do m\u00E9todo de fechamento)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: conex\u00E3o j\u00E1 fechada (da chamada)
-SAAJ0004.p2p.internal.err=SAAJ0004: erro interno
-SAAJ0005.p2p.=SAAJ0005: URL incorreto (a inst\u00E2ncia do endPoint de javax.xml.messaging.URLEndpoint)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL incorreto (inst\u00E2ncia de endPoint da String)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo de endPoint incorreto (inst\u00E2ncia de endPoint do URL)
-SAAJ0008.p2p.bad.response=SAAJ0008: Resposta Incorreta; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: falha no envio da mensagem
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: n\u00E3o \u00E9 poss\u00EDvel ler a resposta
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: conex\u00E3o j\u00E1 fechada (de get)
-SAAJ0012.p2p.get.failed=SAAJ0012: falha de get
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: mensagem de resposta inv\u00E1lida. O tamanho do conte\u00FAdo da resposta era zero.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: host proxy: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: porta proxy: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: protocolo n\u00E3o suportado no URL, deve ser http ou https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: provedores {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: definindo provedores {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} adicionado
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint est\u00E1 dispon\u00EDvel s\u00F3 quando JAXM est\u00E1 presente
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: autoriza\u00E7\u00E3o de HTTPS no POST definida como verdadeira
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F\u5DE5\u5382
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE close \u65B9\u6CD5)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE\u8C03\u7528)
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u9519\u8BEF
-SAAJ0005.p2p.=SAAJ0005: URL \u9519\u8BEF (javax.xml.messaging.URLEndpoint \u7684 endPoint \u5B9E\u4F8B)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: URL \u9519\u8BEF (\u5B57\u7B26\u4E32\u7684 endPoint \u5B9E\u4F8B)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: endPoint \u7C7B\u578B\u9519\u8BEF (URL \u7684 endPoint \u5B9E\u4F8B)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u54CD\u5E94\u9519\u8BEF; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u672A\u80FD\u53D1\u9001\u6D88\u606F
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE get \u65B9\u6CD5)
-SAAJ0012.p2p.get.failed=SAAJ0012: Get \u5931\u8D25
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u56DE\u590D\u6D88\u606F\u65E0\u6548\u3002\u56DE\u590D\u7684\u5185\u5BB9\u957F\u5EA6\u4E3A\u96F6\u3002
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u673A: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u7AEF\u53E3: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL \u4E2D\u4E0D\u652F\u6301\u534F\u8BAE, \u5FC5\u987B\u662F http \u6216 https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u65B9{0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u8BBE\u7F6E\u63D0\u4F9B\u65B9{0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u6DFB\u52A0 SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u4F7F\u7528 JAXM \u65F6, URLEndpoint \u624D\u53EF\u7528
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6743\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages
-# Error messages
-SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F\u8655\u7406\u7AD9
-SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u95DC\u9589\u65B9\u6CD5)
-SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u547C\u53EB)
-SAAJ0004.p2p.internal.err=SAAJ0004: \u5167\u90E8\u932F\u8AA4
-SAAJ0005.p2p.=SAAJ0005: \u932F\u8AA4\u7684 URL (javax.xml.messaging.URLEndpoint \u7684 endPoint \u57F7\u884C\u8655\u7406)
-# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
-SAAJ0006.p2p.bad.URL=SAAJ0006: \u932F\u8AA4\u7684 URL (\u5B57\u4E32\u7684 endPoint \u57F7\u884C\u8655\u7406)
-SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u932F\u8AA4\u7684 endPoint \u985E\u578B (URL \u7684 endPoint \u57F7\u884C\u8655\u7406)
-SAAJ0008.p2p.bad.response=SAAJ0008: \u932F\u8AA4\u7684\u56DE\u61C9; {0}
-SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u8A0A\u606F\u50B3\u9001\u5931\u6557
-SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u7121\u6CD5\u8B80\u53D6\u56DE\u61C9
-SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u53D6\u5F97)
-SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u5931\u6557
-SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
-SAAJ0014.p2p.content.zero=SAAJ0014: \u7121\u6548\u7684\u56DE\u8986\u8A0A\u606F. \u56DE\u8986\u7684\u5167\u5BB9\u9577\u5EA6\u70BA\u96F6.
-
-# Debug messages
-SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u6A5F: {0}
-SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0: {0}
-SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: \u4E0D\u652F\u63F4 URL \u4E2D\u7684\u5354\u5B9A, \u5FC5\u9808\u662F http \u6216 https
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u8005 {0}
-# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
-SAAJ0054.p2p.set.providers=SAAJ0054: \u8A2D\u5B9A\u63D0\u4F9B\u8005 {0}
-# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
-SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u65B0\u589E SSL_PROVIDER {0}
-
-# Trace messages
-SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u6709 JAXM \u6642\u624D\u80FD\u4F7F\u7528 URLEndpoint
-SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6B0A\u8A2D\u70BA true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)Header.java 1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-
-/**
- * The Header class stores a name/value pair to represent headers.
- *
- * @author John Mani
- */
-
-public interface Header {
-
- /**
- * Returns the name of this header.
- *
- * @return name of the header
- */
- String getName();
-
- /**
- * Returns the value of this header.
- *
- * @return value of the header
- */
- String getValue();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MessagingException.java 1.10 02/06/13
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-
-/**
- * The base class for all exceptions thrown by the Messaging classes
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class MessagingException extends Exception {
-
- /**
- * The next exception in the chain.
- *
- * @serial
- */
- private Exception next;
-
- /**
- * Constructs a MessagingException with no detail message.
- */
- public MessagingException() {
- super();
- }
-
- /**
- * Constructs a MessagingException with the specified detail message.
- * @param s the detail message
- */
- public MessagingException(String s) {
- super(s);
- }
-
- /**
- * Constructs a MessagingException with the specified
- * Exception and detail message. The specified exception is chained
- * to this exception.
- * @param s the detail message
- * @param e the embedded exception
- * @see #getNextException
- * @see #setNextException
- */
- public MessagingException(String s, Exception e) {
- super(s);
- next = e;
- }
-
- /**
- * Get the next exception chained to this one. If the
- * next exception is a MessagingException, the chain
- * may extend further.
- *
- * @return next Exception, null if none.
- */
- public synchronized Exception getNextException() {
- return next;
- }
-
- /**
- * Add an exception to the end of the chain. If the end
- * is not a MessagingException, this
- * exception cannot be added to the end.
- *
- * @param ex the new end of the Exception chain
- * @return true
if the this Exception
- * was added, false
otherwise.
- */
- public synchronized boolean setNextException(Exception ex) {
- Exception theEnd = this;
- while (theEnd instanceof MessagingException &&
- ((MessagingException)theEnd).next != null) {
- theEnd = ((MessagingException)theEnd).next;
- }
- // If the end is a MessagingException, we can add this
- // exception to the chain.
- if (theEnd instanceof MessagingException) {
- ((MessagingException)theEnd).next = ex;
- return true;
- } else
- return false;
- }
-
- /**
- * Produce the message, include the message from the nested
- * exception if there is one.
- */
- public String getMessage() {
- if (next == null)
- return super.getMessage();
- Exception n = next;
- String s = super.getMessage();
- StringBuffer sb = new StringBuffer(s == null ? "" : s);
- while (n != null) {
- sb.append(";\n nested exception is:\n\t");
- if (n instanceof MessagingException) {
- MessagingException mex = (MessagingException)n;
- sb.append(n.getClass().toString());
- String msg = mex.getSuperMessage();
- if (msg != null) {
- sb.append(": ");
- sb.append(msg);
- }
- n = mex.next;
- } else {
- sb.append(n.toString());
- n = null;
- }
- }
- return sb.toString();
- }
-
- private String getSuperMessage() {
- return super.getMessage();
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MultipartDataSource.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart;
-
-import javax.activation.DataSource;
-
-/**
- * MultipartDataSource is a DataSource
that contains body
- * parts. This allows "mail aware" DataContentHandlers
to
- * be implemented more efficiently by being aware of such
- * DataSources
and using the appropriate methods to access
- * BodyParts
.
- * - * Note that the data of a MultipartDataSource is also available as - * an input stream.
- * - * This interface will typically be implemented by providers that - * preparse multipart bodies, for example an IMAP provider. - * - * @version 1.6, 02/03/27 - * @author John Mani - * @see javax.activation.DataSource - */ - -public interface MultipartDataSource extends DataSource { - - /** - * Return the number of enclosed MimeBodyPart objects. - * - * @return number of parts - */ - public int getCount(); - - /** - * Get the specified MimeBodyPart. Parts are numbered starting at 0. - * - * @param index the index of the desired MimeBodyPart - * @return the MimeBodyPart - * @exception IndexOutOfBoundsException if the given index - * is out of range. - * @exception MessagingException - */ - public MimeBodyPart getBodyPart(int index) throws MessagingException; - -} diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java --- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,765 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MimeMultipart.java 1.31 03/01/29 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import java.io.*; -import java.util.BitSet; - -import javax.activation.DataSource; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.*; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*; - -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; - -/** - * The MimeMultipart class is an implementation of the abstract Multipart - * class that uses MIME conventions for the multipart data.
- *
- * A MimeMultipart is obtained from a MimePart whose primary type
- * is "multipart" (by invoking the part's getContent()
method)
- * or it can be created by a client as part of creating a new MimeMessage.
- * - * The default multipart subtype is "mixed". The other multipart - * subtypes, such as "alternative", "related", and so on, can be - * implemented as subclasses of MimeMultipart with additional methods - * to implement the additional semantics of that type of multipart - * content. The intent is that service providers, mail JavaBean writers - * and mail clients will write many such subclasses and their Command - * Beans, and will install them into the JavaBeans Activation - * Framework, so that any JavaMail implementation and its clients can - * transparently find and use these classes. Thus, a MIME multipart - * handler is treated just like any other type handler, thereby - * decoupling the process of providing multipart handlers from the - * JavaMail API. Lacking these additional MimeMultipart subclasses, - * all subtypes of MIME multipart data appear as MimeMultipart objects.
- *
- * An application can directly construct a MIME multipart object of any
- * subtype by using the MimeMultipart(String subtype)
- * constructor. For example, to create a "multipart/alternative" object,
- * use new MimeMultipart("alternative")
.
- *
- */
-
-//TODO: cleanup the SharedInputStream handling
-public class BMMimeMultipart extends MimeMultipart {
-
- /*
- * When true it indicates parsing hasnt been done at all
- */
- private boolean begining = true;
-
- int[] bcs = new int[256];
- int[] gss = null;
- private static final int BUFFER_SIZE = 4096;
- private byte[] buffer = new byte[BUFFER_SIZE];
- private byte[] prevBuffer = new byte[BUFFER_SIZE];
- private BitSet lastPartFound = new BitSet(1);
-
- // cached inputstream which is possibly partially consumed
- private InputStream in = null;
- private String boundary = null;
- // current stream position, set to -1 on EOF
- int b = 0;
-
- // property to indicate if lazyAttachments is ON
- private boolean lazyAttachments = false;
-
- /**
- * Default constructor. An empty MimeMultipart object
- * is created. Its content type is set to "multipart/mixed".
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * contentType
field.
- *
- * MimeBodyParts may be added later.
- */
- public BMMimeMultipart() {
- super();
- //this("mixed");
- }
-
- /**
- * Construct a MimeMultipart object of the given subtype.
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * contentType
field.
- * - * MimeBodyParts may be added later. - */ - public BMMimeMultipart(String subtype) { - super(subtype); - /* - * Compute a boundary string. - String boundary = UniqueValue.getUniqueBoundaryValue(); - ContentType cType = new ContentType("multipart", subtype, null); - contentType.setParameter("boundary", boundary); - */ - } - - /** - * Constructs a MimeMultipart object and its bodyparts from the - * given DataSource.
- * - * This constructor handles as a special case the situation where the - * given DataSource is a MultipartDataSource object. In this case, this - * method just invokes the superclass (i.e., Multipart) constructor - * that takes a MultipartDataSource object.
- *
- * Otherwise, the DataSource is assumed to provide a MIME multipart
- * byte stream. The parsed
flag is set to false. When
- * the data for the body parts are needed, the parser extracts the
- * "boundary" parameter from the content type of this DataSource,
- * skips the 'preamble' and reads bytes till the terminating
- * boundary and creates MimeBodyParts for each part of the stream.
- *
- * @param ds DataSource, can be a MultipartDataSource
- */
- public BMMimeMultipart(DataSource ds, ContentType ct)
- throws MessagingException {
- super(ds,ct);
- boundary = ct.getParameter("boundary");
- /*
- if (ds instanceof MultipartDataSource) {
- // ask super to do this for us.
- setMultipartDataSource((MultipartDataSource)ds);
- return;
- }
-
- // 'ds' was not a MultipartDataSource, we have
- // to parse this ourself.
- parsed = false;
- this.ds = ds;
- if (ct==null)
- contentType = new ContentType(ds.getContentType());
- else
- contentType = ct;
- */
-
- }
-
- public InputStream initStream() throws MessagingException {
-
- if (in == null) {
- try {
- in = ds.getInputStream();
- if (!(in instanceof ByteArrayInputStream) &&
- !(in instanceof BufferedInputStream) &&
- !(in instanceof SharedInputStream))
- in = new BufferedInputStream(in);
- } catch (Exception ex) {
- throw new MessagingException("No inputstream from datasource");
- }
-
- if (!in.markSupported()) {
- throw new MessagingException(
- "InputStream does not support Marking");
- }
- }
- return in;
- }
-
- /**
- * Parse the InputStream from our DataSource, constructing the
- * appropriate MimeBodyParts. The parsed
flag is
- * set to true, and if true on entry nothing is done. This
- * method is called by all other methods that need data for
- * the body parts, to make sure the data has been parsed.
- *
- * @since JavaMail 1.2
- */
- protected void parse() throws MessagingException {
- if (parsed)
- return;
-
- initStream();
-
- SharedInputStream sin = null;
- if (in instanceof SharedInputStream) {
- sin = (SharedInputStream)in;
- }
-
- String bnd = "--" + boundary;
- byte[] bndbytes = ASCIIUtility.getBytes(bnd);
- try {
- parse(in, bndbytes, sin);
- } catch (IOException ioex) {
- throw new MessagingException("IO Error", ioex);
- } catch (Exception ex) {
- throw new MessagingException("Error", ex);
- }
-
- parsed = true;
- }
-
- public boolean lastBodyPartFound() {
- return lastPartFound.get(0);
- }
-
- public MimeBodyPart getNextPart(
- InputStream stream, byte[] pattern, SharedInputStream sin)
- throws Exception {
-
- if (!stream.markSupported()) {
- throw new Exception("InputStream does not support Marking");
- }
-
- if (begining) {
- compile(pattern);
- if (!skipPreamble(stream, pattern, sin)) {
- throw new Exception(
- "Missing Start Boundary, or boundary does not start on a new line");
- }
- begining = false;
- }
-
- if (lastBodyPartFound()) {
- throw new Exception("No parts found in Multipart InputStream");
- }
-
- if (sin != null) {
- long start = sin.getPosition();
- b = readHeaders(stream);
- if (b == -1) {
- throw new Exception(
- "End of Stream encountered while reading part headers");
- }
- long[] v = new long[1];
- v[0] = -1; // just to ensure the code later sets it correctly
- b = readBody(stream, pattern, v, null, sin);
- // looks like this check has to be disabled
- // it is allowed to have Mime Package without closing boundary
- if (!ignoreMissingEndBoundary) {
- if ((b == -1) && !lastBodyPartFound()) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- }
- long end = v[0];
- MimeBodyPart mbp = createMimeBodyPart(sin.newStream(start, end));
- addBodyPart(mbp);
- return mbp;
-
- } else {
- InternetHeaders headers = createInternetHeaders(stream);
- ByteOutputStream baos = new ByteOutputStream();
- b = readBody(stream, pattern, null,baos, null);
- // looks like this check has to be disabled
- // in the old impl it is allowed to have Mime Package
- // without closing boundary
- if (!ignoreMissingEndBoundary) {
- if ((b == -1) && !lastBodyPartFound()) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- }
- MimeBodyPart mbp = createMimeBodyPart(
- headers, baos.getBytes(), baos.getCount());
- addBodyPart(mbp);
- return mbp;
- }
-
- }
-
- public boolean parse(
- InputStream stream, byte[] pattern, SharedInputStream sin)
- throws Exception {
-
- while (!lastPartFound.get(0) && (b != -1)) {
- getNextPart(stream, pattern, sin);
- }
- return true;
- }
-
- private int readHeaders(InputStream is) throws Exception {
- // if the headers are to end properly then there has to be CRLF
- // actually we just need to mark the start and end positions
- int b = is.read();
- while(b != -1) {
- // when it is a shared input stream no need to copy
- if (b == '\r') {
- b = is.read();
- if (b == '\n') {
- b = is.read();
- if (b == '\r') {
- b = is.read();
- if (b == '\n') {
- return b;
- } else {
- continue;
- }
- } else {
- continue;
- }
- } else {
- continue;
- }
- }
- b = is.read();
- }
- if (b == -1) {
- throw new Exception(
- "End of inputstream while reading Mime-Part Headers");
- }
- return b;
- }
-
- private int readBody(
- InputStream is, byte[] pattern, long[] posVector,
- ByteOutputStream baos, SharedInputStream sin)
- throws Exception {
- if (!find(is, pattern, posVector, baos, sin)) {
- throw new Exception(
- "Missing boundary delimitier while reading Body Part");
- }
- return b;
- }
-
- private boolean skipPreamble(
- InputStream is, byte[] pattern, SharedInputStream sin)
- throws Exception {
- if (!find(is, pattern, sin)) {
- return false;
- }
- if (lastPartFound.get(0)) {
- throw new Exception(
- "Found closing boundary delimiter while trying to skip preamble");
- }
- return true;
- }
-
-
- public int readNext(InputStream is, byte[] buff, int patternLength,
- BitSet eof, long[] posVector, SharedInputStream sin)
- throws Exception {
-
- int bufferLength = is.read(buffer, 0, patternLength);
- if (bufferLength == -1) {
- eof.flip(0);
- } else if (bufferLength < patternLength) {
- //repeatedly read patternLength - bufferLength
- int temp = 0;
- long pos = 0;
- int i = bufferLength;
- for (; i < patternLength; i++) {
- if (sin != null) {
- pos = sin.getPosition();
- }
- temp = is.read();
- if (temp == -1) {
- eof.flip(0);
- if (sin != null) {
- posVector[0] = pos;
- }
- break;
- }
- buffer[i] = (byte)temp;
- }
- bufferLength=i;
- }
- return bufferLength;
- }
-
- public boolean find(InputStream is, byte[] pattern, SharedInputStream sin)
- throws Exception {
- int i;
- int l = pattern.length;
- int lx = l -1;
- BitSet eof = new BitSet(1);
- long[] posVector = new long[1];
-
- while (true) {
- is.mark(l);
- readNext(is, buffer, l, eof, posVector, sin);
- if (eof.get(0)) {
- // End of stream
- return false;
- }
-
- /*
- if (bufferLength < l) {
- //is.reset();
- return false;
- }*/
-
- for(i = lx; i >= 0; i--) {
- if (buffer[i] != pattern[i]) {
- break;
- }
- }
-
- if (i < 0) {
- // found the boundary, skip *LWSP-char and CRLF
- if (!skipLWSPAndCRLF(is)) {
- throw new Exception("Boundary does not terminate with CRLF");
- }
- return true;
- }
-
- int s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
- is.reset();
- is.skip(s);
- }
- }
-
- public boolean find(
- InputStream is, byte[] pattern, long[] posVector,
- ByteOutputStream out, SharedInputStream sin) throws Exception {
- int i;
- int l = pattern.length;
- int lx = l -1;
- int bufferLength = 0;
- int s = 0;
- long endPos = -1;
- byte[] tmp = null;
-
- boolean first = true;
- BitSet eof = new BitSet(1);
-
- while (true) {
- is.mark(l);
- if (!first) {
- tmp = prevBuffer;
- prevBuffer = buffer;
- buffer = tmp;
- }
- if (sin != null) {
- endPos = sin.getPosition();
- }
-
- bufferLength = readNext(is, buffer, l, eof, posVector, sin);
-
- if (bufferLength == -1) {
- // End of stream
- // looks like it is allowed to not have a closing boundary
- //return false;
- //if (sin != null) {
- // posVector[0] = endPos;
- //}
- b = -1;
- if ((s == l) && (sin == null)) {
- out.write(prevBuffer, 0, s);
- }
- return true;
- }
-
- if (bufferLength < l) {
- if (sin != null) {
- //endPos = sin.getPosition();
- //posVector[0] = endPos;
- } else {
- // looks like it is allowed to not have a closing boundary
- // in the old implementation
- out.write(buffer, 0, bufferLength);
- }
- // looks like it is allowed to not have a closing boundary
- // in the old implementation
- //return false;
- b = -1;
- return true;
- }
-
- for(i = lx; i >= 0; i--) {
- if (buffer[i] != pattern[i]) {
- break;
- }
- }
-
- if (i < 0) {
- if (s > 0) {
- //looks like the earlier impl allowed just an LF
- // so if s == 1 : it must be an LF
- // if s == 2 : it must be a CR LF
- if (s <= 2) {
- //it could be "some-char\n" so write some-char
- if (s == 2) {
- if (prevBuffer[1] == '\n') {
- if (prevBuffer[0] != '\r' && prevBuffer[0] != '\n') {
- out.write(prevBuffer,0,1);
- }
- if (sin != null) {
- posVector[0] = endPos;
- }
-
- } else {
- throw new Exception(
- "Boundary characters encountered in part Body " +
- "without a preceeding CRLF");
- }
-
- } else if (s==1) {
- if (prevBuffer[0] != '\n') {
- throw new Exception(
- "Boundary characters encountered in part Body " +
- "without a preceeding CRLF");
- }else {
- if (sin != null) {
- posVector[0] = endPos;
- }
- }
- }
-
- } else if (s > 2) {
- if ((prevBuffer[s-2] == '\r') && (prevBuffer[s-1] == '\n')) {
- if (sin != null) {
- posVector[0] = endPos - 2;
- } else {
- out.write(prevBuffer, 0, s - 2);
- }
- } else if (prevBuffer[s-1] == '\n') {
- //old impl allowed just a \n
- if (sin != null) {
- posVector[0] = endPos - 1;
- } else {
- out.write(prevBuffer, 0, s - 1);
- }
- } else {
- throw new Exception(
- "Boundary characters encountered in part Body " +
- "without a preceeding CRLF");
- }
- }
- }
- // found the boundary, skip *LWSP-char and CRLF
- if (!skipLWSPAndCRLF(is)) {
- //throw new Exception(
- // "Boundary does not terminate with CRLF");
- }
- return true;
- }
-
- if ((s > 0) && (sin == null)) {
- if (prevBuffer[s-1] == (byte)13) {
- // if buffer[0] == (byte)10
- if (buffer[0] == (byte)10) {
- int j;
- for(j = lx-1; j > 0; j--) {
- if (buffer[j+1] != pattern[j]) {
- break;
- }
- }
- if (j == 0) {
- // matched the pattern excluding the last char of the pattern
- // so dont write the CR into stream
- out.write(prevBuffer,0,s-1);
- } else {
- out.write(prevBuffer,0,s);
- }
- } else {
- out.write(prevBuffer, 0, s);
- }
- } else {
- out.write(prevBuffer, 0, s);
- }
- }
-
- s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
- is.reset();
- is.skip(s);
- if (first) {
- first = false;
- }
- }
- }
-
- private boolean skipLWSPAndCRLF(InputStream is) throws Exception {
-
- b = is.read();
- //looks like old impl allowed just a \n as well
- if (b == '\n') {
- return true;
- }
-
- if (b == '\r') {
- b = is.read();
- //skip any multiple '\r' "\r\n" --> "\r\r\n" on Win2k
- if (b == '\r') {
- b = is.read();
- }
- if (b == '\n') {
- return true;
- } else {
- throw new Exception(
- "transport padding after a Mime Boundary should end in a CRLF, found CR only");
- }
- }
-
- if (b == '-') {
- b = is.read();
- if (b != '-') {
- throw new Exception(
- "Unexpected singular '-' character after Mime Boundary");
- } else {
- //System.out.println("Last Part Found");
- lastPartFound.flip(0);
- // read the next char
- b = is.read();
- }
- }
-
- while ((b != -1) && ((b == ' ') || (b == '\t'))) {
- b = is.read();
- if (b == '\n') {
- return true;
- }
- if (b == '\r') {
- b = is.read();
- //skip any multiple '\r': "\r\n" --> "\r\r\n" on Win2k
- if (b == '\r') {
- b = is.read();
- }
- if (b == '\n') {
- return true;
- }
- }
- }
-
- if (b == -1) {
- // the last boundary need not have CRLF
- if (!lastPartFound.get(0)) {
- throw new Exception(
- "End of Multipart Stream before encountering closing boundary delimiter");
- }
- return true;
- }
- return false;
- }
-
- private void compile(byte[] pattern) {
- int l = pattern.length;
-
- int i;
- int j;
-
- // Copied from J2SE 1.4 regex code
- // java.util.regex.Pattern.java
-
- // Initialise Bad Character Shift table
- for (i = 0; i < l; i++) {
- bcs[pattern[i]] = i + 1;
- }
-
- // Initialise Good Suffix Shift table
- gss = new int[l];
- NEXT: for (i = l; i > 0; i--) {
- // j is the beginning index of suffix being considered
- for (j = l - 1; j >= i; j--) {
- // Testing for good suffix
- if (pattern[j] == pattern[j - i]) {
- // pattern[j..len] is a good suffix
- gss[j - 1] = i;
- } else {
- // No match. The array has already been
- // filled up with correct values before.
- continue NEXT;
- }
- }
- while (j > 0) {
- gss[--j] = i;
- }
- }
- gss[l - 1] = 1;
- }
-
-
- /**
- * Iterates through all the parts and outputs each Mime part
- * separated by a boundary.
- */
-
- public void writeTo(OutputStream os)
- throws IOException, MessagingException {
-
- // inputStream was not null
- if (in != null) {
- contentType.setParameter("boundary", this.boundary);
- }
-
- String bnd = "--" + contentType.getParameter("boundary");
- for (int i = 0; i < parts.size(); i++) {
- OutputUtil.writeln(bnd, os); // put out boundary
- ((MimeBodyPart)parts.get(i)).writeTo(os);
- OutputUtil.writeln(os); // put out empty line
- }
-
- if (in != null) {
- OutputUtil.writeln(bnd, os); // put out boundary
- if ((os instanceof ByteOutputStream) && lazyAttachments) {
- ((ByteOutputStream) os).write(in);
- } else {
- ByteOutputStream baos = null;
- try {
- baos = new ByteOutputStream(in.available());
- baos.write(in);
- baos.writeTo(os);
- // reset the inputstream so that we can support a
- // getAttachment later
- in = baos.newInputStream();
- } finally {
- if (baos != null)
- baos.close();
- }
- }
-
- // this will endup writing the end boundary
- } else {
- // put out last boundary
- OutputUtil.writeAsAscii(bnd, os);
- OutputUtil.writeAsAscii("--", os);
- }
- }
-
- public void setInputStream(InputStream is) {
- this.in = is;
- }
-
- public InputStream getInputStream() {
- return this.in;
- }
-
- public void setBoundary(String bnd) {
- this.boundary = bnd;
- if (this.contentType != null) {
- this.contentType.setParameter("boundary", bnd);
- }
- }
- public String getBoundary() {
- return this.boundary;
- }
-
- public boolean isEndOfStream() {
- return (b == -1);
- }
-
- public void setLazyAttachments(boolean flag) {
- lazyAttachments = flag;
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentDisposition.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class represents a MIME ContentDisposition value. It provides
- * methods to parse a ContentDisposition string into individual components
- * and to generate a MIME style ContentDisposition string.
- *
- * @version 1.6, 02/03/27
- * @author John Mani
- */
-
-public class ContentDisposition {
-
- private String disposition; // disposition
- private ParameterList list; // parameter list
-
- /**
- * No-arg Constructor.
- */
- public ContentDisposition() { }
-
- /**
- * Constructor.
- *
- * @param disposition disposition
- * @param list ParameterList
- * @since JavaMail 1.2
- */
- public ContentDisposition(String disposition, ParameterList list) {
- this.disposition = disposition;
- this.list = list;
- }
-
- /**
- * Constructor that takes a ContentDisposition string. The String
- * is parsed into its constituents: dispostion and parameters.
- * A ParseException is thrown if the parse fails.
- *
- * @param s the ContentDisposition string.
- * @exception ParseException if the parse fails.
- * @since JavaMail 1.2
- */
- public ContentDisposition(String s) throws ParseException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
-
- // First "disposition" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- disposition = tk.getValue();
-
- // Then parameters ..
- String rem = h.getRemainder();
- if (rem != null)
- list = new ParameterList(rem);
- }
-
- /**
- * Return the disposition value.
- * @return the disposition
- * @since JavaMail 1.2
- */
- public String getDisposition() {
- return disposition;
- }
-
- /**
- * Return the specified parameter value. Returns null
- * if this parameter is absent.
- * @return parameter value
- * @since JavaMail 1.2
- */
- public String getParameter(String name) {
- if (list == null)
- return null;
-
- return list.get(name);
- }
-
- /**
- * Return a ParameterList object that holds all the available
- * parameters. Returns null if no parameters are available.
- *
- * @return ParameterList
- * @since JavaMail 1.2
- */
- public ParameterList getParameterList() {
- return list;
- }
-
- /**
- * Set the primary type. Overrides existing primary type.
- * @param primaryType primary type
- * @since JavaMail 1.2
- */
- public void setDisposition(String disposition) {
- this.disposition = disposition;
- }
-
- /**
- * Set the specified parameter. If this parameter already exists,
- * it is replaced by this new value.
- *
- * @param name parameter name
- * @param value parameter value
- * @since JavaMail 1.2
- */
- public void setParameter(String name, String value) {
- if (list == null)
- list = new ParameterList();
-
- list.set(name, value);
- }
-
- /**
- * Set a new ParameterList.
- * @param list ParameterList
- * @since JavaMail 1.2
- */
- public void setParameterList(ParameterList list) {
- this.list = list;
- }
-
- /**
- * Retrieve a RFC2045 style string representation of
- * this ContentDisposition. Returns null
if
- * the conversion failed.
- *
- * @return RFC2045 style string
- * @since JavaMail 1.2
- */
- public String toString() {
- if (disposition == null)
- return null;
-
- if (list == null)
- return disposition;
-
- StringBuffer sb = new StringBuffer(disposition);
-
- // append the parameter list
- // use the length of the string buffer + the length of
- // the header name formatted as follows "Content-Disposition: "
- sb.append(list.toString(sb.length() + 21));
- return sb.toString();
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ContentType.java 1.7 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class represents a MIME ContentType value. It provides
- * methods to parse a ContentType string into individual components
- * and to generate a MIME style ContentType string.
- *
- * @version 1.7, 02/03/27
- * @author John Mani
- */
-public final class ContentType {
-
- private String primaryType; // primary type
- private String subType; // subtype
- private ParameterList list; // parameter list
-
- /**
- * No-arg Constructor.
- */
- public ContentType() { }
-
- /**
- * Constructor.
- *
- * @param primaryType primary type
- * @param subType subType
- * @param list ParameterList
- */
- public ContentType(String primaryType, String subType,
- ParameterList list) {
- this.primaryType = primaryType;
- this.subType = subType;
- if (list == null)
- list = new ParameterList();
- this.list = list;
- }
-
- /**
- * Constructor that takes a Content-Type string. The String
- * is parsed into its constituents: primaryType, subType
- * and parameters. A ParseException is thrown if the parse fails.
- *
- * @param s the Content-Type string.
- * @exception ParseException if the parse fails.
- */
- public ContentType(String s) throws ParseException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
-
- // First "type" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- primaryType = tk.getValue();
-
- // The '/' separator ..
- tk = h.next();
- if ((char)tk.getType() != '/')
- throw new ParseException();
-
- // Then "subType" ..
- tk = h.next();
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- subType = tk.getValue();
-
- // Finally parameters ..
- String rem = h.getRemainder();
- if (rem != null)
- list = new ParameterList(rem);
- }
-
- public ContentType copy() {
- return new ContentType(primaryType,subType,list.copy());
- }
-
- /**
- * Return the primary type.
- * @return the primary type
- */
- public String getPrimaryType() {
- return primaryType;
- }
-
- /**
- * Return the subType.
- * @return the subType
- */
- public String getSubType() {
- return subType;
- }
-
- /**
- * Return the MIME type string, without the parameters.
- * The returned value is basically the concatenation of
- * the primaryType, the '/' character and the secondaryType.
- *
- * @return the type
- */
- public String getBaseType() {
- return primaryType + '/' + subType;
- }
-
- /**
- * Return the specified parameter value. Returns null
- * if this parameter is absent.
- * @return parameter value
- */
- public String getParameter(String name) {
- if (list == null)
- return null;
-
- return list.get(name);
- }
-
- /**
- * Return a ParameterList object that holds all the available
- * parameters. Returns null if no parameters are available.
- *
- * @return ParameterList
- */
- public ParameterList getParameterList() {
- return list;
- }
-
- /**
- * Set the primary type. Overrides existing primary type.
- * @param primaryType primary type
- */
- public void setPrimaryType(String primaryType) {
- this.primaryType = primaryType;
- }
-
- /**
- * Set the subType. Overrides existing subType
- * @param subType subType
- */
- public void setSubType(String subType) {
- this.subType = subType;
- }
-
- /**
- * Set the specified parameter. If this parameter already exists,
- * it is replaced by this new value.
- *
- * @param name parameter name
- * @param value parameter value
- */
- public void setParameter(String name, String value) {
- if (list == null)
- list = new ParameterList();
-
- list.set(name, value);
- }
-
- /**
- * Set a new ParameterList.
- * @param list ParameterList
- */
- public void setParameterList(ParameterList list) {
- this.list = list;
- }
-
- /**
- * Retrieve a RFC2045 style string representation of
- * this Content-Type. Returns null
if
- * the conversion failed.
- *
- * @return RFC2045 style string
- */
- public String toString() {
- if (primaryType == null || subType == null) // need both
- return null;
-
- StringBuffer sb = new StringBuffer();
- sb.append(primaryType).append('/').append(subType);
- if (list != null)
- // Http Binding section of the "SOAP with attachments" specification says,
- // "SOAP message senders should send Content-Type headers on a single long line."
- // (http://www.w3.org/TR/SOAP-attachments#HTTPBinding)
- sb.append(list.toString());
-
- return sb.toString();
- }
-
- /**
- * Match with the specified ContentType object. This method
- * compares only the primaryType
and
- * subType
. The parameters of both operands
- * are ignored.
- *
- * For example, this method will return true
when
- * comparing the ContentTypes for "text/plain"
- * and "text/plain; charset=foobar".
- *
- * If the subType
of either operand is the special
- * character '*', then the subtype is ignored during the match.
- * For example, this method will return true
when
- * comparing the ContentTypes for "text/plain"
- * and "text/*"
- *
- * @param cType to compare this against
- */
- public boolean match(ContentType cType) {
- // Match primaryType
- if (!primaryType.equalsIgnoreCase(cType.getPrimaryType()))
- return false;
-
- String sType = cType.getSubType();
-
- // If either one of the subTypes is wildcarded, return true
- if ((subType.charAt(0) == '*') || (sType.charAt(0) == '*'))
- return true;
-
- // Match subType
- if (!subType.equalsIgnoreCase(sType))
- return false;
-
- return true;
- }
-
- /**
- * Match with the specified content-type string. This method
- * compares only the primaryType
and
- * subType
.
- * The parameters of both operands are ignored.
- *
- * For example, this method will return true
when
- * comparing the ContentType for "text/plain"
- * with "text/plain; charset=foobar".
- *
- * If the subType
of either operand is the special
- * character '*', then the subtype is ignored during the match.
- * For example, this method will return true
when
- * comparing the ContentType for "text/plain"
- * with "text/*"
- */
- public boolean match(String s) {
- try {
- return match(new ContentType(s));
- } catch (ParseException pex) {
- return false;
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,382 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)HeaderTokenizer.java 1.9 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This class tokenizes RFC822 and MIME headers into the basic
- * symbols specified by RFC822 and MIME.
- * - * This class handles folded headers (ie headers with embedded - * CRLF SPACE sequences). The folds are removed in the returned - * tokens. - * - * @version 1.9, 02/03/27 - * @author John Mani - */ - -public class HeaderTokenizer { - - /** - * The Token class represents tokens returned by the - * HeaderTokenizer. - */ - public static class Token { - - private int type; - private String value; - - /** - * Token type indicating an ATOM. - */ - public static final int ATOM = -1; - - /** - * Token type indicating a quoted string. The value - * field contains the string without the quotes. - */ - public static final int QUOTEDSTRING = -2; - - /** - * Token type indicating a comment. The value field - * contains the comment string without the comment - * start and end symbols. - */ - public static final int COMMENT = -3; - - /** - * Token type indicating end of input. - */ - public static final int EOF = -4; - - /** - * Constructor. - * @param type Token type - * @param value Token value - */ - public Token(int type, String value) { - this.type = type; - this.value = value; - } - - /** - * Return the type of the token. If the token represents a - * delimiter or a control character, the type is that character - * itself, converted to an integer. Otherwise, it's value is - * one of the following: - *
ATOM
A sequence of ASCII characters
- * delimited by either SPACE, CTL, "(", <"> or the
- * specified SPECIALS
- * QUOTEDSTRING
A sequence of ASCII characters
- * within quotes
- * COMMENT
A sequence of ASCII characters
- * within "(" and ")".
- * EOF
End of header
- * RFC822
or
- * MIME
- * @param skipComments If true, comments are skipped and
- * not returned as tokens
- */
- public HeaderTokenizer(String header, String delimiters,
- boolean skipComments) {
- string = (header == null) ? "" : header; // paranoia ?!
- this.skipComments = skipComments;
- this.delimiters = delimiters;
- currentPos = nextPos = peekPos = 0;
- maxPos = string.length();
- }
-
- /**
- * Constructor. Comments are ignored and not returned as tokens
- *
- * @param header The header that is tokenized
- * @param delimiters The delimiters to be used
- */
- public HeaderTokenizer(String header, String delimiters) {
- this(header, delimiters, true);
- }
-
- /**
- * Constructor. The RFC822 defined delimiters - RFC822 - are
- * used to delimit ATOMS. Also comments are skipped and not
- * returned as tokens
- */
- public HeaderTokenizer(String header) {
- this(header, RFC822);
- }
-
- /**
- * Parses the next token from this String.
- *
- * Clients sit in a loop calling next() to parse successive
- * tokens until an EOF Token is returned.
- *
- * @return the next Token
- * @exception ParseException if the parse fails
- */
- public Token next() throws ParseException {
- Token tk;
-
- currentPos = nextPos; // setup currentPos
- tk = getNext();
- nextPos = peekPos = currentPos; // update currentPos and peekPos
- return tk;
- }
-
- /**
- * Peek at the next token, without actually removing the token
- * from the parse stream. Invoking this method multiple times
- * will return successive tokens, until next()
is
- * called.
- * - * @return the next Token - * @exception ParseException if the parse fails - */ - public Token peek() throws ParseException { - Token tk; - - currentPos = peekPos; // setup currentPos - tk = getNext(); - peekPos = currentPos; // update peekPos - return tk; - } - - /** - * Return the rest of the Header. - * - * @return String rest of header. null is returned if we are - * already at end of header - */ - public String getRemainder() { - return string.substring(nextPos); - } - - /* - * Return the next token starting from 'currentPos'. After the - * parse, 'currentPos' is updated to point to the start of the - * next token. - */ - private Token getNext() throws ParseException { - // If we're already at end of string, return EOF - if (currentPos >= maxPos) - return EOFToken; - - // Skip white-space, position currentPos beyond the space - if (skipWhiteSpace() == Token.EOF) - return EOFToken; - - char c; - int start; - boolean filter = false; - - c = string.charAt(currentPos); - - // Check or Skip comments and position currentPos - // beyond the comment - while (c == '(') { - // Parsing comment .. - int nesting; - for (start = ++currentPos, nesting = 1; - nesting > 0 && currentPos < maxPos; - currentPos++) { - c = string.charAt(currentPos); - if (c == '\\') { // Escape sequence - currentPos++; // skip the escaped character - filter = true; - } else if (c == '\r') - filter = true; - else if (c == '(') - nesting++; - else if (c == ')') - nesting--; - } - if (nesting != 0) - throw new ParseException("Unbalanced comments"); - - if (!skipComments) { - // Return the comment, if we are asked to. - // Note that the comment start & end markers are ignored. - String s; - if (filter) // need to go thru the token again. - s = filterToken(string, start, currentPos-1); - else - s = string.substring(start,currentPos-1); - - return new Token(Token.COMMENT, s); - } - - // Skip any whitespace after the comment. - if (skipWhiteSpace() == Token.EOF) - return EOFToken; - c = string.charAt(currentPos); - } - - // Check for quoted-string and position currentPos - // beyond the terminating quote - if (c == '"') { - for (start = ++currentPos; currentPos < maxPos; currentPos++) { - c = string.charAt(currentPos); - if (c == '\\') { // Escape sequence - currentPos++; - filter = true; - } else if (c == '\r') - filter = true; - else if (c == '"') { - currentPos++; - String s; - - if (filter) - s = filterToken(string, start, currentPos-1); - else - s = string.substring(start,currentPos-1); - - return new Token(Token.QUOTEDSTRING, s); - } - } - throw new ParseException("Unbalanced quoted string"); - } - - // Check for SPECIAL or CTL - if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) { - currentPos++; // re-position currentPos - char ch[] = new char[1]; - ch[0] = c; - return new Token((int)c, new String(ch)); - } - - // Check for ATOM - for (start = currentPos; currentPos < maxPos; currentPos++) { - c = string.charAt(currentPos); - // ATOM is delimited by either SPACE, CTL, "(", <"> - // or the specified SPECIALS - if (c < 040 || c >= 0177 || c == '(' || c == ' ' || - c == '"' || delimiters.indexOf(c) >= 0) - break; - } - return new Token(Token.ATOM, string.substring(start, currentPos)); - } - - // Skip SPACE, HT, CR and NL - private int skipWhiteSpace() { - char c; - for (; currentPos < maxPos; currentPos++) - if (((c = string.charAt(currentPos)) != ' ') && - (c != '\t') && (c != '\r') && (c != '\n')) - return currentPos; - return Token.EOF; - } - - /* Process escape sequences and embedded LWSPs from a comment or - * quoted string. - */ - private static String filterToken(String s, int start, int end) { - StringBuffer sb = new StringBuffer(); - char c; - boolean gotEscape = false; - boolean gotCR = false; - - for (int i = start; i < end; i++) { - c = s.charAt(i); - if (c == '\n' && gotCR) { - // This LF is part of an unescaped - // CRLF sequence (i.e, LWSP). Skip it. - gotCR = false; - continue; - } - - gotCR = false; - if (!gotEscape) { - // Previous character was NOT '\' - if (c == '\\') // skip this character - gotEscape = true; - else if (c == '\r') // skip this character - gotCR = true; - else // append this character - sb.append(c); - } else { - // Previous character was '\'. So no need to - // bother with any special processing, just - // append this character - sb.append(c); - gotEscape = false; - } - } - return sb.toString(); - } -} diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java --- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,402 +0,0 @@ -/* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)InternetHeaders.java 1.16 02/08/08 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - -import com.sun.xml.internal.messaging.saaj.packaging.mime.Header; -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream; -import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; - -import java.io.IOException; -import java.io.InputStream; -import java.util.AbstractList; -import java.util.List; -import java.util.NoSuchElementException; - -/** - * InternetHeaders is a utility class that manages RFC822 style - * headers. Given an RFC822 format message stream, it reads lines - * until the blank line that indicates end of header. The input stream - * is positioned at the start of the body. The lines are stored - * within the object and can be extracted as either Strings or - * {@link Header} objects.
- *
- * This class is mostly intended for service providers. MimeMessage - * and MimeBody use this class for holding their headers.- *
- *- *
- * RFC822 and MIME header fields must contain only - * US-ASCII characters. If a header contains non US-ASCII characters, - * it must be encoded as per the rules in RFC 2047. The MimeUtility - * class provided in this package can be used to to achieve this. - * Callers of thesetHeader
, addHeader
, and
- * addHeaderLine
methods are responsible for enforcing
- * the MIME requirements for the specified headers. In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP). Received headers may have been folded. The application is
- * responsible for folding and unfolding headers as appropriate. - * - * @author John Mani - * @author Bill Shannon - * @see MimeUtility - */ -public final class InternetHeaders { - - private final FinalArrayList headers = new FinalArrayList(); - - /** - * Lazily cerated view of header lines (Strings). - */ - private List headerValueView; - - /** - * Create an empty InternetHeaders object. - */ - public InternetHeaders() { - } - - /** - * Read and parse the given RFC822 message stream till the - * blank line separating the header from the body. The input - * stream is left positioned at the start of the body. The - * header lines are stored internally.
- *
- * For efficiency, wrap a BufferedInputStream around the actual - * input stream and pass it as the parameter. - * - * @param is RFC822 input stream - */ - public InternetHeaders(InputStream is) throws MessagingException { - load(is); - } - - /** - * Read and parse the given RFC822 message stream till the - * blank line separating the header from the body. Store the - * header lines inside this InternetHeaders object.- *
- * Note that the header lines are added into this InternetHeaders - * object, so any existing headers in this object will not be - * affected. - * - * @param is RFC822 input stream - */ - public void load(InputStream is) throws MessagingException { - // Read header lines until a blank line. It is valid - // to have BodyParts with no header lines. - String line; - LineInputStream lis = new LineInputStream(is); - String prevline = null; // the previous header line, as a string - // a buffer to accumulate the header in, when we know it's needed - StringBuffer lineBuffer = new StringBuffer(); - - try { - //while ((line = lis.readLine()) != null) { - do { - line = lis.readLine(); - if (line != null && - (line.startsWith(" ") || line.startsWith("\t"))) { - // continuation of header - if (prevline != null) { - lineBuffer.append(prevline); - prevline = null; - } - lineBuffer.append("\r\n"); - lineBuffer.append(line); - } else { - // new header - if (prevline != null) - addHeaderLine(prevline); - else if (lineBuffer.length() > 0) { - // store previous header first - addHeaderLine(lineBuffer.toString()); - lineBuffer.setLength(0); - } - prevline = line; - } - } while (line != null && line.length() > 0); - } catch (IOException ioex) { - throw new MessagingException("Error in input stream", ioex); - } - } - - /** - * Return all the values for the specified header. The - * values are String objects. Returnsnull
- * if no headers with the specified name exist.
- *
- * @param name header name
- * @return array of header values, or null if none
- */
- public String[] getHeader(String name) {
- // XXX - should we just step through in index order?
- FinalArrayList v = new FinalArrayList(); // accumulate return values
-
- int len = headers.size();
- for( int i=0; inull
- * if no headers with the specified name exist.
- *
- * @param delimiter delimiter
- * @return the value fields for all headers with
- * this name, or null if none
- * @param name header name
- */
- public String getHeader(String name, String delimiter) {
- String[] s = getHeader(name);
-
- if (s == null)
- return null;
-
- if ((s.length == 1) || delimiter == null)
- return s[0];
-
- StringBuffer r = new StringBuffer(s[0]);
- for (int i = 1; i < s.length; i++) {
- r.append(delimiter);
- r.append(s[i]);
- }
- return r.toString();
- }
-
- /**
- * Change the first header line that matches name
- * to have value, adding a new header if no existing header
- * matches. Remove all matching headers but the first. - *
- * Note that RFC822 headers can only contain US-ASCII characters - * - * @param name header name - * @param value header value - */ - public void setHeader(String name, String value) { - boolean found = false; - - for (int i = 0; i < headers.size(); i++) { - hdr h = (hdr) headers.get(i); - if (name.equalsIgnoreCase(h.name)) { - if (!found) { - int j; - if (h.line != null && (j = h.line.indexOf(':')) >= 0) { - h.line = h.line.substring(0, j + 1) + " " + value; - } else { - h.line = name + ": " + value; - } - found = true; - } else { - headers.remove(i); - i--; // have to look at i again - } - } - } - - if (!found) { - addHeader(name, value); - } - } - - /** - * Add a header with the specified name and value to the header list.- *
- * Note that RFC822 headers can only contain US-ASCII characters. - * - * @param name header name - * @param value header value - */ - public void addHeader(String name, String value) { - int pos = headers.size(); - for (int i = headers.size() - 1; i >= 0; i--) { - hdr h = (hdr) headers.get(i); - if (name.equalsIgnoreCase(h.name)) { - headers.add(i + 1, new hdr(name, value)); - return; - } - // marker for default place to add new headers - if (h.name.equals(":")) - pos = i; - } - headers.add(pos, new hdr(name, value)); - } - - /** - * Remove all header entries that match the given name - * - * @param name header name - */ - public void removeHeader(String name) { - for (int i = 0; i < headers.size(); i++) { - hdr h = (hdr) headers.get(i); - if (name.equalsIgnoreCase(h.name)) { - headers.remove(i); - i--; // have to look at i again - } - } - } - - /** - * Return all the headers as an Enumeration of - * {@link Header} objects. - * - * @return Header objects - */ - public FinalArrayList getAllHeaders() { - return headers; // conceptually it should be read-only, but for performance reason I'm not wrapping it here - } - - /** - * Add an RFC822 header line to the header store. - * If the line starts with a space or tab (a continuation line), - * add it to the last header line in the list.- *
- * Note that RFC822 headers can only contain US-ASCII characters - * - * @param line raw RFC822 header line - */ - public void addHeaderLine(String line) { - try { - char c = line.charAt(0); - if (c == ' ' || c == '\t') { - hdr h = (hdr) headers.get(headers.size() - 1); - h.line += "\r\n" + line; - } else - headers.add(new hdr(line)); - } catch (StringIndexOutOfBoundsException e) { - // line is empty, ignore it - return; - } catch (NoSuchElementException e) { - // XXX - vector is empty? - } - } - - /** - * Return all the header lines as a collection - */ - public List getAllHeaderLines() { - if(headerValueView==null) - headerValueView = new AbstractList() { - public Object get(int index) { - return ((hdr)headers.get(index)).line; - } - - public int size() { - return headers.size(); - } - }; - return headerValueView; - } -} - -/* - * A private utility class to represent an individual header. - */ - -class hdr implements Header { - // XXX - should these be private? - String name; // the canonicalized (trimmed) name of this header - // XXX - should name be stored in lower case? - String line; // the entire RFC822 header "line" - - /* - * Constructor that takes a line and splits out - * the header name. - */ - hdr(String l) { - int i = l.indexOf(':'); - if (i < 0) { - // should never happen - name = l.trim(); - } else { - name = l.substring(0, i).trim(); - } - line = l; - } - - /* - * Constructor that takes a header name and value. - */ - hdr(String n, String v) { - name = n; - line = n + ": " + v; - } - - /* - * Return the "name" part of the header line. - */ - public String getName() { - return name; - } - - /* - * Return the "value" part of the header line. - */ - public String getValue() { - int i = line.indexOf(':'); - if (i < 0) - return line; - - int j; - if (name.equalsIgnoreCase("Content-Description")) { - // Content-Description should retain the folded whitespace after header unfolding - - // rf. RFC2822 section 2.2.3, rf. RFC2822 section 3.2.3 - for (j = i + 1; j < line.length(); j++) { - char c = line.charAt(j); - if (!(/*c == ' ' ||*/c == '\t' || c == '\r' || c == '\n')) - break; - } - } else { - // skip whitespace after ':' - for (j = i + 1; j < line.length(); j++) { - char c = line.charAt(j); - if (!(c == ' ' || c == '\t' || c == '\r' || c == '\n')) - break; - } - } - return line.substring(j); - } -} diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java --- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeBodyPart.java Thu Jan 15 11:18:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1165 +0,0 @@ -/* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @(#)MimeBodyPart.java 1.52 03/02/12 - */ - - - -package com.sun.xml.internal.messaging.saaj.packaging.mime.internet; - - -import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException; -import com.sun.xml.internal.messaging.saaj.packaging.mime.util.OutputUtil; -import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream; -import com.sun.xml.internal.messaging.saaj.util.FinalArrayList; - -import java.util.logging.Level; -import java.util.logging.Logger; -import javax.activation.DataHandler; -import java.io.BufferedInputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.util.List; -import javax.activation.DataSource; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; - -/** - * This class represents a MIME body part. - * MimeBodyParts are contained inMimeMultipart
- * objects.
- *
- * MimeBodyPart uses the InternetHeaders
class to parse
- * and store the headers of that body part.
- * - *
- *
- * RFC 822 header fields must contain only
- * US-ASCII characters. MIME allows non ASCII characters to be present
- * in certain portions of certain headers, by encoding those characters.
- * RFC 2047 specifies the rules for doing this. The MimeUtility
- * class provided in this package can be used to to achieve this.
- * Callers of the setHeader
, addHeader
, and
- * addHeaderLine
methods are responsible for enforcing
- * the MIME requirements for the specified headers. In addition, these
- * header fields must be folded (wrapped) before being sent if they
- * exceed the line length limitation for the transport (1000 bytes for
- * SMTP). Received headers may have been folded. The application is
- * responsible for folding and unfolding headers as appropriate.
- *
- * @author John Mani
- * @author Bill Shannon
- * @see MimeUtility
- */
-
-public final class MimeBodyPart {
-
- /**
- * This part should be presented as an attachment.
- * @see #getDisposition
- * @see #setDisposition
- */
- public static final String ATTACHMENT = "attachment";
-
- /**
- * This part should be presented inline.
- * @see #getDisposition
- * @see #setDisposition
- */
- public static final String INLINE = "inline";
-
-
- // Paranoia:
- // allow this last minute change to be disabled if it causes problems
- private static boolean setDefaultTextCharset = true;
-
- static {
- try {
- String s = System.getProperty("mail.mime.setdefaulttextcharset");
- // default to true
- setDefaultTextCharset = s == null || !s.equalsIgnoreCase("false");
- } catch (SecurityException sex) {
- // ignore it
- }
- }
-
- /*
- Data is represented in one of three forms.
- Either we have a DataHandler, or byte[] as the raw content image, or the contentStream.
- It's OK to have more than one of them, provided that they are identical.
- */
-
- /**
- * The DataHandler object representing this MimeBodyPart's content.
- */
- private DataHandler dh;
-
- /**
- * Byte array that holds the bytes of the content of this MimeBodyPart.
- * Used in a pair with {@link #contentLength} to denote a regision of a buffer
- * as a valid data.
- */
- private byte[] content;
- private int contentLength;
- private int start = 0;
-
- /**
- * If the data for this body part was supplied by an
- * InputStream that implements the SharedInputStream interface,
- * contentStream
is another such stream representing
- * the content of this body part. In this case, content
- * will be null.
- *
- * @since JavaMail 1.2
- */
- private InputStream contentStream;
-
-
-
- /**
- * The InternetHeaders object that stores all the headers
- * of this body part.
- */
- private final InternetHeaders headers;
-
- /**
- * The MimeMultipart
object containing this MimeBodyPart
,
- * if known.
- * @since JavaMail 1.1
- */
- private MimeMultipart parent;
-
- private MIMEPart mimePart;
-
- /**
- * An empty MimeBodyPart object is created.
- * This body part maybe filled in by a client constructing a multipart
- * message.
- */
- public MimeBodyPart() {
- headers = new InternetHeaders();
- }
-
- /**
- * Constructs a MimeBodyPart by reading and parsing the data from
- * the specified input stream. The parser consumes data till the end
- * of the given input stream. The input stream must start at the
- * beginning of a valid MIME body part and must terminate at the end
- * of that body part.
- * - * Note that the "boundary" string that delimits body parts must - * not be included in the input stream. The intention - * is that the MimeMultipart parser will extract each body part's bytes - * from a multipart stream and feed them into this constructor, without - * the delimiter strings. - * - * @param is the body part Input Stream - */ - public MimeBodyPart(InputStream is) throws MessagingException { - if (!(is instanceof ByteArrayInputStream) && - !(is instanceof BufferedInputStream) && - !(is instanceof SharedInputStream)) - is = new BufferedInputStream(is); - - headers = new InternetHeaders(is); - - if (is instanceof SharedInputStream) { - SharedInputStream sis = (SharedInputStream) is; - contentStream = sis.newStream(sis.getPosition(), -1); - } else { - ByteOutputStream bos = null; - try { - bos = new ByteOutputStream(); - bos.write(is); - content = bos.getBytes(); - contentLength = bos.getCount(); - } catch (IOException ioex) { - throw new MessagingException("Error reading input stream", ioex); - } finally { - if (bos != null) - bos.close(); - } - } - - } - - /** - * Constructs a MimeBodyPart using the given header and - * content bytes.
- *
- * Used by providers.
- *
- * @param headers The header of this part
- * @param content bytes representing the body of this part.
- */
- public MimeBodyPart(InternetHeaders headers, byte[] content, int len) {
- this.headers = headers;
- this.content = content;
- this.contentLength = len;
- }
-
- public MimeBodyPart(
- InternetHeaders headers, byte[] content, int start, int len) {
- this.headers = headers;
- this.content = content;
- this.start = start;
- this.contentLength = len;
- }
-
- public MimeBodyPart(MIMEPart part) {
- mimePart = part;
- headers = new InternetHeaders();
- List extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = mimePart.getAllHeaders();
- for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
- headers.addHeader(hd.getName(), hd.getValue());
- }
- }
- /**
- * Return the containing MimeMultipart
object,
- * or null
if not known.
- */
- public MimeMultipart getParent() {
- return parent;
- }
-
- /**
- * Set the parent of this MimeBodyPart
to be the specified
- * MimeMultipart
. Normally called by MimeMultipart
's
- * addBodyPart
method. parent
may be
- * null
if the MimeBodyPart
is being removed
- * from its containing MimeMultipart
.
- * @since JavaMail 1.1
- */
- public void setParent(MimeMultipart parent) {
- this.parent = parent;
- }
-
- /**
- * Return the size of the content of this body part in bytes.
- * Return -1 if the size cannot be determined.
- * - * Note that this number may not be an exact measure of the - * content size and may or may not account for any transfer - * encoding of the content.
- *
- * This implementation returns the size of the content
- * array (if not null), or, if contentStream
is not
- * null, and the available
method returns a positive
- * number, it returns that number as the size. Otherwise, it returns
- * -1.
- *
- * @return size in bytes, or -1 if not known
- */
- public int getSize() {
-
- if (mimePart != null) {
- try {
- return mimePart.read().available();
- } catch (IOException ex) {
- return -1;
- }
- }
- if (content != null)
- return contentLength;
- if (contentStream != null) {
- try {
- int size = contentStream.available();
- // only believe the size if it's greate than zero, since zero
- // is the default returned by the InputStream class itself
- if (size > 0)
- return size;
- } catch (IOException ex) {
- // ignore it
- }
- }
- return -1;
- }
-
- /**
- * Return the number of lines for the content of this MimeBodyPart.
- * Return -1 if this number cannot be determined.
- * - * Note that this number may not be an exact measure of the - * content length and may or may not account for any transfer - * encoding of the content.
- * - * This implementation returns -1. - * - * @return number of lines, or -1 if not known - */ - public int getLineCount() { - return -1; - } - - /** - * Returns the value of the RFC 822 "Content-Type" header field. - * This represents the content type of the content of this - * body part. This value must not be null. If this field is - * unavailable, "text/plain" should be returned.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- *
- * @return Content-Type of this body part
- */
- public String getContentType() {
- if (mimePart != null) {
- return mimePart.getContentType();
- }
- String s = getHeader("Content-Type", null);
- if (s == null)
- s = "text/plain";
-
- return s;
- }
-
- /**
- * Is this MimeBodyPart of the specified MIME type? This method
- * compares only the primaryType
and
- * subType
.
- * The parameters of the content types are ignored.
- *
- * For example, this method will return true
when
- * comparing a MimeBodyPart of content type "text/plain"
- * with "text/plain; charset=foobar".
- *
- * If the subType
of mimeType
is the
- * special character '*', then the subtype is ignored during the
- * comparison.
- */
- public boolean isMimeType(String mimeType) {
- boolean result;
- // XXX - lots of room for optimization here!
- try {
- ContentType ct = new ContentType(getContentType());
- result = ct.match(mimeType);
- } catch (ParseException ex) {
- result = getContentType().equalsIgnoreCase(mimeType);
- }
- return result;
- }
-
- /**
- * Returns the value of the "Content-Disposition" header field.
- * This represents the disposition of this part. The disposition
- * describes how the part should be presented to the user.
- * - * If the Content-Disposition field is unavailable, - * null is returned.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- *
- * @see #headers
- */
- public String getDisposition() throws MessagingException {
- String s = getHeader("Content-Disposition", null);
-
- if (s == null)
- return null;
-
- ContentDisposition cd = new ContentDisposition(s);
- return cd.getDisposition();
- }
-
- /**
- * Set the "Content-Disposition" header field of this body part.
- * If the disposition is null, any existing "Content-Disposition"
- * header field is removed.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setDisposition(String disposition) throws MessagingException {
- if (disposition == null)
- removeHeader("Content-Disposition");
- else {
- String s = getHeader("Content-Disposition", null);
- if (s != null) {
- /* A Content-Disposition header already exists ..
- *
- * Override disposition, but attempt to retain
- * existing disposition parameters
- */
- ContentDisposition cd = new ContentDisposition(s);
- cd.setDisposition(disposition);
- disposition = cd.toString();
- }
- setHeader("Content-Disposition", disposition);
- }
- }
-
- /**
- * Returns the content transfer encoding from the
- * "Content-Transfer-Encoding" header
- * field. Returns null
if the header is unavailable
- * or its value is absent.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- *
- * @see #headers
- */
- public String getEncoding() throws MessagingException {
- String s = getHeader("Content-Transfer-Encoding", null);
-
- if (s == null)
- return null;
-
- s = s.trim(); // get rid of trailing spaces
- // quick check for known values to avoid unnecessary use
- // of tokenizer.
- if (s.equalsIgnoreCase("7bit") || s.equalsIgnoreCase("8bit") ||
- s.equalsIgnoreCase("quoted-printable") ||
- s.equalsIgnoreCase("base64"))
- return s;
-
- // Tokenize the header to obtain the encoding (skip comments)
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
-
- HeaderTokenizer.Token tk;
- int tkType;
-
- for (;;) {
- tk = h.next(); // get a token
- tkType = tk.getType();
- if (tkType == HeaderTokenizer.Token.EOF)
- break; // done
- else if (tkType == HeaderTokenizer.Token.ATOM)
- return tk.getValue();
- else // invalid token, skip it.
- continue;
- }
- return s;
- }
-
- /**
- * Returns the value of the "Content-ID" header field. Returns
- * null
if the field is unavailable or its value is
- * absent.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- */
- public String getContentID() {
- return getHeader("Content-ID", null);
- }
-
- /**
- * Set the "Content-ID" header field of this body part.
- * If the cid
parameter is null, any existing
- * "Content-ID" is removed.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- * @since JavaMail 1.3
- */
- public void setContentID(String cid) {
- if (cid == null)
- removeHeader("Content-ID");
- else
- setHeader("Content-ID", cid);
- }
-
- /**
- * Return the value of the "Content-MD5" header field. Returns
- * null
if this field is unavailable or its value
- * is absent.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- */
- public String getContentMD5() {
- return getHeader("Content-MD5", null);
- }
-
- /**
- * Set the "Content-MD5" header field of this body part.
- *
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setContentMD5(String md5) {
- setHeader("Content-MD5", md5);
- }
-
- /**
- * Get the languages specified in the Content-Language header
- * of this MimeBodyPart. The Content-Language header is defined by
- * RFC 1766. Returns null
if this header is not
- * available or its value is absent.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- */
- public String[] getContentLanguage() throws MessagingException {
- String s = getHeader("Content-Language", null);
-
- if (s == null)
- return null;
-
- // Tokenize the header to obtain the Language-tags (skip comments)
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- FinalArrayList v = new FinalArrayList();
-
- HeaderTokenizer.Token tk;
- int tkType;
-
- while (true) {
- tk = h.next(); // get a language-tag
- tkType = tk.getType();
- if (tkType == HeaderTokenizer.Token.EOF)
- break; // done
- else if (tkType == HeaderTokenizer.Token.ATOM) v.add(tk.getValue());
- else // invalid token, skip it.
- continue;
- }
-
- if (v.size() == 0)
- return null;
-
- return (String[])v.toArray(new String[v.size()]);
- }
-
- /**
- * Set the Content-Language header of this MimeBodyPart. The
- * Content-Language header is defined by RFC 1766.
- *
- * @param languages array of language tags
- */
- public void setContentLanguage(String[] languages) {
- StringBuffer sb = new StringBuffer(languages[0]);
- for (int i = 1; i < languages.length; i++)
- sb.append(',').append(languages[i]);
- setHeader("Content-Language", sb.toString());
- }
-
- /**
- * Returns the "Content-Description" header field of this body part.
- * This typically associates some descriptive information with
- * this part. Returns null if this field is unavailable or its
- * value is absent.
- * - * If the Content-Description field is encoded as per RFC 2047, - * it is decoded and converted into Unicode. If the decoding or - * conversion fails, the raw data is returned as is.
- *
- * This implementation uses getHeader(name)
- * to obtain the requisite header field.
- *
- * @return content description
- */
- public String getDescription() {
- String rawvalue = getHeader("Content-Description", null);
-
- if (rawvalue == null)
- return null;
-
- try {
- return MimeUtility.decodeText(MimeUtility.unfold(rawvalue));
- } catch (UnsupportedEncodingException ex) {
- return rawvalue;
- }
- }
-
- /**
- * Set the "Content-Description" header field for this body part.
- * If the description parameter is null
, then any
- * existing "Content-Description" fields are removed.
- * - * If the description contains non US-ASCII characters, it will - * be encoded using the platform's default charset. If the - * description contains only US-ASCII characters, no encoding - * is done and it is used as is.
- *
- * Note that if the charset encoding process fails, a
- * MessagingException is thrown, and an UnsupportedEncodingException
- * is included in the chain of nested exceptions within the
- * MessagingException.
- *
- * @param description content description
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- * @exception MessagingException An
- * UnsupportedEncodingException may be included
- * in the exception chain if the charset
- * conversion fails.
- */
- public void setDescription(String description) throws MessagingException {
- setDescription(description, null);
- }
-
- /**
- * Set the "Content-Description" header field for this body part.
- * If the description parameter is null
, then any
- * existing "Content-Description" fields are removed.
- * - * If the description contains non US-ASCII characters, it will - * be encoded using the specified charset. If the description - * contains only US-ASCII characters, no encoding is done and - * it is used as is.
- * - * Note that if the charset encoding process fails, a - * MessagingException is thrown, and an UnsupportedEncodingException - * is included in the chain of nested exceptions within the - * MessagingException. - * - * @param description Description - * @param charset Charset for encoding - * @exception IllegalStateException if this body part is - * obtained from a READ_ONLY folder. - * @exception MessagingException An - * UnsupportedEncodingException may be included - * in the exception chain if the charset - * conversion fails. - */ - public void setDescription(String description, String charset) - throws MessagingException { - if (description == null) { - removeHeader("Content-Description"); - return; - } - - try { - setHeader("Content-Description", MimeUtility.fold(21, - MimeUtility.encodeText(description, charset, null))); - } catch (UnsupportedEncodingException uex) { - throw new MessagingException("Encoding error", uex); - } - } - - /** - * Get the filename associated with this body part.
- *
- * Returns the value of the "filename" parameter from the
- * "Content-Disposition" header field of this body part. If its
- * not available, returns the value of the "name" parameter from
- * the "Content-Type" header field of this body part.
- * Returns null
if both are absent.
- *
- * @return filename
- */
- public String getFileName() throws MessagingException {
- String filename = null;
- String s = getHeader("Content-Disposition", null);
-
- if (s != null) {
- // Parse the header ..
- ContentDisposition cd = new ContentDisposition(s);
- filename = cd.getParameter("filename");
- }
- if (filename == null) {
- // Still no filename ? Try the "name" ContentType parameter
- s = getHeader("Content-Type", null);
- if (s != null) {
- try {
- ContentType ct = new ContentType(s);
- filename = ct.getParameter("name");
- } catch (ParseException pex) { } // ignore it
- }
- }
- return filename;
- }
-
- /**
- * Set the filename associated with this body part, if possible.
- * - * Sets the "filename" parameter of the "Content-Disposition" - * header field of this body part. - * - * @exception IllegalStateException if this body part is - * obtained from a READ_ONLY folder. - */ - public void setFileName(String filename) throws MessagingException { - // Set the Content-Disposition "filename" parameter - String s = getHeader("Content-Disposition", null); - ContentDisposition cd = - new ContentDisposition(s == null ? ATTACHMENT : s); - cd.setParameter("filename", filename); - setHeader("Content-Disposition", cd.toString()); - - /* Also attempt to set the Content-Type "name" parameter, - * to satisfy ancient MUAs. - * XXX: This is not RFC compliant, and hence should really - * be conditional based on some property. Fix this once we - * figure out how to get at Properties from here ! - */ - s = getHeader("Content-Type", null); - if (s != null) { - try { - ContentType cType = new ContentType(s); - cType.setParameter("name", filename); - setHeader("Content-Type", cType.toString()); - } catch (ParseException pex) { } // ignore it - } - } - - /** - * Return a decoded input stream for this body part's "content".
- * - * This implementation obtains the input stream from the DataHandler. - * That is, it invokes getDataHandler().getInputStream(); - * - * @return an InputStream - * @exception IOException this is typically thrown by the - * DataHandler. Refer to the documentation for - * javax.activation.DataHandler for more details. - * - * @see #getContentStream - * @see DataHandler#getInputStream - */ - public InputStream getInputStream() - throws IOException { - return getDataHandler().getInputStream(); - } - - /** - * Produce the raw bytes of the content. This method is used - * when creating a DataHandler object for the content. Subclasses - * that can provide a separate input stream for just the MimeBodyPart - * content might want to override this method.
- *
- * @see #content
- */
- /*package*/ InputStream getContentStream() throws MessagingException {
- if (mimePart != null) {
- return mimePart.read();
- }
- if (contentStream != null)
- return ((SharedInputStream)contentStream).newStream(0, -1);
- if (content != null)
- return new ByteArrayInputStream(content,start,contentLength);
-
- throw new MessagingException("No content");
- }
-
- /**
- * Return an InputStream to the raw data with any Content-Transfer-Encoding
- * intact. This method is useful if the "Content-Transfer-Encoding"
- * header is incorrect or corrupt, which would prevent the
- * getInputStream
method or getContent
method
- * from returning the correct data. In such a case the application may
- * use this method and attempt to decode the raw data itself.
- *
- * This implementation simply calls the getContentStream
- * method.
- *
- * @see #getInputStream
- * @see #getContentStream
- * @since JavaMail 1.2
- */
- public InputStream getRawInputStream() throws MessagingException {
- return getContentStream();
- }
-
- /**
- * Return a DataHandler for this body part's content.
- * - * The implementation provided here works just like the - * the implementation in MimeMessage. - */ - public DataHandler getDataHandler() { - if (mimePart != null) { - //return an inputstream - return new DataHandler(new DataSource() { - - public InputStream getInputStream() throws IOException { - return mimePart.read(); - } - - public OutputStream getOutputStream() throws IOException { - throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option"); - } - - public String getContentType() { - return mimePart.getContentType(); - } - - public String getName() { - return "MIMEPart Wrapped DataSource"; - } - }); - } - if (dh == null) - dh = new DataHandler(new MimePartDataSource(this)); - return dh; - } - - /** - * Return the content as a java object. The type of the object - * returned is of course dependent on the content itself. For - * example, the native format of a text/plain content is usually - * a String object. The native format for a "multipart" - * content is always a MimeMultipart subclass. For content types that are - * unknown to the DataHandler system, an input stream is returned - * as the content.
- * - * This implementation obtains the content from the DataHandler. - * That is, it invokes getDataHandler().getContent(); - * - * @return Object - * @exception IOException this is typically thrown by the - * DataHandler. Refer to the documentation for - * javax.activation.DataHandler for more details. - */ - public Object getContent() throws IOException { - return getDataHandler().getContent(); - } - - /** - * This method provides the mechanism to set this body part's content. - * The given DataHandler object should wrap the actual content. - * - * @param dh The DataHandler for the content - * @exception IllegalStateException if this body part is - * obtained from a READ_ONLY folder. - */ - public void setDataHandler(DataHandler dh) { - if (mimePart != null) { - mimePart = null; - } - this.dh = dh; - this.content = null; - this.contentStream = null; - removeHeader("Content-Type"); - removeHeader("Content-Transfer-Encoding"); - } - - /** - * A convenience method for setting this body part's content.
- *
- * The content is wrapped in a DataHandler object. Note that a
- * DataContentHandler class for the specified type should be
- * available to the JavaMail implementation for this to work right.
- * That is, to do setContent(foobar, "application/x-foobar")
,
- * a DataContentHandler for "application/x-foobar" should be installed.
- * Refer to the Java Activation Framework for more information.
- *
- * @param o the content object
- * @param type Mime type of the object
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setContent(Object o, String type) {
- if (mimePart != null) {
- mimePart = null;
- }
- if (o instanceof MimeMultipart) {
- setContent((MimeMultipart)o);
- } else {
- setDataHandler(new DataHandler(o, type));
- }
- }
-
- /**
- * Convenience method that sets the given String as this
- * part's content, with a MIME type of "text/plain". If the
- * string contains non US-ASCII characters, it will be encoded
- * using the platform's default charset. The charset is also
- * used to set the "charset" parameter.
- *
- * Note that there may be a performance penalty if
- * text
is large, since this method may have
- * to scan all the characters to determine what charset to
- * use.
- * If the charset is already known, use the
- * setText() version that takes the charset parameter.
- *
- * @see #setText(String text, String charset)
- */
- public void setText(String text) {
- setText(text, null);
- }
-
- /**
- * Convenience method that sets the given String as this part's
- * content, with a MIME type of "text/plain" and the specified
- * charset. The given Unicode string will be charset-encoded
- * using the specified charset. The charset is also used to set
- * the "charset" parameter.
- */
- public void setText(String text, String charset) {
- if (charset == null) {
- if (MimeUtility.checkAscii(text) != MimeUtility.ALL_ASCII)
- charset = MimeUtility.getDefaultMIMECharset();
- else
- charset = "us-ascii";
- }
- setContent(text, "text/plain; charset=" +
- MimeUtility.quote(charset, HeaderTokenizer.MIME));
- }
-
- /**
- * This method sets the body part's content to a MimeMultipart object.
- *
- * @param mp The multipart object that is the Message's content
- * @exception IllegalStateException if this body part is
- * obtained from a READ_ONLY folder.
- */
- public void setContent(MimeMultipart mp) {
- if (mimePart != null) {
- mimePart = null;
- }
- setDataHandler(new DataHandler(mp, mp.getContentType().toString()));
- mp.setParent(this);
- }
-
- /**
- * Output the body part as an RFC 822 format stream.
- *
- * @exception MessagingException
- * @exception IOException if an error occurs writing to the
- * stream or if an error is generated
- * by the javax.activation layer.
- * @see DataHandler#writeTo
- */
- public void writeTo(OutputStream os)
- throws IOException, MessagingException {
-
- // First, write out the header
- List hdrLines = headers.getAllHeaderLines();
- int sz = hdrLines.size();
- for( int i=0; i
- *
- * A MimeMultipart is obtained from a MimeBodyPart whose primary type
- * is "multipart" (by invoking the part's
- *
- * The default multipart subtype is "mixed". The other multipart
- * subtypes, such as "alternative", "related", and so on, can be
- * implemented as subclasses of MimeMultipart with additional methods
- * to implement the additional semantics of that type of multipart
- * content. The intent is that service providers, mail JavaBean writers
- * and mail clients will write many such subclasses and their Command
- * Beans, and will install them into the JavaBeans Activation
- * Framework, so that any JavaMail implementation and its clients can
- * transparently find and use these classes. Thus, a MIME multipart
- * handler is treated just like any other type handler, thereby
- * decoupling the process of providing multipart handlers from the
- * JavaMail API. Lacking these additional MimeMultipart subclasses,
- * all subtypes of MIME multipart data appear as MimeMultipart objects.
- *
- * An application can directly construct a MIME multipart object of any
- * subtype by using the
- *
- * MimeBodyParts may be added later.
- */
- public MimeMultipart() {
- this("mixed");
- }
-
- /**
- * Construct a MimeMultipart object of the given subtype.
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- *
- *
- * MimeBodyParts may be added later.
- */
- public MimeMultipart(String subtype) {
- //super();
- /*
- * Compute a boundary string.
- */
- String boundary = UniqueValue.getUniqueBoundaryValue();
- contentType = new ContentType("multipart", subtype, null);
- contentType.setParameter("boundary", boundary);
- }
-
- /**
- * Constructs a MimeMultipart object and its bodyparts from the
- * given DataSource.
- *
- * This constructor handles as a special case the situation where the
- * given DataSource is a MultipartDataSource object.
- *
- * Otherwise, the DataSource is assumed to provide a MIME multipart
- * byte stream. The
- *
- * @param subtype Subtype
- */
- public void setSubType(String subtype) {
- contentType.setSubType(subtype);
- }
-
- /**
- * Return the number of enclosed MimeBodyPart objects.
- *
- * @return number of parts
- */
- public int getCount() throws MessagingException {
- parse();
- if (parts == null)
- return 0;
-
- return parts.size();
- }
-
- /**
- * Get the specified MimeBodyPart. BodyParts are numbered starting at 0.
- *
- * @param index the index of the desired MimeBodyPart
- * @return the MimeBodyPart
- * @exception MessagingException if no such MimeBodyPart exists
- */
- public MimeBodyPart getBodyPart(int index)
- throws MessagingException {
- parse();
- if (parts == null)
- throw new IndexOutOfBoundsException("No such BodyPart");
-
- return (MimeBodyPart)parts.get(index);
- }
-
- /**
- * Get the MimeBodyPart referred to by the given ContentID (CID).
- * Returns null if the part is not found.
- *
- * @param CID the ContentID of the desired part
- * @return the MimeBodyPart
- */
- public MimeBodyPart getBodyPart(String CID)
- throws MessagingException {
- parse();
-
- int count = getCount();
- for (int i = 0; i < count; i++) {
- MimeBodyPart part = getBodyPart(i);
- String s = part.getContentID();
- // Old versions of AXIS2 put angle brackets around the content
- // id but not the start param
- String sNoAngle = (s!= null) ? s.replaceFirst("^<", "").replaceFirst(">$", "")
- :null;
- if (s != null && (s.equals(CID) || CID.equals(sNoAngle)))
- return part;
- }
- return null;
- }
-
- /**
- * Update headers. The default implementation here just
- * calls the
- *
- * Note that the boundary parameter is already set up when
- * a new and empty MimeMultipart object is created.
- *
- * This method is called when the
- *
- * The method adds the MultipartDataSource's MimeBodyPart
- * objects into this MimeMultipart. This MimeMultipart's contentType is
- * set to that of the MultipartDataSource.
- *
- * This method is typically used in those cases where one
- * has a multipart data source that has already been pre-parsed into
- * the individual body parts (for example, an IMAP datasource), but
- * needs to create an appropriate MimeMultipart subclass that represents
- * a specific multipart subtype.
- *
- * @param mp MimeMultipart datasource
- */
-
- protected void setMultipartDataSource(MultipartDataSource mp)
- throws MessagingException {
- contentType = new ContentType(mp.getContentType());
-
- int count = mp.getCount();
- for (int i = 0; i < count; i++)
- addBodyPart(mp.getBodyPart(i));
- }
-
- /**
- * Return the content-type of this MimeMultipart.
- *
- * This implementation just returns the value of the
- *
- *
- * This method applies the appropriate transfer-decoding, based
- * on the Content-Transfer-Encoding attribute of this MimeBodyPart.
- * Thus the returned input stream is a decoded stream of bytes.
- *
- * This implementation obtains the raw content from the MimeBodyPart
- * using the
- *
- * This implementation throws the UnknownServiceException.
- */
- public OutputStream getOutputStream() throws IOException {
- throw new UnknownServiceException();
- }
-
- /**
- * Returns the content-type of this DataSource.
- *
- * This implementation just invokes the
- *
- * This implementation just returns an empty string.
- */
- public String getName() {
- try {
- return part.getFileName();
- } catch (MessagingException mex) {
- return "";
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-import com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import javax.activation.DataSource;
-import javax.xml.soap.AttachmentPart;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- *
- * @author Kumar
- */
-public class MimePullMultipart extends MimeMultipart {
-
- private InputStream in = null;
- private String boundary = null;
- private MIMEMessage mm = null;
- private DataSource dataSource = null;
- private ContentType contType = null;
- private String startParam = null;
- private MIMEPart soapPart = null;
-
- public MimePullMultipart(DataSource ds, ContentType ct)
- throws MessagingException {
- parsed = false;
- if (ct==null)
- contType = new ContentType(ds.getContentType());
- else
- contType = ct;
-
- dataSource = ds;
- boundary = contType.getParameter("boundary");
- }
-
- public MIMEPart readAndReturnSOAPPart() throws MessagingException {
- if (soapPart != null) {
- throw new MessagingException("Inputstream from datasource was already consumed");
- }
- readSOAPPart();
- return soapPart;
-
- }
-
- protected void readSOAPPart() throws MessagingException {
- try {
- if (soapPart != null) {
- return;
- }
- in = dataSource.getInputStream();
- MIMEConfig config = new MIMEConfig(); //use defaults
- mm = new MIMEMessage(in, boundary, config);
- String st = contType.getParameter("start");
- if(startParam == null) {
- soapPart = mm.getPart(0);
- } else {
- // Strip <...> from root part's Content-I
- if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') {
- st = st.substring(1, st.length()-1);
- }
- startParam = st;
- soapPart = mm.getPart(startParam);
-
- }
- } catch (IOException ex) {
- throw new MessagingException("No inputstream from datasource", ex);
- }
- }
-
- public void parseAll() throws MessagingException {
- if (parsed) {
- return;
- }
- if (soapPart == null) {
- readSOAPPart();
- }
-
- List
- *
- * There are a set of methods to encode and decode MIME headers as
- * per RFC 2047. A brief description on handling such headers is
- * given below:
- *
- * RFC 822 mail headers must contain only US-ASCII
- * characters. Headers that contain non US-ASCII characters must be
- * encoded so that they contain only US-ASCII characters. Basically,
- * this process involves using either BASE64 or QP to encode certain
- * characters. RFC 2047 describes this in detail.
- *
- * In Java, Strings contain (16 bit) Unicode characters. ASCII is a
- * subset of Unicode (and occupies the range 0 - 127). A String
- * that contains only ASCII characters is already mail-safe. If the
- * String contains non US-ASCII characters, it must be encoded. An
- * additional complexity in this step is that since Unicode is not
- * yet a widely used charset, one might want to first charset-encode
- * the String into another charset and then do the transfer-encoding.
- *
- * Note that to get the actual bytes of a mail-safe String (say,
- * for sending over SMTP), one must do
- *
- *
- * The
- *
- * The
- *
- * Several System properties control strict conformance to the MIME
- * spec. Note that these are not session properties but must be set
- * globally as System properties.
- *
- * The
- *
- * The
- *
- * In addition, the
- *
- * The algorithm used here is:
- *
- * @since JavaMail 1.2
- */
- public static String getEncoding(DataHandler dh) {
- ContentType cType = null;
- String encoding = null;
-
- /*
- * Try to pick the most efficient means of determining the
- * encoding. If this DataHandler was created using a DataSource,
- * the getEncoding(DataSource) method is typically faster. If
- * the DataHandler was created with an object, this method is
- * much faster. To distinguish the two cases, we use a heuristic.
- * A DataHandler created with an object will always have a null name.
- * A DataHandler created with a DataSource will usually have a
- * non-null name.
- *
- * XXX - This is actually quite a disgusting hack, but it makes
- * a common case run over twice as fast.
- */
- if (dh.getName() != null)
- return getEncoding(dh.getDataSource());
-
- try {
- cType = new ContentType(dh.getContentType());
- } catch (Exception ex) {
- return "base64"; // what else ?!
- }
-
- if (cType.match("text/*")) {
- // Check all of the available bytes
- AsciiOutputStream aos = new AsciiOutputStream(false, false);
- try {
- dh.writeTo(aos);
- } catch (IOException ex) { } // ignore it
- switch (aos.getAscii()) {
- case ALL_ASCII:
- encoding = "7bit"; // all ascii
- break;
- case MOSTLY_ASCII:
- encoding = "quoted-printable"; // mostly ascii
- break;
- default:
- encoding = "base64"; // mostly binary
- break;
- }
- } else { // not "text"
- // Check all of available bytes, break out if we find
- // at least one non-US-ASCII character
- AsciiOutputStream aos =
- new AsciiOutputStream(true, encodeEolStrict);
- try {
- dh.writeTo(aos);
- } catch (IOException ex) { } // ignore it
- if (aos.getAscii() == ALL_ASCII) // all ascii
- encoding = "7bit";
- else // found atleast one non-ascii character, use b64
- encoding = "base64";
- }
-
- return encoding;
- }
-
- /**
- * Decode the given input stream. The Input stream returned is
- * the decoded input stream. All the encodings defined in RFC 2045
- * are supported here. They include "base64", "quoted-printable",
- * "7bit", "8bit", and "binary". In addition, "uuencode" is also
- * supported.
- *
- * @param is input stream
- * @param encoding the encoding of the stream.
- * @return decoded input stream.
- */
- public static InputStream decode(InputStream is, String encoding)
- throws MessagingException {
- if (encoding.equalsIgnoreCase("base64"))
- return new BASE64DecoderStream(is);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPDecoderStream(is);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUDecoderStream(is);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return is;
- else
- throw new MessagingException("Unknown encoding: " + encoding);
- }
-
- /**
- * Wrap an encoder around the given output stream.
- * All the encodings defined in RFC 2045 are supported here.
- * They include "base64", "quoted-printable", "7bit", "8bit" and
- * "binary". In addition, "uuencode" is also supported.
- *
- * @param os output stream
- * @param encoding the encoding of the stream.
- * @return output stream that applies the
- * specified encoding.
- */
- public static OutputStream encode(OutputStream os, String encoding)
- throws MessagingException {
- if (encoding == null)
- return os;
- else if (encoding.equalsIgnoreCase("base64"))
- return new BASE64EncoderStream(os);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPEncoderStream(os);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUEncoderStream(os);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return os;
- else
- throw new MessagingException("Unknown encoding: " +encoding);
- }
-
- /**
- * Wrap an encoder around the given output stream.
- * All the encodings defined in RFC 2045 are supported here.
- * They include "base64", "quoted-printable", "7bit", "8bit" and
- * "binary". In addition, "uuencode" is also supported.
- * The
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the platform's
- * default charset, then transfer-encoded using either the B or
- * Q encoding. The resulting bytes are then returned as a Unicode
- * string containing only ASCII characters.
- *
- * Note that this method should be used to encode only
- * "unstructured" RFC 822 headers.
- *
- * Example of usage:
- *
- *
- * @param text unicode string
- * @return Unicode string containing only US-ASCII characters
- * @exception UnsupportedEncodingException if the encoding fails
- */
- public static String encodeText(String text)
- throws UnsupportedEncodingException {
- return encodeText(text, null, null);
- }
-
- /**
- * Encode a RFC 822 "text" token into mail-safe form as per
- * RFC 2047.
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the specified
- * charset, then transfer-encoded using either the B or Q encoding.
- * The resulting bytes are then returned as a Unicode string
- * containing only ASCII characters.
- *
- * Note that this method should be used to encode only
- * "unstructured" RFC 822 headers.
- *
- * @param text the header value
- * @param charset the charset. If this parameter is null, the
- * platform's default chatset is used.
- * @param encoding the encoding to be used. Currently supported
- * values are "B" and "Q". If this parameter is null, then
- * the "Q" encoding is used if most of characters to be
- * encoded are in the ASCII charset, otherwise "B" encoding
- * is used.
- * @return Unicode string containing only US-ASCII characters
- */
- public static String encodeText(String text, String charset,
- String encoding)
- throws UnsupportedEncodingException {
- return encodeWord(text, charset, encoding, false);
- }
-
- /**
- * Decode "unstructured" headers, that is, headers that are defined
- * as '*text' as per RFC 822.
- *
- * The string is decoded using the algorithm specified in
- * RFC 2047, Section 6.1.1. If the charset-conversion fails
- * for any sequence, an UnsupportedEncodingException is thrown.
- * If the String is not an RFC 2047 style encoded header, it is
- * returned as-is
- *
- * Example of usage:
- *
- *
- * @param etext the possibly encoded value
- * @exception UnsupportedEncodingException if the charset
- * conversion failed.
- */
- public static String decodeText(String etext)
- throws UnsupportedEncodingException {
- /*
- * We look for sequences separated by "linear-white-space".
- * (as per RFC 2047, Section 6.1.1)
- * RFC 822 defines "linear-white-space" as SPACE | HT | CR | NL.
- */
- String lwsp = " \t\n\r";
- StringTokenizer st;
-
- /*
- * First, lets do a quick run thru the string and check
- * whether the sequence "=?" exists at all. If none exists,
- * we know there are no encoded-words in here and we can just
- * return the string as-is, without suffering thru the later
- * decoding logic.
- * This handles the most common case of unencoded headers
- * efficiently.
- */
- if (etext.indexOf("=?") == -1)
- return etext;
-
- // Encoded words found. Start decoding ...
-
- st = new StringTokenizer(etext, lwsp, true);
- StringBuffer sb = new StringBuffer(); // decode buffer
- StringBuffer wsb = new StringBuffer(); // white space buffer
- boolean prevWasEncoded = false;
-
- while (st.hasMoreTokens()) {
- char c;
- String s = st.nextToken();
- // If whitespace, append it to the whitespace buffer
- if (((c = s.charAt(0)) == ' ') || (c == '\t') ||
- (c == '\r') || (c == '\n'))
- wsb.append(c);
- else {
- // Check if token is an 'encoded-word' ..
- String word;
- try {
- word = decodeWord(s);
- // Yes, this IS an 'encoded-word'.
- if (!prevWasEncoded && wsb.length() > 0) {
- // if the previous word was also encoded, we
- // should ignore the collected whitespace. Else
- // we include the whitespace as well.
- sb.append(wsb);
- }
- prevWasEncoded = true;
- } catch (ParseException pex) {
- // This is NOT an 'encoded-word'.
- word = s;
- // possibly decode inner encoded words
- if (!decodeStrict)
- word = decodeInnerWords(word);
- // include colleced whitespace ..
- if (wsb.length() > 0)
- sb.append(wsb);
- prevWasEncoded = false;
- }
- sb.append(word); // append the actual word
- wsb.setLength(0); // reset wsb for reuse
- }
- }
- return sb.toString();
- }
-
- /**
- * Encode a RFC 822 "word" token into mail-safe form as per
- * RFC 2047.
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the platform's
- * default charset, then transfer-encoded using either the B or
- * Q encoding. The resulting bytes are then returned as a Unicode
- * string containing only ASCII characters.
- *
- * This method is meant to be used when creating RFC 822 "phrases".
- * The InternetAddress class, for example, uses this to encode
- * it's 'phrase' component.
- *
- * @param text unicode string
- * @return Array of Unicode strings containing only US-ASCII
- * characters.
- * @exception UnsupportedEncodingException if the encoding fails
- */
- public static String encodeWord(String word)
- throws UnsupportedEncodingException {
- return encodeWord(word, null, null);
- }
-
- /**
- * Encode a RFC 822 "word" token into mail-safe form as per
- * RFC 2047.
- *
- * The given Unicode string is examined for non US-ASCII
- * characters. If the string contains only US-ASCII characters,
- * it is returned as-is. If the string contains non US-ASCII
- * characters, it is first character-encoded using the specified
- * charset, then transfer-encoded using either the B or Q encoding.
- * The resulting bytes are then returned as a Unicode string
- * containing only ASCII characters.
- *
- * @param text unicode string
- * @param charset the MIME charset
- * @param encoding the encoding to be used. Currently supported
- * values are "B" and "Q". If this parameter is null, then
- * the "Q" encoding is used if most of characters to be
- * encoded are in the ASCII charset, otherwise "B" encoding
- * is used.
- * @return Unicode string containing only US-ASCII characters
- * @exception UnsupportedEncodingException if the encoding fails
- */
- public static String encodeWord(String word, String charset,
- String encoding)
- throws UnsupportedEncodingException {
- return encodeWord(word, charset, encoding, true);
- }
-
- /*
- * Encode the given string. The parameter 'encodingWord' should
- * be true if a RFC 822 "word" token is being encoded and false if a
- * RFC 822 "text" token is being encoded. This is because the
- * "Q" encoding defined in RFC 2047 has more restrictions when
- * encoding "word" tokens. (Sigh)
- */
- private static String encodeWord(String string, String charset,
- String encoding, boolean encodingWord)
- throws UnsupportedEncodingException {
-
- // If 'string' contains only US-ASCII characters, just
- // return it.
- int ascii = checkAscii(string);
- if (ascii == ALL_ASCII)
- return string;
-
- // Else, apply the specified charset conversion.
- String jcharset;
- if (charset == null) { // use default charset
- jcharset = getDefaultJavaCharset(); // the java charset
- charset = getDefaultMIMECharset(); // the MIME equivalent
- } else // MIME charset -> java charset
- jcharset = javaCharset(charset);
-
- // If no transfer-encoding is specified, figure one out.
- if (encoding == null) {
- if (ascii != MOSTLY_NONASCII)
- encoding = "Q";
- else
- encoding = "B";
- }
-
- boolean b64;
- if (encoding.equalsIgnoreCase("B"))
- b64 = true;
- else if (encoding.equalsIgnoreCase("Q"))
- b64 = false;
- else
- throw new UnsupportedEncodingException(
- "Unknown transfer encoding: " + encoding);
-
- StringBuffer outb = new StringBuffer(); // the output buffer
- doEncode(string, b64, jcharset,
- // As per RFC 2047, size of an encoded string should not
- // exceed 75 bytes.
- // 7 = size of "=?", '?', 'B'/'Q', '?', "?="
- 75 - 7 - charset.length(), // the available space
- "=?" + charset + "?" + encoding + "?", // prefix
- true, encodingWord, outb);
-
- return outb.toString();
- }
-
- private static void doEncode(String string, boolean b64,
- String jcharset, int avail, String prefix,
- boolean first, boolean encodingWord, StringBuffer buf)
- throws UnsupportedEncodingException {
-
- // First find out what the length of the encoded version of
- // 'string' would be.
- byte[] bytes = string.getBytes(jcharset);
- int len;
- if (b64) // "B" encoding
- len = BEncoderStream.encodedLength(bytes);
- else // "Q"
- len = QEncoderStream.encodedLength(bytes, encodingWord);
-
- int size;
- if ((len > avail) && ((size = string.length()) > 1)) {
- // If the length is greater than 'avail', split 'string'
- // into two and recurse.
- doEncode(string.substring(0, size/2), b64, jcharset,
- avail, prefix, first, encodingWord, buf);
- doEncode(string.substring(size/2, size), b64, jcharset,
- avail, prefix, false, encodingWord, buf);
- } else {
- // length <= than 'avail'. Encode the given string
- ByteArrayOutputStream os = new ByteArrayOutputStream(BUFFER_SIZE);
- OutputStream eos; // the encoder
- if (b64) // "B" encoding
- eos = new BEncoderStream(os);
- else // "Q" encoding
- eos = new QEncoderStream(os, encodingWord);
-
- try { // do the encoding
- eos.write(bytes);
- eos.close();
- } catch (IOException ioex) { }
-
- byte[] encodedBytes = os.toByteArray(); // the encoded stuff
- // Now write out the encoded (all ASCII) bytes into our
- // StringBuffer
- if (!first) // not the first line of this sequence
- if (foldEncodedWords)
- buf.append("\r\n "); // start a continuation line
- else
- buf.append(" "); // line will be folded later
-
- buf.append(prefix);
- for (int i = 0; i < encodedBytes.length; i++)
- buf.append((char)encodedBytes[i]);
- buf.append("?="); // terminate the current sequence
- }
- }
-
- /**
- * The string is parsed using the rules in RFC 2047 for parsing
- * an "encoded-word". If the parse fails, a ParseException is
- * thrown. Otherwise, it is transfer-decoded, and then
- * charset-converted into Unicode. If the charset-conversion
- * fails, an UnsupportedEncodingException is thrown.
- *
- * @param eword the possibly encoded value
- * @exception ParseException if the string is not an
- * encoded-word as per RFC 2047.
- * @exception UnsupportedEncodingException if the charset
- * conversion failed.
- */
- public static String decodeWord(String eword)
- throws ParseException, UnsupportedEncodingException {
-
- if (!eword.startsWith("=?")) // not an encoded word
- throw new ParseException();
-
- // get charset
- int start = 2; int pos;
- if ((pos = eword.indexOf('?', start)) == -1)
- throw new ParseException();
- String charset = javaCharset(eword.substring(start, pos));
-
- // get encoding
- start = pos+1;
- if ((pos = eword.indexOf('?', start)) == -1)
- throw new ParseException();
- String encoding = eword.substring(start, pos);
-
- // get encoded-sequence
- start = pos+1;
- if ((pos = eword.indexOf("?=", start)) == -1)
- throw new ParseException();
- String word = eword.substring(start, pos);
-
- try {
- // Extract the bytes from word
- ByteArrayInputStream bis =
- new ByteArrayInputStream(ASCIIUtility.getBytes(word));
-
- // Get the appropriate decoder
- InputStream is;
- if (encoding.equalsIgnoreCase("B"))
- is = new BASE64DecoderStream(bis);
- else if (encoding.equalsIgnoreCase("Q"))
- is = new QDecoderStream(bis);
- else
- throw new UnsupportedEncodingException(
- "unknown encoding: " + encoding);
-
- // For b64 & q, size of decoded word <= size of word. So
- // the decoded bytes must fit into the 'bytes' array. This
- // is certainly more efficient than writing bytes into a
- // ByteArrayOutputStream and then pulling out the byte[]
- // from it.
- int count = bis.available();
- byte[] bytes = new byte[count];
- // count is set to the actual number of decoded bytes
- count = is.read(bytes, 0, count);
-
- // Finally, convert the decoded bytes into a String using
- // the specified charset
- String s = new String(bytes, 0, count, charset);
- if (pos + 2 < eword.length()) {
- // there's still more text in the string
- String rest = eword.substring(pos + 2);
- if (!decodeStrict)
- rest = decodeInnerWords(rest);
- s += rest;
- }
- return s;
- } catch (UnsupportedEncodingException uex) {
- // explicitly catch and rethrow this exception, otherwise
- // the below IOException catch will swallow this up!
- throw uex;
- } catch (IOException ioex) {
- // Shouldn't happen.
- throw new ParseException();
- } catch (IllegalArgumentException iex) {
- /* An unknown charset of the form ISO-XXX-XXX, will cause
- * the JDK to throw an IllegalArgumentException ... Since the
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes
- */
- throw new UnsupportedEncodingException();
- }
- }
-
- /**
- * Look for encoded words within a word. The MIME spec doesn't
- * allow this, but many broken mailers, especially Japanese mailers,
- * produce such incorrect encodings.
- */
- private static String decodeInnerWords(String word)
- throws UnsupportedEncodingException {
- int start = 0, i;
- StringBuffer buf = new StringBuffer();
- while ((i = word.indexOf("=?", start)) >= 0) {
- buf.append(word.substring(start, i));
- int end = word.indexOf("?=", i);
- if (end < 0)
- break;
- String s = word.substring(i, end + 2);
- try {
- s = decodeWord(s);
- } catch (ParseException pex) {
- // ignore it, just use the original string
- }
- buf.append(s);
- start = end + 2;
- }
- if (start == 0)
- return word;
- if (start < word.length())
- buf.append(word.substring(start));
- return buf.toString();
- }
-
- /**
- * A utility method to quote a word, if the word contains any
- * characters from the specified 'specials' list.
- *
- * The
- *
- * This method is typically used during the generation of
- * RFC 822 and MIME header fields.
- *
- * @param word word to be quoted
- * @param specials the set of special characters
- * @return the possibly quoted word
- * @see javax.mail.internet.HeaderTokenizer#MIME
- * @see javax.mail.internet.HeaderTokenizer#RFC822
- */
- public static String quote(String word, String specials) {
- int len = word.length();
-
- /*
- * Look for any "bad" characters, Escape and
- * quote the entire string if necessary.
- */
- boolean needQuoting = false;
- for (int i = 0; i < len; i++) {
- char c = word.charAt(i);
- if (c == '"' || c == '\\' || c == '\r' || c == '\n') {
- // need to escape them and then quote the whole string
- StringBuffer sb = new StringBuffer(len + 3);
- sb.append('"');
- sb.append(word.substring(0, i));
- int lastc = 0;
- for (int j = i; j < len; j++) {
- char cc = word.charAt(j);
- if ((cc == '"') || (cc == '\\') ||
- (cc == '\r') || (cc == '\n'))
- if (cc == '\n' && lastc == '\r')
- ; // do nothing, CR was already escaped
- else
- sb.append('\\'); // Escape the character
- sb.append(cc);
- lastc = cc;
- }
- sb.append('"');
- return sb.toString();
- } else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
- // These characters cause the string to be quoted
- needQuoting = true;
- }
-
- if (needQuoting) {
- StringBuffer sb = new StringBuffer(len + 2);
- sb.append('"').append(word).append('"');
- return sb.toString();
- } else
- return word;
- }
-
- /**
- * Fold a string at linear whitespace so that each line is no longer
- * than 76 characters, if possible. If there are more than 76
- * non-whitespace characters consecutively, the string is folded at
- * the first whitespace after that sequence. The parameter
- *
- *
- * Note that line breaks in the string aren't escaped; they probably
- * should be.
- *
- * @param used characters used in line so far
- * @param s the string to fold
- * @return the folded string
- */
- /*public*/ static String fold(int used, String s) {
- if (!foldText)
- return s;
-
- int end;
- char c;
- // Strip trailing spaces
- for (end = s.length() - 1; end >= 0; end--) {
- c = s.charAt(end);
- if (c != ' ' && c != '\t')
- break;
- }
- if (end != s.length() - 1)
- s = s.substring(0, end + 1);
-
- // if the string fits now, just return it
- if (used + s.length() <= 76)
- return s;
-
- // have to actually fold the string
- StringBuffer sb = new StringBuffer(s.length() + 4);
- char lastc = 0;
- while (used + s.length() > 76) {
- int lastspace = -1;
- for (int i = 0; i < s.length(); i++) {
- if (lastspace != -1 && used + i > 76)
- break;
- c = s.charAt(i);
- if (c == ' ' || c == '\t')
- if (!(lastc == ' ' || lastc == '\t'))
- lastspace = i;
- lastc = c;
- }
- if (lastspace == -1) {
- // no space, use the whole thing
- sb.append(s);
- s = "";
- used = 0;
- break;
- }
- sb.append(s.substring(0, lastspace));
- sb.append("\r\n");
- lastc = s.charAt(lastspace);
- sb.append(lastc);
- s = s.substring(lastspace + 1);
- used = 1;
- }
- sb.append(s);
- return sb.toString();
- }
-
- /**
- * Unfold a folded header. Any line breaks that aren't escaped and
- * are followed by whitespace are removed.
- *
- * @param s the string to unfold
- * @return the unfolded string
- */
- /*public*/ static String unfold(String s) {
- if (!foldText)
- return s;
-
- StringBuffer sb = null;
- int i;
- while ((i = indexOfAny(s, "\r\n")) >= 0) {
- int start = i;
- int l = s.length();
- i++; // skip CR or NL
- if (i < l && s.charAt(i - 1) == '\r' && s.charAt(i) == '\n')
- i++; // skip LF
- if (start == 0 || s.charAt(start - 1) != '\\') {
- char c;
- // if next line starts with whitespace, skip all of it
- // XXX - always has to be true?
- if (i < l && ((c = s.charAt(i)) == ' ' || c == '\t')) {
- i++; // skip whitespace
- while (i < l && ((c = s.charAt(i)) == ' ' || c == '\t'))
- i++;
- if (sb == null)
- sb = new StringBuffer(s.length());
- if (start != 0) {
- sb.append(s.substring(0, start));
- sb.append(' ');
- }
- s = s.substring(i);
- continue;
- }
- // it's not a continuation line, just leave it in
- if (sb == null)
- sb = new StringBuffer(s.length());
- sb.append(s.substring(0, i));
- s = s.substring(i);
- } else {
- // there's a backslash at "start - 1"
- // strip it out, but leave in the line break
- if (sb == null)
- sb = new StringBuffer(s.length());
- sb.append(s.substring(0, start - 1));
- sb.append(s.substring(start, i));
- s = s.substring(i);
- }
- }
- if (sb != null) {
- sb.append(s);
- return sb.toString();
- } else
- return s;
- }
-
- /**
- * Return the first index of any of the characters in "any" in "s",
- * or -1 if none are found.
- *
- * This should be a method on String.
- */
- private static int indexOfAny(String s, String any) {
- return indexOfAny(s, any, 0);
- }
-
- private static int indexOfAny(String s, String any, int start) {
- try {
- int len = s.length();
- for (int i = start; i < len; i++) {
- if (any.indexOf(s.charAt(i)) >= 0)
- return i;
- }
- return -1;
- } catch (StringIndexOutOfBoundsException e) {
- return -1;
- }
- }
-
- /**
- * Convert a MIME charset name into a valid Java charset name.
- *
- * @param charset the MIME charset name
- * @return the Java charset equivalent. If a suitable mapping is
- * not available, the passed in charset is itself returned.
- */
- public static String javaCharset(String charset) {
- if (mime2java == null || charset == null)
- // no mapping table, or charset parameter is null
- return charset;
-
- String alias = (String)mime2java.get(charset.toLowerCase());
- return alias == null ? charset : alias;
- }
-
- /**
- * Convert a java charset into its MIME charset name.
- *
- * Note that a future version of JDK (post 1.2) might provide
- * this functionality, in which case, we may deprecate this
- * method then.
- *
- * @param charset the JDK charset
- * @return the MIME/IANA equivalent. If a mapping
- * is not possible, the passed in charset itself
- * is returned.
- * @since JavaMail 1.1
- */
- public static String mimeCharset(String charset) {
- if (java2mime == null || charset == null)
- // no mapping table or charset param is null
- return charset;
-
- String alias = (String)java2mime.get(charset.toLowerCase());
- return alias == null ? charset : alias;
- }
-
- private static String defaultJavaCharset;
- private static String defaultMIMECharset;
-
- /**
- * Get the default charset corresponding to the system's current
- * default locale. If the System property
- *
- * @return the default charset of the system's default locale,
- * as a Java charset. (NOT a MIME charset)
- * @since JavaMail 1.1
- */
- public static String getDefaultJavaCharset() {
- if (defaultJavaCharset == null) {
- /*
- * If mail.mime.charset is set, it controls the default
- * Java charset as well.
- */
- String mimecs = null;
-
- mimecs = SAAJUtil.getSystemProperty("mail.mime.charset");
-
- if (mimecs != null && mimecs.length() > 0) {
- defaultJavaCharset = javaCharset(mimecs);
- return defaultJavaCharset;
- }
-
- try {
- defaultJavaCharset = System.getProperty("file.encoding",
- "8859_1");
- } catch (SecurityException sex) {
-
- class NullInputStream extends InputStream {
- public int read() {
- return 0;
- }
- }
- InputStreamReader reader =
- new InputStreamReader(new NullInputStream());
- defaultJavaCharset = reader.getEncoding();
- if (defaultJavaCharset == null)
- defaultJavaCharset = "8859_1";
- }
- }
-
- return defaultJavaCharset;
- }
-
- /*
- * Get the default MIME charset for this locale.
- */
- static String getDefaultMIMECharset() {
- if (defaultMIMECharset == null) {
- defaultMIMECharset = SAAJUtil.getSystemProperty("mail.mime.charset");
- }
- if (defaultMIMECharset == null)
- defaultMIMECharset = mimeCharset(getDefaultJavaCharset());
- return defaultMIMECharset;
- }
-
- // Tables to map MIME charset names to Java names and vice versa.
- // XXX - Should eventually use J2SE 1.4 java.nio.charset.Charset
- private static Hashtable mime2java;
- private static Hashtable java2mime;
-
- static {
- java2mime = new Hashtable(40);
- mime2java = new Hashtable(10);
-
- try {
- // Use this class's classloader to load the mapping file
- // XXX - we should use SecuritySupport, but it's in another package
- InputStream is =
- com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility.class.getResourceAsStream(
- "/META-INF/javamail.charset.map");
-
- if (is != null) {
- is = new LineInputStream(is);
-
- // Load the JDK-to-MIME charset mapping table
- loadMappings((LineInputStream)is, java2mime);
-
- // Load the MIME-to-JDK charset mapping table
- loadMappings((LineInputStream)is, mime2java);
- }
- } catch (Exception ex) { }
-
- // If we didn't load the tables, e.g., because we didn't have
- // permission, load them manually. The entries here should be
- // the same as the default javamail.charset.map.
- if (java2mime.isEmpty()) {
- java2mime.put("8859_1", "ISO-8859-1");
- java2mime.put("iso8859_1", "ISO-8859-1");
- java2mime.put("ISO8859-1", "ISO-8859-1");
-
- java2mime.put("8859_2", "ISO-8859-2");
- java2mime.put("iso8859_2", "ISO-8859-2");
- java2mime.put("ISO8859-2", "ISO-8859-2");
-
- java2mime.put("8859_3", "ISO-8859-3");
- java2mime.put("iso8859_3", "ISO-8859-3");
- java2mime.put("ISO8859-3", "ISO-8859-3");
-
- java2mime.put("8859_4", "ISO-8859-4");
- java2mime.put("iso8859_4", "ISO-8859-4");
- java2mime.put("ISO8859-4", "ISO-8859-4");
-
- java2mime.put("8859_5", "ISO-8859-5");
- java2mime.put("iso8859_5", "ISO-8859-5");
- java2mime.put("ISO8859-5", "ISO-8859-5");
-
- java2mime.put("8859_6", "ISO-8859-6");
- java2mime.put("iso8859_6", "ISO-8859-6");
- java2mime.put("ISO8859-6", "ISO-8859-6");
-
- java2mime.put("8859_7", "ISO-8859-7");
- java2mime.put("iso8859_7", "ISO-8859-7");
- java2mime.put("ISO8859-7", "ISO-8859-7");
-
- java2mime.put("8859_8", "ISO-8859-8");
- java2mime.put("iso8859_8", "ISO-8859-8");
- java2mime.put("ISO8859-8", "ISO-8859-8");
-
- java2mime.put("8859_9", "ISO-8859-9");
- java2mime.put("iso8859_9", "ISO-8859-9");
- java2mime.put("ISO8859-9", "ISO-8859-9");
-
- java2mime.put("SJIS", "Shift_JIS");
- java2mime.put("MS932", "Shift_JIS");
- java2mime.put("JIS", "ISO-2022-JP");
- java2mime.put("ISO2022JP", "ISO-2022-JP");
- java2mime.put("EUC_JP", "euc-jp");
- java2mime.put("KOI8_R", "koi8-r");
- java2mime.put("EUC_CN", "euc-cn");
- java2mime.put("EUC_TW", "euc-tw");
- java2mime.put("EUC_KR", "euc-kr");
- }
- if (mime2java.isEmpty()) {
- mime2java.put("iso-2022-cn", "ISO2022CN");
- mime2java.put("iso-2022-kr", "ISO2022KR");
- mime2java.put("utf-8", "UTF8");
- mime2java.put("utf8", "UTF8");
- mime2java.put("ja_jp.iso2022-7", "ISO2022JP");
- mime2java.put("ja_jp.eucjp", "EUCJIS");
- mime2java.put("euc-kr", "KSC5601");
- mime2java.put("euckr", "KSC5601");
- mime2java.put("us-ascii", "ISO-8859-1");
- mime2java.put("x-us-ascii", "ISO-8859-1");
- }
- }
-
- private static void loadMappings(LineInputStream is, Hashtable table) {
- String currLine;
-
- while (true) {
- try {
- currLine = is.readLine();
- } catch (IOException ioex) {
- break; // error in reading, stop
- }
-
- if (currLine == null) // end of file, stop
- break;
- if (currLine.startsWith("--") && currLine.endsWith("--"))
- // end of this table
- break;
-
- // ignore empty lines and comments
- if (currLine.trim().length() == 0 || currLine.startsWith("#"))
- continue;
-
- // A valid entry is of the form
- *
- * This is a package private class.
- *
- * @author John Mani
- * @author Max Spivak
- * @author Bill Shannon
- */
-
-class UniqueValue {
- /**
- * A global part number. Access is not synchronized because the
- * value is only one part of the unique value and so doesn't need
- * to be accurate.
- */
- private static int part = 0;
-
- /**
- * Get a unique value for use in a multipart boundary string.
- *
- * This implementation generates it by concatenating a global
- * part number, a newly created object's
- *
- * Based on java.lang.Integer.parseInt()
- */
- public static int parseInt(byte[] b, int start, int end, int radix)
- throws NumberFormatException {
- if (b == null)
- throw new NumberFormatException("null");
-
- int result = 0;
- boolean negative = false;
- int i = start;
- int limit;
- int multmin;
- int digit;
-
- if (end > start) {
- if (b[i] == '-') {
- negative = true;
- limit = Integer.MIN_VALUE;
- i++;
- } else {
- limit = -Integer.MAX_VALUE;
- }
- multmin = limit / radix;
- if (i < end) {
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException(
- "illegal number: " + toString(b, start, end)
- );
- } else {
- result = -digit;
- }
- }
- while (i < end) {
- // Accumulating negatively avoids surprises near MAX_VALUE
- digit = Character.digit((char)b[i++], radix);
- if (digit < 0) {
- throw new NumberFormatException("illegal number");
- }
- if (result < multmin) {
- throw new NumberFormatException("illegal number");
- }
- result *= radix;
- if (result < limit + digit) {
- throw new NumberFormatException("illegal number");
- }
- result -= digit;
- }
- } else {
- throw new NumberFormatException("illegal number");
- }
- if (negative) {
- if (i > start + 1) {
- return result;
- } else { /* Only got "-" */
- throw new NumberFormatException("illegal number");
- }
- } else {
- return -result;
- }
- }
-
- /**
- * Convert the bytes within the specified range of the given byte
- * array into a String. The range extends from
- */
- public static String toString(byte[] b, int start, int end) {
- int size = end - start;
- char[] theChars = new char[size];
-
- for (int i = 0, j = start; i < size; )
- theChars[i++] = (char)(b[j++]&0xff);
-
- return new String(theChars);
- }
-
- public static byte[] getBytes(String s) {
- char [] chars= s.toCharArray();
- int size = chars.length;
- byte[] bytes = new byte[size];
-
- for (int i = 0; i < size;)
- bytes[i] = (byte) chars[i++];
- return bytes;
- }
-
- /**
- *
- * @deprecated
- * this is an expensive operation that require an additional
- * buffer reallocation just to get the array of an exact size.
- * Unless you absolutely need the exact size array, don't use this.
- * Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}.
- */
- public static byte[] getBytes(InputStream is) throws IOException {
- ByteOutputStream bos = null;
- try {
- bos = new ByteOutputStream();
- bos.write(is);
- } finally {
- if (bos != null)
- bos.close();
- is.close();
- }
- return bos.toByteArray();
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)BASE64DecoderStream.java 1.8 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a BASE64 Decoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class BASE64DecoderStream extends FilterInputStream {
- private byte[] buffer; // cache of decoded bytes
- private int bufsize = 0; // size of the cache
- private int index = 0; // index into the cache
-
- /**
- * Create a BASE64 decoder that decodes the specified input stream
- * @param in the input stream
- */
- public BASE64DecoderStream(InputStream in) {
- super(in);
- buffer = new byte[3];
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an
- *
- * @param buf the buffer into which the data is read.
- * @param off the start offset of the data.
- * @param len the maximum number of bytes read.
- * @return the total number of bytes read into the buffer, or
- *
- *
- * This class is similar to the deprecated
- *
- *
- * The expected use is to write out RFC822 style headers to an output
- * stream.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class OutputUtil {
- private static byte[] newline = {'\r','\n'};
-
- public static void writeln(String s,OutputStream out) throws IOException {
- writeAsAscii(s,out);
- writeln(out);
- }
-
- /**
- * Writes a string as ASCII string.
- */
- public static void writeAsAscii(String s,OutputStream out) throws IOException {
- int len = s.length();
- for( int i=0; i
- *
- * @param buf the buffer into which the data is read.
- * @param off the start offset of the data.
- * @param len the maximum number of bytes read.
- * @return the total number of bytes read into the buffer, or
- *
- * In the absence of type attribute we assume it to be text/xml.
- * That would mean we're easy on accepting the message and
- * generate the correct thing (as the SWA spec also specifies
- * that the type parameter should always be text/xml)
- *
- * @return
- * combination of flags, such as PLAIN_XML_CODE and MIME_MULTIPART_CODE.
- */
- // SOAP1.2 allow SOAP1.2 content type
- static int identifyContentType(ContentType ct)
- throws SOAPExceptionImpl {
- // TBD
- // Is there anything else we need to verify here?
-
- String primary = ct.getPrimaryType().toLowerCase();
- String sub = ct.getSubType().toLowerCase();
-
- if (primary.equals("multipart")) {
- if (sub.equals("related")) {
- String type = getTypeParameter(ct);
- if (isEqualToSoap1_1Type(type)) {
- return (type.equals("application/fastinfoset") ?
- FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_1_FLAG;
- }
- else if (isEqualToSoap1_2Type(type)) {
- return (type.equals("application/soap+fastinfoset") ?
- FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_2_FLAG;
- /*} else if (isMimeMultipartXOPPackage(ct)) {
- return MIME_MULTIPART_XOP_FLAG;*/
- } else if (isMimeMultipartXOPSoap1_1Package(ct)) {
- return MIME_MULTIPART_XOP_SOAP1_1_FLAG;
- } else if (isMimeMultipartXOPSoap1_2Package(ct)) {
- return MIME_MULTIPART_XOP_SOAP1_2_FLAG;
- } else {
- log.severe("SAAJ0536.soap.content-type.mustbe.multipart");
- throw new SOAPExceptionImpl(
- "Content-Type needs to be Multipart/Related "
- + "and with \"type=text/xml\" "
- + "or \"type=application/soap+xml\"");
- }
- } else {
- log.severe("SAAJ0537.soap.invalid.content-type");
- throw new SOAPExceptionImpl(
- "Invalid Content-Type: " + primary + '/' + sub);
- }
- }
- else if (isSoap1_1Type(primary, sub)) {
- return (primary.equalsIgnoreCase("application")
- && sub.equalsIgnoreCase("fastinfoset") ?
- FI_ENCODED_FLAG : 0)
- | PLAIN_XML_FLAG | SOAP1_1_FLAG;
- }
- else if (isSoap1_2Type(primary, sub)) {
- return (primary.equalsIgnoreCase("application")
- && sub.equalsIgnoreCase("soap+fastinfoset") ?
- FI_ENCODED_FLAG : 0)
- | PLAIN_XML_FLAG | SOAP1_2_FLAG;
- } else if(isSOAPBodyXOPPackage(ct)){
- return XOP_FLAG;
- } else {
- log.severe("SAAJ0537.soap.invalid.content-type");
- throw new SOAPExceptionImpl(
- "Invalid Content-Type:"
- + primary
- + '/'
- + sub
- + ". Is this an error message instead of a SOAP response?");
- }
- }
-
- /**
- * Obtains the type parameter of the Content-Type header. Defaults to "text/xml".
- */
- private static String getTypeParameter(ContentType contentType) {
- String p = contentType.getParameter("type");
- if(p!=null)
- return p.toLowerCase();
- else
- return "text/xml";
- }
-
- public MimeHeaders getMimeHeaders() {
- return this.headers;
- }
-
- final static String getContentType(MimeHeaders headers) {
- String[] values = headers.getHeader("Content-Type");
- if (values == null)
- return null;
- else
- return values[0];
- }
-
- /*
- * Get the complete ContentType value along with optional parameters.
- */
- public String getContentType() {
- return getContentType(this.headers);
- }
-
- public void setContentType(String type) {
- headers.setHeader("Content-Type", type);
- needsSave();
- }
-
- private ContentType contentType() {
- ContentType ct = null;
- try {
- String currentContent = getContentType();
- if (currentContent == null) {
- return this.contentType;
- }
- ct = new ContentType(currentContent);
- } catch (Exception e) {
- // what to do here?
- }
- return ct;
- }
-
- /*
- * Return the MIME type string, without the parameters.
- */
- public String getBaseType() {
- return contentType().getBaseType();
- }
-
- public void setBaseType(String type) {
- ContentType ct = contentType();
- ct.setParameter("type", type);
- headers.setHeader("Content-Type", ct.toString());
- needsSave();
- }
-
- public String getAction() {
- return contentType().getParameter("action");
- }
-
- public void setAction(String action) {
- ContentType ct = contentType();
- ct.setParameter("action", action);
- headers.setHeader("Content-Type", ct.toString());
- needsSave();
- }
-
- public String getCharset() {
- return contentType().getParameter("charset");
- }
-
- public void setCharset(String charset) {
- ContentType ct = contentType();
- ct.setParameter("charset", charset);
- headers.setHeader("Content-Type", ct.toString());
- needsSave();
- }
-
- /**
- * All write methods (i.e setters) should call this method in
- * order to make sure that a save is necessary since the state
- * has been modified.
- */
- private final void needsSave() {
- saved = false;
- }
-
- public boolean saveRequired() {
- return saved != true;
- }
-
- public String getContentDescription() {
- String[] values = headers.getHeader("Content-Description");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- public void setContentDescription(String description) {
- headers.setHeader("Content-Description", description);
- needsSave();
- }
-
- public abstract SOAPPart getSOAPPart();
-
- public void removeAllAttachments() {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- if (attachments != null) {
- attachments.clear();
- needsSave();
- }
- }
-
- public int countAttachments() {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments != null)
- return attachments.size();
- return 0;
- }
-
- public void addAttachmentPart(AttachmentPart attachment) {
- try {
- initializeAllAttachments();
- this.optimizeAttachmentProcessing = true;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- attachments = new FinalArrayList();
-
- attachments.add(attachment);
-
- needsSave();
- }
-
- static private final Iterator nullIter = Collections.EMPTY_LIST.iterator();
-
- public Iterator getAttachments() {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- return nullIter;
- return attachments.iterator();
- }
-
- private void setFinalContentType(String charset) {
- ContentType ct = contentType();
- if (ct == null) {
- ct = new ContentType();
- }
- String[] split = getExpectedContentType().split("/");
- ct.setPrimaryType(split[0]);
- ct.setSubType(split[1]);
- ct.setParameter("charset", charset);
- headers.setHeader("Content-Type", ct.toString());
- }
-
- private class MimeMatchingIterator implements Iterator {
- public MimeMatchingIterator(MimeHeaders headers) {
- this.headers = headers;
- this.iter = attachments.iterator();
- }
-
- private Iterator iter;
- private MimeHeaders headers;
- private Object nextAttachment;
-
- public boolean hasNext() {
- if (nextAttachment == null)
- nextAttachment = nextMatch();
- return nextAttachment != null;
- }
-
- public Object next() {
- if (nextAttachment != null) {
- Object ret = nextAttachment;
- nextAttachment = null;
- return ret;
- }
-
- if (hasNext())
- return nextAttachment;
-
- return null;
- }
-
- Object nextMatch() {
- while (iter.hasNext()) {
- AttachmentPartImpl ap = (AttachmentPartImpl) iter.next();
- if (ap.hasAllHeaders(headers))
- return ap;
- }
- return null;
- }
-
- public void remove() {
- iter.remove();
- }
- }
-
- public Iterator getAttachments(MimeHeaders headers) {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- return nullIter;
-
- return new MimeMatchingIterator(headers);
- }
-
- public void removeAttachments(MimeHeaders headers) {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- if (attachments == null)
- return ;
-
- Iterator it = new MimeMatchingIterator(headers);
- while (it.hasNext()) {
- int index = attachments.indexOf(it.next());
- attachments.set(index, null);
- }
- FinalArrayList f = new FinalArrayList();
- for (int i = 0; i < attachments.size(); i++) {
- if (attachments.get(i) != null) {
- f.add(attachments.get(i));
- }
- }
- attachments = f;
- // needsSave();
- }
-
- public AttachmentPart createAttachmentPart() {
- return new AttachmentPartImpl();
- }
-
- public AttachmentPart getAttachment(SOAPElement element)
- throws SOAPException {
- try {
- initializeAllAttachments();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- String uri;
- String hrefAttr = element.getAttribute("href");
- if ("".equals(hrefAttr)) {
- Node node = getValueNodeStrict(element);
- String swaRef = null;
- if (node != null) {
- swaRef = node.getValue();
- }
- if (swaRef == null || "".equals(swaRef)) {
- return null;
- } else {
- uri = swaRef;
- }
- } else {
- uri = hrefAttr;
- }
- return getAttachmentPart(uri);
- }
-
- private Node getValueNodeStrict(SOAPElement element) {
- Node node = (Node)element.getFirstChild();
- if (node != null) {
- if (node.getNextSibling() == null
- && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
- return node;
- } else {
- return null;
- }
- }
- return null;
- }
-
-
- private AttachmentPart getAttachmentPart(String uri) throws SOAPException {
- AttachmentPart _part;
- try {
- if (uri.startsWith("cid:")) {
- // rfc2392
- uri = '<'+uri.substring("cid:".length())+'>';
-
- MimeHeaders headersToMatch = new MimeHeaders();
- headersToMatch.addHeader(CONTENT_ID, uri);
-
- Iterator i = this.getAttachments(headersToMatch);
- _part = (i == null) ? null : (AttachmentPart)i.next();
- } else {
- // try content-location
- MimeHeaders headersToMatch = new MimeHeaders();
- headersToMatch.addHeader(CONTENT_LOCATION, uri);
-
- Iterator i = this.getAttachments(headersToMatch);
- _part = (i == null) ? null : (AttachmentPart)i.next();
- }
-
- // try auto-generated JAXRPC CID
- if (_part == null) {
- Iterator j = this.getAttachments();
-
- while (j.hasNext()) {
- AttachmentPart p = (AttachmentPart)j.next();
- String cl = p.getContentId();
- if (cl != null) {
- // obtain the partname
- int eqIndex = cl.indexOf("=");
- if (eqIndex > -1) {
- cl = cl.substring(1, eqIndex);
- if (cl.equalsIgnoreCase(uri)) {
- _part = p;
- break;
- }
- }
- }
- }
- }
-
- } catch (Exception se) {
- log.log(Level.SEVERE, "SAAJ0590.soap.unable.to.locate.attachment", new Object[] {uri});
- throw new SOAPExceptionImpl(se);
- }
- return _part;
- }
-
- private final InputStream getHeaderBytes()
- throws IOException {
- SOAPPartImpl sp = (SOAPPartImpl) getSOAPPart();
- return sp.getContentAsStream();
- }
-
- private String convertToSingleLine(String contentType) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < contentType.length(); i ++) {
- char c = contentType.charAt(i);
- if (c != '\r' && c != '\n' && c != '\t')
- buffer.append(c);
- }
- return buffer.toString();
- }
-
- private MimeMultipart getMimeMessage() throws SOAPException {
- try {
- SOAPPartImpl soapPart = (SOAPPartImpl) getSOAPPart();
- MimeBodyPart mimeSoapPart = soapPart.getMimePart();
-
- /*
- * Get content type from this message instead of soapPart
- * to ensure agreement if soapPart is transcoded (XML <-> FI)
- */
- ContentType soapPartCtype = new ContentType(getExpectedContentType());
-
- if (!isFastInfoset) {
- soapPartCtype.setParameter("charset", initCharset());
- }
- mimeSoapPart.setHeader("Content-Type", soapPartCtype.toString());
-
- MimeMultipart headerAndBody = null;
-
- if (!switchOffBM && !switchOffLazyAttachment &&
- (multiPart != null) && !attachmentsInitialized) {
- headerAndBody = new BMMimeMultipart();
- headerAndBody.addBodyPart(mimeSoapPart);
- if (attachments != null) {
- for (Iterator eachAttachment = attachments.iterator();
- eachAttachment.hasNext();) {
- headerAndBody.addBodyPart(
- ((AttachmentPartImpl) eachAttachment.next())
- .getMimePart());
- }
- }
- InputStream in = ((BMMimeMultipart)multiPart).getInputStream();
- if (!((BMMimeMultipart)multiPart).lastBodyPartFound() &&
- !((BMMimeMultipart)multiPart).isEndOfStream()) {
- ((BMMimeMultipart)headerAndBody).setInputStream(in);
- ((BMMimeMultipart)headerAndBody).setBoundary(
- ((BMMimeMultipart)multiPart).getBoundary());
- ((BMMimeMultipart)headerAndBody).
- setLazyAttachments(lazyAttachments);
- }
-
- } else {
- headerAndBody = new MimeMultipart();
- headerAndBody.addBodyPart(mimeSoapPart);
-
- for (Iterator eachAttachement = getAttachments();
- eachAttachement.hasNext();
- ) {
- headerAndBody.addBodyPart(
- ((AttachmentPartImpl) eachAttachement.next())
- .getMimePart());
- }
- }
-
- ContentType contentType = headerAndBody.getContentType();
-
- ParameterList l = contentType.getParameterList();
-
- // set content type depending on SOAP version
- l.set("type", getExpectedContentType());
- l.set("boundary", contentType.getParameter("boundary"));
- ContentType nct = new ContentType("multipart", "related", l);
-
- headers.setHeader(
- "Content-Type",
- convertToSingleLine(nct.toString()));
- // TBD
- // Set content length MIME header here.
-
- return headerAndBody;
- } catch (SOAPException ex) {
- throw ex;
- } catch (Throwable ex) {
- log.severe("SAAJ0538.soap.cannot.convert.msg.to.multipart.obj");
- throw new SOAPExceptionImpl(
- "Unable to convert SOAP message into "
- + "a MimeMultipart object",
- ex);
- }
- }
-
- private String initCharset() {
-
- String charset = null;
-
- String[] cts = getMimeHeaders().getHeader("Content-Type");
- if ((cts != null) && (cts[0] != null)) {
- charset = getCharsetString(cts[0]);
- }
-
- if (charset == null) {
- charset = (String) getProperty(CHARACTER_SET_ENCODING);
- }
-
- if (charset != null) {
- return charset;
- }
-
- return "utf-8";
- }
-
- private String getCharsetString(String s) {
- try {
- int index = s.indexOf(";");
- if(index < 0)
- return null;
- ParameterList pl = new ParameterList(s.substring(index));
- return pl.get("charset");
- } catch(Exception e) {
- return null;
- }
- }
-
- public void saveChanges() throws SOAPException {
-
- // suck in all the data from the attachments and have it
- // ready for writing/sending etc.
-
- String charset = initCharset();
-
- /*if (countAttachments() == 0) {*/
- int attachmentCount = (attachments == null) ? 0 : attachments.size();
- if (attachmentCount == 0) {
- if (!switchOffBM && !switchOffLazyAttachment &&
- !attachmentsInitialized && (multiPart != null)) {
- // so there might be attachments
- attachmentCount = 1;
- }
- }
-
- try {
- if ((attachmentCount == 0) && !hasXOPContent()) {
- InputStream in;
- try{
- /*
- * Not sure why this is called getHeaderBytes(), but it actually
- * returns the whole message as a byte stream. This stream could
- * be either XML of Fast depending on the mode.
- */
- in = getHeaderBytes();
- // no attachments, hence this property can be false
- this.optimizeAttachmentProcessing = false;
- if (SOAPPartImpl.lazyContentLength) {
- inputStreamAfterSaveChanges = in;
- }
- } catch (IOException ex) {
- log.severe("SAAJ0539.soap.cannot.get.header.stream");
- throw new SOAPExceptionImpl(
- "Unable to get header stream in saveChanges: ",
- ex);
- }
-
- if (in instanceof ByteInputStream) {
- ByteInputStream bIn = (ByteInputStream)in;
- messageBytes = bIn.getBytes();
- messageByteCount = bIn.getCount();
- }
-
- setFinalContentType(charset);
- /*
- headers.setHeader(
- "Content-Type",
- getExpectedContentType() +
- (isFastInfoset ? "" : "; charset=" + charset));*/
- if (messageByteCount > 0) {
- headers.setHeader(
- "Content-Length",
- Integer.toString(messageByteCount));
- }
- } else {
- if(hasXOPContent())
- mmp = getXOPMessage();
- else
- mmp = getMimeMessage();
- }
- } catch (Throwable ex) {
- log.severe("SAAJ0540.soap.err.saving.multipart.msg");
- throw new SOAPExceptionImpl(
- "Error during saving a multipart message",
- ex);
- }
-
- // FIX ME -- SOAP Action replaced by Content-Type optional parameter action
- /*
- if(isCorrectSoapVersion(SOAP1_1_FLAG)) {
-
- String[] soapAction = headers.getHeader("SOAPAction");
-
- if (soapAction == null || soapAction.length == 0)
- headers.setHeader("SOAPAction", "\"\"");
-
- }
- */
-
- saved = true;
- }
-
- private MimeMultipart getXOPMessage() throws SOAPException {
- try {
- MimeMultipart headerAndBody = new MimeMultipart();
- SOAPPartImpl soapPart = (SOAPPartImpl)getSOAPPart();
- MimeBodyPart mimeSoapPart = soapPart.getMimePart();
- ContentType soapPartCtype =
- new ContentType("application/xop+xml");
- soapPartCtype.setParameter("type", getExpectedContentType());
- String charset = initCharset();
- soapPartCtype.setParameter("charset", charset);
- mimeSoapPart.setHeader("Content-Type", soapPartCtype.toString());
- headerAndBody.addBodyPart(mimeSoapPart);
-
- for (Iterator eachAttachement = getAttachments();
- eachAttachement.hasNext();
- ) {
- headerAndBody.addBodyPart(
- ((AttachmentPartImpl) eachAttachement.next())
- .getMimePart());
- }
-
- ContentType contentType = headerAndBody.getContentType();
-
- ParameterList l = contentType.getParameterList();
-
- //lets not write start-info for now till we get servlet fix done
- l.set("start-info", getExpectedContentType());//+";charset="+initCharset());
-
- // set content type depending on SOAP version
- l.set("type", "application/xop+xml");
-
- if (isCorrectSoapVersion(SOAP1_2_FLAG)) {
- String action = getAction();
- if(action != null)
- l.set("action", action);
- }
-
- l.set("boundary", contentType.getParameter("boundary"));
- ContentType nct = new ContentType("Multipart", "Related", l);
- headers.setHeader(
- "Content-Type",
- convertToSingleLine(nct.toString()));
- // TBD
- // Set content length MIME header here.
-
- return headerAndBody;
- } catch (SOAPException ex) {
- throw ex;
- } catch (Throwable ex) {
- log.severe("SAAJ0538.soap.cannot.convert.msg.to.multipart.obj");
- throw new SOAPExceptionImpl(
- "Unable to convert SOAP message into "
- + "a MimeMultipart object",
- ex);
- }
-
- }
-
- private boolean hasXOPContent() throws ParseException {
- String type = getContentType();
- if(type == null)
- return false;
- ContentType ct = new ContentType(type);
- //return isMimeMultipartXOPPackage(ct) || isSOAPBodyXOPPackage(ct);
- return isMimeMultipartXOPSoap1_1Package(ct) ||
- isMimeMultipartXOPSoap1_2Package(ct) || isSOAPBodyXOPPackage(ct);
-
- }
-
- public void writeTo(OutputStream out) throws SOAPException, IOException {
- if (saveRequired()){
- this.optimizeAttachmentProcessing = true;
- saveChanges();
- }
-
- if(!optimizeAttachmentProcessing){
- if (SOAPPartImpl.lazyContentLength && messageByteCount <= 0) {
- byte[] buf = new byte[1024];
-
- int length = 0;
- while( (length = inputStreamAfterSaveChanges.read(buf)) != -1) {
- out.write(buf,0, length);
- messageByteCount += length;
- }
- if (messageByteCount > 0) {
- headers.setHeader(
- "Content-Length",
- Integer.toString(messageByteCount));
- }
- } else {
- out.write(messageBytes, 0, messageByteCount);
- }
- }
- else{
- try{
- if(hasXOPContent()){
- mmp.writeTo(out);
- }else{
- mmp.writeTo(out);
- if (!switchOffBM && !switchOffLazyAttachment &&
- (multiPart != null) && !attachmentsInitialized) {
- ((BMMimeMultipart)multiPart).setInputStream(
- ((BMMimeMultipart)mmp).getInputStream());
- }
- }
- } catch(Exception ex){
- log.severe("SAAJ0540.soap.err.saving.multipart.msg");
- throw new SOAPExceptionImpl(
- "Error during saving a multipart message",
- ex);
- }
- }
-
- if(isCorrectSoapVersion(SOAP1_1_FLAG)) {
-
- String[] soapAction = headers.getHeader("SOAPAction");
-
- if (soapAction == null || soapAction.length == 0)
- headers.setHeader("SOAPAction", "\"\"");
-
- }
-
- messageBytes = null;
- needsSave();
- }
-
- public SOAPBody getSOAPBody() throws SOAPException {
- SOAPBody body = getSOAPPart().getEnvelope().getBody();
- /*if (body == null) {
- throw new SOAPException("No SOAP Body was found in the SOAP Message");
- }*/
- return body;
- }
-
- public SOAPHeader getSOAPHeader() throws SOAPException {
- SOAPHeader hdr = getSOAPPart().getEnvelope().getHeader();
- /*if (hdr == null) {
- throw new SOAPException("No SOAP Header was found in the SOAP Message");
- }*/
- return hdr;
- }
-
- private void initializeAllAttachments ()
- throws MessagingException, SOAPException {
- if (switchOffBM || switchOffLazyAttachment) {
- return;
- }
-
- if (attachmentsInitialized || (multiPart == null)) {
- return;
- }
-
- if (attachments == null)
- attachments = new FinalArrayList();
-
- int count = multiPart.getCount();
- for (int i=0; i < count; i++ ) {
- initializeAttachment(multiPart.getBodyPart(i));
- }
- attachmentsInitialized = true;
- //multiPart = null;
- needsSave();
- }
-
- private void initializeAttachment(MimeBodyPart mbp) throws SOAPException {
- AttachmentPartImpl attachmentPart = new AttachmentPartImpl();
- DataHandler attachmentHandler = mbp.getDataHandler();
- attachmentPart.setDataHandler(attachmentHandler);
-
- AttachmentPartImpl.copyMimeHeaders(mbp, attachmentPart);
- attachments.add(attachmentPart);
- }
-
- private void initializeAttachment(MimeMultipart multiPart, int i)
- throws Exception {
- MimeBodyPart currentBodyPart = multiPart.getBodyPart(i);
- AttachmentPartImpl attachmentPart = new AttachmentPartImpl();
-
- DataHandler attachmentHandler = currentBodyPart.getDataHandler();
- attachmentPart.setDataHandler(attachmentHandler);
-
- AttachmentPartImpl.copyMimeHeaders(currentBodyPart, attachmentPart);
- addAttachmentPart(attachmentPart);
- }
-
- private void setMimeHeaders(SOAPPart soapPart,
- MimeBodyPart soapMessagePart) throws Exception {
-
- // first remove the existing content-type
- soapPart.removeAllMimeHeaders();
- // add everything present in soapMessagePart
- List headers = soapMessagePart.getAllHeaders();
- int sz = headers.size();
- for( int i=0; i
- * Compared to {@link BufferedOutputStream},
- * this class:
- *
- *
-* Parsing of a URI specification is done according to the URI
-* syntax described in RFC 2396
-*
-* For URIs that do not follow the "generic URI" syntax (e.g. mailto),
-* the entire scheme-specific part is treated as the "path" portion
-* of the URI.
-*
-* Note that, unlike the java.net.URL class, this class does not provide
-* any built-in network access functionality nor does it provide any
-* scheme-specific functionality (for example, it does not know a
-* default port for a specific scheme). Rather, it only knows the
-* grammar and basic set of operations that can be applied to a URI.
-*
-* @version
-*
-**********************************************************************/
- public class JaxmURI implements Serializable {
-
- /*******************************************************************
- * MalformedURIExceptions are thrown in the process of building a URI
- * or setting fields on a URI when an operation would result in an
- * invalid URI specification.
- *
- ********************************************************************/
- public static class MalformedURIException extends IOException {
-
- /******************************************************************
- * Constructs a
- * An
- *
- * There are no restrictions on the content portion of an
- * An
- * The following code fragment, in which
- * The following code fragment creates and adds a second
- *
- * The
- * For the MIME content types "text/plain", "text/html" and "text/xml", the
- *
- * A SAAJ-compliant implementation must, as a minimum, return a
- *
- * Note that reading from the returned InputStream would result in consuming
- * the data in the stream. It is the responsibility of the caller to reset
- * the InputStream appropriately before calling a Subsequent API. If a copy
- * of the raw attachment content is required then the {@link #getRawContentBytes} API
- * should be used instead.
- *
- * @return an
- * A subsequent call to getSize() may not be an exact measure
- * of the content size.
- *
- * @param content the raw data to add to the attachment part
- * @param contentType the value to set into the
- * A subsequent call to getSize() may not be an exact measure
- * of the content size.
- *
- * @param content the base64 encoded data to add to the attachment part
- * @param contentType the value to set into the
- *
- * Note that RFC822 headers can only contain US-ASCII characters.
- *
- * @param name a
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a
- * A
- * The following code fragment, in which sf is a
- * This method is package private so that this code can be shared.
- *
- * @return the
- * This method is package private so that this code can be shared.
- *
- * @return the
- * This method is package private so that this code can be shared.
- *
- * @return the
- * A SAAJ client can create a
- * All
- * Content can be added to this message's This class is used primarily when an application wants to
- * retrieve specific attachments based on certain MIME headers and
- * values. This class will most likely be used by implementations of
- *
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a
- * The following is an example of a namespace declaration in an element.
- *
- * XML namespaces are used to disambiguate SOAP identifiers from
- * application-specific identifiers.
- *
- *
- * The
- * Calling the method
-* SAAJMetaFactory is a service provider interface. There are no public methods on this
-* class.
-*
-* @author SAAJ RI Development Team
-* @since 1.6, SAAJ 1.3
-*/
-
-public abstract class SAAJMetaFactory {
- static private final String META_FACTORY_CLASS_PROPERTY =
- "javax.xml.soap.MetaFactory";
- static final String DEFAULT_META_FACTORY_CLASS =
- "com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl";
-
- /**
- * Creates a new instance of a concrete
- * This kind of
- * This kind of
- * A
- * A
- * For SOAP 1.2 the
- * A
- * For SOAP 1.2 the
- * A
- * For SOAP 1.2 the
- * In case of a SOAP 1.2 fault, the default value for the mandatory
- * A
- * For SOAP 1.2 the
- * In case of a SOAP 1.2 fault, the default value for the mandatory
- * A
- * Calling this method invalidates the
- * A new
- * The SOAPConnection class is optional. Some implementations may
- * not implement this interface in which case the call to
- *
- * A client can obtain a
- * This value can be passed to
- * {@link SOAPHeader#examineMustUnderstandHeaderElements(String)},
- * {@link SOAPHeader#examineHeaderElements(String)} and
- * {@link SOAPHeader#extractHeaderElements(String)}
- */
- public static final String
- URI_SOAP_ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next";
-
- /**
- * The URI identifying the next application processing a SOAP request as the intended
- * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2
- * specification).
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE + "/role/next";
-
- /**
- * The URI specifying the role None in SOAP 1.2.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE + "/role/none";
-
- /**
- * The URI identifying the ultimate receiver of the SOAP 1.2 message.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER =
- URI_NS_SOAP_1_2_ENVELOPE + "/role/ultimateReceiver";
-
- /**
- * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
- * @since 1.6, SAAJ 1.3
- */
- public static final String SOAP_ENV_PREFIX = "env";
-
- /**
- * SOAP 1.2 VersionMismatch Fault
- * @since 1.6, SAAJ 1.3
- */
- public static final QName SOAP_VERSIONMISMATCH_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 MustUnderstand Fault
- * @since 1.6, SAAJ 1.3
- */
- public static final QName SOAP_MUSTUNDERSTAND_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 DataEncodingUnknown Fault
- * @since 1.6, SAAJ 1.3
- */
- public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 Sender Fault
- * @since 1.6, SAAJ 1.3
- */
- public static final QName SOAP_SENDER_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX);
-
- /**
- * SOAP 1.2 Receiver Fault
- * @since 1.6, SAAJ 1.3
- */
- public static final QName SOAP_RECEIVER_FAULT =
- new QName(URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX);
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElement.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElement.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,526 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * An object representing an element of a SOAP message that is allowed but not
- * specifically prescribed by a SOAP specification. This interface serves as the
- * base interface for those objects that are specifically prescribed by a SOAP
- * specification.
- *
- * Methods in this interface that are required to return SAAJ specific objects
- * may "silently" replace nodes in the tree as required to successfully return
- * objects of the correct type. See {@link #getChildElements()} and
- * {@link javax.xml.soap}
- * for details.
- *
- * @since 1.6
- */
-public interface SOAPElement extends Node, org.w3c.dom.Element {
-
- /**
- * Creates a new
- * This method may be deprecated in a future release of SAAJ in favor of
- * addChildElement(javax.xml.namespace.QName)
- *
- * @param name a The fragment rooted in The fragment rooted in
- * This method is useful for rolling back the construction of partially
- * completed
- * Callers should not rely on the element instance being renamed as is.
- * Implementations could end up copying the content of the
- *
- * Calling this method may cause child
- * Calling this method may cause child
- * Calling this method may cause child Elements created using this factory do not have the properties
- * of an element that lives inside a SOAP header document. These
- * elements are copied into the XML document tree when they are
- * inserted.
- * @deprecated - Use
- * A client can access the
- * It is possible to change the body or header of a
- * The
- * This factory method creates
- * This factory method creates
- * A new
- * A new
- * It is illegal to add a header when the envelope already
- * contains a header. Therefore, this method should be called
- * only after the existing header has been removed.
- *
- * @return the new
- * It is illegal to add a body when the envelope already
- * contains a body. Therefore, this method should be called
- * only after the existing body has been removed.
- *
- * @return the new Typical reasons for throwing a
- * If there is an embedded
- * This method can be called at most once. It is generally called from
- * within the constructor or immediately after the constructor has
- * returned a new
- * This factory method creates
- * This factory method creates
- * This factory method creates
- * Depending on the Fault codes, which give information about the fault, are defined
- * in the SOAP 1.1 specification. A fault code is mandatory and must
- * be of type
- * Fault codes, which given information about the fault, are defined in
- * the SOAP 1.1 specification. This element is mandatory in SOAP 1.1.
- * Because the fault code is required to be a QName it is preferable to
- * use the {@link #setFaultCode(Name)} form of this method.
- *
- * @param faultCode a
- * The fault actor is the recipient in the message path who caused the
- * fault to happen.
- *
- * If this
- * If this
- * If this
- *
- * If this
- *
- * If this
- *
- * If this
- *
- * A
- * It is illegal to add a detail when the fault already
- * contains a detail. Therefore, this method should be called
- * only after the existing detail has been removed.
- *
- * @return the new
- * Code sample:
- *
- *
- * Content is added to a
- * A
- * A
- * In SOAP 1.2 the env:actor attribute is replaced by the env:role
- * attribute, but with essentially the same semantics.
- *
- * @param actor a
- * In SOAP 1.2 the env:actor attribute is replaced by the env:role
- * attribute, but with essentially the same semantics.
- *
- * @param actor a
- * This method allows an actor to process the parts of the
- *
- * In SOAP 1.2 the env:actor attribute is replaced by the env:role
- * attribute, but with essentially the same semantics.
- *
- * @param actor a
- * A
- * If this
- * If this
- * If the mustUnderstand attribute is on, the actor who receives the
- *
- * The SOAP relay attribute is set to true to indicate that the SOAP header
- * block must be relayed by any node that is targeted by the header block
- * but not actually process it. This attribute is ignored on header blocks
- * whose mustUnderstand attribute is set to true or that are targeted at
- * the ultimate reciever (which is the default). The default value of this
- * attribute is
- * A
- * A new
- * In addition to the mandatory
- * Unlike the rest of a SOAP message, an attachment is not required to be in
- * XML format and can therefore be anything from simple text to an image file.
- * Consequently, any message content that is not in XML format must be in an
- *
- * A
- * In order to ensure backward source compatibility, methods that are added to
- * this class after version 1.1 of the SAAJ specification are all concrete
- * instead of abstract and they all have default implementations. Unless
- * otherwise noted in the JavaDocs for those methods the default
- * implementations simply throw an
- *
- *
- * @return the
- *
- * @return the
- * This method does not touch the SOAP part.
- */
- public abstract void removeAllAttachments();
-
- /**
- * Gets a count of the number of attachments in this message. This count
- * does not include the SOAP part.
- *
- * @return the number of
- * In addition, this method marks the point at which the data from all
- * constituent
- *
- * @exception
- * If there are no attachments, just an XML stream is written out. For
- * those messages that have attachments,
- * Note that this method does not write the transport-specific MIME Headers
- * of the Message
- *
- * @param out
- * the
- * The valid property names include
- * {@link SOAPMessage#WRITE_XML_DECLARATION} and
- * {@link SOAPMessage#CHARACTER_SET_ENCODING}. All of these standard SAAJ
- * properties are prefixed by "javax.xml.soap". Vendors may also add
- * implementation specific properties. These properties must be prefixed
- * with package names that are unique to the vendor.
- *
- * Setting the property
- * The property
- * Some implementations may allow encodings in addition to UTF-8 and
- * UTF-16. Refer to your vendor's documentation for details.
- *
- * @param property
- * the property with which the specified value is to be
- * associated.
- * @param value
- * the value to be associated with the specified property
- * @exception SOAPException
- * if the property name is not recognized.
- * @since 1.6, SAAJ 1.2
- */
- public void setProperty(String property, Object value)
- throws SOAPException {
- throw new UnsupportedOperationException("setProperty must be overridden by all subclasses of SOAPMessage");
- }
-
- /**
- * Retrieves value of the specified property.
- *
- * @param property
- * the name of the property to retrieve
- * @return the value associated with the named property or
- * A
- * When a message is sent, its SOAP part must have the MIME header Content-Type
- * set to "text/xml". Or, from the other perspective, the SOAP part of any
- * message that is received must have the MIME header Content-Type with a
- * value of "text/xml".
- *
- * A client can access the
- * A
- *
- * @since 1.6
- */
-public abstract class SOAPPart implements org.w3c.dom.Document, Node {
-
- /**
- * Gets the
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a
- * Note that RFC822 headers can contain only US-ASCII characters.
- *
- * @param name a The API in the
-
-
-
-
-
-
-
-What this means in
-practical terms is that an application that starts to use SAAJ APIs on a
-tree after manipulating it using DOM APIs must assume that the tree has been
-translated into an all SAAJ tree and that any references to objects within
-the tree that were obtained using DOM APIs are no longer valid. Switching
-from SAAJ APIs to DOM APIs is not allowed to cause invalid references and
-neither is using SAAJ APIs exclusively. It is only switching from using DOM
-APIs on a particular SAAJ tree to using SAAJ APIs that causes the risk of
-invalid references. Typical reasons for throwing a
+ * If there is an embedded
+ * This method can be called at most once. It is generally called from
+ * within the constructor or immediately after the constructor has
+ * returned a new
+ *
+ * Note that the data of a MultipartDataSource is also available as
+ * an input stream.
+ *
+ * This interface will typically be implemented by providers that
+ * preparse multipart bodies, for example an IMAP provider.
+ *
+ * @version 1.6, 02/03/27
+ * @author John Mani
+ * @see javax.activation.DataSource
+ */
+
+public interface MultipartDataSource extends DataSource {
+
+ /**
+ * Return the number of enclosed MimeBodyPart objects.
+ *
+ * @return number of parts
+ */
+ public int getCount();
+
+ /**
+ * Get the specified MimeBodyPart. Parts are numbered starting at 0.
+ *
+ * @param index the index of the desired MimeBodyPart
+ * @return the MimeBodyPart
+ * @exception IndexOutOfBoundsException if the given index
+ * is out of range.
+ * @exception MessagingException
+ */
+ public MimeBodyPart getBodyPart(int index) throws MessagingException;
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/BMMimeMultipart.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,765 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)MimeMultipart.java 1.31 03/01/29
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+import java.io.*;
+import java.util.BitSet;
+
+import javax.activation.DataSource;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
+
+import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
+
+/**
+ * The MimeMultipart class is an implementation of the abstract Multipart
+ * class that uses MIME conventions for the multipart data.
+ *
+ * A MimeMultipart is obtained from a MimePart whose primary type
+ * is "multipart" (by invoking the part's
+ *
+ * The default multipart subtype is "mixed". The other multipart
+ * subtypes, such as "alternative", "related", and so on, can be
+ * implemented as subclasses of MimeMultipart with additional methods
+ * to implement the additional semantics of that type of multipart
+ * content. The intent is that service providers, mail JavaBean writers
+ * and mail clients will write many such subclasses and their Command
+ * Beans, and will install them into the JavaBeans Activation
+ * Framework, so that any JavaMail implementation and its clients can
+ * transparently find and use these classes. Thus, a MIME multipart
+ * handler is treated just like any other type handler, thereby
+ * decoupling the process of providing multipart handlers from the
+ * JavaMail API. Lacking these additional MimeMultipart subclasses,
+ * all subtypes of MIME multipart data appear as MimeMultipart objects.
+ *
+ * An application can directly construct a MIME multipart object of any
+ * subtype by using the
+ *
+ * MimeBodyParts may be added later.
+ */
+ public BMMimeMultipart() {
+ super();
+ //this("mixed");
+ }
+
+ /**
+ * Construct a MimeMultipart object of the given subtype.
+ * A unique boundary string is generated and this string is
+ * setup as the "boundary" parameter for the
+ *
+ *
+ * MimeBodyParts may be added later.
+ */
+ public BMMimeMultipart(String subtype) {
+ super(subtype);
+ /*
+ * Compute a boundary string.
+ String boundary = UniqueValue.getUniqueBoundaryValue();
+ ContentType cType = new ContentType("multipart", subtype, null);
+ contentType.setParameter("boundary", boundary);
+ */
+ }
+
+ /**
+ * Constructs a MimeMultipart object and its bodyparts from the
+ * given DataSource.
+ *
+ * This constructor handles as a special case the situation where the
+ * given DataSource is a MultipartDataSource object. In this case, this
+ * method just invokes the superclass (i.e., Multipart) constructor
+ * that takes a MultipartDataSource object.
+ *
+ * Otherwise, the DataSource is assumed to provide a MIME multipart
+ * byte stream. The
+ *
+ * For example, this method will return
+ *
+ * For example, this method will return
+ *
+ * This class handles folded headers (ie headers with embedded
+ * CRLF SPACE sequences). The folds are removed in the returned
+ * tokens.
+ *
+ * @version 1.9, 02/03/27
+ * @author John Mani
+ */
+
+public class HeaderTokenizer {
+
+ /**
+ * The Token class represents tokens returned by the
+ * HeaderTokenizer.
+ */
+ public static class Token {
+
+ private int type;
+ private String value;
+
+ /**
+ * Token type indicating an ATOM.
+ */
+ public static final int ATOM = -1;
+
+ /**
+ * Token type indicating a quoted string. The value
+ * field contains the string without the quotes.
+ */
+ public static final int QUOTEDSTRING = -2;
+
+ /**
+ * Token type indicating a comment. The value field
+ * contains the comment string without the comment
+ * start and end symbols.
+ */
+ public static final int COMMENT = -3;
+
+ /**
+ * Token type indicating end of input.
+ */
+ public static final int EOF = -4;
+
+ /**
+ * Constructor.
+ * @param type Token type
+ * @param value Token value
+ */
+ public Token(int type, String value) {
+ this.type = type;
+ this.value = value;
+ }
+
+ /**
+ * Return the type of the token. If the token represents a
+ * delimiter or a control character, the type is that character
+ * itself, converted to an integer. Otherwise, it's value is
+ * one of the following:
+ *
+ *
+ * Clients sit in a loop calling next() to parse successive
+ * tokens until an EOF Token is returned.
+ *
+ * @return the next Token
+ * @exception ParseException if the parse fails
+ */
+ public Token next() throws ParseException {
+ Token tk;
+
+ currentPos = nextPos; // setup currentPos
+ tk = getNext();
+ nextPos = peekPos = currentPos; // update currentPos and peekPos
+ return tk;
+ }
+
+ /**
+ * Peek at the next token, without actually removing the token
+ * from the parse stream. Invoking this method multiple times
+ * will return successive tokens, until
+ *
+ * @return the next Token
+ * @exception ParseException if the parse fails
+ */
+ public Token peek() throws ParseException {
+ Token tk;
+
+ currentPos = peekPos; // setup currentPos
+ tk = getNext();
+ peekPos = currentPos; // update peekPos
+ return tk;
+ }
+
+ /**
+ * Return the rest of the Header.
+ *
+ * @return String rest of header. null is returned if we are
+ * already at end of header
+ */
+ public String getRemainder() {
+ return string.substring(nextPos);
+ }
+
+ /*
+ * Return the next token starting from 'currentPos'. After the
+ * parse, 'currentPos' is updated to point to the start of the
+ * next token.
+ */
+ private Token getNext() throws ParseException {
+ // If we're already at end of string, return EOF
+ if (currentPos >= maxPos)
+ return EOFToken;
+
+ // Skip white-space, position currentPos beyond the space
+ if (skipWhiteSpace() == Token.EOF)
+ return EOFToken;
+
+ char c;
+ int start;
+ boolean filter = false;
+
+ c = string.charAt(currentPos);
+
+ // Check or Skip comments and position currentPos
+ // beyond the comment
+ while (c == '(') {
+ // Parsing comment ..
+ int nesting;
+ for (start = ++currentPos, nesting = 1;
+ nesting > 0 && currentPos < maxPos;
+ currentPos++) {
+ c = string.charAt(currentPos);
+ if (c == '\\') { // Escape sequence
+ currentPos++; // skip the escaped character
+ filter = true;
+ } else if (c == '\r')
+ filter = true;
+ else if (c == '(')
+ nesting++;
+ else if (c == ')')
+ nesting--;
+ }
+ if (nesting != 0)
+ throw new ParseException("Unbalanced comments");
+
+ if (!skipComments) {
+ // Return the comment, if we are asked to.
+ // Note that the comment start & end markers are ignored.
+ String s;
+ if (filter) // need to go thru the token again.
+ s = filterToken(string, start, currentPos-1);
+ else
+ s = string.substring(start,currentPos-1);
+
+ return new Token(Token.COMMENT, s);
+ }
+
+ // Skip any whitespace after the comment.
+ if (skipWhiteSpace() == Token.EOF)
+ return EOFToken;
+ c = string.charAt(currentPos);
+ }
+
+ // Check for quoted-string and position currentPos
+ // beyond the terminating quote
+ if (c == '"') {
+ for (start = ++currentPos; currentPos < maxPos; currentPos++) {
+ c = string.charAt(currentPos);
+ if (c == '\\') { // Escape sequence
+ currentPos++;
+ filter = true;
+ } else if (c == '\r')
+ filter = true;
+ else if (c == '"') {
+ currentPos++;
+ String s;
+
+ if (filter)
+ s = filterToken(string, start, currentPos-1);
+ else
+ s = string.substring(start,currentPos-1);
+
+ return new Token(Token.QUOTEDSTRING, s);
+ }
+ }
+ throw new ParseException("Unbalanced quoted string");
+ }
+
+ // Check for SPECIAL or CTL
+ if (c < 040 || c >= 0177 || delimiters.indexOf(c) >= 0) {
+ currentPos++; // re-position currentPos
+ char ch[] = new char[1];
+ ch[0] = c;
+ return new Token((int)c, new String(ch));
+ }
+
+ // Check for ATOM
+ for (start = currentPos; currentPos < maxPos; currentPos++) {
+ c = string.charAt(currentPos);
+ // ATOM is delimited by either SPACE, CTL, "(", <">
+ // or the specified SPECIALS
+ if (c < 040 || c >= 0177 || c == '(' || c == ' ' ||
+ c == '"' || delimiters.indexOf(c) >= 0)
+ break;
+ }
+ return new Token(Token.ATOM, string.substring(start, currentPos));
+ }
+
+ // Skip SPACE, HT, CR and NL
+ private int skipWhiteSpace() {
+ char c;
+ for (; currentPos < maxPos; currentPos++)
+ if (((c = string.charAt(currentPos)) != ' ') &&
+ (c != '\t') && (c != '\r') && (c != '\n'))
+ return currentPos;
+ return Token.EOF;
+ }
+
+ /* Process escape sequences and embedded LWSPs from a comment or
+ * quoted string.
+ */
+ private static String filterToken(String s, int start, int end) {
+ StringBuffer sb = new StringBuffer();
+ char c;
+ boolean gotEscape = false;
+ boolean gotCR = false;
+
+ for (int i = start; i < end; i++) {
+ c = s.charAt(i);
+ if (c == '\n' && gotCR) {
+ // This LF is part of an unescaped
+ // CRLF sequence (i.e, LWSP). Skip it.
+ gotCR = false;
+ continue;
+ }
+
+ gotCR = false;
+ if (!gotEscape) {
+ // Previous character was NOT '\'
+ if (c == '\\') // skip this character
+ gotEscape = true;
+ else if (c == '\r') // skip this character
+ gotCR = true;
+ else // append this character
+ sb.append(c);
+ } else {
+ // Previous character was '\'. So no need to
+ // bother with any special processing, just
+ // append this character
+ sb.append(c);
+ gotEscape = false;
+ }
+ }
+ return sb.toString();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/InternetHeaders.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,402 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)InternetHeaders.java 1.16 02/08/08
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream;
+import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.AbstractList;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+/**
+ * InternetHeaders is a utility class that manages RFC822 style
+ * headers. Given an RFC822 format message stream, it reads lines
+ * until the blank line that indicates end of header. The input stream
+ * is positioned at the start of the body. The lines are stored
+ * within the object and can be extracted as either Strings or
+ * {@link Header} objects.
+ *
+ *
+ *
+ *
+ * @author John Mani
+ * @author Bill Shannon
+ * @see MimeUtility
+ */
+public final class InternetHeaders {
+
+ private final FinalArrayList headers = new FinalArrayList();
+
+ /**
+ * Lazily cerated view of header lines (Strings).
+ */
+ private List headerValueView;
+
+ /**
+ * Create an empty InternetHeaders object.
+ */
+ public InternetHeaders() {
+ }
+
+ /**
+ * Read and parse the given RFC822 message stream till the
+ * blank line separating the header from the body. The input
+ * stream is left positioned at the start of the body. The
+ * header lines are stored internally.
+ *
+ *
+ *
+ *
+ *
+ *
+ * MimeBodyPart uses the
+ *
+ *
+ *
+ * RFC 822 header fields must contain only
+ * US-ASCII characters. MIME allows non ASCII characters to be present
+ * in certain portions of certain headers, by encoding those characters.
+ * RFC 2047 specifies the rules for doing this. The MimeUtility
+ * class provided in this package can be used to to achieve this.
+ * Callers of the
+ *
+ * @author John Mani
+ * @author Bill Shannon
+ * @see MimeUtility
+ */
+
+public final class MimeBodyPart {
+
+ /**
+ * This part should be presented as an attachment.
+ * @see #getDisposition
+ * @see #setDisposition
+ */
+ public static final String ATTACHMENT = "attachment";
+
+ /**
+ * This part should be presented inline.
+ * @see #getDisposition
+ * @see #setDisposition
+ */
+ public static final String INLINE = "inline";
+
+
+ // Paranoia:
+ // allow this last minute change to be disabled if it causes problems
+ private static boolean setDefaultTextCharset = true;
+
+ static {
+ try {
+ String s = System.getProperty("mail.mime.setdefaulttextcharset");
+ // default to true
+ setDefaultTextCharset = s == null || !s.equalsIgnoreCase("false");
+ } catch (SecurityException sex) {
+ // ignore it
+ }
+ }
+
+ /*
+ Data is represented in one of three forms.
+ Either we have a DataHandler, or byte[] as the raw content image, or the contentStream.
+ It's OK to have more than one of them, provided that they are identical.
+ */
+
+ /**
+ * The DataHandler object representing this MimeBodyPart's content.
+ */
+ private DataHandler dh;
+
+ /**
+ * Byte array that holds the bytes of the content of this MimeBodyPart.
+ * Used in a pair with {@link #contentLength} to denote a regision of a buffer
+ * as a valid data.
+ */
+ private byte[] content;
+ private int contentLength;
+ private int start = 0;
+
+ /**
+ * If the data for this body part was supplied by an
+ * InputStream that implements the SharedInputStream interface,
+ *
+ *
+ * Note that the "boundary" string that delimits body parts must
+ * not be included in the input stream. The intention
+ * is that the MimeMultipart parser will extract each body part's bytes
+ * from a multipart stream and feed them into this constructor, without
+ * the delimiter strings.
+ *
+ * @param is the body part Input Stream
+ */
+ public MimeBodyPart(InputStream is) throws MessagingException {
+ if (!(is instanceof ByteArrayInputStream) &&
+ !(is instanceof BufferedInputStream) &&
+ !(is instanceof SharedInputStream))
+ is = new BufferedInputStream(is);
+
+ headers = new InternetHeaders(is);
+
+ if (is instanceof SharedInputStream) {
+ SharedInputStream sis = (SharedInputStream) is;
+ contentStream = sis.newStream(sis.getPosition(), -1);
+ } else {
+ ByteOutputStream bos = null;
+ try {
+ bos = new ByteOutputStream();
+ bos.write(is);
+ content = bos.getBytes();
+ contentLength = bos.getCount();
+ } catch (IOException ioex) {
+ throw new MessagingException("Error reading input stream", ioex);
+ } finally {
+ if (bos != null)
+ bos.close();
+ }
+ }
+
+ }
+
+ /**
+ * Constructs a MimeBodyPart using the given header and
+ * content bytes.
+ *
+ * Used by providers.
+ *
+ * @param headers The header of this part
+ * @param content bytes representing the body of this part.
+ */
+ public MimeBodyPart(InternetHeaders headers, byte[] content, int len) {
+ this.headers = headers;
+ this.content = content;
+ this.contentLength = len;
+ }
+
+ public MimeBodyPart(
+ InternetHeaders headers, byte[] content, int start, int len) {
+ this.headers = headers;
+ this.content = content;
+ this.start = start;
+ this.contentLength = len;
+ }
+
+ public MimeBodyPart(MIMEPart part) {
+ mimePart = part;
+ headers = new InternetHeaders();
+ List extends com.sun.xml.internal.org.jvnet.mimepull.Header> hdrs = mimePart.getAllHeaders();
+ for (com.sun.xml.internal.org.jvnet.mimepull.Header hd : hdrs) {
+ headers.addHeader(hd.getName(), hd.getValue());
+ }
+ }
+ /**
+ * Return the containing
+ *
+ * Note that this number may not be an exact measure of the
+ * content size and may or may not account for any transfer
+ * encoding of the content.
+ *
+ * This implementation returns the size of the
+ *
+ * Note that this number may not be an exact measure of the
+ * content length and may or may not account for any transfer
+ * encoding of the content.
+ *
+ * This implementation returns -1.
+ *
+ * @return number of lines, or -1 if not known
+ */
+ public int getLineCount() {
+ return -1;
+ }
+
+ /**
+ * Returns the value of the RFC 822 "Content-Type" header field.
+ * This represents the content type of the content of this
+ * body part. This value must not be null. If this field is
+ * unavailable, "text/plain" should be returned.
+ *
+ * This implementation uses
+ *
+ * For example, this method will return
+ *
+ * If the
+ *
+ * If the Content-Disposition field is unavailable,
+ * null is returned.
+ *
+ * This implementation uses
+ *
+ * This implementation uses
+ *
+ * This implementation uses
+ *
+ * This implementation uses
+ *
+ * This implementation uses
+ *
+ * If the Content-Description field is encoded as per RFC 2047,
+ * it is decoded and converted into Unicode. If the decoding or
+ * conversion fails, the raw data is returned as is.
+ *
+ * This implementation uses
+ *
+ * If the description contains non US-ASCII characters, it will
+ * be encoded using the platform's default charset. If the
+ * description contains only US-ASCII characters, no encoding
+ * is done and it is used as is.
+ *
+ * Note that if the charset encoding process fails, a
+ * MessagingException is thrown, and an UnsupportedEncodingException
+ * is included in the chain of nested exceptions within the
+ * MessagingException.
+ *
+ * @param description content description
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ * @exception MessagingException An
+ * UnsupportedEncodingException may be included
+ * in the exception chain if the charset
+ * conversion fails.
+ */
+ public void setDescription(String description) throws MessagingException {
+ setDescription(description, null);
+ }
+
+ /**
+ * Set the "Content-Description" header field for this body part.
+ * If the description parameter is
+ *
+ * If the description contains non US-ASCII characters, it will
+ * be encoded using the specified charset. If the description
+ * contains only US-ASCII characters, no encoding is done and
+ * it is used as is.
+ *
+ * Note that if the charset encoding process fails, a
+ * MessagingException is thrown, and an UnsupportedEncodingException
+ * is included in the chain of nested exceptions within the
+ * MessagingException.
+ *
+ * @param description Description
+ * @param charset Charset for encoding
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ * @exception MessagingException An
+ * UnsupportedEncodingException may be included
+ * in the exception chain if the charset
+ * conversion fails.
+ */
+ public void setDescription(String description, String charset)
+ throws MessagingException {
+ if (description == null) {
+ removeHeader("Content-Description");
+ return;
+ }
+
+ try {
+ setHeader("Content-Description", MimeUtility.fold(21,
+ MimeUtility.encodeText(description, charset, null)));
+ } catch (UnsupportedEncodingException uex) {
+ throw new MessagingException("Encoding error", uex);
+ }
+ }
+
+ /**
+ * Get the filename associated with this body part.
+ *
+ * Returns the value of the "filename" parameter from the
+ * "Content-Disposition" header field of this body part. If its
+ * not available, returns the value of the "name" parameter from
+ * the "Content-Type" header field of this body part.
+ * Returns
+ *
+ * Sets the "filename" parameter of the "Content-Disposition"
+ * header field of this body part.
+ *
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ */
+ public void setFileName(String filename) throws MessagingException {
+ // Set the Content-Disposition "filename" parameter
+ String s = getHeader("Content-Disposition", null);
+ ContentDisposition cd =
+ new ContentDisposition(s == null ? ATTACHMENT : s);
+ cd.setParameter("filename", filename);
+ setHeader("Content-Disposition", cd.toString());
+
+ /* Also attempt to set the Content-Type "name" parameter,
+ * to satisfy ancient MUAs.
+ * XXX: This is not RFC compliant, and hence should really
+ * be conditional based on some property. Fix this once we
+ * figure out how to get at Properties from here !
+ */
+ s = getHeader("Content-Type", null);
+ if (s != null) {
+ try {
+ ContentType cType = new ContentType(s);
+ cType.setParameter("name", filename);
+ setHeader("Content-Type", cType.toString());
+ } catch (ParseException pex) { } // ignore it
+ }
+ }
+
+ /**
+ * Return a decoded input stream for this body part's "content".
+ *
+ * This implementation obtains the input stream from the DataHandler.
+ * That is, it invokes getDataHandler().getInputStream();
+ *
+ * @return an InputStream
+ * @exception IOException this is typically thrown by the
+ * DataHandler. Refer to the documentation for
+ * javax.activation.DataHandler for more details.
+ *
+ * @see #getContentStream
+ * @see DataHandler#getInputStream
+ */
+ public InputStream getInputStream()
+ throws IOException {
+ return getDataHandler().getInputStream();
+ }
+
+ /**
+ * Produce the raw bytes of the content. This method is used
+ * when creating a DataHandler object for the content. Subclasses
+ * that can provide a separate input stream for just the MimeBodyPart
+ * content might want to override this method.
+ *
+ * @see #content
+ */
+ /*package*/ InputStream getContentStream() throws MessagingException {
+ if (mimePart != null) {
+ return mimePart.read();
+ }
+ if (contentStream != null)
+ return ((SharedInputStream)contentStream).newStream(0, -1);
+ if (content != null)
+ return new ByteArrayInputStream(content,start,contentLength);
+
+ throw new MessagingException("No content");
+ }
+
+ /**
+ * Return an InputStream to the raw data with any Content-Transfer-Encoding
+ * intact. This method is useful if the "Content-Transfer-Encoding"
+ * header is incorrect or corrupt, which would prevent the
+ *
+ *
+ * This implementation simply calls the
+ *
+ * The implementation provided here works just like the
+ * the implementation in MimeMessage.
+ */
+ public DataHandler getDataHandler() {
+ if (mimePart != null) {
+ //return an inputstream
+ return new DataHandler(new DataSource() {
+
+ public InputStream getInputStream() throws IOException {
+ return mimePart.read();
+ }
+
+ public OutputStream getOutputStream() throws IOException {
+ throw new UnsupportedOperationException("getOutputStream cannot be supported : You have enabled LazyAttachments Option");
+ }
+
+ public String getContentType() {
+ return mimePart.getContentType();
+ }
+
+ public String getName() {
+ return "MIMEPart Wrapped DataSource";
+ }
+ });
+ }
+ if (dh == null)
+ dh = new DataHandler(new MimePartDataSource(this));
+ return dh;
+ }
+
+ /**
+ * Return the content as a java object. The type of the object
+ * returned is of course dependent on the content itself. For
+ * example, the native format of a text/plain content is usually
+ * a String object. The native format for a "multipart"
+ * content is always a MimeMultipart subclass. For content types that are
+ * unknown to the DataHandler system, an input stream is returned
+ * as the content.
+ *
+ * This implementation obtains the content from the DataHandler.
+ * That is, it invokes getDataHandler().getContent();
+ *
+ * @return Object
+ * @exception IOException this is typically thrown by the
+ * DataHandler. Refer to the documentation for
+ * javax.activation.DataHandler for more details.
+ */
+ public Object getContent() throws IOException {
+ return getDataHandler().getContent();
+ }
+
+ /**
+ * This method provides the mechanism to set this body part's content.
+ * The given DataHandler object should wrap the actual content.
+ *
+ * @param dh The DataHandler for the content
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ */
+ public void setDataHandler(DataHandler dh) {
+ if (mimePart != null) {
+ mimePart = null;
+ }
+ this.dh = dh;
+ this.content = null;
+ this.contentStream = null;
+ removeHeader("Content-Type");
+ removeHeader("Content-Transfer-Encoding");
+ }
+
+ /**
+ * A convenience method for setting this body part's content.
+ *
+ * The content is wrapped in a DataHandler object. Note that a
+ * DataContentHandler class for the specified type should be
+ * available to the JavaMail implementation for this to work right.
+ * That is, to do
+ *
+ * Note that there may be a performance penalty if
+ *
+ * If the charset is already known, use the
+ * setText() version that takes the charset parameter.
+ *
+ * @see #setText(String text, String charset)
+ */
+ public void setText(String text) {
+ setText(text, null);
+ }
+
+ /**
+ * Convenience method that sets the given String as this part's
+ * content, with a MIME type of "text/plain" and the specified
+ * charset. The given Unicode string will be charset-encoded
+ * using the specified charset. The charset is also used to set
+ * the "charset" parameter.
+ */
+ public void setText(String text, String charset) {
+ if (charset == null) {
+ if (MimeUtility.checkAscii(text) != MimeUtility.ALL_ASCII)
+ charset = MimeUtility.getDefaultMIMECharset();
+ else
+ charset = "us-ascii";
+ }
+ setContent(text, "text/plain; charset=" +
+ MimeUtility.quote(charset, HeaderTokenizer.MIME));
+ }
+
+ /**
+ * This method sets the body part's content to a MimeMultipart object.
+ *
+ * @param mp The multipart object that is the Message's content
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ */
+ public void setContent(MimeMultipart mp) {
+ if (mimePart != null) {
+ mimePart = null;
+ }
+ setDataHandler(new DataHandler(mp, mp.getContentType().toString()));
+ mp.setParent(this);
+ }
+
+ /**
+ * Output the body part as an RFC 822 format stream.
+ *
+ * @exception MessagingException
+ * @exception IOException if an error occurs writing to the
+ * stream or if an error is generated
+ * by the javax.activation layer.
+ * @see DataHandler#writeTo
+ */
+ public void writeTo(OutputStream os)
+ throws IOException, MessagingException {
+
+ // First, write out the header
+ List hdrLines = headers.getAllHeaderLines();
+ int sz = hdrLines.size();
+ for( int i=0; i
+ *
+ * A MimeMultipart is obtained from a MimeBodyPart whose primary type
+ * is "multipart" (by invoking the part's
+ *
+ * The default multipart subtype is "mixed". The other multipart
+ * subtypes, such as "alternative", "related", and so on, can be
+ * implemented as subclasses of MimeMultipart with additional methods
+ * to implement the additional semantics of that type of multipart
+ * content. The intent is that service providers, mail JavaBean writers
+ * and mail clients will write many such subclasses and their Command
+ * Beans, and will install them into the JavaBeans Activation
+ * Framework, so that any JavaMail implementation and its clients can
+ * transparently find and use these classes. Thus, a MIME multipart
+ * handler is treated just like any other type handler, thereby
+ * decoupling the process of providing multipart handlers from the
+ * JavaMail API. Lacking these additional MimeMultipart subclasses,
+ * all subtypes of MIME multipart data appear as MimeMultipart objects.
+ *
+ * An application can directly construct a MIME multipart object of any
+ * subtype by using the
+ *
+ * MimeBodyParts may be added later.
+ */
+ public MimeMultipart() {
+ this("mixed");
+ }
+
+ /**
+ * Construct a MimeMultipart object of the given subtype.
+ * A unique boundary string is generated and this string is
+ * setup as the "boundary" parameter for the
+ *
+ *
+ * MimeBodyParts may be added later.
+ */
+ public MimeMultipart(String subtype) {
+ //super();
+ /*
+ * Compute a boundary string.
+ */
+ String boundary = UniqueValue.getUniqueBoundaryValue();
+ contentType = new ContentType("multipart", subtype, null);
+ contentType.setParameter("boundary", boundary);
+ }
+
+ /**
+ * Constructs a MimeMultipart object and its bodyparts from the
+ * given DataSource.
+ *
+ * This constructor handles as a special case the situation where the
+ * given DataSource is a MultipartDataSource object.
+ *
+ * Otherwise, the DataSource is assumed to provide a MIME multipart
+ * byte stream. The
+ *
+ * @param subtype Subtype
+ */
+ public void setSubType(String subtype) {
+ contentType.setSubType(subtype);
+ }
+
+ /**
+ * Return the number of enclosed MimeBodyPart objects.
+ *
+ * @return number of parts
+ */
+ public int getCount() throws MessagingException {
+ parse();
+ if (parts == null)
+ return 0;
+
+ return parts.size();
+ }
+
+ /**
+ * Get the specified MimeBodyPart. BodyParts are numbered starting at 0.
+ *
+ * @param index the index of the desired MimeBodyPart
+ * @return the MimeBodyPart
+ * @exception MessagingException if no such MimeBodyPart exists
+ */
+ public MimeBodyPart getBodyPart(int index)
+ throws MessagingException {
+ parse();
+ if (parts == null)
+ throw new IndexOutOfBoundsException("No such BodyPart");
+
+ return (MimeBodyPart)parts.get(index);
+ }
+
+ /**
+ * Get the MimeBodyPart referred to by the given ContentID (CID).
+ * Returns null if the part is not found.
+ *
+ * @param CID the ContentID of the desired part
+ * @return the MimeBodyPart
+ */
+ public MimeBodyPart getBodyPart(String CID)
+ throws MessagingException {
+ parse();
+
+ int count = getCount();
+ for (int i = 0; i < count; i++) {
+ MimeBodyPart part = getBodyPart(i);
+ String s = part.getContentID();
+ // Old versions of AXIS2 put angle brackets around the content
+ // id but not the start param
+ String sNoAngle = (s!= null) ? s.replaceFirst("^<", "").replaceFirst(">$", "")
+ :null;
+ if (s != null && (s.equals(CID) || CID.equals(sNoAngle)))
+ return part;
+ }
+ return null;
+ }
+
+ /**
+ * Update headers. The default implementation here just
+ * calls the
+ *
+ * Note that the boundary parameter is already set up when
+ * a new and empty MimeMultipart object is created.
+ *
+ * This method is called when the
+ *
+ * The method adds the MultipartDataSource's MimeBodyPart
+ * objects into this MimeMultipart. This MimeMultipart's contentType is
+ * set to that of the MultipartDataSource.
+ *
+ * This method is typically used in those cases where one
+ * has a multipart data source that has already been pre-parsed into
+ * the individual body parts (for example, an IMAP datasource), but
+ * needs to create an appropriate MimeMultipart subclass that represents
+ * a specific multipart subtype.
+ *
+ * @param mp MimeMultipart datasource
+ */
+
+ protected void setMultipartDataSource(MultipartDataSource mp)
+ throws MessagingException {
+ contentType = new ContentType(mp.getContentType());
+
+ int count = mp.getCount();
+ for (int i = 0; i < count; i++)
+ addBodyPart(mp.getBodyPart(i));
+ }
+
+ /**
+ * Return the content-type of this MimeMultipart.
+ *
+ * This implementation just returns the value of the
+ *
+ *
+ * This method applies the appropriate transfer-decoding, based
+ * on the Content-Transfer-Encoding attribute of this MimeBodyPart.
+ * Thus the returned input stream is a decoded stream of bytes.
+ *
+ * This implementation obtains the raw content from the MimeBodyPart
+ * using the
+ *
+ * This implementation throws the UnknownServiceException.
+ */
+ public OutputStream getOutputStream() throws IOException {
+ throw new UnknownServiceException();
+ }
+
+ /**
+ * Returns the content-type of this DataSource.
+ *
+ * This implementation just invokes the
+ *
+ * This implementation just returns an empty string.
+ */
+ public String getName() {
+ try {
+ return part.getFileName();
+ } catch (MessagingException mex) {
+ return "";
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePullMultipart.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
+import com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import javax.activation.DataSource;
+import javax.xml.soap.AttachmentPart;
+import com.sun.xml.internal.org.jvnet.mimepull.MIMEConfig;
+import com.sun.xml.internal.org.jvnet.mimepull.MIMEMessage;
+import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
+
+/**
+ *
+ * @author Kumar
+ */
+public class MimePullMultipart extends MimeMultipart {
+
+ private InputStream in = null;
+ private String boundary = null;
+ private MIMEMessage mm = null;
+ private DataSource dataSource = null;
+ private ContentType contType = null;
+ private String startParam = null;
+ private MIMEPart soapPart = null;
+
+ public MimePullMultipart(DataSource ds, ContentType ct)
+ throws MessagingException {
+ parsed = false;
+ if (ct==null)
+ contType = new ContentType(ds.getContentType());
+ else
+ contType = ct;
+
+ dataSource = ds;
+ boundary = contType.getParameter("boundary");
+ }
+
+ public MIMEPart readAndReturnSOAPPart() throws MessagingException {
+ if (soapPart != null) {
+ throw new MessagingException("Inputstream from datasource was already consumed");
+ }
+ readSOAPPart();
+ return soapPart;
+
+ }
+
+ protected void readSOAPPart() throws MessagingException {
+ try {
+ if (soapPart != null) {
+ return;
+ }
+ in = dataSource.getInputStream();
+ MIMEConfig config = new MIMEConfig(); //use defaults
+ mm = new MIMEMessage(in, boundary, config);
+ String st = contType.getParameter("start");
+ if(startParam == null) {
+ soapPart = mm.getPart(0);
+ } else {
+ // Strip <...> from root part's Content-I
+ if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') {
+ st = st.substring(1, st.length()-1);
+ }
+ startParam = st;
+ soapPart = mm.getPart(startParam);
+
+ }
+ } catch (IOException ex) {
+ throw new MessagingException("No inputstream from datasource", ex);
+ }
+ }
+
+ public void parseAll() throws MessagingException {
+ if (parsed) {
+ return;
+ }
+ if (soapPart == null) {
+ readSOAPPart();
+ }
+
+ List
+ *
+ * There are a set of methods to encode and decode MIME headers as
+ * per RFC 2047. A brief description on handling such headers is
+ * given below:
+ *
+ * RFC 822 mail headers must contain only US-ASCII
+ * characters. Headers that contain non US-ASCII characters must be
+ * encoded so that they contain only US-ASCII characters. Basically,
+ * this process involves using either BASE64 or QP to encode certain
+ * characters. RFC 2047 describes this in detail.
+ *
+ * In Java, Strings contain (16 bit) Unicode characters. ASCII is a
+ * subset of Unicode (and occupies the range 0 - 127). A String
+ * that contains only ASCII characters is already mail-safe. If the
+ * String contains non US-ASCII characters, it must be encoded. An
+ * additional complexity in this step is that since Unicode is not
+ * yet a widely used charset, one might want to first charset-encode
+ * the String into another charset and then do the transfer-encoding.
+ *
+ * Note that to get the actual bytes of a mail-safe String (say,
+ * for sending over SMTP), one must do
+ *
+ *
+ * The
+ *
+ * The
+ *
+ * Several System properties control strict conformance to the MIME
+ * spec. Note that these are not session properties but must be set
+ * globally as System properties.
+ *
+ * The
+ *
+ * The
+ *
+ * In addition, the
+ *
+ * The algorithm used here is:
+ *
+ * @since JavaMail 1.2
+ */
+ public static String getEncoding(DataHandler dh) {
+ ContentType cType = null;
+ String encoding = null;
+
+ /*
+ * Try to pick the most efficient means of determining the
+ * encoding. If this DataHandler was created using a DataSource,
+ * the getEncoding(DataSource) method is typically faster. If
+ * the DataHandler was created with an object, this method is
+ * much faster. To distinguish the two cases, we use a heuristic.
+ * A DataHandler created with an object will always have a null name.
+ * A DataHandler created with a DataSource will usually have a
+ * non-null name.
+ *
+ * XXX - This is actually quite a disgusting hack, but it makes
+ * a common case run over twice as fast.
+ */
+ if (dh.getName() != null)
+ return getEncoding(dh.getDataSource());
+
+ try {
+ cType = new ContentType(dh.getContentType());
+ } catch (Exception ex) {
+ return "base64"; // what else ?!
+ }
+
+ if (cType.match("text/*")) {
+ // Check all of the available bytes
+ AsciiOutputStream aos = new AsciiOutputStream(false, false);
+ try {
+ dh.writeTo(aos);
+ } catch (IOException ex) { } // ignore it
+ switch (aos.getAscii()) {
+ case ALL_ASCII:
+ encoding = "7bit"; // all ascii
+ break;
+ case MOSTLY_ASCII:
+ encoding = "quoted-printable"; // mostly ascii
+ break;
+ default:
+ encoding = "base64"; // mostly binary
+ break;
+ }
+ } else { // not "text"
+ // Check all of available bytes, break out if we find
+ // at least one non-US-ASCII character
+ AsciiOutputStream aos =
+ new AsciiOutputStream(true, encodeEolStrict);
+ try {
+ dh.writeTo(aos);
+ } catch (IOException ex) { } // ignore it
+ if (aos.getAscii() == ALL_ASCII) // all ascii
+ encoding = "7bit";
+ else // found atleast one non-ascii character, use b64
+ encoding = "base64";
+ }
+
+ return encoding;
+ }
+
+ /**
+ * Decode the given input stream. The Input stream returned is
+ * the decoded input stream. All the encodings defined in RFC 2045
+ * are supported here. They include "base64", "quoted-printable",
+ * "7bit", "8bit", and "binary". In addition, "uuencode" is also
+ * supported.
+ *
+ * @param is input stream
+ * @param encoding the encoding of the stream.
+ * @return decoded input stream.
+ */
+ public static InputStream decode(InputStream is, String encoding)
+ throws MessagingException {
+ if (encoding.equalsIgnoreCase("base64"))
+ return new BASE64DecoderStream(is);
+ else if (encoding.equalsIgnoreCase("quoted-printable"))
+ return new QPDecoderStream(is);
+ else if (encoding.equalsIgnoreCase("uuencode") ||
+ encoding.equalsIgnoreCase("x-uuencode") ||
+ encoding.equalsIgnoreCase("x-uue"))
+ return new UUDecoderStream(is);
+ else if (encoding.equalsIgnoreCase("binary") ||
+ encoding.equalsIgnoreCase("7bit") ||
+ encoding.equalsIgnoreCase("8bit"))
+ return is;
+ else
+ throw new MessagingException("Unknown encoding: " + encoding);
+ }
+
+ /**
+ * Wrap an encoder around the given output stream.
+ * All the encodings defined in RFC 2045 are supported here.
+ * They include "base64", "quoted-printable", "7bit", "8bit" and
+ * "binary". In addition, "uuencode" is also supported.
+ *
+ * @param os output stream
+ * @param encoding the encoding of the stream.
+ * @return output stream that applies the
+ * specified encoding.
+ */
+ public static OutputStream encode(OutputStream os, String encoding)
+ throws MessagingException {
+ if (encoding == null)
+ return os;
+ else if (encoding.equalsIgnoreCase("base64"))
+ return new BASE64EncoderStream(os);
+ else if (encoding.equalsIgnoreCase("quoted-printable"))
+ return new QPEncoderStream(os);
+ else if (encoding.equalsIgnoreCase("uuencode") ||
+ encoding.equalsIgnoreCase("x-uuencode") ||
+ encoding.equalsIgnoreCase("x-uue"))
+ return new UUEncoderStream(os);
+ else if (encoding.equalsIgnoreCase("binary") ||
+ encoding.equalsIgnoreCase("7bit") ||
+ encoding.equalsIgnoreCase("8bit"))
+ return os;
+ else
+ throw new MessagingException("Unknown encoding: " +encoding);
+ }
+
+ /**
+ * Wrap an encoder around the given output stream.
+ * All the encodings defined in RFC 2045 are supported here.
+ * They include "base64", "quoted-printable", "7bit", "8bit" and
+ * "binary". In addition, "uuencode" is also supported.
+ * The
+ *
+ * The given Unicode string is examined for non US-ASCII
+ * characters. If the string contains only US-ASCII characters,
+ * it is returned as-is. If the string contains non US-ASCII
+ * characters, it is first character-encoded using the platform's
+ * default charset, then transfer-encoded using either the B or
+ * Q encoding. The resulting bytes are then returned as a Unicode
+ * string containing only ASCII characters.
+ *
+ * Note that this method should be used to encode only
+ * "unstructured" RFC 822 headers.
+ *
+ * Example of usage:
+ *
+ *
+ * @param text unicode string
+ * @return Unicode string containing only US-ASCII characters
+ * @exception UnsupportedEncodingException if the encoding fails
+ */
+ public static String encodeText(String text)
+ throws UnsupportedEncodingException {
+ return encodeText(text, null, null);
+ }
+
+ /**
+ * Encode a RFC 822 "text" token into mail-safe form as per
+ * RFC 2047.
+ *
+ * The given Unicode string is examined for non US-ASCII
+ * characters. If the string contains only US-ASCII characters,
+ * it is returned as-is. If the string contains non US-ASCII
+ * characters, it is first character-encoded using the specified
+ * charset, then transfer-encoded using either the B or Q encoding.
+ * The resulting bytes are then returned as a Unicode string
+ * containing only ASCII characters.
+ *
+ * Note that this method should be used to encode only
+ * "unstructured" RFC 822 headers.
+ *
+ * @param text the header value
+ * @param charset the charset. If this parameter is null, the
+ * platform's default chatset is used.
+ * @param encoding the encoding to be used. Currently supported
+ * values are "B" and "Q". If this parameter is null, then
+ * the "Q" encoding is used if most of characters to be
+ * encoded are in the ASCII charset, otherwise "B" encoding
+ * is used.
+ * @return Unicode string containing only US-ASCII characters
+ */
+ public static String encodeText(String text, String charset,
+ String encoding)
+ throws UnsupportedEncodingException {
+ return encodeWord(text, charset, encoding, false);
+ }
+
+ /**
+ * Decode "unstructured" headers, that is, headers that are defined
+ * as '*text' as per RFC 822.
+ *
+ * The string is decoded using the algorithm specified in
+ * RFC 2047, Section 6.1.1. If the charset-conversion fails
+ * for any sequence, an UnsupportedEncodingException is thrown.
+ * If the String is not an RFC 2047 style encoded header, it is
+ * returned as-is
+ *
+ * Example of usage:
+ *
+ *
+ * @param etext the possibly encoded value
+ * @exception UnsupportedEncodingException if the charset
+ * conversion failed.
+ */
+ public static String decodeText(String etext)
+ throws UnsupportedEncodingException {
+ /*
+ * We look for sequences separated by "linear-white-space".
+ * (as per RFC 2047, Section 6.1.1)
+ * RFC 822 defines "linear-white-space" as SPACE | HT | CR | NL.
+ */
+ String lwsp = " \t\n\r";
+ StringTokenizer st;
+
+ /*
+ * First, lets do a quick run thru the string and check
+ * whether the sequence "=?" exists at all. If none exists,
+ * we know there are no encoded-words in here and we can just
+ * return the string as-is, without suffering thru the later
+ * decoding logic.
+ * This handles the most common case of unencoded headers
+ * efficiently.
+ */
+ if (etext.indexOf("=?") == -1)
+ return etext;
+
+ // Encoded words found. Start decoding ...
+
+ st = new StringTokenizer(etext, lwsp, true);
+ StringBuffer sb = new StringBuffer(); // decode buffer
+ StringBuffer wsb = new StringBuffer(); // white space buffer
+ boolean prevWasEncoded = false;
+
+ while (st.hasMoreTokens()) {
+ char c;
+ String s = st.nextToken();
+ // If whitespace, append it to the whitespace buffer
+ if (((c = s.charAt(0)) == ' ') || (c == '\t') ||
+ (c == '\r') || (c == '\n'))
+ wsb.append(c);
+ else {
+ // Check if token is an 'encoded-word' ..
+ String word;
+ try {
+ word = decodeWord(s);
+ // Yes, this IS an 'encoded-word'.
+ if (!prevWasEncoded && wsb.length() > 0) {
+ // if the previous word was also encoded, we
+ // should ignore the collected whitespace. Else
+ // we include the whitespace as well.
+ sb.append(wsb);
+ }
+ prevWasEncoded = true;
+ } catch (ParseException pex) {
+ // This is NOT an 'encoded-word'.
+ word = s;
+ // possibly decode inner encoded words
+ if (!decodeStrict)
+ word = decodeInnerWords(word);
+ // include colleced whitespace ..
+ if (wsb.length() > 0)
+ sb.append(wsb);
+ prevWasEncoded = false;
+ }
+ sb.append(word); // append the actual word
+ wsb.setLength(0); // reset wsb for reuse
+ }
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Encode a RFC 822 "word" token into mail-safe form as per
+ * RFC 2047.
+ *
+ * The given Unicode string is examined for non US-ASCII
+ * characters. If the string contains only US-ASCII characters,
+ * it is returned as-is. If the string contains non US-ASCII
+ * characters, it is first character-encoded using the platform's
+ * default charset, then transfer-encoded using either the B or
+ * Q encoding. The resulting bytes are then returned as a Unicode
+ * string containing only ASCII characters.
+ *
+ * This method is meant to be used when creating RFC 822 "phrases".
+ * The InternetAddress class, for example, uses this to encode
+ * it's 'phrase' component.
+ *
+ * @param text unicode string
+ * @return Array of Unicode strings containing only US-ASCII
+ * characters.
+ * @exception UnsupportedEncodingException if the encoding fails
+ */
+ public static String encodeWord(String word)
+ throws UnsupportedEncodingException {
+ return encodeWord(word, null, null);
+ }
+
+ /**
+ * Encode a RFC 822 "word" token into mail-safe form as per
+ * RFC 2047.
+ *
+ * The given Unicode string is examined for non US-ASCII
+ * characters. If the string contains only US-ASCII characters,
+ * it is returned as-is. If the string contains non US-ASCII
+ * characters, it is first character-encoded using the specified
+ * charset, then transfer-encoded using either the B or Q encoding.
+ * The resulting bytes are then returned as a Unicode string
+ * containing only ASCII characters.
+ *
+ * @param text unicode string
+ * @param charset the MIME charset
+ * @param encoding the encoding to be used. Currently supported
+ * values are "B" and "Q". If this parameter is null, then
+ * the "Q" encoding is used if most of characters to be
+ * encoded are in the ASCII charset, otherwise "B" encoding
+ * is used.
+ * @return Unicode string containing only US-ASCII characters
+ * @exception UnsupportedEncodingException if the encoding fails
+ */
+ public static String encodeWord(String word, String charset,
+ String encoding)
+ throws UnsupportedEncodingException {
+ return encodeWord(word, charset, encoding, true);
+ }
+
+ /*
+ * Encode the given string. The parameter 'encodingWord' should
+ * be true if a RFC 822 "word" token is being encoded and false if a
+ * RFC 822 "text" token is being encoded. This is because the
+ * "Q" encoding defined in RFC 2047 has more restrictions when
+ * encoding "word" tokens. (Sigh)
+ */
+ private static String encodeWord(String string, String charset,
+ String encoding, boolean encodingWord)
+ throws UnsupportedEncodingException {
+
+ // If 'string' contains only US-ASCII characters, just
+ // return it.
+ int ascii = checkAscii(string);
+ if (ascii == ALL_ASCII)
+ return string;
+
+ // Else, apply the specified charset conversion.
+ String jcharset;
+ if (charset == null) { // use default charset
+ jcharset = getDefaultJavaCharset(); // the java charset
+ charset = getDefaultMIMECharset(); // the MIME equivalent
+ } else // MIME charset -> java charset
+ jcharset = javaCharset(charset);
+
+ // If no transfer-encoding is specified, figure one out.
+ if (encoding == null) {
+ if (ascii != MOSTLY_NONASCII)
+ encoding = "Q";
+ else
+ encoding = "B";
+ }
+
+ boolean b64;
+ if (encoding.equalsIgnoreCase("B"))
+ b64 = true;
+ else if (encoding.equalsIgnoreCase("Q"))
+ b64 = false;
+ else
+ throw new UnsupportedEncodingException(
+ "Unknown transfer encoding: " + encoding);
+
+ StringBuffer outb = new StringBuffer(); // the output buffer
+ doEncode(string, b64, jcharset,
+ // As per RFC 2047, size of an encoded string should not
+ // exceed 75 bytes.
+ // 7 = size of "=?", '?', 'B'/'Q', '?', "?="
+ 75 - 7 - charset.length(), // the available space
+ "=?" + charset + "?" + encoding + "?", // prefix
+ true, encodingWord, outb);
+
+ return outb.toString();
+ }
+
+ private static void doEncode(String string, boolean b64,
+ String jcharset, int avail, String prefix,
+ boolean first, boolean encodingWord, StringBuffer buf)
+ throws UnsupportedEncodingException {
+
+ // First find out what the length of the encoded version of
+ // 'string' would be.
+ byte[] bytes = string.getBytes(jcharset);
+ int len;
+ if (b64) // "B" encoding
+ len = BEncoderStream.encodedLength(bytes);
+ else // "Q"
+ len = QEncoderStream.encodedLength(bytes, encodingWord);
+
+ int size;
+ if ((len > avail) && ((size = string.length()) > 1)) {
+ // If the length is greater than 'avail', split 'string'
+ // into two and recurse.
+ doEncode(string.substring(0, size/2), b64, jcharset,
+ avail, prefix, first, encodingWord, buf);
+ doEncode(string.substring(size/2, size), b64, jcharset,
+ avail, prefix, false, encodingWord, buf);
+ } else {
+ // length <= than 'avail'. Encode the given string
+ ByteArrayOutputStream os = new ByteArrayOutputStream(BUFFER_SIZE);
+ OutputStream eos; // the encoder
+ if (b64) // "B" encoding
+ eos = new BEncoderStream(os);
+ else // "Q" encoding
+ eos = new QEncoderStream(os, encodingWord);
+
+ try { // do the encoding
+ eos.write(bytes);
+ eos.close();
+ } catch (IOException ioex) { }
+
+ byte[] encodedBytes = os.toByteArray(); // the encoded stuff
+ // Now write out the encoded (all ASCII) bytes into our
+ // StringBuffer
+ if (!first) // not the first line of this sequence
+ if (foldEncodedWords)
+ buf.append("\r\n "); // start a continuation line
+ else
+ buf.append(" "); // line will be folded later
+
+ buf.append(prefix);
+ for (int i = 0; i < encodedBytes.length; i++)
+ buf.append((char)encodedBytes[i]);
+ buf.append("?="); // terminate the current sequence
+ }
+ }
+
+ /**
+ * The string is parsed using the rules in RFC 2047 for parsing
+ * an "encoded-word". If the parse fails, a ParseException is
+ * thrown. Otherwise, it is transfer-decoded, and then
+ * charset-converted into Unicode. If the charset-conversion
+ * fails, an UnsupportedEncodingException is thrown.
+ *
+ * @param eword the possibly encoded value
+ * @exception ParseException if the string is not an
+ * encoded-word as per RFC 2047.
+ * @exception UnsupportedEncodingException if the charset
+ * conversion failed.
+ */
+ public static String decodeWord(String eword)
+ throws ParseException, UnsupportedEncodingException {
+
+ if (!eword.startsWith("=?")) // not an encoded word
+ throw new ParseException();
+
+ // get charset
+ int start = 2; int pos;
+ if ((pos = eword.indexOf('?', start)) == -1)
+ throw new ParseException();
+ String charset = javaCharset(eword.substring(start, pos));
+
+ // get encoding
+ start = pos+1;
+ if ((pos = eword.indexOf('?', start)) == -1)
+ throw new ParseException();
+ String encoding = eword.substring(start, pos);
+
+ // get encoded-sequence
+ start = pos+1;
+ if ((pos = eword.indexOf("?=", start)) == -1)
+ throw new ParseException();
+ String word = eword.substring(start, pos);
+
+ try {
+ // Extract the bytes from word
+ ByteArrayInputStream bis =
+ new ByteArrayInputStream(ASCIIUtility.getBytes(word));
+
+ // Get the appropriate decoder
+ InputStream is;
+ if (encoding.equalsIgnoreCase("B"))
+ is = new BASE64DecoderStream(bis);
+ else if (encoding.equalsIgnoreCase("Q"))
+ is = new QDecoderStream(bis);
+ else
+ throw new UnsupportedEncodingException(
+ "unknown encoding: " + encoding);
+
+ // For b64 & q, size of decoded word <= size of word. So
+ // the decoded bytes must fit into the 'bytes' array. This
+ // is certainly more efficient than writing bytes into a
+ // ByteArrayOutputStream and then pulling out the byte[]
+ // from it.
+ int count = bis.available();
+ byte[] bytes = new byte[count];
+ // count is set to the actual number of decoded bytes
+ count = is.read(bytes, 0, count);
+
+ // Finally, convert the decoded bytes into a String using
+ // the specified charset
+ String s = new String(bytes, 0, count, charset);
+ if (pos + 2 < eword.length()) {
+ // there's still more text in the string
+ String rest = eword.substring(pos + 2);
+ if (!decodeStrict)
+ rest = decodeInnerWords(rest);
+ s += rest;
+ }
+ return s;
+ } catch (UnsupportedEncodingException uex) {
+ // explicitly catch and rethrow this exception, otherwise
+ // the below IOException catch will swallow this up!
+ throw uex;
+ } catch (IOException ioex) {
+ // Shouldn't happen.
+ throw new ParseException();
+ } catch (IllegalArgumentException iex) {
+ /* An unknown charset of the form ISO-XXX-XXX, will cause
+ * the JDK to throw an IllegalArgumentException ... Since the
+ * JDK will attempt to create a classname using this string,
+ * but valid classnames must not contain the character '-',
+ * and this results in an IllegalArgumentException, rather than
+ * the expected UnsupportedEncodingException. Yikes
+ */
+ throw new UnsupportedEncodingException();
+ }
+ }
+
+ /**
+ * Look for encoded words within a word. The MIME spec doesn't
+ * allow this, but many broken mailers, especially Japanese mailers,
+ * produce such incorrect encodings.
+ */
+ private static String decodeInnerWords(String word)
+ throws UnsupportedEncodingException {
+ int start = 0, i;
+ StringBuffer buf = new StringBuffer();
+ while ((i = word.indexOf("=?", start)) >= 0) {
+ buf.append(word.substring(start, i));
+ int end = word.indexOf("?=", i);
+ if (end < 0)
+ break;
+ String s = word.substring(i, end + 2);
+ try {
+ s = decodeWord(s);
+ } catch (ParseException pex) {
+ // ignore it, just use the original string
+ }
+ buf.append(s);
+ start = end + 2;
+ }
+ if (start == 0)
+ return word;
+ if (start < word.length())
+ buf.append(word.substring(start));
+ return buf.toString();
+ }
+
+ /**
+ * A utility method to quote a word, if the word contains any
+ * characters from the specified 'specials' list.
+ *
+ * The
+ *
+ * This method is typically used during the generation of
+ * RFC 822 and MIME header fields.
+ *
+ * @param word word to be quoted
+ * @param specials the set of special characters
+ * @return the possibly quoted word
+ * @see javax.mail.internet.HeaderTokenizer#MIME
+ * @see javax.mail.internet.HeaderTokenizer#RFC822
+ */
+ public static String quote(String word, String specials) {
+ int len = word.length();
+
+ /*
+ * Look for any "bad" characters, Escape and
+ * quote the entire string if necessary.
+ */
+ boolean needQuoting = false;
+ for (int i = 0; i < len; i++) {
+ char c = word.charAt(i);
+ if (c == '"' || c == '\\' || c == '\r' || c == '\n') {
+ // need to escape them and then quote the whole string
+ StringBuffer sb = new StringBuffer(len + 3);
+ sb.append('"');
+ sb.append(word.substring(0, i));
+ int lastc = 0;
+ for (int j = i; j < len; j++) {
+ char cc = word.charAt(j);
+ if ((cc == '"') || (cc == '\\') ||
+ (cc == '\r') || (cc == '\n'))
+ if (cc == '\n' && lastc == '\r')
+ ; // do nothing, CR was already escaped
+ else
+ sb.append('\\'); // Escape the character
+ sb.append(cc);
+ lastc = cc;
+ }
+ sb.append('"');
+ return sb.toString();
+ } else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
+ // These characters cause the string to be quoted
+ needQuoting = true;
+ }
+
+ if (needQuoting) {
+ StringBuffer sb = new StringBuffer(len + 2);
+ sb.append('"').append(word).append('"');
+ return sb.toString();
+ } else
+ return word;
+ }
+
+ /**
+ * Fold a string at linear whitespace so that each line is no longer
+ * than 76 characters, if possible. If there are more than 76
+ * non-whitespace characters consecutively, the string is folded at
+ * the first whitespace after that sequence. The parameter
+ *
+ *
+ * Note that line breaks in the string aren't escaped; they probably
+ * should be.
+ *
+ * @param used characters used in line so far
+ * @param s the string to fold
+ * @return the folded string
+ */
+ /*public*/ static String fold(int used, String s) {
+ if (!foldText)
+ return s;
+
+ int end;
+ char c;
+ // Strip trailing spaces
+ for (end = s.length() - 1; end >= 0; end--) {
+ c = s.charAt(end);
+ if (c != ' ' && c != '\t')
+ break;
+ }
+ if (end != s.length() - 1)
+ s = s.substring(0, end + 1);
+
+ // if the string fits now, just return it
+ if (used + s.length() <= 76)
+ return s;
+
+ // have to actually fold the string
+ StringBuffer sb = new StringBuffer(s.length() + 4);
+ char lastc = 0;
+ while (used + s.length() > 76) {
+ int lastspace = -1;
+ for (int i = 0; i < s.length(); i++) {
+ if (lastspace != -1 && used + i > 76)
+ break;
+ c = s.charAt(i);
+ if (c == ' ' || c == '\t')
+ if (!(lastc == ' ' || lastc == '\t'))
+ lastspace = i;
+ lastc = c;
+ }
+ if (lastspace == -1) {
+ // no space, use the whole thing
+ sb.append(s);
+ s = "";
+ used = 0;
+ break;
+ }
+ sb.append(s.substring(0, lastspace));
+ sb.append("\r\n");
+ lastc = s.charAt(lastspace);
+ sb.append(lastc);
+ s = s.substring(lastspace + 1);
+ used = 1;
+ }
+ sb.append(s);
+ return sb.toString();
+ }
+
+ /**
+ * Unfold a folded header. Any line breaks that aren't escaped and
+ * are followed by whitespace are removed.
+ *
+ * @param s the string to unfold
+ * @return the unfolded string
+ */
+ /*public*/ static String unfold(String s) {
+ if (!foldText)
+ return s;
+
+ StringBuffer sb = null;
+ int i;
+ while ((i = indexOfAny(s, "\r\n")) >= 0) {
+ int start = i;
+ int l = s.length();
+ i++; // skip CR or NL
+ if (i < l && s.charAt(i - 1) == '\r' && s.charAt(i) == '\n')
+ i++; // skip LF
+ if (start == 0 || s.charAt(start - 1) != '\\') {
+ char c;
+ // if next line starts with whitespace, skip all of it
+ // XXX - always has to be true?
+ if (i < l && ((c = s.charAt(i)) == ' ' || c == '\t')) {
+ i++; // skip whitespace
+ while (i < l && ((c = s.charAt(i)) == ' ' || c == '\t'))
+ i++;
+ if (sb == null)
+ sb = new StringBuffer(s.length());
+ if (start != 0) {
+ sb.append(s.substring(0, start));
+ sb.append(' ');
+ }
+ s = s.substring(i);
+ continue;
+ }
+ // it's not a continuation line, just leave it in
+ if (sb == null)
+ sb = new StringBuffer(s.length());
+ sb.append(s.substring(0, i));
+ s = s.substring(i);
+ } else {
+ // there's a backslash at "start - 1"
+ // strip it out, but leave in the line break
+ if (sb == null)
+ sb = new StringBuffer(s.length());
+ sb.append(s.substring(0, start - 1));
+ sb.append(s.substring(start, i));
+ s = s.substring(i);
+ }
+ }
+ if (sb != null) {
+ sb.append(s);
+ return sb.toString();
+ } else
+ return s;
+ }
+
+ /**
+ * Return the first index of any of the characters in "any" in "s",
+ * or -1 if none are found.
+ *
+ * This should be a method on String.
+ */
+ private static int indexOfAny(String s, String any) {
+ return indexOfAny(s, any, 0);
+ }
+
+ private static int indexOfAny(String s, String any, int start) {
+ try {
+ int len = s.length();
+ for (int i = start; i < len; i++) {
+ if (any.indexOf(s.charAt(i)) >= 0)
+ return i;
+ }
+ return -1;
+ } catch (StringIndexOutOfBoundsException e) {
+ return -1;
+ }
+ }
+
+ /**
+ * Convert a MIME charset name into a valid Java charset name.
+ *
+ * @param charset the MIME charset name
+ * @return the Java charset equivalent. If a suitable mapping is
+ * not available, the passed in charset is itself returned.
+ */
+ public static String javaCharset(String charset) {
+ if (mime2java == null || charset == null)
+ // no mapping table, or charset parameter is null
+ return charset;
+
+ String alias = (String)mime2java.get(charset.toLowerCase());
+ return alias == null ? charset : alias;
+ }
+
+ /**
+ * Convert a java charset into its MIME charset name.
+ *
+ * Note that a future version of JDK (post 1.2) might provide
+ * this functionality, in which case, we may deprecate this
+ * method then.
+ *
+ * @param charset the JDK charset
+ * @return the MIME/IANA equivalent. If a mapping
+ * is not possible, the passed in charset itself
+ * is returned.
+ * @since JavaMail 1.1
+ */
+ public static String mimeCharset(String charset) {
+ if (java2mime == null || charset == null)
+ // no mapping table or charset param is null
+ return charset;
+
+ String alias = (String)java2mime.get(charset.toLowerCase());
+ return alias == null ? charset : alias;
+ }
+
+ private static String defaultJavaCharset;
+ private static String defaultMIMECharset;
+
+ /**
+ * Get the default charset corresponding to the system's current
+ * default locale. If the System property
+ *
+ * @return the default charset of the system's default locale,
+ * as a Java charset. (NOT a MIME charset)
+ * @since JavaMail 1.1
+ */
+ public static String getDefaultJavaCharset() {
+ if (defaultJavaCharset == null) {
+ /*
+ * If mail.mime.charset is set, it controls the default
+ * Java charset as well.
+ */
+ String mimecs = null;
+
+ mimecs = SAAJUtil.getSystemProperty("mail.mime.charset");
+
+ if (mimecs != null && mimecs.length() > 0) {
+ defaultJavaCharset = javaCharset(mimecs);
+ return defaultJavaCharset;
+ }
+
+ try {
+ defaultJavaCharset = System.getProperty("file.encoding",
+ "8859_1");
+ } catch (SecurityException sex) {
+
+ class NullInputStream extends InputStream {
+ public int read() {
+ return 0;
+ }
+ }
+ InputStreamReader reader =
+ new InputStreamReader(new NullInputStream());
+ defaultJavaCharset = reader.getEncoding();
+ if (defaultJavaCharset == null)
+ defaultJavaCharset = "8859_1";
+ }
+ }
+
+ return defaultJavaCharset;
+ }
+
+ /*
+ * Get the default MIME charset for this locale.
+ */
+ static String getDefaultMIMECharset() {
+ if (defaultMIMECharset == null) {
+ defaultMIMECharset = SAAJUtil.getSystemProperty("mail.mime.charset");
+ }
+ if (defaultMIMECharset == null)
+ defaultMIMECharset = mimeCharset(getDefaultJavaCharset());
+ return defaultMIMECharset;
+ }
+
+ // Tables to map MIME charset names to Java names and vice versa.
+ // XXX - Should eventually use J2SE 1.4 java.nio.charset.Charset
+ private static Hashtable mime2java;
+ private static Hashtable java2mime;
+
+ static {
+ java2mime = new Hashtable(40);
+ mime2java = new Hashtable(10);
+
+ try {
+ // Use this class's classloader to load the mapping file
+ // XXX - we should use SecuritySupport, but it's in another package
+ InputStream is =
+ com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility.class.getResourceAsStream(
+ "/META-INF/javamail.charset.map");
+
+ if (is != null) {
+ is = new LineInputStream(is);
+
+ // Load the JDK-to-MIME charset mapping table
+ loadMappings((LineInputStream)is, java2mime);
+
+ // Load the MIME-to-JDK charset mapping table
+ loadMappings((LineInputStream)is, mime2java);
+ }
+ } catch (Exception ex) { }
+
+ // If we didn't load the tables, e.g., because we didn't have
+ // permission, load them manually. The entries here should be
+ // the same as the default javamail.charset.map.
+ if (java2mime.isEmpty()) {
+ java2mime.put("8859_1", "ISO-8859-1");
+ java2mime.put("iso8859_1", "ISO-8859-1");
+ java2mime.put("ISO8859-1", "ISO-8859-1");
+
+ java2mime.put("8859_2", "ISO-8859-2");
+ java2mime.put("iso8859_2", "ISO-8859-2");
+ java2mime.put("ISO8859-2", "ISO-8859-2");
+
+ java2mime.put("8859_3", "ISO-8859-3");
+ java2mime.put("iso8859_3", "ISO-8859-3");
+ java2mime.put("ISO8859-3", "ISO-8859-3");
+
+ java2mime.put("8859_4", "ISO-8859-4");
+ java2mime.put("iso8859_4", "ISO-8859-4");
+ java2mime.put("ISO8859-4", "ISO-8859-4");
+
+ java2mime.put("8859_5", "ISO-8859-5");
+ java2mime.put("iso8859_5", "ISO-8859-5");
+ java2mime.put("ISO8859-5", "ISO-8859-5");
+
+ java2mime.put("8859_6", "ISO-8859-6");
+ java2mime.put("iso8859_6", "ISO-8859-6");
+ java2mime.put("ISO8859-6", "ISO-8859-6");
+
+ java2mime.put("8859_7", "ISO-8859-7");
+ java2mime.put("iso8859_7", "ISO-8859-7");
+ java2mime.put("ISO8859-7", "ISO-8859-7");
+
+ java2mime.put("8859_8", "ISO-8859-8");
+ java2mime.put("iso8859_8", "ISO-8859-8");
+ java2mime.put("ISO8859-8", "ISO-8859-8");
+
+ java2mime.put("8859_9", "ISO-8859-9");
+ java2mime.put("iso8859_9", "ISO-8859-9");
+ java2mime.put("ISO8859-9", "ISO-8859-9");
+
+ java2mime.put("SJIS", "Shift_JIS");
+ java2mime.put("MS932", "Shift_JIS");
+ java2mime.put("JIS", "ISO-2022-JP");
+ java2mime.put("ISO2022JP", "ISO-2022-JP");
+ java2mime.put("EUC_JP", "euc-jp");
+ java2mime.put("KOI8_R", "koi8-r");
+ java2mime.put("EUC_CN", "euc-cn");
+ java2mime.put("EUC_TW", "euc-tw");
+ java2mime.put("EUC_KR", "euc-kr");
+ }
+ if (mime2java.isEmpty()) {
+ mime2java.put("iso-2022-cn", "ISO2022CN");
+ mime2java.put("iso-2022-kr", "ISO2022KR");
+ mime2java.put("utf-8", "UTF8");
+ mime2java.put("utf8", "UTF8");
+ mime2java.put("ja_jp.iso2022-7", "ISO2022JP");
+ mime2java.put("ja_jp.eucjp", "EUCJIS");
+ mime2java.put("euc-kr", "KSC5601");
+ mime2java.put("euckr", "KSC5601");
+ mime2java.put("us-ascii", "ISO-8859-1");
+ mime2java.put("x-us-ascii", "ISO-8859-1");
+ }
+ }
+
+ private static void loadMappings(LineInputStream is, Hashtable table) {
+ String currLine;
+
+ while (true) {
+ try {
+ currLine = is.readLine();
+ } catch (IOException ioex) {
+ break; // error in reading, stop
+ }
+
+ if (currLine == null) // end of file, stop
+ break;
+ if (currLine.startsWith("--") && currLine.endsWith("--"))
+ // end of this table
+ break;
+
+ // ignore empty lines and comments
+ if (currLine.trim().length() == 0 || currLine.startsWith("#"))
+ continue;
+
+ // A valid entry is of the form
+ *
+ * This is a package private class.
+ *
+ * @author John Mani
+ * @author Max Spivak
+ * @author Bill Shannon
+ */
+
+class UniqueValue {
+ /**
+ * A global part number. Access is not synchronized because the
+ * value is only one part of the unique value and so doesn't need
+ * to be accurate.
+ */
+ private static int part = 0;
+
+ /**
+ * Get a unique value for use in a multipart boundary string.
+ *
+ * This implementation generates it by concatenating a global
+ * part number, a newly created object's
+ *
+ * Based on java.lang.Integer.parseInt()
+ */
+ public static int parseInt(byte[] b, int start, int end, int radix)
+ throws NumberFormatException {
+ if (b == null)
+ throw new NumberFormatException("null");
+
+ int result = 0;
+ boolean negative = false;
+ int i = start;
+ int limit;
+ int multmin;
+ int digit;
+
+ if (end > start) {
+ if (b[i] == '-') {
+ negative = true;
+ limit = Integer.MIN_VALUE;
+ i++;
+ } else {
+ limit = -Integer.MAX_VALUE;
+ }
+ multmin = limit / radix;
+ if (i < end) {
+ digit = Character.digit((char)b[i++], radix);
+ if (digit < 0) {
+ throw new NumberFormatException(
+ "illegal number: " + toString(b, start, end)
+ );
+ } else {
+ result = -digit;
+ }
+ }
+ while (i < end) {
+ // Accumulating negatively avoids surprises near MAX_VALUE
+ digit = Character.digit((char)b[i++], radix);
+ if (digit < 0) {
+ throw new NumberFormatException("illegal number");
+ }
+ if (result < multmin) {
+ throw new NumberFormatException("illegal number");
+ }
+ result *= radix;
+ if (result < limit + digit) {
+ throw new NumberFormatException("illegal number");
+ }
+ result -= digit;
+ }
+ } else {
+ throw new NumberFormatException("illegal number");
+ }
+ if (negative) {
+ if (i > start + 1) {
+ return result;
+ } else { /* Only got "-" */
+ throw new NumberFormatException("illegal number");
+ }
+ } else {
+ return -result;
+ }
+ }
+
+ /**
+ * Convert the bytes within the specified range of the given byte
+ * array into a String. The range extends from
+ */
+ public static String toString(byte[] b, int start, int end) {
+ int size = end - start;
+ char[] theChars = new char[size];
+
+ for (int i = 0, j = start; i < size; )
+ theChars[i++] = (char)(b[j++]&0xff);
+
+ return new String(theChars);
+ }
+
+ public static byte[] getBytes(String s) {
+ char [] chars= s.toCharArray();
+ int size = chars.length;
+ byte[] bytes = new byte[size];
+
+ for (int i = 0; i < size;)
+ bytes[i] = (byte) chars[i++];
+ return bytes;
+ }
+
+ /**
+ *
+ * @deprecated
+ * this is an expensive operation that require an additional
+ * buffer reallocation just to get the array of an exact size.
+ * Unless you absolutely need the exact size array, don't use this.
+ * Use {@link ByteOutputStream} and {@link ByteOutputStream#write(InputStream)}.
+ */
+ public static byte[] getBytes(InputStream is) throws IOException {
+ ByteOutputStream bos = null;
+ try {
+ bos = new ByteOutputStream();
+ bos.write(is);
+ } finally {
+ if (bos != null)
+ bos.close();
+ is.close();
+ }
+ return bos.toByteArray();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64DecoderStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,256 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)BASE64DecoderStream.java 1.8 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.*;
+
+/**
+ * This class implements a BASE64 Decoder. It is implemented as
+ * a FilterInputStream, so one can just wrap this class around
+ * any input stream and read bytes from this filter. The decoding
+ * is done as the bytes are read out.
+ *
+ * @author John Mani
+ * @author Bill Shannon
+ */
+
+public class BASE64DecoderStream extends FilterInputStream {
+ private byte[] buffer; // cache of decoded bytes
+ private int bufsize = 0; // size of the cache
+ private int index = 0; // index into the cache
+
+ /**
+ * Create a BASE64 decoder that decodes the specified input stream
+ * @param in the input stream
+ */
+ public BASE64DecoderStream(InputStream in) {
+ super(in);
+ buffer = new byte[3];
+ }
+
+ /**
+ * Read the next decoded byte from this input stream. The byte
+ * is returned as an
+ *
+ * @param buf the buffer into which the data is read.
+ * @param off the start offset of the data.
+ * @param len the maximum number of bytes read.
+ * @return the total number of bytes read into the buffer, or
+ *
+ *
+ * This class is similar to the deprecated
+ *
+ *
+ * The expected use is to write out RFC822 style headers to an output
+ * stream.
+ *
+ * @author Kohsuke Kawaguchi
+ */
+public abstract class OutputUtil {
+ private static byte[] newline = {'\r','\n'};
+
+ public static void writeln(String s,OutputStream out) throws IOException {
+ writeAsAscii(s,out);
+ writeln(out);
+ }
+
+ /**
+ * Writes a string as ASCII string.
+ */
+ public static void writeAsAscii(String s,OutputStream out) throws IOException {
+ int len = s.length();
+ for( int i=0; i
+ *
+ * @param buf the buffer into which the data is read.
+ * @param off the start offset of the data.
+ * @param len the maximum number of bytes read.
+ * @return the total number of bytes read into the buffer, or
+ *
+ * In the absence of type attribute we assume it to be text/xml.
+ * That would mean we're easy on accepting the message and
+ * generate the correct thing (as the SWA spec also specifies
+ * that the type parameter should always be text/xml)
+ *
+ * @return
+ * combination of flags, such as PLAIN_XML_CODE and MIME_MULTIPART_CODE.
+ */
+ // SOAP1.2 allow SOAP1.2 content type
+ static int identifyContentType(ContentType ct)
+ throws SOAPExceptionImpl {
+ // TBD
+ // Is there anything else we need to verify here?
+
+ String primary = ct.getPrimaryType().toLowerCase();
+ String sub = ct.getSubType().toLowerCase();
+
+ if (primary.equals("multipart")) {
+ if (sub.equals("related")) {
+ String type = getTypeParameter(ct);
+ if (isEqualToSoap1_1Type(type)) {
+ return (type.equals("application/fastinfoset") ?
+ FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_1_FLAG;
+ }
+ else if (isEqualToSoap1_2Type(type)) {
+ return (type.equals("application/soap+fastinfoset") ?
+ FI_ENCODED_FLAG : 0) | MIME_MULTIPART_FLAG | SOAP1_2_FLAG;
+ /*} else if (isMimeMultipartXOPPackage(ct)) {
+ return MIME_MULTIPART_XOP_FLAG;*/
+ } else if (isMimeMultipartXOPSoap1_1Package(ct)) {
+ return MIME_MULTIPART_XOP_SOAP1_1_FLAG;
+ } else if (isMimeMultipartXOPSoap1_2Package(ct)) {
+ return MIME_MULTIPART_XOP_SOAP1_2_FLAG;
+ } else {
+ log.severe("SAAJ0536.soap.content-type.mustbe.multipart");
+ throw new SOAPExceptionImpl(
+ "Content-Type needs to be Multipart/Related "
+ + "and with \"type=text/xml\" "
+ + "or \"type=application/soap+xml\"");
+ }
+ } else {
+ log.severe("SAAJ0537.soap.invalid.content-type");
+ throw new SOAPExceptionImpl(
+ "Invalid Content-Type: " + primary + '/' + sub);
+ }
+ }
+ else if (isSoap1_1Type(primary, sub)) {
+ return (primary.equalsIgnoreCase("application")
+ && sub.equalsIgnoreCase("fastinfoset") ?
+ FI_ENCODED_FLAG : 0)
+ | PLAIN_XML_FLAG | SOAP1_1_FLAG;
+ }
+ else if (isSoap1_2Type(primary, sub)) {
+ return (primary.equalsIgnoreCase("application")
+ && sub.equalsIgnoreCase("soap+fastinfoset") ?
+ FI_ENCODED_FLAG : 0)
+ | PLAIN_XML_FLAG | SOAP1_2_FLAG;
+ } else if(isSOAPBodyXOPPackage(ct)){
+ return XOP_FLAG;
+ } else {
+ log.severe("SAAJ0537.soap.invalid.content-type");
+ throw new SOAPExceptionImpl(
+ "Invalid Content-Type:"
+ + primary
+ + '/'
+ + sub
+ + ". Is this an error message instead of a SOAP response?");
+ }
+ }
+
+ /**
+ * Obtains the type parameter of the Content-Type header. Defaults to "text/xml".
+ */
+ private static String getTypeParameter(ContentType contentType) {
+ String p = contentType.getParameter("type");
+ if(p!=null)
+ return p.toLowerCase();
+ else
+ return "text/xml";
+ }
+
+ public MimeHeaders getMimeHeaders() {
+ return this.headers;
+ }
+
+ final static String getContentType(MimeHeaders headers) {
+ String[] values = headers.getHeader("Content-Type");
+ if (values == null)
+ return null;
+ else
+ return values[0];
+ }
+
+ /*
+ * Get the complete ContentType value along with optional parameters.
+ */
+ public String getContentType() {
+ return getContentType(this.headers);
+ }
+
+ public void setContentType(String type) {
+ headers.setHeader("Content-Type", type);
+ needsSave();
+ }
+
+ private ContentType contentType() {
+ ContentType ct = null;
+ try {
+ String currentContent = getContentType();
+ if (currentContent == null) {
+ return this.contentType;
+ }
+ ct = new ContentType(currentContent);
+ } catch (Exception e) {
+ // what to do here?
+ }
+ return ct;
+ }
+
+ /*
+ * Return the MIME type string, without the parameters.
+ */
+ public String getBaseType() {
+ return contentType().getBaseType();
+ }
+
+ public void setBaseType(String type) {
+ ContentType ct = contentType();
+ ct.setParameter("type", type);
+ headers.setHeader("Content-Type", ct.toString());
+ needsSave();
+ }
+
+ public String getAction() {
+ return contentType().getParameter("action");
+ }
+
+ public void setAction(String action) {
+ ContentType ct = contentType();
+ ct.setParameter("action", action);
+ headers.setHeader("Content-Type", ct.toString());
+ needsSave();
+ }
+
+ public String getCharset() {
+ return contentType().getParameter("charset");
+ }
+
+ public void setCharset(String charset) {
+ ContentType ct = contentType();
+ ct.setParameter("charset", charset);
+ headers.setHeader("Content-Type", ct.toString());
+ needsSave();
+ }
+
+ /**
+ * All write methods (i.e setters) should call this method in
+ * order to make sure that a save is necessary since the state
+ * has been modified.
+ */
+ private final void needsSave() {
+ saved = false;
+ }
+
+ public boolean saveRequired() {
+ return saved != true;
+ }
+
+ public String getContentDescription() {
+ String[] values = headers.getHeader("Content-Description");
+ if (values != null && values.length > 0)
+ return values[0];
+ return null;
+ }
+
+ public void setContentDescription(String description) {
+ headers.setHeader("Content-Description", description);
+ needsSave();
+ }
+
+ public abstract SOAPPart getSOAPPart();
+
+ public void removeAllAttachments() {
+ try {
+ initializeAllAttachments();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+
+ if (attachments != null) {
+ attachments.clear();
+ needsSave();
+ }
+ }
+
+ public int countAttachments() {
+ try {
+ initializeAllAttachments();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ if (attachments != null)
+ return attachments.size();
+ return 0;
+ }
+
+ public void addAttachmentPart(AttachmentPart attachment) {
+ try {
+ initializeAllAttachments();
+ this.optimizeAttachmentProcessing = true;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ if (attachments == null)
+ attachments = new FinalArrayList();
+
+ attachments.add(attachment);
+
+ needsSave();
+ }
+
+ static private final Iterator nullIter = Collections.EMPTY_LIST.iterator();
+
+ public Iterator getAttachments() {
+ try {
+ initializeAllAttachments();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ if (attachments == null)
+ return nullIter;
+ return attachments.iterator();
+ }
+
+ private void setFinalContentType(String charset) {
+ ContentType ct = contentType();
+ if (ct == null) {
+ ct = new ContentType();
+ }
+ String[] split = getExpectedContentType().split("/");
+ ct.setPrimaryType(split[0]);
+ ct.setSubType(split[1]);
+ ct.setParameter("charset", charset);
+ headers.setHeader("Content-Type", ct.toString());
+ }
+
+ private class MimeMatchingIterator implements Iterator {
+ public MimeMatchingIterator(MimeHeaders headers) {
+ this.headers = headers;
+ this.iter = attachments.iterator();
+ }
+
+ private Iterator iter;
+ private MimeHeaders headers;
+ private Object nextAttachment;
+
+ public boolean hasNext() {
+ if (nextAttachment == null)
+ nextAttachment = nextMatch();
+ return nextAttachment != null;
+ }
+
+ public Object next() {
+ if (nextAttachment != null) {
+ Object ret = nextAttachment;
+ nextAttachment = null;
+ return ret;
+ }
+
+ if (hasNext())
+ return nextAttachment;
+
+ return null;
+ }
+
+ Object nextMatch() {
+ while (iter.hasNext()) {
+ AttachmentPartImpl ap = (AttachmentPartImpl) iter.next();
+ if (ap.hasAllHeaders(headers))
+ return ap;
+ }
+ return null;
+ }
+
+ public void remove() {
+ iter.remove();
+ }
+ }
+
+ public Iterator getAttachments(MimeHeaders headers) {
+ try {
+ initializeAllAttachments();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ if (attachments == null)
+ return nullIter;
+
+ return new MimeMatchingIterator(headers);
+ }
+
+ public void removeAttachments(MimeHeaders headers) {
+ try {
+ initializeAllAttachments();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ if (attachments == null)
+ return ;
+
+ Iterator it = new MimeMatchingIterator(headers);
+ while (it.hasNext()) {
+ int index = attachments.indexOf(it.next());
+ attachments.set(index, null);
+ }
+ FinalArrayList f = new FinalArrayList();
+ for (int i = 0; i < attachments.size(); i++) {
+ if (attachments.get(i) != null) {
+ f.add(attachments.get(i));
+ }
+ }
+ attachments = f;
+ // needsSave();
+ }
+
+ public AttachmentPart createAttachmentPart() {
+ return new AttachmentPartImpl();
+ }
+
+ public AttachmentPart getAttachment(SOAPElement element)
+ throws SOAPException {
+ try {
+ initializeAllAttachments();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ String uri;
+ String hrefAttr = element.getAttribute("href");
+ if ("".equals(hrefAttr)) {
+ Node node = getValueNodeStrict(element);
+ String swaRef = null;
+ if (node != null) {
+ swaRef = node.getValue();
+ }
+ if (swaRef == null || "".equals(swaRef)) {
+ return null;
+ } else {
+ uri = swaRef;
+ }
+ } else {
+ uri = hrefAttr;
+ }
+ return getAttachmentPart(uri);
+ }
+
+ private Node getValueNodeStrict(SOAPElement element) {
+ Node node = (Node)element.getFirstChild();
+ if (node != null) {
+ if (node.getNextSibling() == null
+ && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
+ return node;
+ } else {
+ return null;
+ }
+ }
+ return null;
+ }
+
+
+ private AttachmentPart getAttachmentPart(String uri) throws SOAPException {
+ AttachmentPart _part;
+ try {
+ if (uri.startsWith("cid:")) {
+ // rfc2392
+ uri = '<'+uri.substring("cid:".length())+'>';
+
+ MimeHeaders headersToMatch = new MimeHeaders();
+ headersToMatch.addHeader(CONTENT_ID, uri);
+
+ Iterator i = this.getAttachments(headersToMatch);
+ _part = (i == null) ? null : (AttachmentPart)i.next();
+ } else {
+ // try content-location
+ MimeHeaders headersToMatch = new MimeHeaders();
+ headersToMatch.addHeader(CONTENT_LOCATION, uri);
+
+ Iterator i = this.getAttachments(headersToMatch);
+ _part = (i == null) ? null : (AttachmentPart)i.next();
+ }
+
+ // try auto-generated JAXRPC CID
+ if (_part == null) {
+ Iterator j = this.getAttachments();
+
+ while (j.hasNext()) {
+ AttachmentPart p = (AttachmentPart)j.next();
+ String cl = p.getContentId();
+ if (cl != null) {
+ // obtain the partname
+ int eqIndex = cl.indexOf("=");
+ if (eqIndex > -1) {
+ cl = cl.substring(1, eqIndex);
+ if (cl.equalsIgnoreCase(uri)) {
+ _part = p;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ } catch (Exception se) {
+ log.log(Level.SEVERE, "SAAJ0590.soap.unable.to.locate.attachment", new Object[] {uri});
+ throw new SOAPExceptionImpl(se);
+ }
+ return _part;
+ }
+
+ private final InputStream getHeaderBytes()
+ throws IOException {
+ SOAPPartImpl sp = (SOAPPartImpl) getSOAPPart();
+ return sp.getContentAsStream();
+ }
+
+ private String convertToSingleLine(String contentType) {
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < contentType.length(); i ++) {
+ char c = contentType.charAt(i);
+ if (c != '\r' && c != '\n' && c != '\t')
+ buffer.append(c);
+ }
+ return buffer.toString();
+ }
+
+ private MimeMultipart getMimeMessage() throws SOAPException {
+ try {
+ SOAPPartImpl soapPart = (SOAPPartImpl) getSOAPPart();
+ MimeBodyPart mimeSoapPart = soapPart.getMimePart();
+
+ /*
+ * Get content type from this message instead of soapPart
+ * to ensure agreement if soapPart is transcoded (XML <-> FI)
+ */
+ ContentType soapPartCtype = new ContentType(getExpectedContentType());
+
+ if (!isFastInfoset) {
+ soapPartCtype.setParameter("charset", initCharset());
+ }
+ mimeSoapPart.setHeader("Content-Type", soapPartCtype.toString());
+
+ MimeMultipart headerAndBody = null;
+
+ if (!switchOffBM && !switchOffLazyAttachment &&
+ (multiPart != null) && !attachmentsInitialized) {
+ headerAndBody = new BMMimeMultipart();
+ headerAndBody.addBodyPart(mimeSoapPart);
+ if (attachments != null) {
+ for (Iterator eachAttachment = attachments.iterator();
+ eachAttachment.hasNext();) {
+ headerAndBody.addBodyPart(
+ ((AttachmentPartImpl) eachAttachment.next())
+ .getMimePart());
+ }
+ }
+ InputStream in = ((BMMimeMultipart)multiPart).getInputStream();
+ if (!((BMMimeMultipart)multiPart).lastBodyPartFound() &&
+ !((BMMimeMultipart)multiPart).isEndOfStream()) {
+ ((BMMimeMultipart)headerAndBody).setInputStream(in);
+ ((BMMimeMultipart)headerAndBody).setBoundary(
+ ((BMMimeMultipart)multiPart).getBoundary());
+ ((BMMimeMultipart)headerAndBody).
+ setLazyAttachments(lazyAttachments);
+ }
+
+ } else {
+ headerAndBody = new MimeMultipart();
+ headerAndBody.addBodyPart(mimeSoapPart);
+
+ for (Iterator eachAttachement = getAttachments();
+ eachAttachement.hasNext();
+ ) {
+ headerAndBody.addBodyPart(
+ ((AttachmentPartImpl) eachAttachement.next())
+ .getMimePart());
+ }
+ }
+
+ ContentType contentType = headerAndBody.getContentType();
+
+ ParameterList l = contentType.getParameterList();
+
+ // set content type depending on SOAP version
+ l.set("type", getExpectedContentType());
+ l.set("boundary", contentType.getParameter("boundary"));
+ ContentType nct = new ContentType("multipart", "related", l);
+
+ headers.setHeader(
+ "Content-Type",
+ convertToSingleLine(nct.toString()));
+ // TBD
+ // Set content length MIME header here.
+
+ return headerAndBody;
+ } catch (SOAPException ex) {
+ throw ex;
+ } catch (Throwable ex) {
+ log.severe("SAAJ0538.soap.cannot.convert.msg.to.multipart.obj");
+ throw new SOAPExceptionImpl(
+ "Unable to convert SOAP message into "
+ + "a MimeMultipart object",
+ ex);
+ }
+ }
+
+ private String initCharset() {
+
+ String charset = null;
+
+ String[] cts = getMimeHeaders().getHeader("Content-Type");
+ if ((cts != null) && (cts[0] != null)) {
+ charset = getCharsetString(cts[0]);
+ }
+
+ if (charset == null) {
+ charset = (String) getProperty(CHARACTER_SET_ENCODING);
+ }
+
+ if (charset != null) {
+ return charset;
+ }
+
+ return "utf-8";
+ }
+
+ private String getCharsetString(String s) {
+ try {
+ int index = s.indexOf(";");
+ if(index < 0)
+ return null;
+ ParameterList pl = new ParameterList(s.substring(index));
+ return pl.get("charset");
+ } catch(Exception e) {
+ return null;
+ }
+ }
+
+ public void saveChanges() throws SOAPException {
+
+ // suck in all the data from the attachments and have it
+ // ready for writing/sending etc.
+
+ String charset = initCharset();
+
+ /*if (countAttachments() == 0) {*/
+ int attachmentCount = (attachments == null) ? 0 : attachments.size();
+ if (attachmentCount == 0) {
+ if (!switchOffBM && !switchOffLazyAttachment &&
+ !attachmentsInitialized && (multiPart != null)) {
+ // so there might be attachments
+ attachmentCount = 1;
+ }
+ }
+
+ try {
+ if ((attachmentCount == 0) && !hasXOPContent()) {
+ InputStream in;
+ try{
+ /*
+ * Not sure why this is called getHeaderBytes(), but it actually
+ * returns the whole message as a byte stream. This stream could
+ * be either XML of Fast depending on the mode.
+ */
+ in = getHeaderBytes();
+ // no attachments, hence this property can be false
+ this.optimizeAttachmentProcessing = false;
+ if (SOAPPartImpl.lazyContentLength) {
+ inputStreamAfterSaveChanges = in;
+ }
+ } catch (IOException ex) {
+ log.severe("SAAJ0539.soap.cannot.get.header.stream");
+ throw new SOAPExceptionImpl(
+ "Unable to get header stream in saveChanges: ",
+ ex);
+ }
+
+ if (in instanceof ByteInputStream) {
+ ByteInputStream bIn = (ByteInputStream)in;
+ messageBytes = bIn.getBytes();
+ messageByteCount = bIn.getCount();
+ }
+
+ setFinalContentType(charset);
+ /*
+ headers.setHeader(
+ "Content-Type",
+ getExpectedContentType() +
+ (isFastInfoset ? "" : "; charset=" + charset));*/
+ if (messageByteCount > 0) {
+ headers.setHeader(
+ "Content-Length",
+ Integer.toString(messageByteCount));
+ }
+ } else {
+ if(hasXOPContent())
+ mmp = getXOPMessage();
+ else
+ mmp = getMimeMessage();
+ }
+ } catch (Throwable ex) {
+ log.severe("SAAJ0540.soap.err.saving.multipart.msg");
+ throw new SOAPExceptionImpl(
+ "Error during saving a multipart message",
+ ex);
+ }
+
+ // FIX ME -- SOAP Action replaced by Content-Type optional parameter action
+ /*
+ if(isCorrectSoapVersion(SOAP1_1_FLAG)) {
+
+ String[] soapAction = headers.getHeader("SOAPAction");
+
+ if (soapAction == null || soapAction.length == 0)
+ headers.setHeader("SOAPAction", "\"\"");
+
+ }
+ */
+
+ saved = true;
+ }
+
+ private MimeMultipart getXOPMessage() throws SOAPException {
+ try {
+ MimeMultipart headerAndBody = new MimeMultipart();
+ SOAPPartImpl soapPart = (SOAPPartImpl)getSOAPPart();
+ MimeBodyPart mimeSoapPart = soapPart.getMimePart();
+ ContentType soapPartCtype =
+ new ContentType("application/xop+xml");
+ soapPartCtype.setParameter("type", getExpectedContentType());
+ String charset = initCharset();
+ soapPartCtype.setParameter("charset", charset);
+ mimeSoapPart.setHeader("Content-Type", soapPartCtype.toString());
+ headerAndBody.addBodyPart(mimeSoapPart);
+
+ for (Iterator eachAttachement = getAttachments();
+ eachAttachement.hasNext();
+ ) {
+ headerAndBody.addBodyPart(
+ ((AttachmentPartImpl) eachAttachement.next())
+ .getMimePart());
+ }
+
+ ContentType contentType = headerAndBody.getContentType();
+
+ ParameterList l = contentType.getParameterList();
+
+ //lets not write start-info for now till we get servlet fix done
+ l.set("start-info", getExpectedContentType());//+";charset="+initCharset());
+
+ // set content type depending on SOAP version
+ l.set("type", "application/xop+xml");
+
+ if (isCorrectSoapVersion(SOAP1_2_FLAG)) {
+ String action = getAction();
+ if(action != null)
+ l.set("action", action);
+ }
+
+ l.set("boundary", contentType.getParameter("boundary"));
+ ContentType nct = new ContentType("Multipart", "Related", l);
+ headers.setHeader(
+ "Content-Type",
+ convertToSingleLine(nct.toString()));
+ // TBD
+ // Set content length MIME header here.
+
+ return headerAndBody;
+ } catch (SOAPException ex) {
+ throw ex;
+ } catch (Throwable ex) {
+ log.severe("SAAJ0538.soap.cannot.convert.msg.to.multipart.obj");
+ throw new SOAPExceptionImpl(
+ "Unable to convert SOAP message into "
+ + "a MimeMultipart object",
+ ex);
+ }
+
+ }
+
+ private boolean hasXOPContent() throws ParseException {
+ String type = getContentType();
+ if(type == null)
+ return false;
+ ContentType ct = new ContentType(type);
+ //return isMimeMultipartXOPPackage(ct) || isSOAPBodyXOPPackage(ct);
+ return isMimeMultipartXOPSoap1_1Package(ct) ||
+ isMimeMultipartXOPSoap1_2Package(ct) || isSOAPBodyXOPPackage(ct);
+
+ }
+
+ public void writeTo(OutputStream out) throws SOAPException, IOException {
+ if (saveRequired()){
+ this.optimizeAttachmentProcessing = true;
+ saveChanges();
+ }
+
+ if(!optimizeAttachmentProcessing){
+ if (SOAPPartImpl.lazyContentLength && messageByteCount <= 0) {
+ byte[] buf = new byte[1024];
+
+ int length = 0;
+ while( (length = inputStreamAfterSaveChanges.read(buf)) != -1) {
+ out.write(buf,0, length);
+ messageByteCount += length;
+ }
+ if (messageByteCount > 0) {
+ headers.setHeader(
+ "Content-Length",
+ Integer.toString(messageByteCount));
+ }
+ } else {
+ out.write(messageBytes, 0, messageByteCount);
+ }
+ }
+ else{
+ try{
+ if(hasXOPContent()){
+ mmp.writeTo(out);
+ }else{
+ mmp.writeTo(out);
+ if (!switchOffBM && !switchOffLazyAttachment &&
+ (multiPart != null) && !attachmentsInitialized) {
+ ((BMMimeMultipart)multiPart).setInputStream(
+ ((BMMimeMultipart)mmp).getInputStream());
+ }
+ }
+ } catch(Exception ex){
+ log.severe("SAAJ0540.soap.err.saving.multipart.msg");
+ throw new SOAPExceptionImpl(
+ "Error during saving a multipart message",
+ ex);
+ }
+ }
+
+ if(isCorrectSoapVersion(SOAP1_1_FLAG)) {
+
+ String[] soapAction = headers.getHeader("SOAPAction");
+
+ if (soapAction == null || soapAction.length == 0)
+ headers.setHeader("SOAPAction", "\"\"");
+
+ }
+
+ messageBytes = null;
+ needsSave();
+ }
+
+ public SOAPBody getSOAPBody() throws SOAPException {
+ SOAPBody body = getSOAPPart().getEnvelope().getBody();
+ /*if (body == null) {
+ throw new SOAPException("No SOAP Body was found in the SOAP Message");
+ }*/
+ return body;
+ }
+
+ public SOAPHeader getSOAPHeader() throws SOAPException {
+ SOAPHeader hdr = getSOAPPart().getEnvelope().getHeader();
+ /*if (hdr == null) {
+ throw new SOAPException("No SOAP Header was found in the SOAP Message");
+ }*/
+ return hdr;
+ }
+
+ private void initializeAllAttachments ()
+ throws MessagingException, SOAPException {
+ if (switchOffBM || switchOffLazyAttachment) {
+ return;
+ }
+
+ if (attachmentsInitialized || (multiPart == null)) {
+ return;
+ }
+
+ if (attachments == null)
+ attachments = new FinalArrayList();
+
+ int count = multiPart.getCount();
+ for (int i=0; i < count; i++ ) {
+ initializeAttachment(multiPart.getBodyPart(i));
+ }
+ attachmentsInitialized = true;
+ //multiPart = null;
+ needsSave();
+ }
+
+ private void initializeAttachment(MimeBodyPart mbp) throws SOAPException {
+ AttachmentPartImpl attachmentPart = new AttachmentPartImpl();
+ DataHandler attachmentHandler = mbp.getDataHandler();
+ attachmentPart.setDataHandler(attachmentHandler);
+
+ AttachmentPartImpl.copyMimeHeaders(mbp, attachmentPart);
+ attachments.add(attachmentPart);
+ }
+
+ private void initializeAttachment(MimeMultipart multiPart, int i)
+ throws Exception {
+ MimeBodyPart currentBodyPart = multiPart.getBodyPart(i);
+ AttachmentPartImpl attachmentPart = new AttachmentPartImpl();
+
+ DataHandler attachmentHandler = currentBodyPart.getDataHandler();
+ attachmentPart.setDataHandler(attachmentHandler);
+
+ AttachmentPartImpl.copyMimeHeaders(currentBodyPart, attachmentPart);
+ addAttachmentPart(attachmentPart);
+ }
+
+ private void setMimeHeaders(SOAPPart soapPart,
+ MimeBodyPart soapMessagePart) throws Exception {
+
+ // first remove the existing content-type
+ soapPart.removeAllMimeHeaders();
+ // add everything present in soapMessagePart
+ List headers = soapMessagePart.getAllHeaders();
+ int sz = headers.size();
+ for( int i=0; i
+ * Compared to {@link BufferedOutputStream},
+ * this class:
+ *
+ *
+* Parsing of a URI specification is done according to the URI
+* syntax described in RFC 2396
+*
+* For URIs that do not follow the "generic URI" syntax (e.g. mailto),
+* the entire scheme-specific part is treated as the "path" portion
+* of the URI.
+*
+* Note that, unlike the java.net.URL class, this class does not provide
+* any built-in network access functionality nor does it provide any
+* scheme-specific functionality (for example, it does not know a
+* default port for a specific scheme). Rather, it only knows the
+* grammar and basic set of operations that can be applied to a URI.
+*
+* @version
+*
+**********************************************************************/
+ public class JaxmURI implements Serializable {
+
+ /*******************************************************************
+ * MalformedURIExceptions are thrown in the process of building a URI
+ * or setting fields on a URI when an operation would result in an
+ * invalid URI specification.
+ *
+ ********************************************************************/
+ public static class MalformedURIException extends IOException {
+
+ /******************************************************************
+ * Constructs a
+ * An
+ *
+ * There are no restrictions on the content portion of an
+ * An
+ * The following code fragment, in which
+ * The following code fragment creates and adds a second
+ *
+ * The
+ * For the MIME content types "text/plain", "text/html" and "text/xml", the
+ *
+ * A SAAJ-compliant implementation must, as a minimum, return a
+ *
+ * Note that reading from the returned InputStream would result in consuming
+ * the data in the stream. It is the responsibility of the caller to reset
+ * the InputStream appropriately before calling a Subsequent API. If a copy
+ * of the raw attachment content is required then the {@link #getRawContentBytes} API
+ * should be used instead.
+ *
+ * @return an
+ * A subsequent call to getSize() may not be an exact measure
+ * of the content size.
+ *
+ * @param content the raw data to add to the attachment part
+ * @param contentType the value to set into the
+ * A subsequent call to getSize() may not be an exact measure
+ * of the content size.
+ *
+ * @param content the base64 encoded data to add to the attachment part
+ * @param contentType the value to set into the
+ *
+ * Note that RFC822 headers can only contain US-ASCII characters.
+ *
+ * @param name a
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a
+ * A
+ * The following code fragment, in which sf is a
+ * This method is package private so that this code can be shared.
+ *
+ * @return the
+ * This method is package private so that this code can be shared.
+ *
+ * @return the
+ * This method is package private so that this code can be shared.
+ *
+ * @return the
+ * A SAAJ client can create a
+ * All
+ * Content can be added to this message's This class is used primarily when an application wants to
+ * retrieve specific attachments based on certain MIME headers and
+ * values. This class will most likely be used by implementations of
+ *
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a
+ * The following is an example of a namespace declaration in an element.
+ *
+ * XML namespaces are used to disambiguate SOAP identifiers from
+ * application-specific identifiers.
+ *
+ *
+ * The
+ * Calling the method
+* SAAJMetaFactory is a service provider interface. There are no public methods on this
+* class.
+*
+* @author SAAJ RI Development Team
+* @since 1.6, SAAJ 1.3
+*/
+
+public abstract class SAAJMetaFactory {
+ static private final String META_FACTORY_CLASS_PROPERTY =
+ "javax.xml.soap.MetaFactory";
+ static final String DEFAULT_META_FACTORY_CLASS =
+ "com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl";
+
+ /**
+ * Creates a new instance of a concrete
+ * This kind of
+ * This kind of
+ * A
+ * A
+ * For SOAP 1.2 the
+ * A
+ * For SOAP 1.2 the
+ * A
+ * For SOAP 1.2 the
+ * In case of a SOAP 1.2 fault, the default value for the mandatory
+ * A
+ * For SOAP 1.2 the
+ * In case of a SOAP 1.2 fault, the default value for the mandatory
+ * A
+ * Calling this method invalidates the
+ * A new
+ * The SOAPConnection class is optional. Some implementations may
+ * not implement this interface in which case the call to
+ *
+ * A client can obtain a
+ * This value can be passed to
+ * {@link SOAPHeader#examineMustUnderstandHeaderElements(String)},
+ * {@link SOAPHeader#examineHeaderElements(String)} and
+ * {@link SOAPHeader#extractHeaderElements(String)}
+ */
+ public static final String
+ URI_SOAP_ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next";
+
+ /**
+ * The URI identifying the next application processing a SOAP request as the intended
+ * role for a SOAP 1.2 header entry (see section 2.2 of part 1 of the SOAP 1.2
+ * specification).
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ URI_SOAP_1_2_ROLE_NEXT = URI_NS_SOAP_1_2_ENVELOPE + "/role/next";
+
+ /**
+ * The URI specifying the role None in SOAP 1.2.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ URI_SOAP_1_2_ROLE_NONE = URI_NS_SOAP_1_2_ENVELOPE + "/role/none";
+
+ /**
+ * The URI identifying the ultimate receiver of the SOAP 1.2 message.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ URI_SOAP_1_2_ROLE_ULTIMATE_RECEIVER =
+ URI_NS_SOAP_1_2_ENVELOPE + "/role/ultimateReceiver";
+
+ /**
+ * The default namespace prefix for http://www.w3.org/2003/05/soap-envelope
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String SOAP_ENV_PREFIX = "env";
+
+ /**
+ * SOAP 1.2 VersionMismatch Fault
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final QName SOAP_VERSIONMISMATCH_FAULT =
+ new QName(URI_NS_SOAP_1_2_ENVELOPE, "VersionMismatch", SOAP_ENV_PREFIX);
+
+ /**
+ * SOAP 1.2 MustUnderstand Fault
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final QName SOAP_MUSTUNDERSTAND_FAULT =
+ new QName(URI_NS_SOAP_1_2_ENVELOPE, "MustUnderstand", SOAP_ENV_PREFIX);
+
+ /**
+ * SOAP 1.2 DataEncodingUnknown Fault
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final QName SOAP_DATAENCODINGUNKNOWN_FAULT =
+ new QName(URI_NS_SOAP_1_2_ENVELOPE, "DataEncodingUnknown", SOAP_ENV_PREFIX);
+
+ /**
+ * SOAP 1.2 Sender Fault
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final QName SOAP_SENDER_FAULT =
+ new QName(URI_NS_SOAP_1_2_ENVELOPE, "Sender", SOAP_ENV_PREFIX);
+
+ /**
+ * SOAP 1.2 Receiver Fault
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final QName SOAP_RECEIVER_FAULT =
+ new QName(URI_NS_SOAP_1_2_ENVELOPE, "Receiver", SOAP_ENV_PREFIX);
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElement.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,526 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An object representing an element of a SOAP message that is allowed but not
+ * specifically prescribed by a SOAP specification. This interface serves as the
+ * base interface for those objects that are specifically prescribed by a SOAP
+ * specification.
+ *
+ * Methods in this interface that are required to return SAAJ specific objects
+ * may "silently" replace nodes in the tree as required to successfully return
+ * objects of the correct type. See {@link #getChildElements()} and
+ * {@link javax.xml.soap}
+ * for details.
+ *
+ * @since 1.6
+ */
+public interface SOAPElement extends Node, org.w3c.dom.Element {
+
+ /**
+ * Creates a new
+ * This method may be deprecated in a future release of SAAJ in favor of
+ * addChildElement(javax.xml.namespace.QName)
+ *
+ * @param name a The fragment rooted in The fragment rooted in
+ * This method is useful for rolling back the construction of partially
+ * completed
+ * Callers should not rely on the element instance being renamed as is.
+ * Implementations could end up copying the content of the
+ *
+ * Calling this method may cause child
+ * Calling this method may cause child
+ * Calling this method may cause child Elements created using this factory do not have the properties
+ * of an element that lives inside a SOAP header document. These
+ * elements are copied into the XML document tree when they are
+ * inserted.
+ * @deprecated - Use
+ * A client can access the
+ * It is possible to change the body or header of a
+ * The
+ * This factory method creates
+ * This factory method creates
+ * A new
+ * A new
+ * It is illegal to add a header when the envelope already
+ * contains a header. Therefore, this method should be called
+ * only after the existing header has been removed.
+ *
+ * @return the new
+ * It is illegal to add a body when the envelope already
+ * contains a body. Therefore, this method should be called
+ * only after the existing body has been removed.
+ *
+ * @return the new Typical reasons for throwing a
+ * If there is an embedded
+ * This method can be called at most once. It is generally called from
+ * within the constructor or immediately after the constructor has
+ * returned a new
+ * This factory method creates
+ * This factory method creates
+ * This factory method creates
+ * Depending on the Fault codes, which give information about the fault, are defined
+ * in the SOAP 1.1 specification. A fault code is mandatory and must
+ * be of type
+ * Fault codes, which given information about the fault, are defined in
+ * the SOAP 1.1 specification. This element is mandatory in SOAP 1.1.
+ * Because the fault code is required to be a QName it is preferable to
+ * use the {@link #setFaultCode(Name)} form of this method.
+ *
+ * @param faultCode a
+ * The fault actor is the recipient in the message path who caused the
+ * fault to happen.
+ *
+ * If this
+ * If this
+ * If this
+ *
+ * If this
+ *
+ * If this
+ *
+ * If this
+ *
+ * A
+ * It is illegal to add a detail when the fault already
+ * contains a detail. Therefore, this method should be called
+ * only after the existing detail has been removed.
+ *
+ * @return the new
+ * Code sample:
+ *
+ *
+ * Content is added to a
+ * A
+ * A
+ * In SOAP 1.2 the env:actor attribute is replaced by the env:role
+ * attribute, but with essentially the same semantics.
+ *
+ * @param actor a
+ * In SOAP 1.2 the env:actor attribute is replaced by the env:role
+ * attribute, but with essentially the same semantics.
+ *
+ * @param actor a
+ * This method allows an actor to process the parts of the
+ *
+ * In SOAP 1.2 the env:actor attribute is replaced by the env:role
+ * attribute, but with essentially the same semantics.
+ *
+ * @param actor a
+ * A
+ * If this
+ * If this
+ * If the mustUnderstand attribute is on, the actor who receives the
+ *
+ * The SOAP relay attribute is set to true to indicate that the SOAP header
+ * block must be relayed by any node that is targeted by the header block
+ * but not actually process it. This attribute is ignored on header blocks
+ * whose mustUnderstand attribute is set to true or that are targeted at
+ * the ultimate reciever (which is the default). The default value of this
+ * attribute is
+ * A
+ * A new
+ * In addition to the mandatory
+ * Unlike the rest of a SOAP message, an attachment is not required to be in
+ * XML format and can therefore be anything from simple text to an image file.
+ * Consequently, any message content that is not in XML format must be in an
+ *
+ * A
+ * In order to ensure backward source compatibility, methods that are added to
+ * this class after version 1.1 of the SAAJ specification are all concrete
+ * instead of abstract and they all have default implementations. Unless
+ * otherwise noted in the JavaDocs for those methods the default
+ * implementations simply throw an
+ *
+ *
+ * @return the
+ *
+ * @return the
+ * This method does not touch the SOAP part.
+ */
+ public abstract void removeAllAttachments();
+
+ /**
+ * Gets a count of the number of attachments in this message. This count
+ * does not include the SOAP part.
+ *
+ * @return the number of
+ * In addition, this method marks the point at which the data from all
+ * constituent
+ *
+ * @exception
+ * If there are no attachments, just an XML stream is written out. For
+ * those messages that have attachments,
+ * Note that this method does not write the transport-specific MIME Headers
+ * of the Message
+ *
+ * @param out
+ * the
+ * The valid property names include
+ * {@link SOAPMessage#WRITE_XML_DECLARATION} and
+ * {@link SOAPMessage#CHARACTER_SET_ENCODING}. All of these standard SAAJ
+ * properties are prefixed by "javax.xml.soap". Vendors may also add
+ * implementation specific properties. These properties must be prefixed
+ * with package names that are unique to the vendor.
+ *
+ * Setting the property
+ * The property
+ * Some implementations may allow encodings in addition to UTF-8 and
+ * UTF-16. Refer to your vendor's documentation for details.
+ *
+ * @param property
+ * the property with which the specified value is to be
+ * associated.
+ * @param value
+ * the value to be associated with the specified property
+ * @exception SOAPException
+ * if the property name is not recognized.
+ * @since 1.6, SAAJ 1.2
+ */
+ public void setProperty(String property, Object value)
+ throws SOAPException {
+ throw new UnsupportedOperationException("setProperty must be overridden by all subclasses of SOAPMessage");
+ }
+
+ /**
+ * Retrieves value of the specified property.
+ *
+ * @param property
+ * the name of the property to retrieve
+ * @return the value associated with the named property or
+ * A
+ * When a message is sent, its SOAP part must have the MIME header Content-Type
+ * set to "text/xml". Or, from the other perspective, the SOAP part of any
+ * message that is received must have the MIME header Content-Type with a
+ * value of "text/xml".
+ *
+ * A client can access the
+ * A
+ *
+ * @since 1.6
+ */
+public abstract class SOAPPart implements org.w3c.dom.Document, Node {
+
+ /**
+ * Gets the
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a
+ * Note that RFC822 headers can contain only US-ASCII characters.
+ *
+ * @param name a The API in the
+
+
+
+
+
+
+
+What this means in
+practical terms is that an application that starts to use SAAJ APIs on a
+tree after manipulating it using DOM APIs must assume that the tree has been
+translated into an all SAAJ tree and that any references to objects within
+the tree that were obtained using DOM APIs are no longer valid. Switching
+from SAAJ APIs to DOM APIs is not allowed to cause invalid references and
+neither is using SAAJ APIs exclusively. It is only switching from using DOM
+APIs on a particular SAAJ tree to using SAAJ APIs that causes the risk of
+invalid references. There are no guarantees on the type, mutability, or serializability
- * of the {@code Map} or {@code List} objects returned, or of the
+ * of the {@code ConcurrentMap} or {@code List} objects returned, or of the
* thread-safety of the {@code List} objects returned.
* @implSpec
* This produces a result similar to:
@@ -1028,6 +1028,9 @@
* produces a result of type {@code D}. The resulting collector produces a
* {@code Map There are no guarantees on the type, mutability, or serializability
+ * of the {@code ConcurrentMap} returned.
+ *
* For example, to compute the set of last names of people in each city,
* where the city names are sorted:
* There are no guarantees on the type, mutability, serializability,
+ * or thread-safety of the {@code Map} returned.
+ *
* @apiNote
* It is common for either the key or the value to be the input elements.
* In this case, the utility method
@@ -1271,6 +1278,9 @@
* the value mapping function is applied to each equal element, and the
* results are merged using the provided merging function.
*
+ * There are no guarantees on the type, mutability, serializability,
+ * or thread-safety of the {@code Map} returned.
+ *
* @apiNote
* There are multiple ways to deal with collisions between multiple elements
* mapping to the same key. The other forms of {@code toMap} simply use
@@ -1382,6 +1392,9 @@
* may have duplicates, use
* {@link #toConcurrentMap(Function, Function, BinaryOperator)} instead.
*
+ * There are no guarantees on the type, mutability, or serializability
+ * of the {@code ConcurrentMap} returned.
+ *
* @apiNote
* It is common for either the key or the value to be the input elements.
* In this case, the utility method
@@ -1436,6 +1449,9 @@
* the value mapping function is applied to each equal element, and the
* results are merged using the provided merging function.
*
+ * There are no guarantees on the type, mutability, or serializability
+ * of the {@code ConcurrentMap} returned.
+ *
* @apiNote
* There are multiple ways to deal with collisions between multiple elements
* mapping to the same key. The other forms of {@code toConcurrentMap} simply use
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/sun/security/x509/PolicyConstraintsExtension.java
--- a/jdk/src/java.base/share/classes/sun/security/x509/PolicyConstraintsExtension.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/security/x509/PolicyConstraintsExtension.java Sun Jan 18 11:50:10 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,9 +27,7 @@
import java.io.IOException;
import java.io.OutputStream;
-import java.security.cert.CertificateException;
import java.util.Enumeration;
-import java.util.Vector;
import sun.security.util.*;
@@ -111,7 +109,7 @@
*/
public PolicyConstraintsExtension(int require, int inhibit)
throws IOException {
- this(Boolean.FALSE, require, inhibit);
+ this(Boolean.TRUE, require, inhibit);
}
/**
@@ -202,7 +200,7 @@
DerOutputStream tmp = new DerOutputStream();
if (extensionValue == null) {
extensionId = PKIXExtensions.PolicyConstraints_Id;
- critical = false;
+ critical = true;
encodeThis();
}
super.encode(tmp);
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/sun/security/x509/PolicyMappingsExtension.java
--- a/jdk/src/java.base/share/classes/sun/security/x509/PolicyMappingsExtension.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/sun/security/x509/PolicyMappingsExtension.java Sun Jan 18 11:50:10 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,7 @@
throws IOException {
this.maps = map;
this.extensionId = PKIXExtensions.PolicyMappings_Id;
- this.critical = false;
+ this.critical = true;
encodeThis();
}
@@ -100,8 +100,8 @@
* Create a default PolicyMappingsExtension.
*/
public PolicyMappingsExtension() {
- extensionId = PKIXExtensions.KeyUsage_Id;
- critical = false;
+ extensionId = PKIXExtensions.PolicyMappings_Id;
+ critical = true;
maps = new ArrayList
+ *
+ * Usage: java PropertiesParser -compile [path to .properties file] [output folder where .java file will be written]
+ *
+ * @author mcimadamore
+ */
+
+public class PropertiesParser {
+
+ public Logger logger;
+
+ public PropertiesParser(Logger logger) {
+ this.logger = logger;
+ }
+
+ public static void main(String[] args) {
+ PropertiesParser pp = new PropertiesParser(msg -> System.out.println(msg));
+ boolean ok = pp.run(args);
+ if ( !ok ) {
+ System.exit(1);
+ }
+ }
+
+ public static interface Logger {
+ void info(String msg);
+ }
+
+ public void info(String msg) {
+ logger.info(msg);
+ }
+
+ public boolean run(String[] args) {
+ MapContent-Type
and Content-Transfer-Encoding
.
- * Headers might need to be updated in two cases:
- *
- *
- * - A message being crafted by a mail application will certainly
- * need to activate this method at some point to fill up its internal
- * headers.
- *
- *
- * - A message read in from a Store will have obtained
- * all its headers from the store, and so doesn't need this.
- * However, if this message is editable and if any edits have
- * been made to either the content or message structure, we might
- * need to resync our headers.
- *
- *
- * In both cases this method is typically called by the
- * Message.saveChanges
method.
- */
- protected void updateHeaders() throws MessagingException {
- DataHandler dh = getDataHandler();
- /*
- * Code flow indicates null is never returned from
- * getdataHandler() - findbugs
- */
- //if (dh == null) // Huh ?
- // return;
-
- try {
- String type = dh.getContentType();
- boolean composite = false;
- boolean needCTHeader = getHeader("Content-Type") == null;
-
- ContentType cType = new ContentType(type);
- if (cType.match("multipart/*")) {
- // If multipart, recurse
- composite = true;
- Object o = dh.getContent();
- ((MimeMultipart) o).updateHeaders();
- } else if (cType.match("message/rfc822")) {
- composite = true;
- }
-
- // Content-Transfer-Encoding, but only if we don't
- // already have one
- if (!composite) { // not allowed on composite parts
- if (getHeader("Content-Transfer-Encoding") == null)
- setEncoding(MimeUtility.getEncoding(dh));
-
- if (needCTHeader && setDefaultTextCharset &&
- cType.match("text/*") &&
- cType.getParameter("charset") == null) {
- /*
- * Set a default charset for text parts.
- * We really should examine the data to determine
- * whether or not it's all ASCII, but that's too
- * expensive so we make an assumption: If we
- * chose 7bit encoding for this data, it's probably
- * ASCII. (MimeUtility.getEncoding will choose
- * 7bit only in this case, but someone might've
- * set the Content-Transfer-Encoding header manually.)
- */
- String charset;
- String enc = getEncoding();
- if (enc != null && enc.equalsIgnoreCase("7bit"))
- charset = "us-ascii";
- else
- charset = MimeUtility.getDefaultMIMECharset();
- cType.setParameter("charset", charset);
- type = cType.toString();
- }
- }
-
- // Now, let's update our own headers ...
-
- // Content-type, but only if we don't already have one
- if (needCTHeader) {
- /*
- * Pull out "filename" from Content-Disposition, and
- * use that to set the "name" parameter. This is to
- * satisfy older MUAs (DtMail, Roam and probably
- * a bunch of others).
- */
- String s = getHeader("Content-Disposition", null);
- if (s != null) {
- // Parse the header ..
- ContentDisposition cd = new ContentDisposition(s);
- String filename = cd.getParameter("filename");
- if (filename != null) {
- cType.setParameter("name", filename);
- type = cType.toString();
- }
- }
-
- setHeader("Content-Type", type);
- }
- } catch (IOException ex) {
- throw new MessagingException("IOException updating headers", ex);
- }
- }
-
- private void setEncoding(String encoding) {
- setHeader("Content-Transfer-Encoding", encoding);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,657 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimeMultipart.java 1.31 03/01/29
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-import com.sun.xml.internal.messaging.saaj.util.SAAJUtil;
-
-/**
- * The MimeMultipart class is an implementation
- * that uses MIME conventions for the multipart data. getContent()
method)
- * or it can be created by a client as part of creating a new MimeMessage. MimeMultipart(String subtype)
- * constructor. For example, to create a "multipart/alternative" object,
- * use new MimeMultipart("alternative")
.
- *
- * @version 1.31, 03/01/29
- * @author John Mani
- * @author Bill Shannon
- * @author Max Spivak
- */
-
-//BM MimeMultipart can extend this
-public class MimeMultipart {
-
- /**
- * The DataSource supplying our InputStream.
- */
- protected DataSource ds = null;
-
- /**
- * Have we parsed the data from our InputStream yet?
- * Defaults to true; set to false when our constructor is
- * given a DataSource with an InputStream that we need to
- * parse.
- */
- protected boolean parsed = true;
-
- /**
- * Vector of MimeBodyPart objects.
- */
- protected FinalArrayList parts = new FinalArrayList(); // Holds BodyParts
-
- /**
- * This field specifies the content-type of this multipart
- * object. It defaults to "multipart/mixed".
- */
- protected ContentType contentType;
-
- /**
- * The MimeBodyPart
containing this MimeMultipart
,
- * if known.
- * @since JavaMail 1.1
- */
- protected MimeBodyPart parent;
-
- protected static final boolean ignoreMissingEndBoundary;
- static {
- ignoreMissingEndBoundary = SAAJUtil.getSystemBoolean("saaj.mime.multipart.ignoremissingendboundary");
- }
-
- /**
- * Default constructor. An empty MimeMultipart object
- * is created. Its content type is set to "multipart/mixed".
- * A unique boundary string is generated and this string is
- * setup as the "boundary" parameter for the
- * contentType
field. contentType
field. parsed
flag is set to false. When
- * the data for the body parts are needed, the parser extracts the
- * "boundary" parameter from the content type of this DataSource,
- * skips the 'preamble' and reads bytes till the terminating
- * boundary and creates MimeBodyParts for each part of the stream.
- *
- * @param ds DataSource, can be a MultipartDataSource
- * @param ct
- * This must be the same information as {@link DataSource#getContentType()}.
- * All the callers of this method seem to have this object handy, so
- * for performance reason this method accepts it. Can be null.
- */
- public MimeMultipart(DataSource ds, ContentType ct) throws MessagingException {
- // 'ds' was not a MultipartDataSource, we have
- // to parse this ourself.
- parsed = false;
- this.ds = ds;
- if (ct==null)
- contentType = new ContentType(ds.getContentType());
- else
- contentType = ct;
- }
-
- /**
- * Set the subtype. This method should be invoked only on a new
- * MimeMultipart object created by the client. The default subtype
- * of such a multipart object is "mixed". updateHeaders
method on each of its
- * children BodyParts. saveChanges
- * method is invoked on the Message object containing this
- * MimeMultipart. This is typically done as part of the Message
- * send process, however note that a client is free to call
- * it any number of times. So if the header updating process is
- * expensive for a specific MimeMultipart subclass, then it
- * might itself want to track whether its internal state actually
- * did change, and do the header updating only if necessary.
- */
- protected void updateHeaders() throws MessagingException {
- for (int i = 0; i < parts.size(); i++)
- ((MimeBodyPart)parts.get(i)).updateHeaders();
- }
-
- /**
- * Iterates through all the parts and outputs each Mime part
- * separated by a boundary.
- */
- public void writeTo(OutputStream os)
- throws IOException, MessagingException {
- parse();
-
- String boundary = "--" + contentType.getParameter("boundary");
-
- for (int i = 0; i < parts.size(); i++) {
- OutputUtil.writeln(boundary, os); // put out boundary
- getBodyPart(i).writeTo(os);
- OutputUtil.writeln(os); // put out empty line
- }
-
- // put out last boundary
- OutputUtil.writeAsAscii(boundary, os);
- OutputUtil.writeAsAscii("--", os);
- os.flush();
- }
-
- /**
- * Parse the InputStream from our DataSource, constructing the
- * appropriate MimeBodyParts. The parsed
flag is
- * set to true, and if true on entry nothing is done. This
- * method is called by all other methods that need data for
- * the body parts, to make sure the data has been parsed.
- *
- * @since JavaMail 1.2
- */
- protected void parse() throws MessagingException {
- if (parsed)
- return;
-
- InputStream in;
- SharedInputStream sin = null;
- long start = 0, end = 0;
- boolean foundClosingBoundary = false;
-
- try {
- in = ds.getInputStream();
- if (!(in instanceof ByteArrayInputStream) &&
- !(in instanceof BufferedInputStream) &&
- !(in instanceof SharedInputStream))
- in = new BufferedInputStream(in);
- } catch (Exception ex) {
- throw new MessagingException("No inputstream from datasource");
- }
- if (in instanceof SharedInputStream)
- sin = (SharedInputStream)in;
-
- String boundary = "--" + contentType.getParameter("boundary");
- byte[] bndbytes = ASCIIUtility.getBytes(boundary);
- int bl = bndbytes.length;
-
- ByteOutputStream buf = null;
- try {
- // Skip the preamble
- LineInputStream lin = new LineInputStream(in);
- String line;
- while ((line = lin.readLine()) != null) {
- /*
- * Strip trailing whitespace. Can't use trim method
- * because it's too aggressive. Some bogus MIME
- * messages will include control characters in the
- * boundary string.
- */
- int i;
- for (i = line.length() - 1; i >= 0; i--) {
- char c = line.charAt(i);
- if (!(c == ' ' || c == '\t'))
- break;
- }
- line = line.substring(0, i + 1);
- if (line.equals(boundary))
- break;
- }
- if (line == null)
- throw new MessagingException("Missing start boundary");
-
- /*
- * Read and process body parts until we see the
- * terminating boundary line (or EOF).
- */
- boolean done = false;
- getparts:
- while (!done) {
- InternetHeaders headers = null;
- if (sin != null) {
- start = sin.getPosition();
- // skip headers
- while ((line = lin.readLine()) != null && line.length() > 0)
- ;
- if (line == null) {
- if (!ignoreMissingEndBoundary) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- // assume there's just a missing end boundary
- break getparts;
- }
- } else {
- // collect the headers for this body part
- headers = createInternetHeaders(in);
- }
-
- if (!in.markSupported())
- throw new MessagingException("Stream doesn't support mark");
-
- buf = null;
- // if we don't have a shared input stream, we copy the data
- if (sin == null)
- buf = new ByteOutputStream();
- int b;
- boolean bol = true; // beginning of line flag
- // the two possible end of line characters
- int eol1 = -1, eol2 = -1;
-
- /*
- * Read and save the content bytes in buf.
- */
- for (;;) {
- if (bol) {
- /*
- * At the beginning of a line, check whether the
- * next line is a boundary.
- */
- int i;
- in.mark(bl + 4 + 1000); // bnd + "--\r\n" + lots of LWSP
- // read bytes, matching against the boundary
- for (i = 0; i < bl; i++)
- if (in.read() != bndbytes[i])
- break;
- if (i == bl) {
- // matched the boundary, check for last boundary
- int b2 = in.read();
- if (b2 == '-') {
- if (in.read() == '-') {
- done = true;
- foundClosingBoundary = true;
- break; // ignore trailing text
- }
- }
- // skip linear whitespace
- while (b2 == ' ' || b2 == '\t')
- b2 = in.read();
- // check for end of line
- if (b2 == '\n')
- break; // got it! break out of the loop
- if (b2 == '\r') {
- in.mark(1);
- if (in.read() != '\n')
- in.reset();
- break; // got it! break out of the loop
- }
- }
- // failed to match, reset and proceed normally
- in.reset();
-
- // if this is not the first line, write out the
- // end of line characters from the previous line
- if (buf != null && eol1 != -1) {
- buf.write(eol1);
- if (eol2 != -1)
- buf.write(eol2);
- eol1 = eol2 = -1;
- }
- }
-
- // read the next byte
- if ((b = in.read()) < 0) {
- done = true;
- break;
- }
-
- /*
- * If we're at the end of the line, save the eol characters
- * to be written out before the beginning of the next line.
- */
- if (b == '\r' || b == '\n') {
- bol = true;
- if (sin != null)
- end = sin.getPosition() - 1;
- eol1 = b;
- if (b == '\r') {
- in.mark(1);
- if ((b = in.read()) == '\n')
- eol2 = b;
- else
- in.reset();
- }
- } else {
- bol = false;
- if (buf != null)
- buf.write(b);
- }
- }
-
- /*
- * Create a MimeBody element to represent this body part.
- */
- MimeBodyPart part;
- if (sin != null)
- part = createMimeBodyPart(sin.newStream(start, end));
- else
- part = createMimeBodyPart(headers, buf.getBytes(), buf.getCount());
- addBodyPart(part);
- }
- } catch (IOException ioex) {
- throw new MessagingException("IO Error", ioex);
- } finally {
- if (buf != null)
- buf.close();
- }
-
- if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) {
- throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
- }
- parsed = true;
- }
-
- /**
- * Create and return an InternetHeaders object that loads the
- * headers from the given InputStream. Subclasses can override
- * this method to return a subclass of InternetHeaders, if
- * necessary. This implementation simply constructs and returns
- * an InternetHeaders object.
- *
- * @param is the InputStream to read the headers from
- * @exception MessagingException
- * @since JavaMail 1.2
- */
- protected InternetHeaders createInternetHeaders(InputStream is)
- throws MessagingException {
- return new InternetHeaders(is);
- }
-
- /**
- * Create and return a MimeBodyPart object to represent a
- * body part parsed from the InputStream. Subclasses can override
- * this method to return a subclass of MimeBodyPart, if
- * necessary. This implementation simply constructs and returns
- * a MimeBodyPart object.
- *
- * @param headers the headers for the body part
- * @param content the content of the body part
- * @since JavaMail 1.2
- */
- protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) {
- return new MimeBodyPart(headers, content,len);
- }
-
- /**
- * Create and return a MimeBodyPart object to represent a
- * body part parsed from the InputStream. Subclasses can override
- * this method to return a subclass of MimeBodyPart, if
- * necessary. This implementation simply constructs and returns
- * a MimeBodyPart object.
- *
- * @param is InputStream containing the body part
- * @exception MessagingException
- * @since JavaMail 1.2
- */
- protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException {
- return new MimeBodyPart(is);
- }
-
- /**
- * Setup this MimeMultipart object from the given MultipartDataSource. contentType
field.
- *
- * @return content-type
- * @see #contentType
- */
- public ContentType getContentType() {
- return contentType;
- }
-
- /**
- * Remove the specified part from the multipart message.
- * Shifts all the parts after the removed part down one.
- *
- * @param part The part to remove
- * @return true if part removed, false otherwise
- * @exception MessagingException if no such MimeBodyPart exists
- */
- public boolean removeBodyPart(MimeBodyPart part) throws MessagingException {
- if (parts == null)
- throw new MessagingException("No such body part");
-
- boolean ret = parts.remove(part);
- part.setParent(null);
- return ret;
- }
-
- /**
- * Remove the part at specified location (starting from 0).
- * Shifts all the parts after the removed part down one.
- *
- * @param index Index of the part to remove
- * @exception IndexOutOfBoundsException if the given index
- * is out of range.
- */
- public void removeBodyPart(int index) {
- if (parts == null)
- throw new IndexOutOfBoundsException("No such BodyPart");
-
- MimeBodyPart part = (MimeBodyPart)parts.get(index);
- parts.remove(index);
- part.setParent(null);
- }
-
- /**
- * Adds a MimeBodyPart to the multipart. The MimeBodyPart is appended to
- * the list of existing Parts.
- *
- * @param part The MimeBodyPart to be appended
- */
- public synchronized void addBodyPart(MimeBodyPart part) {
- if (parts == null)
- parts = new FinalArrayList();
-
- parts.add(part);
- part.setParent(this);
- }
-
- /**
- * Adds a MimeBodyPart at position index
.
- * If index
is not the last one in the list,
- * the subsequent parts are shifted up. If index
- * is larger than the number of parts present, the
- * MimeBodyPart is appended to the end.
- *
- * @param part The MimeBodyPart to be inserted
- * @param index Location where to insert the part
- */
- public synchronized void addBodyPart(MimeBodyPart part, int index) {
- if (parts == null)
- parts = new FinalArrayList();
-
- parts.add(index,part);
- part.setParent(this);
- }
-
- /**
- * Return the MimeBodyPart
that contains this MimeMultipart
- * object, or null
if not known.
- * @since JavaMail 1.1
- */
- MimeBodyPart getParent() {
- return parent;
- }
-
- /**
- * Set the parent of this MimeMultipart
to be the specified
- * MimeBodyPart
. Normally called by the Message
- * or MimeBodyPart
setContent(MimeMultipart)
method.
- * parent
may be null
if the
- * MimeMultipart
is being removed from its containing
- * MimeBodyPart
.
- * @since JavaMail 1.1
- */
- void setParent(MimeBodyPart parent) {
- this.parent = parent;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)MimePartDataSource.java 1.9 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.io.*;
-import java.net.UnknownServiceException;
-
-import javax.activation.DataSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-/**
- * A utility class that implements a DataSource out of
- * a MimeBodyPart. This class is primarily meant for service providers.
- *
- * @author John Mani
- */
-
-public final class MimePartDataSource implements DataSource {
- private final MimeBodyPart part;
-
- /**
- * Constructor, that constructs a DataSource from a MimeBodyPart.
- */
- public MimePartDataSource(MimeBodyPart part) {
- this.part = part;
- }
-
- /**
- * Returns an input stream from this MimeBodyPart. getContentStream()
method and decodes
- * it using the MimeUtility.decode()
method.
- *
- * @return decoded input stream
- */
- public InputStream getInputStream() throws IOException {
-
- try {
- InputStream is = part.getContentStream();
-
- String encoding = part.getEncoding();
- if (encoding != null)
- return MimeUtility.decode(is, encoding);
- else
- return is;
- } catch (MessagingException mex) {
- throw new IOException(mex.getMessage());
- }
- }
-
- /**
- * DataSource method to return an output stream. getContentType
- * method on the MimeBodyPart.
- */
- public String getContentType() {
- return part.getContentType();
- }
-
- /**
- * DataSource method to return a name.
- *
- * byte[] bytes = string.getBytes("iso-8859-1");
- *
- *
setHeader
and addHeader
methods
- * on MimeMessage and MimeBodyPart assume that the given header values
- * are Unicode strings that contain only US-ASCII characters. Hence
- * the callers of those methods must insure that the values they pass
- * do not contain non US-ASCII characters. The methods in this class
- * help do this. getHeader
family of methods on MimeMessage and
- * MimeBodyPart return the raw header value. These might be encoded
- * as per RFC 2047, and if so, must be decoded into Unicode Strings.
- * The methods in this class help to do this. mail.mime.decodetext.strict
property controls
- * decoding of MIME encoded words. The MIME spec requires that encoded
- * words start at the beginning of a whitespace separated word. Some
- * mailers incorrectly include encoded words in the middle of a word.
- * If the mail.mime.decodetext.strict
System property is
- * set to "false"
, an attempt will be made to decode these
- * illegal encoded words. The default is true. mail.mime.encodeeol.strict
property controls the
- * choice of Content-Transfer-Encoding for MIME parts that are not of
- * type "text". Often such parts will contain textual data for which
- * an encoding that allows normal end of line conventions is appropriate.
- * In rare cases, such a part will appear to contain entirely textual
- * data, but will require an encoding that preserves CR and LF characters
- * without change. If the mail.mime.decodetext.strict
- * System property is set to "true"
, such an encoding will
- * be used when necessary. The default is false. mail.mime.charset
System property can
- * be used to specify the default MIME charset to use for encoded words
- * and text parts that don't otherwise specify a charset. Normally, the
- * default MIME charset is derived from the default Java charset, as
- * specified in the file.encoding
System property. Most
- * applications will have no need to explicitly set the default MIME
- * charset. In cases where the default MIME charset to be used for
- * mail messages is different than the charset used for files stored on
- * the system, this property should be set.
- *
- * @version 1.45, 03/03/10
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class MimeUtility {
-
- // This class cannot be instantiated
- private MimeUtility() { }
-
- public static final int ALL = -1;
-
- private static final int BUFFER_SIZE = 1024;
- private static boolean decodeStrict = true;
- private static boolean encodeEolStrict = false;
- private static boolean foldEncodedWords = false;
- private static boolean foldText = true;
-
- static {
- try {
- String s = SAAJUtil.getSystemProperty("mail.mime.decodetext.strict");
- // default to true
- decodeStrict = s == null || !s.equalsIgnoreCase("false");
- s = SAAJUtil.getSystemProperty("mail.mime.encodeeol.strict");
- // default to false
- encodeEolStrict = s != null && s.equalsIgnoreCase("true");
- s = SAAJUtil.getSystemProperty("mail.mime.foldencodedwords");
- // default to false
- foldEncodedWords = s != null && s.equalsIgnoreCase("true");
- s = SAAJUtil.getSystemProperty("mail.mime.foldtext");
- // default to true
- foldText = s == null || !s.equalsIgnoreCase("false");
- } catch (SecurityException sex) {
- // ignore it
- }
- }
-
-
- /**
- * Get the content-transfer-encoding that should be applied
- * to the input stream of this datasource, to make it mailsafe.
- *
- *
- *
- * @param ds DataSource
- * @return the encoding. This is either "7bit",
- * "quoted-printable" or "base64"
- */
- public static String getEncoding(DataSource ds) {
- ContentType cType = null;
- InputStream is = null;
- String encoding = null;
-
- try {
- cType = new ContentType(ds.getContentType());
- is = ds.getInputStream();
- } catch (Exception ex) {
- return "base64"; // what else ?!
- }
-
- boolean isText = cType.match("text/*");
- // if not text, stop processing when we see non-ASCII
- int i = checkAscii(is, ALL, !isText);
- switch (i) {
- case ALL_ASCII:
- encoding = "7bit"; // all ascii
- break;
- case MOSTLY_ASCII:
- encoding = "quoted-printable"; // mostly ascii
- break;
- default:
- encoding = "base64"; // mostly binary
- break;
- }
-
- // Close the input stream
- try {
- is.close();
- } catch (IOException ioex) { }
-
- return encoding;
- }
-
- /**
- * Same as getEncoding(DataSource)
except that instead
- * of reading the data from an InputStream
it uses the
- * writeTo
method to examine the data. This is more
- * efficient in the common case of a DataHandler
- * created with an object and a MIME type (for example, a
- * "text/plain" String) because all the I/O is done in this
- * thread. In the case requiring an InputStream
the
- * DataHandler
uses a thread, a pair of pipe streams,
- * and the writeTo
method to produce the data. filename
parameter is used with the "uuencode"
- * encoding and is included in the encoded output.
- *
- * @param os output stream
- * @param encoding the encoding of the stream.
- * @param filename name for the file being encoded (only used
- * with uuencode)
- * @return output stream that applies the
- * specified encoding.
- * @since JavaMail 1.2
- */
- public static OutputStream encode(OutputStream os, String encoding,
- String filename)
- throws MessagingException {
- if (encoding == null)
- return os;
- else if (encoding.equalsIgnoreCase("base64"))
- return new BASE64EncoderStream(os);
- else if (encoding.equalsIgnoreCase("quoted-printable"))
- return new QPEncoderStream(os);
- else if (encoding.equalsIgnoreCase("uuencode") ||
- encoding.equalsIgnoreCase("x-uuencode") ||
- encoding.equalsIgnoreCase("x-uue"))
- return new UUEncoderStream(os, filename);
- else if (encoding.equalsIgnoreCase("binary") ||
- encoding.equalsIgnoreCase("7bit") ||
- encoding.equalsIgnoreCase("8bit"))
- return os;
- else
- throw new MessagingException("Unknown encoding: " +encoding);
- }
-
- /**
- * Encode a RFC 822 "text" token into mail-safe form as per
- * RFC 2047.
- *
- * MimeBodyPart part = ...
- * String rawvalue = "FooBar Mailer, Japanese version 1.1"
- * try {
- * // If we know for sure that rawvalue contains only US-ASCII
- * // characters, we can skip the encoding part
- * part.setHeader("X-mailer", MimeUtility.encodeText(rawvalue));
- * } catch (UnsupportedEncodingException e) {
- * // encoding failure
- * } catch (MessagingException me) {
- * // setHeader() failure
- * }
- *
- *
- *
- * MimeBodyPart part = ...
- * String rawvalue = null;
- * String value = null;
- * try {
- * if ((rawvalue = part.getHeader("X-mailer")[0]) != null)
- * value = MimeUtility.decodeText(rawvalue);
- * } catch (UnsupportedEncodingException e) {
- * // Don't care
- * value = rawvalue;
- * } catch (MessagingException me) { }
- *
- * return value;
- *
- *
HeaderTokenizer
class defines two special
- * sets of delimiters - MIME and RFC 822. used
indicates how many characters have been used in
- * the current line; it is usually the length of the header name. mail.mime.charset
- * is set, a system charset corresponding to this MIME charset will be
- * returned. max
bytes are checked. If max
is
- * set to ALL
, then all the bytes available in this
- * input stream are checked. If breakOnNonAscii
is true
- * the check terminates when the first non-US-ASCII character is
- * found and MOSTLY_NONASCII is returned. Else, the check continues
- * till max
bytes or till the end of stream.
- *
- * @param is the input stream
- * @param max maximum bytes to check for. The special value
- * ALL indicates that all the bytes in this input
- * stream must be checked.
- * @param breakOnNonAscii if true
, then terminate the
- * the check when the first non-US-ASCII character
- * is found.
- * @return ALL_ASCII if all characters in the string
- * belong to the US-ASCII charset. MOSTLY_ASCII
- * if more than half of the available characters
- * are US-ASCII characters. Else MOSTLY_NONASCII.
- */
- static int checkAscii(InputStream is, int max, boolean breakOnNonAscii) {
- int ascii = 0, non_ascii = 0;
- int len;
- int block = 4096;
- int linelen = 0;
- boolean longLine = false, badEOL = false;
- boolean checkEOL = encodeEolStrict && breakOnNonAscii;
- byte buf[] = null;
- if (max != 0) {
- block = (max == ALL) ? 4096 : Math.min(max, 4096);
- buf = new byte[block];
- }
- while (max != 0) {
- try {
- if ((len = is.read(buf, 0, block)) == -1)
- break;
- int lastb = 0;
- for (int i = 0; i < len; i++) {
- // The '&' operator automatically causes b[i] to
- // be promoted to an int, and we mask out the higher
- // bytes in the int so that the resulting value is
- // not a negative integer.
- int b = buf[i] & 0xff;
- if (checkEOL &&
- ((lastb == '\r' && b != '\n') ||
- (lastb != '\r' && b == '\n')))
- badEOL = true;
- if (b == '\r' || b == '\n')
- linelen = 0;
- else {
- linelen++;
- if (linelen > 998) // 1000 - CRLF
- longLine = true;
- }
- if (nonascii(b)) { // non-ascii
- if (breakOnNonAscii) // we are done
- return MOSTLY_NONASCII;
- else
- non_ascii++;
- } else
- ascii++;
- lastb = b;
- }
- } catch (IOException ioex) {
- break;
- }
- if (max != ALL)
- max -= len;
- }
-
- if (max == 0 && breakOnNonAscii)
- // We have been told to break on the first non-ascii character.
- // We haven't got any non-ascii character yet, but then we
- // have not checked all of the available bytes either. So we
- // cannot say for sure that this input stream is ALL_ASCII,
- // and hence we must play safe and return MOSTLY_NONASCII
-
- return MOSTLY_NONASCII;
-
- if (non_ascii == 0) { // no non-us-ascii characters so far
- // If we're looking at non-text data, and we saw CR without LF
- // or vice versa, consider this mostly non-ASCII so that it
- // will be base64 encoded (since the quoted-printable encoder
- // doesn't encode this case properly).
- if (badEOL)
- return MOSTLY_NONASCII;
- // if we've seen a long line, we degrade to mostly ascii
- else if (longLine)
- return MOSTLY_ASCII;
- else
- return ALL_ASCII;
- }
- if (ascii > non_ascii) // mostly ascii
- return MOSTLY_ASCII;
- return MOSTLY_NONASCII;
- }
-
- static final boolean nonascii(int b) {
- return b >= 0177 || (b < 040 && b != '\r' && b != '\n' && b != '\t');
- }
-}
-
-/**
- * An OutputStream that determines whether the data written to
- * it is all ASCII, mostly ASCII, or mostly non-ASCII.
- */
-class AsciiOutputStream extends OutputStream {
- private boolean breakOnNonAscii;
- private int ascii = 0, non_ascii = 0;
- private int linelen = 0;
- private boolean longLine = false;
- private boolean badEOL = false;
- private boolean checkEOL = false;
- private int lastb = 0;
- private int ret = 0;
-
- public AsciiOutputStream(boolean breakOnNonAscii, boolean encodeEolStrict) {
- this.breakOnNonAscii = breakOnNonAscii;
- checkEOL = encodeEolStrict && breakOnNonAscii;
- }
-
- public void write(int b) throws IOException {
- check(b);
- }
-
- public void write(byte b[]) throws IOException {
- write(b, 0, b.length);
- }
-
- public void write(byte b[], int off, int len) throws IOException {
- len += off;
- for (int i = off; i < len ; i++)
- check(b[i]);
- }
-
- private final void check(int b) throws IOException {
- b &= 0xff;
- if (checkEOL &&
- ((lastb == '\r' && b != '\n') || (lastb != '\r' && b == '\n')))
- badEOL = true;
- if (b == '\r' || b == '\n')
- linelen = 0;
- else {
- linelen++;
- if (linelen > 998) // 1000 - CRLF
- longLine = true;
- }
- if (MimeUtility.nonascii(b)) { // non-ascii
- non_ascii++;
- if (breakOnNonAscii) { // we are done
- ret = MimeUtility.MOSTLY_NONASCII;
- throw new EOFException();
- }
- } else
- ascii++;
- lastb = b;
- }
-
- /**
- * Return ASCII-ness of data stream.
- */
- public int getAscii() {
- if (ret != 0)
- return ret;
- // If we're looking at non-text data, and we saw CR without LF
- // or vice versa, consider this mostly non-ASCII so that it
- // will be base64 encoded (since the quoted-printable encoder
- // doesn't encode this case properly).
- if (badEOL)
- return MimeUtility.MOSTLY_NONASCII;
- else if (non_ascii == 0) { // no non-us-ascii characters so far
- // if we've seen a long line, we degrade to mostly ascii
- if (longLine)
- return MimeUtility.MOSTLY_ASCII;
- else
- return MimeUtility.ALL_ASCII;
- }
- if (ascii > non_ascii) // mostly ascii
- return MimeUtility.MOSTLY_ASCII;
- return MimeUtility.MOSTLY_NONASCII;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)ParameterList.java 1.10 03/02/12
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * This class holds MIME parameters (attribute-value pairs).
- *
- * @version 1.10, 03/02/12
- * @author John Mani
- */
-
-public final class ParameterList {
-
- private final HashMap list;
-
- /**
- * No-arg Constructor.
- */
- public ParameterList() {
- this.list = new HashMap();
- }
-
- private ParameterList(HashMap m) {
- this.list = m;
- }
-
- /**
- * Constructor that takes a parameter-list string. The String
- * is parsed and the parameters are collected and stored internally.
- * A ParseException is thrown if the parse fails.
- * Note that an empty parameter-list string is valid and will be
- * parsed into an empty ParameterList.
- *
- * @param s the parameter-list string.
- * @exception ParseException if the parse fails.
- */
- public ParameterList(String s) throws ParseException {
- HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
- HeaderTokenizer.Token tk;
- int type;
- String name;
-
- list = new HashMap();
- while (true) {
- tk = h.next();
- type = tk.getType();
-
- if (type == HeaderTokenizer.Token.EOF) // done
- return;
-
- if ((char)type == ';') {
- // expect parameter name
- tk = h.next();
- // tolerate trailing semicolon, even though it violates the spec
- if (tk.getType() == HeaderTokenizer.Token.EOF)
- return;
- // parameter name must be a MIME Atom
- if (tk.getType() != HeaderTokenizer.Token.ATOM)
- throw new ParseException();
- name = tk.getValue().toLowerCase();
-
- // expect '='
- tk = h.next();
- if ((char)tk.getType() != '=')
- throw new ParseException();
-
- // expect parameter value
- tk = h.next();
- type = tk.getType();
- // parameter value must be a MIME Atom or Quoted String
- if (type != HeaderTokenizer.Token.ATOM &&
- type != HeaderTokenizer.Token.QUOTEDSTRING)
- throw new ParseException();
-
- list.put(name, tk.getValue());
- } else
- throw new ParseException();
- }
- }
-
- /**
- * Return the number of parameters in this list.
- *
- * @return number of parameters.
- */
- public int size() {
- return list.size();
- }
-
- /**
- * Returns the value of the specified parameter. Note that
- * parameter names are case-insensitive.
- *
- * @param name parameter name.
- * @return Value of the parameter. Returns
- * null
if the parameter is not
- * present.
- */
- public String get(String name) {
- return (String)list.get(name.trim().toLowerCase());
- }
-
- /**
- * Set a parameter. If this parameter already exists, it is
- * replaced by this new value.
- *
- * @param name name of the parameter.
- * @param value value of the parameter.
- */
- public void set(String name, String value) {
- list.put(name.trim().toLowerCase(), value);
- }
-
- /**
- * Removes the specified parameter from this ParameterList.
- * This method does nothing if the parameter is not present.
- *
- * @param name name of the parameter.
- */
- public void remove(String name) {
- list.remove(name.trim().toLowerCase());
- }
-
- /**
- * Return an enumeration of the names of all parameters in this
- * list.
- *
- * @return Enumeration of all parameter names in this list.
- */
- public Iterator getNames() {
- return list.keySet().iterator();
- }
-
-
- /**
- * Convert this ParameterList into a MIME String. If this is
- * an empty list, an empty string is returned.
- *
- * @return String
- */
- public String toString() {
- return toString(0);
- }
-
- /**
- * Convert this ParameterList into a MIME String. If this is
- * an empty list, an empty string is returned.
- *
- * The 'used' parameter specifies the number of character positions
- * already taken up in the field into which the resulting parameter
- * list is to be inserted. It's used to determine where to fold the
- * resulting parameter list.
- *
- * @param used number of character positions already used, in
- * the field into which the parameter list is to
- * be inserted.
- * @return String
- */
- public String toString(int used) {
- StringBuffer sb = new StringBuffer();
- Iterator itr = list.entrySet().iterator();
-
- while (itr.hasNext()) {
- Map.Entry e = (Map.Entry)itr.next();
- String name = (String)e.getKey();
- String value = quote((String)e.getValue());
- sb.append("; ");
- used += 2;
- int len = name.length() + value.length() + 1;
- if (used + len > 76) { // overflows ...
- sb.append("\r\n\t"); // .. start new continuation line
- used = 8; // account for the starting start
(inclusive)
- * up to end
(exclusive). start
must be
- * non-negative. If end
is -1, the new stream ends
- * at the same place as this stream. The returned InputStream
- * will also implement the SharedInputStream interface.
- *
- * @param start the starting position
- * @param end the ending position + 1
- * @return the new stream
- */
- public InputStream newStream(long start, long end);
-
- /**
- * Writes the specified region to another {@link OutputStream}.
- */
- public void writeTo(long start,long end, OutputStream out);
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)UniqueValue.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
-
-
-/**
- * This is a utility class that generates unique values. The generated
- * String contains only US-ASCII characters and hence is safe for use
- * in RFC822 headers. hashCode()
,
- * and the current time (in milliseconds).
- */
- public static String getUniqueBoundaryValue() {
- StringBuffer s = new StringBuffer();
-
- // Unique string is ----=_Part_start
till, but not including end
. start
- * till, but not including end
. int
in the range 0
- * to 255
. If no byte is available because the end of
- * the stream has been reached, the value -1
is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return next byte of data, or -1
if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
- public int read() throws IOException {
- if (index >= bufsize) {
- decode(); // Fills up buffer
- if (bufsize == 0) // buffer is empty
- return -1;
- index = 0; // reset index into buffer
- }
- return buffer[index++] & 0xff; // Zero off the MSB
- }
-
- /**
- * Reads up to len
decoded bytes of data from this input stream
- * into an array of bytes. This method blocks until some input is
- * available.
- * -1
if there is no more data because the end of
- * the stream has been reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) // At end of stream, so we should
- i = -1; // return -1 , NOT 0.
- break;
- }
- buf[off+i] = (byte)c;
- }
-
- return i;
- }
-
- /**
- * Tests if this input stream supports marks. Currently this class
- * does not support marks
- */
- public boolean markSupported() {
- return false; // Maybe later ..
- }
-
- /**
- * Returns the number of bytes that can be read from this input
- * stream without blocking. However, this figure is only
- * a close approximation in case the original encoded stream
- * contains embedded CRLFs; since the CRLFs are discarded, not decoded
- */
- public int available() throws IOException {
- // This is only an estimate, since in.available()
- // might include CRLFs too ..
- return ((in.available() * 3)/4 + (bufsize-index));
- }
-
- /**
- * This character array provides the character to value map
- * based on RFC1521.
- */
- private final static char pem_array[] = {
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
- };
-
- private final static byte pem_convert_array[] = new byte[256];
-
- static {
- for (int i = 0; i < 255; i++)
- pem_convert_array[i] = -1;
- for(int i = 0; i < pem_array.length; i++)
- pem_convert_array[pem_array[i]] = (byte) i;
- }
-
- /* The decoder algorithm */
- private byte[] decode_buffer = new byte[4];
- private void decode() throws IOException {
- bufsize = 0;
- /*
- * We need 4 valid base64 characters before we start decoding.
- * We skip anything that's not a valid base64 character (usually
- * just CRLF).
- */
- int got = 0;
- while (got < 4) {
- int i = in.read();
- if (i == -1) {
- if (got == 0)
- return; // EOF before any data is ok
- throw new IOException("Error in encoded stream, got " + got);
- }
- if (i >= 0 && i < 256 && i == '=' || pem_convert_array[i] != -1)
- decode_buffer[got++] = (byte)i;
- }
-
- byte a, b;
- a = pem_convert_array[decode_buffer[0] & 0xff];
- b = pem_convert_array[decode_buffer[1] & 0xff];
- // The first decoded byte
- buffer[bufsize++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
-
- if (decode_buffer[2] == '=') // End of this BASE64 encoding
- return;
- a = b;
- b = pem_convert_array[decode_buffer[2] & 0xff];
- // The second decoded byte
- buffer[bufsize++] = (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
-
- if (decode_buffer[3] == '=') // End of this BASE64 encoding
- return;
- a = b;
- b = pem_convert_array[decode_buffer[3] & 0xff];
- // The third decoded byte
- buffer[bufsize++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
- }
-
- /**
- * Base64 decode a byte array. No line breaks are allowed.
- * This method is suitable for short strings, such as those
- * in the IMAP AUTHENTICATE protocol, but not to decode the
- * entire content of a MIME part.
- *
- * NOTE: inbuf may only contain valid base64 characters.
- * Whitespace is not ignored.
- */
- public static byte[] decode(byte[] inbuf) {
- int size = (inbuf.length / 4) * 3;
- if (size == 0)
- return inbuf;
-
- if (inbuf[inbuf.length - 1] == '=') {
- size--;
- if (inbuf[inbuf.length - 2] == '=')
- size--;
- }
- byte[] outbuf = new byte[size];
-
- int inpos = 0, outpos = 0;
- size = inbuf.length;
- while (size > 0) {
- byte a, b;
- a = pem_convert_array[inbuf[inpos++] & 0xff];
- b = pem_convert_array[inbuf[inpos++] & 0xff];
- // The first decoded byte
- outbuf[outpos++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
-
- if (inbuf[inpos] == '=') // End of this BASE64 encoding
- return outbuf;
- a = b;
- b = pem_convert_array[inbuf[inpos++] & 0xff];
- // The second decoded byte
- outbuf[outpos++] = (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
-
- if (inbuf[inpos] == '=') // End of this BASE64 encoding
- return outbuf;
- a = b;
- b = pem_convert_array[inbuf[inpos++] & 0xff];
- // The third decoded byte
- outbuf[outpos++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
- size -= 4;
- }
- return outbuf;
- }
-
- /*** begin TEST program ***
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- BASE64DecoderStream decoder = new BASE64DecoderStream(infile);
- int c;
-
- while ((c = decoder.read()) != -1)
- System.out.print((char)c);
- System.out.flush();
- }
- *** end TEST program ***/
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)BASE64EncoderStream.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a BASE64 Encoder. It is implemented as
- * a FilterOutputStream, so one can just wrap this class around
- * any output stream and write bytes into this filter. The Encoding
- * is done as the bytes are written out.
- *
- * @author John Mani
- * @author Bill Shannon
- */
-
-public class BASE64EncoderStream extends FilterOutputStream {
- private byte[] buffer; // cache of bytes that are yet to be encoded
- private int bufsize = 0; // size of the cache
- private int count = 0; // number of bytes that have been output
- private int bytesPerLine; // number of bytes per line
-
- /**
- * Create a BASE64 encoder that encodes the specified input stream
- * @param out the output stream
- * @param bytesPerLine number of bytes per line. The encoder inserts
- * a CRLF sequence after the specified number of bytes
- */
- public BASE64EncoderStream(OutputStream out, int bytesPerLine) {
- super(out);
- buffer = new byte[3];
- this.bytesPerLine = bytesPerLine;
- }
-
- /**
- * Create a BASE64 encoder that encodes the specified input stream.
- * Inserts the CRLF sequence after outputting 76 bytes.
- * @param out the output stream
- */
- public BASE64EncoderStream(OutputStream out) {
- this(out, 76);
- }
-
- /**
- * Encodes len
bytes from the specified
- * byte
array starting at offset off
to
- * this output stream.
- *
- * @param b the data.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b, int off, int len) throws IOException {
- for (int i = 0; i < len; i++)
- write(b[off + i]);
- }
-
- /**
- * Encodes b.length
bytes to this output stream.
- * @param b the data to be written.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
-
- /**
- * Encodes the specified byte
to this output stream.
- * @param c the byte
.
- * @exception IOException if an I/O error occurs.
- */
- public void write(int c) throws IOException {
- buffer[bufsize++] = (byte)c;
- if (bufsize == 3) { // Encoding unit = 3 bytes
- encode();
- bufsize = 0;
- }
- }
-
- /**
- * Flushes this output stream and forces any buffered output bytes
- * to be encoded out to the stream.
- * @exception IOException if an I/O error occurs.
- */
- public void flush() throws IOException {
- if (bufsize > 0) { // If there's unencoded characters in the buffer ..
- encode(); // .. encode them
- bufsize = 0;
- }
- out.flush();
- }
-
- /**
- * Forces any buffered output bytes to be encoded out to the stream
- * and closes this output stream
- */
- public void close() throws IOException {
- flush();
- out.close();
- }
-
- /** This array maps the characters to their 6 bit values */
- private final static char pem_array[] = {
- 'A','B','C','D','E','F','G','H', // 0
- 'I','J','K','L','M','N','O','P', // 1
- 'Q','R','S','T','U','V','W','X', // 2
- 'Y','Z','a','b','c','d','e','f', // 3
- 'g','h','i','j','k','l','m','n', // 4
- 'o','p','q','r','s','t','u','v', // 5
- 'w','x','y','z','0','1','2','3', // 6
- '4','5','6','7','8','9','+','/' // 7
- };
-
- private void encode() throws IOException {
- // If writing out this encoded unit will cause overflow,
- // start a new line.
- if (count + 4 > bytesPerLine) {
- out.write('\r');
- out.write('\n');
- count = 0;
- }
-
- byte a, b, c;
- if (bufsize == 1) {
- a = buffer[0];
- b = 0;
- c = 0;
- out.write(pem_array[(a >>> 2) & 0x3F]);
- out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
- out.write('='); // pad character
- out.write('='); // pad character
- } else if (bufsize == 2) {
- a = buffer[0];
- b = buffer[1];
- c = 0;
- out.write(pem_array[(a >>> 2) & 0x3F]);
- out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
- out.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
- out.write('='); // pad character
- } else {
- a = buffer[0];
- b = buffer[1];
- c = buffer[2];
- out.write(pem_array[(a >>> 2) & 0x3F]);
- out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
- out.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
- out.write(pem_array[c & 0x3F]);
- }
-
- // increment count
- count += 4;
- }
-
- /**
- * Base64 encode a byte array. No line breaks are inserted.
- * This method is suitable for short strings, such as those
- * in the IMAP AUTHENTICATE protocol, but not to encode the
- * entire content of a MIME part.
- */
- public static byte[] encode(byte[] inbuf) {
- if (inbuf.length == 0)
- return inbuf;
- byte[] outbuf = new byte[((inbuf.length + 2) / 3) * 4];
- int inpos = 0, outpos = 0;
- int size = inbuf.length;
- while (size > 0) {
- byte a, b, c;
- if (size == 1) {
- a = inbuf[inpos++];
- b = 0;
- c = 0;
- outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
- outbuf[outpos++] =
- (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- outbuf[outpos++] = (byte)'='; // pad character
- outbuf[outpos++] = (byte)'='; // pad character
- } else if (size == 2) {
- a = inbuf[inpos++];
- b = inbuf[inpos++];
- c = 0;
- outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
- outbuf[outpos++] =
- (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- outbuf[outpos++] =
- (byte)pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
- outbuf[outpos++] = (byte)'='; // pad character
- } else {
- a = inbuf[inpos++];
- b = inbuf[inpos++];
- c = inbuf[inpos++];
- outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
- outbuf[outpos++] =
- (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
- outbuf[outpos++] =
- (byte)pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
- outbuf[outpos++] = (byte)pem_array[c & 0x3F];
- }
- size -= 3;
- }
- return outbuf;
- }
-
- /*** begin TEST program
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- BASE64EncoderStream encoder = new BASE64EncoderStream(System.out);
- int c;
-
- while ((c = infile.read()) != -1)
- encoder.write(c);
- encoder.close();
- }
- *** end TEST program **/
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)BEncoderStream.java 1.3 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.OutputStream;
-
-/**
- * This class implements a 'B' Encoder as defined by RFC2047 for
- * encoding MIME headers. It subclasses the BASE64EncoderStream
- * class.
- *
- * @author John Mani
- */
-
-public class BEncoderStream extends BASE64EncoderStream {
-
- /**
- * Create a 'B' encoder that encodes the specified input stream.
- * @param out the output stream
- */
- public BEncoderStream(OutputStream out) {
- super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should
- // suffice (!) to indicate that
- // CRLFs should not be inserted
- }
-
- /**
- * Returns the length of the encoded version of this byte array.
- */
- public static int encodedLength(byte[] b) {
- return ((b.length + 2)/3) * 4;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)LineInputStream.java 1.7 03/01/07
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class is to support reading CRLF terminated lines that
- * contain only US-ASCII characters from an input stream. Provides
- * functionality that is similar to the deprecated
- * DataInputStream.readLine()
. Expected use is to read
- * lines as String objects from a RFC822 stream.
- *
- * It is implemented as a FilterInputStream, so one can just wrap
- * this class around any input stream and read bytes from this filter.
- *
- * @author John Mani
- */
-
-public final class LineInputStream extends FilterInputStream {
-
- private char[] lineBuffer = null; // reusable byte buffer
-
- public LineInputStream(InputStream in) {
- super(in);
- }
-
- /**
- * Read a line containing only ASCII characters from the input
- * stream. A line is terminated by a CR or NL or CR-NL sequence.
- * A common error is a CR-CR-NL sequence, which will also terminate
- * a line.
- * The line terminator is not returned as part of the returned
- * String. Returns null if no data is available. DataInputStream.readLine()
- */
- public String readLine() throws IOException {
- InputStream in = this.in;
- char[] buf = lineBuffer;
-
- if (buf == null)
- buf = lineBuffer = new char[128];
-
- int c1;
- int room = buf.length;
- int offset = 0;
-
- while ((c1 = in.read()) != -1) {
- if (c1 == '\n') // Got NL, outa here.
- break;
- else if (c1 == '\r') {
- // Got CR, is the next char NL ?
- int c2 = in.read();
- if (c2 == '\r') // discard extraneous CR
- c2 = in.read();
- if (c2 != '\n') {
- // If not NL, push it back
- if (!(in instanceof PushbackInputStream))
- in = this.in = new PushbackInputStream(in);
- ((PushbackInputStream)in).unread(c2);
- }
- break; // outa here.
- }
-
- // Not CR, NL or CR-NL ...
- // .. Insert the byte into our byte buffer
- if (--room < 0) { // No room, need to grow.
- buf = new char[offset + 128];
- room = buf.length - offset - 1;
- System.arraycopy(lineBuffer, 0, buf, 0, offset);
- lineBuffer = buf;
- }
- buf[offset++] = (char)c1;
- }
-
- if ((c1 == -1) && (offset == 0))
- return null;
-
- return String.copyValueOf(buf, 0, offset);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)OutputUtil.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
-
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * This class is to support writing out Strings as a sequence of bytes
- * terminated by a CRLF sequence. The String must contain only US-ASCII
- * characters.0
- * to 255
. If no byte is available because the end of
- * the stream has been reached, the value -1
is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return the next byte of data, or -1
if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read() throws IOException {
- int c = in.read();
-
- if (c == '_') // Return '_' as ' '
- return ' ';
- else if (c == '=') {
- // QP Encoded atom. Get the next two bytes ..
- ba[0] = (byte)in.read();
- ba[1] = (byte)in.read();
- // .. and decode them
- try {
- return ASCIIUtility.parseInt(ba, 0, 2, 16);
- } catch (NumberFormatException nex) {
- throw new IOException("Error in QP stream " + nex.getMessage());
- }
- } else
- return c;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QEncoderStream.java 1.4 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * This class implements a Q Encoder as defined by RFC 2047 for
- * encoding MIME headers. It subclasses the QPEncoderStream class.
- *
- * @author John Mani
- */
-
-public class QEncoderStream extends QPEncoderStream {
-
- private String specials;
- private static String WORD_SPECIALS = "=_?\"#$%&'(),.:;<>@[\\]^`{|}~";
- private static String TEXT_SPECIALS = "=_?";
-
- /**
- * Create a Q encoder that encodes the specified input stream
- * @param out the output stream
- * @param encodingWord true if we are Q-encoding a word within a
- * phrase.
- */
- public QEncoderStream(OutputStream out, boolean encodingWord) {
- super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should
- // suffice (!) to indicate that
- // CRLFs should not be inserted
- // when encoding rfc822 headers
-
- // a RFC822 "word" token has more restrictions than a
- // RFC822 "text" token.
- specials = encodingWord ? WORD_SPECIALS : TEXT_SPECIALS;
- }
-
- /**
- * Encodes the specified byte
to this output stream.
- * @param c the byte
.
- * @exception IOException if an I/O error occurs.
- */
- public void write(int c) throws IOException {
- c = c & 0xff; // Turn off the MSB.
- if (c == ' ')
- output('_', false);
- else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
- // Encoding required.
- output(c, true);
- else // No encoding required
- output(c, false);
- }
-
- /**
- * Returns the length of the encoded version of this byte array.
- */
- public static int encodedLength(byte[] b, boolean encodingWord) {
- int len = 0;
- String specials = encodingWord ? WORD_SPECIALS: TEXT_SPECIALS;
- for (int i = 0; i < b.length; i++) {
- int c = b[i] & 0xff; // Mask off MSB
- if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
- // needs encoding
- len += 3; // Q-encoding is 1 -> 3 conversion
- else
- len++;
- }
- return len;
- }
-
- /**** begin TEST program ***
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- QEncoderStream encoder = new QEncoderStream(System.out);
- int c;
-
- while ((c = infile.read()) != -1)
- encoder.write(c);
- encoder.close();
- }
- *** end TEST program ***/
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QPDecoderStream.java 1.9 02/04/02
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a QP Decoder. It is implemented as
- * a FilterInputStream, so one can just wrap this class around
- * any input stream and read bytes from this filter. The decoding
- * is done as the bytes are read out.
- *
- * @author John Mani
- */
-
-public class QPDecoderStream extends FilterInputStream {
- protected byte[] ba = new byte[2];
- protected int spaces = 0;
-
- /**
- * Create a Quoted Printable decoder that decodes the specified
- * input stream.
- * @param in the input stream
- */
- public QPDecoderStream(InputStream in) {
- super(new PushbackInputStream(in, 2)); // pushback of size=2
- }
-
- /**
- * Read the next decoded byte from this input stream. The byte
- * is returned as an int
in the range 0
- * to 255
. If no byte is available because the end of
- * the stream has been reached, the value -1
is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return the next byte of data, or -1
if the end of the
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read() throws IOException {
- if (spaces > 0) {
- // We have cached space characters, return one
- spaces--;
- return ' ';
- }
-
- int c = in.read();
-
- if (c == ' ') {
- // Got space, keep reading till we get a non-space char
- while ((c = in.read()) == ' ')
- spaces++;
-
- if (c == '\r' || c == '\n' || c == -1)
- // If the non-space char is CR/LF/EOF, the spaces we got
- // so far is junk introduced during transport. Junk 'em.
- spaces = 0;
- else {
- // The non-space char is NOT CR/LF, the spaces are valid.
- ((PushbackInputStream)in).unread(c);
- c = ' ';
- }
- return c; // return either len
decoded bytes of data from this input stream
- * into an array of bytes. This method blocks until some input is
- * available.
- * -1
if there is no more data because the end of
- * the stream has been reached.
- * @exception IOException if an I/O error occurs.
- */
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) // At end of stream, so we should
- i = -1; // return -1 , NOT 0.
- break;
- }
- buf[off+i] = (byte)c;
- }
- return i;
- }
-
- /**
- * Tests if this input stream supports marks. Currently this class
- * does not support marks
- */
- public boolean markSupported() {
- return false;
- }
-
- /**
- * Returns the number of bytes that can be read from this input
- * stream without blocking. The QP algorithm does not permit
- * a priori knowledge of the number of bytes after decoding, so
- * this method just invokes the available
method
- * of the original input stream.
- */
- public int available() throws IOException {
- // This is bogus ! We don't really know how much
- // bytes are available *after* decoding
- return in.available();
- }
-
- /**** begin TEST program
- public static void main(String argv[]) throws Exception {
- FileInputStream infile = new FileInputStream(argv[0]);
- QPDecoderStream decoder = new QPDecoderStream(infile);
- int c;
-
- while ((c = decoder.read()) != -1)
- System.out.print((char)c);
- System.out.println();
- }
- *** end TEST program ****/
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @(#)QPEncoderStream.java 1.6 02/03/27
- */
-
-
-
-package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
-
-import java.io.*;
-
-/**
- * This class implements a Quoted Printable Encoder. It is implemented as
- * a FilterOutputStream, so one can just wrap this class around
- * any output stream and write bytes into this filter. The Encoding
- * is done as the bytes are written out.
- *
- * @author John Mani
- */
-
-public class QPEncoderStream extends FilterOutputStream {
- private int count = 0; // number of bytes that have been output
- private int bytesPerLine; // number of bytes per line
- private boolean gotSpace = false;
- private boolean gotCR = false;
-
- /**
- * Create a QP encoder that encodes the specified input stream
- * @param out the output stream
- * @param bytesPerLine the number of bytes per line. The encoder
- * inserts a CRLF sequence after this many number
- * of bytes.
- */
- public QPEncoderStream(OutputStream out, int bytesPerLine) {
- super(out);
- // Subtract 1 to account for the '=' in the soft-return
- // at the end of a line
- this.bytesPerLine = bytesPerLine - 1;
- }
-
- /**
- * Create a QP encoder that encodes the specified input stream.
- * Inserts the CRLF sequence after outputting 76 bytes.
- * @param out the output stream
- */
- public QPEncoderStream(OutputStream out) {
- this(out, 76);
- }
-
- /**
- * Encodes len
bytes from the specified
- * byte
array starting at offset off
to
- * this output stream.
- *
- * @param b the data.
- * @param off the start offset in the data.
- * @param len the number of bytes to write.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b, int off, int len) throws IOException {
- for (int i = 0; i < len; i++)
- write(b[off + i]);
- }
-
- /**
- * Encodes b.length
bytes to this output stream.
- * @param b the data to be written.
- * @exception IOException if an I/O error occurs.
- */
- public void write(byte[] b) throws IOException {
- write(b, 0, b.length);
- }
-
- /**
- * Encodes the specified byte
to this output stream.
- * @param c the byte
.
- * @exception IOException if an I/O error occurs.
- */
- public void write(int c) throws IOException {
- c = c & 0xff; // Turn off the MSB.
- if (gotSpace) { // previous character was int
in the range 0
- * to 255
. If no byte is available because the end of
- * the stream has been reached, the value -1
is returned.
- * This method blocks until input data is available, the end of the
- * stream is detected, or an exception is thrown.
- *
- * @return next byte of data, or -1
if the end of
- * stream is reached.
- * @exception IOException if an I/O error occurs.
- * @see java.io.FilterInputStream#in
- */
-
- public int read() throws IOException {
- if (index >= bufsize) {
- readPrefix();
- if (!decode())
- return -1;
- index = 0; // reset index into buffer
- }
- return buffer[index++] & 0xff; // return lower byte
- }
-
- public int read(byte[] buf, int off, int len) throws IOException {
- int i, c;
- for (i = 0; i < len; i++) {
- if ((c = read()) == -1) {
- if (i == 0) // At end of stream, so we should
- i = -1; // return -1, NOT 0.
- break;
- }
- buf[off+i] = (byte)c;
- }
- return i;
- }
-
- public boolean markSupported() {
- return false;
- }
-
- public int available() throws IOException {
- // This is only an estimate, since in.available()
- // might include CRLFs too ..
- return ((in.available() * 3)/4 + (bufsize-index));
- }
-
- /**
- * Get the "name" field from the prefix. This is meant to
- * be the pathname of the decoded file
- *
- * @return name of decoded file
- * @exception IOException if an I/O error occurs.
- */
- public String getName() throws IOException {
- readPrefix();
- return name;
- }
-
- /**
- * Get the "mode" field from the prefix. This is the permission
- * mode of the source file.
- *
- * @return permission mode of source file
- * @exception IOException if an I/O error occurs.
- */
- public int getMode() throws IOException {
- readPrefix();
- return mode;
- }
-
- /**
- * UUencoded streams start off with the line:
- * "begin DataContentHandler
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- DataFlavor flavors[] = new DataFlavor[1];
- flavors[0] = new ActivationDataFlavor(
- FastInfosetReflection.getFastInfosetSource_class(),
- "application/fastinfoset", "Fast Infoset");
- return flavors;
- }
-
- /**
- * return the Transfer Data of type DataFlavor from InputStream
- * @param df The DataFlavor.
- * @param ins The InputStream corresponding to the data.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor flavor, DataSource dataSource)
- throws IOException
- {
- if (flavor.getMimeType().startsWith("application/fastinfoset")) {
- try {
- if (flavor.getRepresentationClass().getName().equals(STR_SRC)) {
- return FastInfosetReflection.FastInfosetSource_new(
- dataSource.getInputStream());
- }
- }
- catch (Exception e) {
- throw new IOException(e.getMessage());
- }
- }
- return null;
- }
-
- public Object getContent(DataSource dataSource) throws IOException {
- try {
- return FastInfosetReflection.FastInfosetSource_new(
- dataSource.getInputStream());
- }
- catch (Exception e) {
- throw new IOException(e.getMessage());
- }
- }
-
- /**
- * construct an object from a byte stream
- * (similar semantically to previous method, we are deciding
- * which one to support)
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException
- {
- if (!mimeType.equals("application/fastinfoset")) {
- throw new IOException("Invalid content type \"" + mimeType
- + "\" for FastInfosetDCH");
- }
-
- try {
- InputStream is = FastInfosetReflection.FastInfosetSource_getInputStream(
- (Source) obj);
-
- int n; byte[] buffer = new byte[4096];
- while ((n = is.read(buffer)) != -1) {
- os.write(buffer, 0, n);
- }
- }
- catch (Exception ex) {
- throw new IOException(
- "Error copying FI source to output stream " + ex.getMessage());
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.*;
-import java.awt.*;
-
-import javax.activation.*;
-
-/**
- * DataContentHandler for image/gif.
- *
- * @author Ana Lindstrom-Tamer
- */
-public class GifDataContentHandler extends Component implements DataContentHandler {
- private static ActivationDataFlavor myDF =
- new ActivationDataFlavor(
- java.awt.Image.class,
- "image/gif",
- "GIF Image");
-
- protected ActivationDataFlavor getDF() {
- return myDF;
- }
-
- /**
- * Return the DataFlavors for this DataContentHandler
.
- *
- * @return The DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- return new DataFlavor[] { getDF()};
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- *
- * @param df The DataFlavor
- * @param ins The InputStream corresponding to the data
- * @return String object
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- // use myDF.equals to be sure to get ActivationDataFlavor.equals,
- // which properly ignores Content-Type parameters in comparison
- if (getDF().equals(df))
- return getContent(ds);
- else
- return null;
- }
-
- public Object getContent(DataSource ds) throws IOException {
- InputStream is = ds.getInputStream();
- int pos = 0;
- int count;
- byte buf[] = new byte[1024];
-
- while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
- pos += count;
- if (pos >= buf.length) {
- int size = buf.length;
- if (size < 256*1024)
- size += size;
- else
- size += 256*1024;
- byte tbuf[] = new byte[size];
- System.arraycopy(buf, 0, tbuf, 0, pos);
- buf = tbuf;
- }
- }
- Toolkit tk = Toolkit.getDefaultToolkit();
- return tk.createImage(buf, 0, pos);
- }
-
- /**
- * Write the object to the output stream, using the specified MIME type.
- */
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
- if (obj != null && !(obj instanceof Image))
- throw new IOException("\"" + getDF().getMimeType() +
- "\" DataContentHandler requires Image object, " +
- "was given object of type " + obj.getClass().toString());
-
- throw new IOException(getDF().getMimeType() + " encoding not supported");
- }
-
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.*;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.image.BufferedImage;
-import java.io.*;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.activation.*;
-import javax.imageio.ImageIO;
-import javax.imageio.ImageWriter;
-import javax.imageio.stream.ImageOutputStream;
-
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class ImageDataContentHandler extends Component
- implements DataContentHandler {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- private DataFlavor[] flavor;
-
- public ImageDataContentHandler() {
- String[] mimeTypes = ImageIO.getReaderMIMETypes();
- flavor = new DataFlavor[mimeTypes.length];
- for(int i=0; i < mimeTypes.length; i++) {
- flavor[i] = new ActivationDataFlavor(
- java.awt.Image.class, mimeTypes[i], "Image");
- }
- }
-
- /**
- * Returns an array of DataFlavor objects indicating the flavors the
- * data can be provided in. The array should be ordered according to
- * preference for providing the data (from most richly descriptive to
- * least descriptive).
- *
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() {
- return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length);
- }
-
- /**
- * Returns an object which represents the data to be transferred.
- * The class of the object returned is defined by the representation class
- * of the flavor.
- *
- * @param df The DataFlavor representing the requested type.
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- for (int i=0; i < flavor.length; i++) {
- if (flavor[i].equals(df)) {
- return getContent(ds);
- }
- }
- return null;
- }
-
- /**
- * Return an object representing the data in its most preferred form.
- * Generally this will be the form described by the first DataFlavor
- * returned by the getTransferDataFlavors
method.
- *
- * @param ds The DataSource representing the data to be converted.
- * @return The constructed Object.
- */
- public Object getContent(DataSource ds) throws IOException {
- return ImageIO.read(new BufferedInputStream(ds.getInputStream()));
- }
-
- /**
- * Convert the object to a byte stream of the specified MIME type
- * and write it to the output stream.
- *
- * @param obj The object to be converted.
- * @param mimeType The requested MIME type of the resulting byte stream.
- * @param os The output stream into which to write the converted
- * byte stream.
- */
-
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
-
- try {
- BufferedImage bufImage = null;
- if (obj instanceof BufferedImage) {
- bufImage = (BufferedImage)obj;
- } else if (obj instanceof Image) {
- bufImage = render((Image)obj);
- } else {
- log.log(Level.SEVERE,
- "SAAJ0520.soap.invalid.obj.type",
- new String[] { obj.getClass().toString() });
- throw new IOException(
- "ImageDataContentHandler requires Image object, "
- + "was given object of type "
- + obj.getClass().toString());
- }
- ImageWriter writer = null;
- Iterator i = ImageIO.getImageWritersByMIMEType(type);
- if (i.hasNext()) {
- writer = (ImageWriter)i.next();
- }
- if (writer != null) {
- ImageOutputStream stream = null;
- stream = ImageIO.createImageOutputStream(os);
- writer.setOutput(stream);
- writer.write(bufImage);
- writer.dispose();
- stream.close();
- } else {
- log.log(Level.SEVERE, "SAAJ0526.soap.unsupported.mime.type",
- new String[] { type });
- throw new IOException("Unsupported mime type:"+ type);
- }
- } catch (Exception e) {
- log.severe("SAAJ0525.soap.cannot.encode.img");
- throw new IOException("Unable to encode the image to a stream "
- + e.getMessage());
- }
- }
-
-
- private BufferedImage render(Image img) throws InterruptedException {
-
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(img, 0);
- tracker.waitForAll();
- BufferedImage bufImage = new BufferedImage(img.getWidth(null),
- img.getHeight(null), BufferedImage.TYPE_INT_RGB);
- Graphics g = bufImage.createGraphics();
- g.drawImage(img, 0, 0, null);
- g.dispose();
- return bufImage;
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.*;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.image.BufferedImage;
-import java.io.*;
-
-import javax.activation.*;
-
-//import com.sun.image.codec.jpeg.*;
-import javax.imageio.ImageIO;
-
-/**
- * JAF data handler for Jpeg content
- *
- * @author Ana Lindstrom-Tamer
- */
-
-public class JpegDataContentHandler
- extends Component
- implements DataContentHandler {
- public static final String STR_SRC = "java.awt.Image";
-
- /**
- * return the DataFlavors for this DataContentHandler
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- DataFlavor flavors[] = new DataFlavor[1];
-
- try {
- flavors[0] =
- new ActivationDataFlavor(
- Class.forName(STR_SRC),
- "image/jpeg",
- "JPEG");
- } catch (Exception e) {
- System.out.println(e);
- }
-
- return flavors;
- }
-
- /**
- * return the Transfer Data of type DataFlavor from InputStream
- * @param df The DataFlavor.
- * @param ins The InputStream corresponding to the data.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor df, DataSource ds) {
-
- // this is sort of hacky, but will work for the
- // sake of testing...
- if (df.getMimeType().startsWith("image/jpeg")) {
- if (df.getRepresentationClass().getName().equals(STR_SRC)) {
- InputStream inputStream = null;
- BufferedImage jpegLoadImage = null;
-
- try {
- inputStream = ds.getInputStream();
- jpegLoadImage = ImageIO.read(inputStream);
-
- } catch (Exception e) {
- System.out.println(e);
- }
-
- return jpegLoadImage;
- }
- }
- return null;
- }
-
- /**
- *
- */
- public Object getContent(DataSource ds) { // throws Exception;
- InputStream inputStream = null;
- BufferedImage jpegLoadImage = null;
-
- try {
- inputStream = ds.getInputStream();
- jpegLoadImage = ImageIO.read(inputStream);
-
- } catch (Exception e) {
- }
-
- return (Image) jpegLoadImage;
- }
-
- /**
- * construct an object from a byte stream
- * (similar semantically to previous method, we are deciding
- * which one to support)
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (!mimeType.equals("image/jpeg"))
- throw new IOException(
- "Invalid content type \""
- + mimeType
- + "\" for ImageContentHandler");
-
- if (obj == null) {
- throw new IOException("Null object for ImageContentHandler");
- }
-
- try {
- BufferedImage bufImage = null;
- if (obj instanceof BufferedImage) {
- bufImage = (BufferedImage) obj;
-
- } else {
- Image img = (Image) obj;
- MediaTracker tracker = new MediaTracker(this);
- tracker.addImage(img, 0);
- tracker.waitForAll();
- if (tracker.isErrorAny()) {
- throw new IOException("Error while loading image");
- }
- bufImage =
- new BufferedImage(
- img.getWidth(null),
- img.getHeight(null),
- BufferedImage.TYPE_INT_RGB);
-
- Graphics g = bufImage.createGraphics();
- g.drawImage(img, 0, 0, null);
- }
- ImageIO.write(bufImage, "jpeg", os);
-
- } catch (Exception ex) {
- throw new IOException(
- "Unable to run the JPEG Encoder on a stream "
- + ex.getMessage());
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-public interface LazyEnvelope extends Envelope {
- public XMLStreamReader getPayloadReader() throws SOAPException;
- public boolean isLazy();
- public void writeTo(XMLStreamWriter writer) throws XMLStreamException, SOAPException;
-
- /**
- * Retrieve payload qname without materializing its contents
- * @return
- * @throws SOAPException
- */
- public QName getPayloadQName() throws SOAPException;
-
- /**
- * Retrieve payload attribute value without materializing its contents
- * @param localName
- * @return
- * @throws SOAPException
- */
- public String getPayloadAttributeValue(String localName) throws SOAPException;
-
- /**
- * Retrieve payload attribute value without materializing its contents
- * @param qName
- * @return
- * @throws SOAPException
- */
- public String getPayloadAttributeValue(QName qName) throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Data handler error: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: No data handler associated with this attachment
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Null dataHandler argument to setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Unable to externalize attachment
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: Unable to copy MIME header
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: Unable to copy MIME headers into attachment
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: Unable to register handlers in JAF command map
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Unable to create envelope from given source
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Unable to create envelope from given source
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Unable to create envelope: incorrect factory used during tree construction
-SAAJ0513.soap.unknown.ns=SAAJ0513: Unable to create envelope from given source because the namespace was not recognized
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Unable to create envelope from given source because the root element is not named Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: Unable to reset the soap-part content source
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler requires Image object, but was given object of type {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type set to {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Invalid content-type {0} for ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Null object for ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: Unable to run the JPEG Encoder on a stream
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: Unable to encode image to a stream
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Unsupported mime type {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Unrecognized Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Unable to parse content type
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Absent Content-Type
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got {0}, but expected {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Unrecognized Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Unable to internalize message
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type needs to be Multipart/Related and with type=text/xml or application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: Unable to convert SOAP message into a Multipart object
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Unable to get header stream in saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Error during saving a multipart message
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Could not complete operation. Fragment not bound to SOAP part
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Processing Instructions are not allowed in SOAP documents
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: Entity References are not allowed in SOAP documents
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: Source does not have a valid Reader or InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Error setting the source for SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Internal error: stream not of the right type
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Error while trying to externalize
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: Unable to externalize header
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Bad Content-Type for SOAP Part {0}
-SAAJ0550.soap.null.headers=SAAJ0550: Cannot create message: Headers can't be null
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: Unsupported encoding {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML declaration parsing failed
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode on SOAPPart not supported
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument on SOAPPart not supported
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig on SOAPPart not supported
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode on SOAPPart not supported
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI on SOAPPart not supported
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI on SOAPPart not supported
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking on SOAPPart not supported
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding on SOAPPart not supported
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding on SOAPPart not supported
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone on SOAPPart not supported
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone on SOAPPart not supported
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion on SOAPPart not supported
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion on SOAPPart not supported
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking on SOAPPart not supported
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: Null {0} argument to {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: Protocol {0} does not support {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: Unknown Protocol {0} specified for creating {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: The parent element of a soap part is not defined
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Setting value of a soap part is not defined
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: No data handler/content associated with this attachment
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException while reading the raw attachment content
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException while trying to obtain the inputstream from datahandler for this attachment
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Exception while trying to retrieve content for this attachment
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Exception while trying to set the Raw content for this attachment
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Exception while trying to get the Raw content for this attachment
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Exception while trying to set the Decoded content for this attachment
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Exception while trying to get the Encoded content for this attachment
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Unable to locate attachment with cid {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: Exception {0} when trying to set Property {1} on SOAP Message
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type set to {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Daten-Handler-Fehler: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: Es ist kein Daten-Handler mit diesem Anhang verkn\u00FCpft
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Null-dataHandler-Argument f\u00FCr setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Anhang kann nicht externalisiert werden
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME-Header kann nicht kopiert werden
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME-Header k\u00F6nnen nicht in Anhang kopiert werden
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: Handler k\u00F6nnen in JAF-Befehlszuordnung nicht registriert werden
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Envelope kann nicht aus angegebener Quelle erstellt werden
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Envelope kann nicht erstellt werden: falsche Factory bei der Erstellung der Baumstruktur verwendet
-SAAJ0513.soap.unknown.ns=SAAJ0513: Envelope kann nicht aus der angegebenen Quelle erstellt werden, weil der Namespace nicht erkannt wurde
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Envelope kann nicht aus der angegebenen Quelle erstellt werden, weil das Root-Element nicht den Namen "Envelope" hat
-SAAJ0515.source.reset.exception=SAAJ0515: soap-part-Contentquelle kann nicht zur\u00FCckgesetzt werden
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler erfordert Imageobjekt, Objekt vom Typ {0} wurde jedoch angegeben
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type auf {0} festgelegt
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Ung\u00FCltiger Content-Type {0} f\u00FCr ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Null-Objekt f\u00FCr ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: JPEG-Encoder kann nicht in einem Stream ausgef\u00FChrt werden
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: Image kann nicht in einem Stream codiert werden
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Nicht unterst\u00FCtzter MIME-Typ {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Nicht erkannter Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Content-Type kann nicht geparst werden
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type fehlt
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Nachricht kann nicht erstellt werden: Falscher Content-Type f\u00FCr SOAP-Version. {0} erhalten, jedoch {1} erwartet
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Nicht erkannter Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Nachricht kann nicht \"internalisiert\" werden.
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type muss Multipart/Related mit type=text/xml oder application/soap+xml sein
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Ung\u00FCltiger Content-Type. K\u00F6nnte eine Fehlermeldung anstelle einer SOAP-Nachricht sein
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP-Nachricht kann nicht in ein Multipart-Objekt konvertiert werden
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Header Stream in saveChanges kann nicht abgerufen werden
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Fehler beim Speichern einer Multipart-Nachricht
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Vorgang konnte nicht abgeschlossen werden. Fragment nicht an SOAP Part gebunden
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Verarbeitungsanweisungen sind in SOAP-Dokumenten nicht zul\u00E4ssig
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: Entity-Referenzen sind in SOAP-Dokumenten nicht zul\u00E4ssig
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: Quelle hat keinen g\u00FCltigen Reader oder InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Fehler beim Festlegen der Quelle f\u00FCr SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Interner Fehler: Stream hat nicht den richtigen Typ
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Fehler bei Externalisierungsversuch
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0504: Header kann nicht externalisiert werden
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Ung\u00FCltiger Content-Type f\u00FCr SOAPPart {0}
-SAAJ0550.soap.null.headers=SAAJ0550: Nachricht kann nicht erstellt werden: Header d\u00FCrfen nicht null sein
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: Nicht unterst\u00FCtzte Codierung {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: Parsing von XML-Deklaration nicht erfolgreich
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode in SOAPPart nicht unterst\u00FCtzt
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument in SOAPPart nicht unterst\u00FCtzt
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig in SOAPPart nicht unterst\u00FCtzt
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode in SOAPPart nicht unterst\u00FCtzt
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI in SOAPPart nicht unterst\u00FCtzt
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI in SOAPPart nicht unterst\u00FCtzt
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking in SOAPPart nicht unterst\u00FCtzt
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding in SOAPPart nicht unterst\u00FCtzt
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding in SOAPPart nicht unterst\u00FCtzt
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone in SOAPPart nicht unterst\u00FCtzt
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone in SOAPPart nicht unterst\u00FCtzt
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion in SOAPPart nicht unterst\u00FCtzt
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion in SOAPPart nicht unterst\u00FCtzt
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking in SOAPPart nicht unterst\u00FCtzt
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: Null-{0}-Argument f\u00FCr {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: Protokoll {0} unterst\u00FCtzt {1} nicht
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: Unbekanntes Protokoll {0} f\u00FCr Erstellung von {1} angegeben
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: Das \u00FCbergeordnete Element eines SOAPPart-Teils ist nicht definiert
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Die Festlegung des Wertes eines SOAPPart-Teils ist nicht definiert
-SAAJ0572.soap.no.content.for.attachment=SAAJ0502: Es ist kein Daten-Handler/Content mit diesem Anhang verkn\u00FCpft
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException beim Lesen des Raw-Anhangscontents
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException beim Versuch, den Input Stream aus Daten-Handler f\u00FCr diesen Anhang abzurufen
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Ausnahme beim Versuch, den Content f\u00FCr diesen Anhang abzurufen
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Ausnahme beim Versuch, den Raw-Content f\u00FCr diesen Anhang festzulegen
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Ausnahme beim Versuch, den Raw-Content f\u00FCr diesen Anhang abzurufen
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Ausnahme beim Versuch, den decodierten Content f\u00FCr diesen Anhang festzulegen
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Ausnahme beim Versuch, den decodierten Content f\u00FCr diesen Anhang abzurufen
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Anhang mit CID {0} kann nicht gefunden werden
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: Ausnahme {0} beim Versuch, Eigenschaft {1} in SOAP-Nachricht festzulegen
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type auf {0} festgelegt
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Error de manejador de datos: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: no hay ning\u00FAn manejador de datos asociado a este anexo
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: argumento dataHandler nulo para setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: no se ha podido externalizar el anexo
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: no se ha podido copiar la cabecera MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: no se han podido copiar las cabeceras MIME en el anexo
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: no se han podido registrar los manejadores en la asignaci\u00F3n de comandos JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: no se ha podido crear el elemento Envelope desde el origen especificado
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: no se ha podido crear el elemento Envelope desde el origen especificado
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: No se ha podido crear el elemento Envelope: se ha utilizado una f\u00E1brica incorrecta durante la construcci\u00F3n del \u00E1rbol
-SAAJ0513.soap.unknown.ns=SAAJ0513: no se ha podido crear el elemento Envelope desde el origen especificado, porque no se ha reconocido el espacio de nombres
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: no se ha podido crear el elemento Envelope desde el origen especificado, porque el elemento ra\u00EDz no se denomina Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: no se ha podido restablecer el origen del contenido de la parte soap
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler necesita un objeto de imagen, pero se ha proporcionado un objeto de tipo {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type est\u00E1 definido en {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Content-Type {0} no v\u00E1lido para ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: objeto nulo para ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: no se ha podido ejecutar el codificador JPEG en un flujo
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: no se ha podido codificar la imagen en un flujo
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: tipo MIME no soportado {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type no reconocido
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: no se ha podido analizar el tipo de contenido
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type ausente
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: No se puede crear el mensaje: content-type incorrecto para la versi\u00F3n de SOAP. Se ha obtenido {0}, pero se esperaba {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type no reconocido
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: no se ha podido internalizar el mensaje
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type tiene que ser Multipart/Related y con type=text/xml o application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type no v\u00E1lido. Podr\u00EDa ser un mensaje de error en lugar de un mensaje SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: no se ha podido convertir un mensaje SOAP en un objeto de varias partes
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: no se ha podido obtener el flujo de cabeceras en saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: error al guardar un mensaje de varias partes
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: no se ha podido completar la operaci\u00F3n. El fragmento no est\u00E1 enlazado a la parte SOAP
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: no se permiten instrucciones de procesamiento en los documentos SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: no se permiten referencias a entidades en los documentos SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: el origen no tiene un Reader o InputStream v\u00E1lido
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: error al definir el origen para SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Error interno: el flujo no es del tipo correcto
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Error al intentar externalizar
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: no se ha podido externalizar la cabecera
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Content-Type err\u00F3neo para la parte SOAP {0}
-SAAJ0550.soap.null.headers=SAAJ0550: no se puede crear el mensaje. Las cabeceras no pueden ser nulas
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: codificaci\u00F3n no soportada {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: fallo en el an\u00E1lisis de la declaraci\u00F3n XML
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode en SOAPPart no est\u00E1 soportado
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument en SOAPPart no est\u00E1 soportado
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig en SOAPPart no est\u00E1 soportado
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode en SOAPPart no est\u00E1 soportado
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI en SOAPPart no est\u00E1 soportado
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI en SOAPPart no est\u00E1 soportado
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking en SOAPPart no est\u00E1 soportado
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding en SOAPPart no est\u00E1 soportado
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding en SOAPPart no est\u00E1 soportado
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone en SOAPPart no est\u00E1 soportado
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone en SOAPPart no est\u00E1 soportado
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion en SOAPPart no est\u00E1 soportado
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion en SOAPPart no est\u00E1 soportado
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking en SOAPPart no est\u00E1 soportado
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: argumento {0} nulo para {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: el protocolo {0} no soporta {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: se ha especificado un protocolo {0} desconocido para crear {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: no se ha definido el elemento principal de una parte soap
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: no se ha definido el valor de definici\u00F3n de una parte soap
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: no hay ning\u00FAn manejador/contenido asociado a este anexo
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: excepci\u00F3n de E/S al leer el contenido del anexo raw
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: excepci\u00F3n de E/S al intentar obtener el flujo de entrada desde el manejador de datos de este anexo
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: excepci\u00F3n al intentar recuperar el contenido de este anexo
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: excepci\u00F3n al intentar definir el contenido raw de este anexo
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: excepci\u00F3n al intentar obtener el contenido raw de este anexo
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: excepci\u00F3n al intentar definir el contenido descodificado de este anexo
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: excepci\u00F3n al intentar obtener el contenido codificado de este anexo
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: no se ha encontrado el anexo con el CID {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: excepci\u00F3n {0} al intentar definir la propiedad {1} en el mensaje SOAP
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type definido en {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501 : erreur de gestionnaire de donn\u00E9es : {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502 : aucun gestionnaire de donn\u00E9es associ\u00E9 \u00E0 cette pi\u00E8ce jointe
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503 : argument dataHandler NULL pour setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504 : impossible d'externaliser la pi\u00E8ce jointe
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505 : impossible de copier l'en-t\u00EAte MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506 : impossible de copier les en-t\u00EAtes MIME dans la pi\u00E8ce jointe
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050 : impossible d'inscrire les gestionnaires dans la mappe de commande JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512 : impossible de cr\u00E9er une enveloppe : fabrique incorrecte utilis\u00E9e lors de la construction de l'arborescence
-SAAJ0513.soap.unknown.ns=SAAJ0513 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e car l'espace de noms n'a pas \u00E9t\u00E9 reconnu
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e car l'\u00E9l\u00E9ment racine n'est pas nomm\u00E9 Envelope
-SAAJ0515.source.reset.exception=SAAJ0515 : impossible de red\u00E9finir la source de contenu soap-part
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520 : DataContentHandler exige un objet de type Image, mais a re\u00E7u un objet de type {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521 : Content-Type d\u00E9fini sur {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522 : content-type {0} non valide pour ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523 : objet NULL pour ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524 : impossible d'ex\u00E9cuter l'encodeur JPEG sur un flux
-SAAJ0525.soap.cannot.encode.img=SAAJ0525 : impossible d'encoder l'image en un flux
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526 : type MIME {0} non pris en charge
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530 : Content-Type non reconnu
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531 : impossible d'analyser le type de contenu
-SAAJ0532.soap.no.Content-Type=SAAJ0532 : Content-Type absent
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533 : impossible de cr\u00E9er un message : content-type incorrect pour la version SOAP. {0} obtenu, mais {1} attendu
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534 : Content-Type non reconnu
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535 : impossible d'internaliser le message
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536 : Content-Type doit \u00EAtre Multipart/Related et avec le type = text/xml ou application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537 : Content-Type non valide. Cela peut \u00EAtre un message d'erreur au lieu d'un message SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538 : impossible de convertir un message SOAP en objet Multipart
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539 : impossible d'obtenir un flux de donn\u00E9es d'en-t\u00EAte dans saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540 : erreur lors de l'enregistrement d'un message Multipart
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541 : impossible de terminer l'op\u00E9ration. Fragment non li\u00E9 \u00E0 la partie SOAP
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542 : les instructions de traitement ne sont pas autoris\u00E9es dans les documents SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543 : les r\u00E9f\u00E9rences d'entit\u00E9 ne sont pas autoris\u00E9es dans les documents SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544 : la source n'a pas de processus de lecture ou d'InputStream valide
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545 : erreur lors de la d\u00E9finition de la source pour SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546 : erreur interne : le type du flux n'est pas correct
-SAAJ0547.soap.cannot.externalize=SAAJ0547 : erreur lors de la tentative d'externalisation
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548 : impossible d'externaliser l'en-t\u00EAte
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549 : Content-Type incorrect pour la partie SOAP {0}
-SAAJ0550.soap.null.headers=SAAJ0550 : impossible de cr\u00E9er le message : les en-t\u00EAtes ne peuvent pas \u00EAtre NULL
-SAAJ0551.soap.unsupported.encoding=SAAJ0551 : encodage {0} non pris en charge
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552 : \u00E9chec de l'analyse de la d\u00E9claration XML
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553 : renameNode sur SOAPPart non pris en charge
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554 : normalizeDocument sur SOAPPart non pris en charge
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555 : getDomConfig sur SOAPPart non pris en charge
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556 : adoptNode sur SOAPPart non pris en charge
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557 : setDocumentURI sur SOAPPart non pris en charge
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558 : getDocumentURI sur SOAPPart non pris en charge
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559 : setStrictErrorChecking sur SOAPPart non pris en charge
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560 : getInputEncoding sur SOAPPart non pris en charge
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561 : getXmlEncoding sur SOAPPart non pris en charge
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562 : getXmlStandalone sur SOAPPart non pris en charge
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563 : setXmlStandalone sur SOAPPart non pris en charge
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564 : getXmlVersion sur SOAPPart non pris en charge
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565 : setXmlVersion sur SOAPPart non pris en charge
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566 : getStrictErrorChecking sur SOAPPart non pris en charge
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567 : argument {0} NULL pour {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568 : le protocole {0} ne prend pas en charge {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569 : protocole {0} inconnu indiqu\u00E9 pour la cr\u00E9ation de {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570 : l'\u00E9l\u00E9ment parent d'une partie SOAP n'est pas d\u00E9fini
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571 : la valeur de param\u00E8tre d'une partie SOAP n'est pas d\u00E9finie
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572 : aucun contenu/gestionnaire de donn\u00E9es associ\u00E9 \u00E0 cette pi\u00E8ce jointe
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573 : exception d'E/S lors de la lecture du contenu de la pi\u00E8ce jointe raw
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574 : exception d'E/S lors de la tentative d'obtention du flux d'entr\u00E9e \u00E0 partir du gestionnaire de donn\u00E9es pour cette pi\u00E8ce jointe
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575 : exception lors de la tentative d'extraction du contenu pour cette pi\u00E8ce jointe
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576 : exception lors de la tentative de d\u00E9finition du contenu Raw pour cette pi\u00E8ce jointe
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577 : exception lors de la tentative d'obtention du contenu Raw pour cette pi\u00E8ce jointe
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578 : exception lors de la tentative de d\u00E9finition du contenu Decoded pour cette pi\u00E8ce jointe
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579 : exception lors de la tentative d'obtention du contenu Encoded pour cette pi\u00E8ce jointe
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590 : impossible de localiser la pi\u00E8ce jointe avec le CID {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591 : exception {0} lors de la tentative de d\u00E9finition de la propri\u00E9t\u00E9 {1} sur le message SOAP
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580 : Content-Type d\u00E9fini sur {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: Errore dell''handler dei dati: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: Nessun handler dei dati associato a questo allegato
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Argomento dataHandler nullo per setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Impossibile esternalizzare l'allegato
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: Impossibile copiare l'intestazione MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: Impossibile copiare le intestazioni MIME nell'allegato
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: Impossibile registrare gli handler nella mappa dei comandi JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Impossibile creare l'envelope dall'origine specificata
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Impossibile creare l'envelope dall'origine specificata
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Impossibile creare l'envelope: factory errato usato durante la costruzione della struttura
-SAAJ0513.soap.unknown.ns=SAAJ0513: Impossibile creare l'envelope dall'origine specificata poich\u00E9 lo spazio di nomi non \u00E8 stato riconosciuto
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Impossibile creare l'envelope dall'origine specificata poich\u00E9 l'elemento radice non \u00E8 denominato Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: Impossibile reimpostare l'origine del contenuto soap-part
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler richiede un oggetto di immagine, ma l''oggetto specificato \u00E8 di tipo {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type impostato per {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Content-Type non valido {0} per ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Oggetto nullo per ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: Impossibile eseguire il codificatore JPEG su un flusso
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: Impossibile codificare l'immagine in un flusso
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Tipo MIME {0} non supportato
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type non riconosciuto
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Impossibile analizzare il tipo di contenuto
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type assente
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Impossibile creare il messaggio: Content-Type errato per la versione SOAP. Ricevuto {0}, ma previsto {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type non riconosciuto
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Impossibile rendere interno il messaggio
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type deve essere Multipart/Related e con type=text/xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type non valido. Potrebbe essere un messaggio di errore anzich\u00E9 un messaggio SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: Impossibile convertire il messaggio SOAP in un oggetto Multipart
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Impossibile recuperare il flusso di intestazioni in saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Errore durante il salvataggio di un messaggio multiparte
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Impossibile completare l'operazione. Frammento non associato alla SOAP Part
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Le istruzioni di elaborazione non sono consentite nei documenti SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: I riferimenti alle entit\u00E0 non sono consentiti nei documenti SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: L'origine non ha un lettore o un flusso di input valido
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Errore di impostazione dell''origine per SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Errore interno: flusso di tipo errato
-SAAJ0547.soap.cannot.externalize=SAAJ0547: Errore durante il tentativo di esternalizzazione
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: Impossibile esternalizzare l'intestazione
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Content-Type non valido per SOAP Part {0}
-SAAJ0550.soap.null.headers=SAAJ0550: Impossibile creare il messaggio: le intestazioni non possono essere nulle
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: Codifica {0} non supportata
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: Analisi della dichiarazione XML non riuscita
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode su SOAPPart non supportato
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument su SOAPPart non supportato
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig su SOAPPart non supportato
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode su SOAPPart non supportato
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI su SOAPPart non supportato
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI su SOAPPart non supportato
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking su SOAPPart non supportato
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding su SOAPPart non supportato
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding su SOAPPart non supportato
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone su SOAPPart non supportato
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone su SOAPPart non supportato
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion su SOAPPart non supportato
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion su SOAPPart non supportato
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking su SOAPPart non supportato
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: Argomento {0} nullo a {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: Il protocollo {0} non supporta {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: Protocollo sconosciuto {0} specificato per la creazione di {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: L'elemento padre di una SOAP Part non \u00E8 definito
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Il valore di impostazione di una SOAP Part non \u00E8 definito
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: Nessun handler dei dati/contenuto associato a questo allegato
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException durante la lettura del contenuto dell'allegato di tipo RAW
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException durante il tentativo di ottenere il flusso di input dall'handler dei dati per questo allegato
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Eccezione durante il tentativo di recuperare il contenuto per questo allegato
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Eccezione durante il tentativo di impostare il contenuto di tipo RAW per questo allegato
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Eccezione durante il tentativo di recuperare il contenuto di tipo RAW per questo allegato
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Eccezione durante il tentativo di impostare il contenuto decodificato per questo allegato
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Eccezione durante il tentativo di recuperare il contenuto codificato per questo allegato
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Impossibile trovare l''allegato con cid {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: Eccezione {0} durante il tentativo di impostare Property {1} su SOAP Message
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type impostato per {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9\u30FB\u30A8\u30E9\u30FC: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u3053\u306E\u6DFB\u4ED8\u306B\u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler\u306B\u5BFE\u3059\u308BdataHandler\u5F15\u6570\u304Cnull\u3067\u3059
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u6DFB\u4ED8\u3092\u5916\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME\u30D8\u30C3\u30C0\u30FC\u3092\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME\u30D8\u30C3\u30C0\u30FC\u3092\u6DFB\u4ED8\u306B\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: JAF\u30B3\u30DE\u30F3\u30C9\u30FB\u30DE\u30C3\u30D7\u306B\u30CF\u30F3\u30C9\u30E9\u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: \u30C4\u30EA\u30FC\u306E\u69CB\u7BC9\u4E2D\u306B\u7121\u52B9\u306A\u30D5\u30A1\u30AF\u30C8\u30EA\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F
-SAAJ0513.soap.unknown.ns=SAAJ0513: \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u8A8D\u8B58\u3055\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u30EB\u30FC\u30C8\u8981\u7D20\u306E\u540D\u524D\u304CEnvelope\u3067\u306F\u306A\u3044\u305F\u3081\u3001\u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0515.source.reset.exception=SAAJ0515: soap-part\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BD\u30FC\u30B9\u3092\u30EA\u30BB\u30C3\u30C8\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler\u306B\u306FImage\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001\u30BF\u30A4\u30D7{0}\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler\u306Econtent-type {0}\u304C\u7121\u52B9\u3067\u3059
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304Cnull\u3067\u3059
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u30B9\u30C8\u30EA\u30FC\u30E0\u3067JPEG\u30A8\u30F3\u30B3\u30FC\u30C0\u3092\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u30A4\u30E1\u30FC\u30B8\u3092\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u30A8\u30F3\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: MIME\u30BF\u30A4\u30D7{0}\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type\u304C\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BF\u30A4\u30D7\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type\u304C\u3042\u308A\u307E\u305B\u3093
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: SOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306Econtent-type\u304C\u7121\u52B9\u3067\u3059\u3002{0}\u304C\u53D6\u5F97\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type\u304C\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5185\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type\u306FMultipart/Related\u3067\u3042\u308A\u3001type=text/xml\u307E\u305F\u306Fapplication/soap+xml\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type\u304C\u7121\u52B9\u3067\u3059\u3002SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u304B\u308F\u308A\u306B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306A\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092Multipart\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: saveChanges\u3067\u30D8\u30C3\u30C0\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: multipart\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u4FDD\u5B58\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u64CD\u4F5C\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u304CSOAP\u30D1\u30FC\u30C8\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u51E6\u7406\u547D\u4EE4\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOAP\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u30BD\u30FC\u30B9\u306B\u6709\u52B9\u306AReader\u307E\u305F\u306FInputStream\u304C\u3042\u308A\u307E\u305B\u3093
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: SOAPPart\u306E\u30BD\u30FC\u30B9\u3092\u8A2D\u5B9A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5185\u90E8\u30A8\u30E9\u30FC: \u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u30BF\u30A4\u30D7\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5916\u90E8\u5316\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u30D8\u30C3\u30C0\u30FC\u3092\u5916\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP\u30D1\u30FC\u30C8{0}\u306EContent-Type\u304C\u7121\u52B9\u3067\u3059
-SAAJ0550.soap.null.headers=SAAJ0550: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: \u30D8\u30C3\u30C0\u30FC\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML\u5BA3\u8A00\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: SOAPPart\u306ErenameNode\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: SOAPPart\u306EnormalizeDocument\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: SOAPPart\u306EgetDomConfig\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: SOAPPart\u306EadoptNode\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: SOAPPart\u306EsetDocumentURI\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: SOAPPart\u306EgetDocumentURI\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: SOAPPart\u306EsetStrictErrorChecking\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: SOAPPart\u306EgetInputEncoding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: SOAPPart\u306EgetXmlEncoding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: SOAPPart\u306EgetXmlStandalone\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: SOAPPart\u306EsetXmlStandalone\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: SOAPPart\u306EgetXmlVersion\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: SOAPPart\u306EsetXmlVersion\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: SOAPPart\u306EgetStrictErrorChecking\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1}\u306B\u5BFE\u3059\u308B{0}\u5F15\u6570\u304Cnull\u3067\u3059
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u30D7\u30ED\u30C8\u30B3\u30EB{0}\u306F{1}\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u305B\u3093
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: {1}\u306E\u4F5C\u6210\u306B\u5BFE\u3057\u3066\u4E0D\u660E\u306A\u30D7\u30ED\u30C8\u30B3\u30EB{0}\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: SOAP\u30D1\u30FC\u30C8\u306E\u89AA\u8981\u7D20\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: SOAP\u30D1\u30FC\u30C8\u306E\u8A2D\u5B9A\u5024\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u3053\u306E\u6DFB\u4ED8\u306B\u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9/\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: raw\u6DFB\u4ED8\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u8AAD\u53D6\u308A\u4E2D\u306BIOException\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u3053\u306E\u6DFB\u4ED8\u306Edatahandler\u304B\u3089inputstream\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306BIOException\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u3053\u306E\u6DFB\u4ED8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u3053\u306E\u6DFB\u4ED8\u306ERaw\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u3053\u306E\u6DFB\u4ED8\u306ERaw\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u3053\u306E\u6DFB\u4ED8\u306E\u30C7\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u3053\u306E\u6DFB\u4ED8\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: cid {0}\u306E\u6DFB\u4ED8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u30D7\u30ED\u30D1\u30C6\u30A3{1}\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306B\u4F8B\u5916{0}\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \uB370\uC774\uD130 \uCC98\uB9AC\uAE30 \uC624\uB958: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uACFC \uC5F0\uAD00\uB41C \uB370\uC774\uD130 \uCC98\uB9AC\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler\uC5D0 \uB300\uD55C dataHandler \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC678\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME \uD5E4\uB354\uB97C \uBCF5\uC0AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME \uD5E4\uB354\uB97C \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uBCF5\uC0AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: JAF \uBA85\uB839 \uB9F5\uC5D0\uC11C \uCC98\uB9AC\uAE30\uB97C \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: \uD2B8\uB9AC \uC0DD\uC131 \uC911 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uD329\uD1A0\uB9AC\uAC00 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0513.soap.unknown.ns=SAAJ0513: \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC5B4 \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \uB8E8\uD2B8 \uC694\uC18C\uAC00 Envelope\uB85C \uBA85\uBA85\uB418\uC9C0 \uC54A\uC544 \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0515.source.reset.exception=SAAJ0515: soap-part \uCF58\uD150\uCE20 \uC18C\uC2A4\uB97C \uC7AC\uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler\uC5D0\uB294 \uC774\uBBF8\uC9C0 \uAC1D\uCCB4\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC {0} \uC720\uD615\uC758 \uAC1D\uCCB4\uAC00 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler\uC5D0 \uB300\uD55C content-type {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler\uC5D0 \uB300\uD55C \uAC1D\uCCB4\uAC00 \uB110\uC785\uB2C8\uB2E4.
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \uC2A4\uD2B8\uB9BC\uC5D0\uC11C JPEG \uC778\uCF54\uB354\uB97C \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \uC2A4\uD2B8\uB9BC\uC5D0 \uC774\uBBF8\uC9C0\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 mime \uC720\uD615\uC785\uB2C8\uB2E4.
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \uCF58\uD150\uCE20 \uC720\uD615\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: SOAP \uBC84\uC804\uC5D0 \uB300\uD55C content-type\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. {0}\uC744(\uB97C) \uAC00\uC838\uC654\uC9C0\uB9CC {1}\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \uBA54\uC2DC\uC9C0\uB97C \uB0B4\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type\uC740 Multipart/Related\uC5EC\uC57C \uD558\uBA70 \uC720\uD615\uC774 text/xml \uB610\uB294 application/soap+xml\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. SOAP \uBA54\uC2DC\uC9C0\uAC00 \uC544\uB2CC \uC624\uB958 \uBA54\uC2DC\uC9C0\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP \uBA54\uC2DC\uC9C0\uB97C Multipart \uAC1D\uCCB4\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: saveChanges\uC5D0\uC11C \uD5E4\uB354 \uC2A4\uD2B8\uB9BC\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Multipart \uBA54\uC2DC\uC9C0\uB97C \uC800\uC7A5\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \uC791\uC5C5\uC744 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uD3B8\uC774 SOAP \uBD80\uBD84\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: \uC9C0\uCE68 \uCC98\uB9AC\uB294 SOAP \uBB38\uC11C\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uB294 SOAP \uBB38\uC11C\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \uC18C\uC2A4\uC5D0 \uC801\uD569\uD55C \uC77D\uAE30 \uC7A5\uCE58 \uB610\uB294 InputStream\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: SOAPPart\uC5D0 \uB300\uD55C \uC18C\uC2A4\uB97C \uC124\uC815\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \uB0B4\uBD80 \uC624\uB958: \uC2A4\uD2B8\uB9BC\uC758 \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \uC678\uBD80\uD654\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \uD5E4\uB354\uB97C \uC678\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \uBD80\uBD84 {0}\uC5D0 \uB300\uD55C Content-Type\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0550.soap.null.headers=SAAJ0550: \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: \uD5E4\uB354\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529\uC785\uB2C8\uB2E4.
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML \uC120\uC5B8\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: SOAPPart\uC758 renameNode\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: SOAPPart\uC758 normalizeDocument\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: SOAPPart\uC758 getDomConfig\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: SOAPPart\uC758 adoptNode\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: SOAPPart\uC758 setDocumentURI\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: SOAPPart\uC758 getDocumentURI\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: SOAPPart\uC758 setStrictErrorChecking\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: SOAPPart\uC758 getInputEncoding\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: SOAPPart\uC758 getXmlEncoding\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: SOAPPart\uC758 getXmlStandalone\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: SOAPPart\uC758 setXmlStandalone\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: SOAPPart\uC758 getXmlVersion\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: SOAPPart\uC758 setXmlVersion\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: SOAPPart\uC758 getStrictErrorChecking\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1}\uC5D0 \uB300\uD55C {0} \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: {0} \uD504\uB85C\uD1A0\uCF5C\uC740 {1}\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: {1} \uC0DD\uC131\uC744 \uC704\uD574 \uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uD1A0\uCF5C {0}\uC774(\uAC00) \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: SOAP \uBD80\uBD84\uC758 \uC0C1\uC704 \uC694\uC18C\uAC00 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: SOAP \uBD80\uBD84\uC758 \uC124\uC815 \uAC12\uC774 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uACFC \uC5F0\uAD00\uB41C \uB370\uC774\uD130 \uCC98\uB9AC\uAE30/\uCF58\uD150\uCE20\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \uC6D0\uC2DC \uCCA8\uBD80 \uD30C\uC77C \uCF58\uD150\uCE20\uB97C \uC77D\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD574 \uB370\uC774\uD130 \uCC98\uB9AC\uAE30\uC5D0\uC11C \uC785\uB825 \uC2A4\uD2B8\uB9BC\uC744 \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20\uB97C \uAC80\uC0C9\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC6D0\uC2DC \uCF58\uD150\uCE20\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC6D0\uC2DC \uCF58\uD150\uCE20\uB97C \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uB514\uCF54\uB529\uB41C \uCF58\uD150\uCE20\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC778\uCF54\uB529\uB41C \uCF58\uD150\uCE20\uB97C \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: CID\uAC00 {0}\uC778 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: SOAP \uBA54\uC2DC\uC9C0\uC5D0\uC11C {1} \uC18D\uC131\uC744 \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 {0} \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: erro do handler de dados: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: n\u00E3o h\u00E1 handler de dados associado a este anexo
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: argumento dataHandler nulo para setDataHandler
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: n\u00E3o \u00E9 poss\u00EDvel externalizar o anexo
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: n\u00E3o \u00E9 poss\u00EDvel copiar o cabe\u00E7alho MIME
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: n\u00E3o \u00E9 poss\u00EDvel copiar cabe\u00E7alhos MIME no anexo
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: n\u00E3o \u00E9 poss\u00EDvel registrar os handlers no mapa de comando JAF
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: n\u00E3o \u00E9 poss\u00EDvel criar o envelope: factory incorreta usada durante a constru\u00E7\u00E3o da \u00E1rvore
-SAAJ0513.soap.unknown.ns=SAAJ0513: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida porque o namespace n\u00E3o era reconhecido
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida porque o elemento-raiz n\u00E3o \u00E9 um Envelope nomeado
-SAAJ0515.source.reset.exception=SAAJ0515: n\u00E3o \u00E9 poss\u00EDvel redefinir a origem de conte\u00FAdo da parte de soap
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler requer objeto da Imagem, mas foi fornecido o objeto do tipo {0}
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Tipo de Conte\u00FAdo definido como {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: tipo de conte\u00FAdo {0} inv\u00E1lido para ImageContentHandler
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: objeto nulo para ImageContentHandler
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: n\u00E3o \u00E9 poss\u00EDvel executar o Codificador JPEG em um fluxo
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: n\u00E3o \u00E9 poss\u00EDvel codificar a imagem em um fluxo
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: tipo de mime {0} n\u00E3o suportado
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: tipo de Conte\u00FAdo N\u00E3o Reconhecido
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: n\u00E3o \u00E9 poss\u00EDvel fazer parse do tipo de conte\u00FAdo
-SAAJ0532.soap.no.Content-Type=SAAJ0532: tipo de Conte\u00FAdo Inexistente
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: n\u00E3o \u00E9 poss\u00EDvel criar a mensagem: tipo de conte\u00FAdo incorreto para a vers\u00E3o SOAP. Obteve {0}, mas esperava {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: tipo de Conte\u00FAdo N\u00E3o Reconhecido
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: n\u00E3o \u00E9 poss\u00EDvel internalizar a mensagem
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: o Tipo de Conte\u00FAdo precisa ser de V\u00E1rias Partes/Relacionado com tipo=texto/xml ou aplica\u00E7\u00E3o/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: tipo de Conte\u00FAdo Inv\u00E1lido. Pode ser uma mensagem de erro, em vez de uma mensagem SOAP
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: n\u00E3o \u00E9 poss\u00EDvel converter a mensagem SOAP em um objeto de V\u00E1rias partes
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: n\u00E3o \u00E9 poss\u00EDvel obter fluxo do cabe\u00E7alho em saveChanges
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: erro ao salvar uma mensagem de v\u00E1rias partes
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: n\u00E3o foi poss\u00EDvel concluir a opera\u00E7\u00E3o. Fragmento n\u00E3o vinculado \u00E0 parte de SOAP
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: as instru\u00E7\u00F5es de processamento n\u00E3o s\u00E3o permitidas nos documentos de SOAP
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: refer\u00EAncias da entidade n\u00E3o s\u00E3o permitidas nos documentos SOAP
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: a origem n\u00E3o tem um Reader ou InputStream v\u00E1lido
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: erro ao definir a origem de SOAPPart
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Erro interno: o fluxo n\u00E3o \u00E9 do tipo correto
-SAAJ0547.soap.cannot.externalize=SAAJ0547: erro ao tentar externalizar
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: n\u00E3o \u00E9 poss\u00EDvel externalizar o cabe\u00E7alho
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: tipo de Conte\u00FAdo Inv\u00E1lido para a Parte {0} de SOAP
-SAAJ0550.soap.null.headers=SAAJ0550: n\u00E3o \u00E9 poss\u00EDvel criar a mensagem: os cabe\u00E7alhos n\u00E3o podem ser nulos
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: codifica\u00E7\u00E3o n\u00E3o suportada {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: falha ao fazer parse da declara\u00E7\u00E3o XML
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode em SOAPPart n\u00E3o suportado
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument em SOAPPart n\u00E3o suportado
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig em SOAPPart n\u00E3o suportado
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode em SOAPPart n\u00E3o suportado
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI em SOAPPart n\u00E3o suportado
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI em SOAPPart n\u00E3o suportado
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking em SOAPPart n\u00E3o suportado
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding em SOAPPart n\u00E3o suportado
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding em SOAPPart n\u00E3o suportado
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone em SOAPPart n\u00E3o suportado
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone em SOAPPart n\u00E3o suportado
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion em SOAPPart n\u00E3o suportado
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion em SOAPPart n\u00E3o suportado
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking em SOAPPart n\u00E3o suportado
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: argumento {0} nulo para {1}
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: o protocolo {0} n\u00E3o suporta {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: protocolo {0} Desconhecido especificado para criar {1}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: o elemento pai da parte de soap n\u00E3o foi definido
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: o valor de defini\u00E7\u00E3o de uma parte de soap n\u00E3o foi definido
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: n\u00E3o h\u00E1 handler/conte\u00FAdo de dados associado a este anexo
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException ao ler o conte\u00FAdo do anexo bruto
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException ao tentar obter o inputstream de datahandler deste anexo
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: exce\u00E7\u00E3o ao tentar recuperar o conte\u00FAdo deste anexo
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Bruto deste anexo
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Bruto deste anexo
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Decodificado deste anexo
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: exce\u00E7\u00E3o ao tentar obter o conte\u00FAdo Codificado deste anexo
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: n\u00E3o \u00E9 poss\u00EDvel localizar o anexo como o cid {0}
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: exce\u00E7\u00E3o {0} ao tentar definir a Propriedade {1} na Mensagem SOAP
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Tipo de Conte\u00FAdo definido como {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \u6570\u636E\u5904\u7406\u7A0B\u5E8F\u9519\u8BEF: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u6CA1\u6709\u4E0E\u6B64\u9644\u4EF6\u5173\u8054\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler \u7684 dataHandler \u53C2\u6570\u4E3A\u7A7A\u503C
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u65E0\u6CD5\u4F7F\u9644\u4EF6\u5916\u90E8\u5316
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: \u65E0\u6CD5\u590D\u5236 MIME \u6807\u5934
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: \u65E0\u6CD5\u5C06 MIME \u6807\u5934\u590D\u5236\u5230\u9644\u4EF6\u4E2D
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: \u65E0\u6CD5\u6CE8\u518C JAF \u547D\u4EE4\u6620\u5C04\u4E2D\u7684\u5904\u7406\u7A0B\u5E8F
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u65E0\u6CD5\u521B\u5EFA\u4FE1\u5C01: \u5728\u6811\u6784\u9020\u671F\u95F4\u4F7F\u7528\u7684\u5DE5\u5382\u4E0D\u6B63\u786E
-SAAJ0513.soap.unknown.ns=SAAJ0513: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01, \u56E0\u4E3A\u65E0\u6CD5\u8BC6\u522B\u540D\u79F0\u7A7A\u95F4
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01, \u56E0\u4E3A\u6839\u5143\u7D20\u4E0D\u662F\u547D\u540D\u7684\u4FE1\u5C01
-SAAJ0515.source.reset.exception=SAAJ0515: \u65E0\u6CD5\u91CD\u7F6E soap-part \u5185\u5BB9\u6E90
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler \u9700\u8981 Image \u5BF9\u8C61, \u4F46\u5374\u5F97\u5230\u7C7B\u578B\u4E3A{0}\u7684\u5BF9\u8C61
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type \u8BBE\u7F6E\u4E3A{0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler \u7684 content-type {0}\u65E0\u6548
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler \u7684\u5BF9\u8C61\u4E3A\u7A7A\u503C
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u65E0\u6CD5\u5728\u6D41\u4E0A\u8FD0\u884C JPEG \u7F16\u7801\u5668
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u65E0\u6CD5\u5C06\u56FE\u50CF\u7F16\u7801\u4E3A\u6D41
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: \u4E0D\u652F\u6301\u7684 mime \u7C7B\u578B{0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u65E0\u6CD5\u89E3\u6790\u5185\u5BB9\u7C7B\u578B
-SAAJ0532.soap.no.Content-Type=SAAJ0532: \u7F3A\u5C11 Content-Type
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F: SOAP \u7248\u672C\u7684 content-type \u4E0D\u6B63\u786E\u3002\u5F97\u5230\u7684\u662F{0}, \u4F46\u5E94\u4E3A{1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u65E0\u6CD5\u4F7F\u6D88\u606F\u5185\u90E8\u5316
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type \u5FC5\u987B\u662F\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u5E76\u4E14\u5E26\u6709 type=text/xml \u6216 application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type \u65E0\u6548\u3002\u53EF\u4EE5\u662F\u9519\u8BEF\u6D88\u606F, \u4F46\u4E0D\u80FD\u662F SOAP \u6D88\u606F
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: \u65E0\u6CD5\u5C06 SOAP \u6D88\u606F\u8F6C\u6362\u4E3A\u591A\u90E8\u5206\u5BF9\u8C61
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: \u65E0\u6CD5\u5728 saveChanges \u4E2D\u83B7\u53D6\u6807\u5934\u6D41
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: \u4FDD\u5B58\u591A\u90E8\u5206\u6D88\u606F\u671F\u95F4\u51FA\u9519
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u65E0\u6CD5\u5B8C\u6210\u64CD\u4F5C\u3002\u7247\u6BB5\u672A\u7ED1\u5B9A\u5230 SOAP \u90E8\u5206
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP \u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5904\u7406\u6307\u4EE4
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOAP \u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5B9E\u4F53\u5F15\u7528
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u6E90\u6CA1\u6709\u6709\u6548\u7684\u8BFB\u8FDB\u7A0B\u6216 InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: \u4E3A SOAPPart \u8BBE\u7F6E\u6E90\u65F6\u51FA\u9519
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5185\u90E8\u9519\u8BEF: \u6D41\u7684\u7C7B\u578B\u4E0D\u6B63\u786E
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5C1D\u8BD5\u5916\u90E8\u5316\u65F6\u51FA\u9519
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u65E0\u6CD5\u4F7F\u6807\u5934\u5916\u90E8\u5316
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \u90E8\u5206{0}\u7684 Content-Type \u9519\u8BEF
-SAAJ0550.soap.null.headers=SAAJ0550: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F: \u6807\u5934\u4E0D\u80FD\u4E3A\u7A7A\u503C
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u4E0D\u652F\u6301\u7684\u7F16\u7801{0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: \u672A\u80FD\u89E3\u6790 XML \u58F0\u660E
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 renameNode
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 normalizeDocument
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getDomConfig
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 adoptNode
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setDocumentURI
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getDocumentURI
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setStrictErrorChecking
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getInputEncoding
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlEncoding
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlStandalone
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setXmlStandalone
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlVersion
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setXmlVersion
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getStrictErrorChecking
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1}\u7684{0}\u53C2\u6570\u4E3A\u7A7A\u503C
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u534F\u8BAE{0}\u4E0D\u652F\u6301{1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: \u6307\u5B9A\u7528\u4E8E\u521B\u5EFA{1}\u7684\u534F\u8BAE{0}\u672A\u77E5
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: \u672A\u5B9A\u4E49 soap \u90E8\u5206\u7684\u7236\u5143\u7D20
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: \u672A\u5B9A\u4E49 soap \u90E8\u5206\u7684\u8BBE\u7F6E\u503C
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u6CA1\u6709\u4E0E\u6B64\u9644\u4EF6\u5173\u8054\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F/\u5185\u5BB9
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \u8BFB\u53D6\u539F\u59CB\u9644\u4EF6\u5185\u5BB9\u65F6\u51FA\u73B0 IOException
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u5C1D\u8BD5\u4ECE\u6B64\u9644\u4EF6\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F\u83B7\u53D6\u8F93\u5165\u6D41\u65F6\u51FA\u73B0 IOException
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u5C1D\u8BD5\u68C0\u7D22\u6B64\u9644\u4EF6\u7684\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u5C1D\u8BD5\u8BBE\u7F6E\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u5C1D\u8BD5\u83B7\u53D6\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u5C1D\u8BD5\u8BBE\u7F6E\u6B64\u9644\u4EF6\u7684\u89E3\u7801\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u5C1D\u8BD5\u83B7\u53D6\u6B64\u9644\u4EF6\u7684\u7F16\u7801\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: \u65E0\u6CD5\u627E\u5230\u5177\u6709 cid {0} \u7684\u9644\u4EF6
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: \u5C1D\u8BD5\u8BBE\u7F6E SOAP \u6D88\u606F\u7684\u5C5E\u6027{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF{0}
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type \u8BBE\u7F6E\u4E3A{0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for soap pkg
-# Error messages
-SAAJ0501.soap.data.handler.err=SAAJ0501: \u8CC7\u6599\u8655\u7406\u7A0B\u5F0F\u932F\u8AA4: {0}
-SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u6C92\u6709\u8207\u6B64\u9644\u4EF6\u76F8\u95DC\u806F\u7684\u8CC7\u6599\u8655\u7406\u7A0B\u5F0F
-SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler \u7684 dataHandler \u5F15\u6578\u70BA\u7A7A\u503C
-SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u7121\u6CD5\u5C07\u9644\u4EF6\u5916\u90E8\u5316
-SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: \u7121\u6CD5\u8907\u88FD MIME \u6A19\u982D
-SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: \u7121\u6CD5\u5C07 MIME \u6A19\u982D\u8907\u88FD\u5230\u9644\u4EF6\u4E2D
-# Usage not found. TODO Remove
-#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
-SAAJ0508.soap.cannot.register.handlers=SAAJ050: \u7121\u6CD5\u5728 JAF \u547D\u4EE4\u5C0D\u61C9\u4E2D\u8A3B\u518A\u8655\u7406\u7A0B\u5F0F
-
-SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F
-SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F
-SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u7121\u6CD5\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F: \u5EFA\u69CB\u6A39\u72C0\u7D50\u69CB\u6642\u4F7F\u7528\u4E86\u4E0D\u6B63\u78BA\u7684\u8655\u7406\u7AD9
-SAAJ0513.soap.unknown.ns=SAAJ0513: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F, \u56E0\u70BA\u7121\u6CD5\u8FA8\u8B58\u8A72\u547D\u540D\u7A7A\u9593
-SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F, \u56E0\u70BA\u6839\u5143\u7D20\u4E0D\u662F\u6307\u5B9A\u7684 Envelope
-SAAJ0515.source.reset.exception=SAAJ0515: \u7121\u6CD5\u91CD\u8A2D soap-part \u5167\u5BB9\u4F86\u6E90
-
-SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler \u9700\u8981 Image \u7269\u4EF6, \u4F46\u662F\u63D0\u4F9B\u7684\u662F {0} \u985E\u578B\u7684\u7269\u4EF6
-SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type \u8A2D\u70BA {0}
-SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler \u7684 content-type {0} \u7121\u6548
-SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler \u7684\u7269\u4EF6\u70BA\u7A7A\u503C
-SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u7121\u6CD5\u5728\u4E32\u6D41\u4E0A\u57F7\u884C JPEG \u7DE8\u78BC\u5668
-SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u7121\u6CD5\u5C07\u5F71\u50CF\u7DE8\u78BC\u70BA\u4E32\u6D41
-SAAJ0526.soap.unsupported.mime.type=SAAJ0526: \u4E0D\u652F\u63F4\u7684 MIME \u985E\u578B {0}
-
-SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
-SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u7121\u6CD5\u5256\u6790\u5167\u5BB9\u985E\u578B
-SAAJ0532.soap.no.Content-Type=SAAJ0532: \u7F3A\u5C11 Content-Type
-SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F: SOAP \u7248\u672C\u7684 content-type \u4E0D\u6B63\u78BA. \u5F97\u5230 {0}, \u4F46\u61C9\u8A72\u662F {1}
-SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
-SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u7121\u6CD5\u5C07\u8A0A\u606F\u5167\u90E8\u5316
-SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type \u5FC5\u9808\u662F Multipart/Related, \u4E14\u542B type=text/xml \u6216 application/soap+xml
-SAAJ0537.soap.invalid.content-type=SAAJ0537: \u7121\u6548\u7684 Content-Type. \u53EF\u80FD\u662F\u53D6\u4EE3 SOAP \u8A0A\u606F\u7684\u932F\u8AA4\u8A0A\u606F
-SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: \u7121\u6CD5\u5C07 SOAP \u8A0A\u606F\u8F49\u63DB\u70BA Multipart \u7269\u4EF6
-SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: \u7121\u6CD5\u81EA saveChanges \u53D6\u5F97\u6A19\u982D\u4E32\u6D41
-SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: \u5132\u5B58\u591A\u91CD\u90E8\u5206\u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4
-SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u7121\u6CD5\u5B8C\u6210\u4F5C\u696D. \u7247\u6BB5\u672A\u9023\u7D50\u81F3 SOAP \u90E8\u5206
-SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP \u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u300C\u8655\u7406\u6307\u793A\u300D
-SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOPA \u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u300C\u500B\u9AD4\u53C3\u7167\u300D
-SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u4F86\u6E90\u6C92\u6709\u6709\u6548\u7684 Reader \u6216 InputStream
-SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: \u8A2D\u5B9A SOAPPart \u7684\u4F86\u6E90\u6642\u767C\u751F\u932F\u8AA4
-SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5167\u90E8\u932F\u8AA4: \u4E32\u6D41\u4E0D\u662F\u6B63\u78BA\u7684\u985E\u578B
-SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5617\u8A66\u5916\u90E8\u5316\u6642\u767C\u751F\u932F\u8AA4
-SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u7121\u6CD5\u5C07\u6A19\u982D\u5916\u90E8\u5316
-SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \u90E8\u5206 {0} \u7684 Content-Type \u932F\u8AA4
-SAAJ0550.soap.null.headers=SAAJ0550: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F: \u6A19\u982D\u4E0D\u5F97\u662F\u7A7A\u503C
-SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u4E0D\u652F\u63F4\u7684\u7DE8\u78BC {0}
-SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML \u5BA3\u544A\u5256\u6790\u5931\u6557
-SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 renameNode
-SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 normalizeDocument
-SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getDomConfig
-SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 adoptNode
-SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setDocumentURI
-SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getDocumentURI
-SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setStrictErrorChecking
-SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getInputEncoding
-SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlEncoding
-SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlStandalone
-SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setXmlStandalone
-SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlVersion
-SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setXmlVersion
-SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getStrictErrorChecking
-# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
-SAAJ0567.soap.null.input=SAAJ0567: {1} \u7684 {0} \u5F15\u6578\u662F\u7A7A\u503C
-SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u5354\u5B9A {0} \u4E0D\u652F\u63F4 {1}
-# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
-SAAJ0569.soap.unknown.protocol=SAAJ0569: \u5EFA\u7ACB {1} \u6642\u6307\u5B9A\u4E86\u4E0D\u660E\u7684\u5354\u5B9A {0}
-SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: \u672A\u5B9A\u7FA9 SOAP \u90E8\u5206\u7684\u7236\u9805\u5143\u7D20
-SAAJ0571.soappart.setValue.not.defined=SAAJ0571: \u672A\u5B9A\u7FA9 SOAP \u90E8\u5206\u7684\u8A2D\u5B9A\u503C
-SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u6C92\u6709\u8207\u6B64\u9644\u4EF6\u76F8\u95DC\u806F\u7684\u8CC7\u6599\u8655\u7406\u7A0B\u5F0F/\u5167\u5BB9
-SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \u8B80\u53D6\u539F\u59CB\u9644\u4EF6\u5167\u5BB9\u6642\u767C\u751F IOException
-SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u5617\u8A66\u5F9E\u6B64\u9644\u4EF6\u7684 datahandler \u53D6\u5F97 inputstream \u6642\u767C\u751F IOException
-SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u5617\u8A66\u64F7\u53D6\u6B64\u9644\u4EF6\u7684\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u5617\u8A66\u8A2D\u5B9A\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u5617\u8A66\u53D6\u5F97\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u5617\u8A66\u8A2D\u5B9A\u6B64\u9644\u4EF6\u7684\u89E3\u78BC\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u5617\u8A66\u53D6\u5F97\u6B64\u9644\u4EF6\u7684\u89E3\u78BC\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
-SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: \u627E\u4E0D\u5230 cid \u70BA {0} \u7684\u9644\u4EF6
-SAAJ0591.soap.exception.in.set.property=SAAJ0591: \u5617\u8A66\u5728 SOAP \u8A0A\u606F\u4E0A\u8A2D\u5B9A\u7279\u6027 {1} \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1 {0}
-
-# Info messages
-SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type \u8A2D\u70BA {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-import java.util.logging.Logger;
-
-import javax.xml.soap.*;
-import javax.xml.stream.XMLStreamReader;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ParseException;
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl;
-import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-import com.sun.xml.internal.messaging.saaj.util.TeeInputStream;
-
-/**
- * A factory for creating SOAP messages.
- *
- * Converted to a placeholder for common functionality between SOAP
- * implementations.
- *
- * @author Phil Goodwin (phil.goodwin@sun.com)
- */
-public class MessageFactoryImpl extends MessageFactory {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected OutputStream listener;
-
- protected boolean lazyAttachments = false;
-
- public OutputStream listen(OutputStream newListener) {
- OutputStream oldListener = listener;
- listener = newListener;
- return oldListener;
- }
-
- public SOAPMessage createMessage() throws SOAPException {
- throw new UnsupportedOperationException();
- }
-
- public SOAPMessage createMessage(String protocol) throws SOAPException {
- if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol))
- return new com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl();
- else
- return new com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl();
- }
-
- public SOAPMessage createMessage(boolean isFastInfoset,
- boolean acceptFastInfoset) throws SOAPException
- {
- throw new UnsupportedOperationException();
- }
-
- public SOAPMessage createMessage(MimeHeaders headers, XMLStreamReader reader) throws SOAPException, IOException {
- String contentTypeString = MessageImpl.getContentType(headers);
-
- if (listener != null) {
- throw new SOAPException("Listener OutputStream is not supported with XMLStreamReader");
- }
-
- try {
- ContentType contentType = new ContentType(contentTypeString);
- int stat = MessageImpl.identifyContentType(contentType);
-
- if (MessageImpl.isSoap1_1Content(stat)) {
- return new Message1_1Impl(headers,contentType,stat,reader);
- } else if (MessageImpl.isSoap1_2Content(stat)) {
- return new Message1_2Impl(headers,contentType,stat,reader);
- } else {
- log.severe("SAAJ0530.soap.unknown.Content-Type");
- throw new SOAPExceptionImpl("Unrecognized Content-Type");
- }
- } catch (ParseException e) {
- log.severe("SAAJ0531.soap.cannot.parse.Content-Type");
- throw new SOAPExceptionImpl(
- "Unable to parse content type: " + e.getMessage());
- }
- }
- public SOAPMessage createMessage(MimeHeaders headers, InputStream in)
- throws SOAPException, IOException {
- String contentTypeString = MessageImpl.getContentType(headers);
-
- if (listener != null) {
- in = new TeeInputStream(in, listener);
- }
-
- try {
- ContentType contentType = new ContentType(contentTypeString);
- int stat = MessageImpl.identifyContentType(contentType);
-
- if (MessageImpl.isSoap1_1Content(stat)) {
- return new Message1_1Impl(headers,contentType,stat,in);
- } else if (MessageImpl.isSoap1_2Content(stat)) {
- return new Message1_2Impl(headers,contentType,stat,in);
- } else {
- log.severe("SAAJ0530.soap.unknown.Content-Type");
- throw new SOAPExceptionImpl("Unrecognized Content-Type");
- }
- } catch (ParseException e) {
- log.severe("SAAJ0531.soap.cannot.parse.Content-Type");
- throw new SOAPExceptionImpl(
- "Unable to parse content type: " + e.getMessage());
- }
- }
-
- protected static final String getContentType(MimeHeaders headers) {
- String[] values = headers.getHeader("Content-Type");
- if (values == null)
- return null;
- else
- return values[0];
- }
-
- public void setLazyAttachmentOptimization(boolean flag) {
- lazyAttachments = flag;
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1486 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.io.*;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.xml.soap.*;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import javax.xml.transform.stax.StAXSource;
-import javax.xml.transform.stream.StreamSource;
-
-import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.util.*;
-import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
-
-/**
- * The message implementation for SOAP messages with
- * attachments. Messages for specific profiles will likely extend this
- * MessageImpl class and add more value for that particular profile.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- * @author Rajiv Mordani (rajiv.mordani@sun.com)
- * @author Manveen Kaur (manveen.kaur@sun.com)
- */
-
-public abstract class MessageImpl
- extends SOAPMessage
- implements SOAPConstants {
-
-
- public static final String CONTENT_ID = "Content-ID";
- public static final String CONTENT_LOCATION = "Content-Location";
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
-
- protected static final int PLAIN_XML_FLAG = 1; // 00001
- protected static final int MIME_MULTIPART_FLAG = 2; // 00010
- protected static final int SOAP1_1_FLAG = 4; // 00100
- protected static final int SOAP1_2_FLAG = 8; // 01000
- //protected static final int MIME_MULTIPART_XOP_FLAG = 14; // 01110
- protected static final int MIME_MULTIPART_XOP_SOAP1_1_FLAG = 6; // 00110
- protected static final int MIME_MULTIPART_XOP_SOAP1_2_FLAG = 10; // 01010
- protected static final int XOP_FLAG = 13; // 01101
- protected static final int FI_ENCODED_FLAG = 16; // 10000
-
- protected MimeHeaders headers;
- protected ContentType contentType;
- protected SOAPPartImpl soapPartImpl;
- protected FinalArrayList attachments;
- protected boolean saved = false;
- protected byte[] messageBytes;
- protected int messageByteCount;
- protected HashMap properties = new HashMap();
-
- // used for lazy attachment initialization
- protected MimeMultipart multiPart = null;
- protected boolean attachmentsInitialized = false;
-
- /**
- * True if this part is encoded using Fast Infoset.
- * MIME -> application/fastinfoset
- */
- protected boolean isFastInfoset = false;
-
- /**
- * True if the Accept header of this message includes
- * application/fastinfoset
- */
- protected boolean acceptFastInfoset = false;
-
- protected MimeMultipart mmp = null;
-
- // if attachments are present, don't read the entire message in byte stream in saveTo()
- private boolean optimizeAttachmentProcessing = true;
-
- private InputStream inputStreamAfterSaveChanges = null;
-
- public static final String LAZY_SOAP_BODY_PARSING = "saaj.lazy.soap.body";
-
- // switch back to old MimeMultipart incase of problem
- private static boolean switchOffBM = false;
- private static boolean switchOffLazyAttachment = false;
- private static boolean useMimePull = false;
-
- static {
- String s = SAAJUtil.getSystemProperty("saaj.mime.optimization");
- if ((s != null) && s.equals("false")) {
- switchOffBM = true;
- }
- s = SAAJUtil.getSystemProperty("saaj.lazy.mime.optimization");
- if ((s != null) && s.equals("false")) {
- switchOffLazyAttachment = true;
- }
- useMimePull = SAAJUtil.getSystemBoolean("saaj.use.mimepull");
-
- }
-
- //property to indicate optimized serialization for lazy attachments
- private boolean lazyAttachments = false;
-
- // most of the times, Content-Types are already all lower cased.
- // String.toLowerCase() works faster in this case, so even if you
- // are only doing one comparison, it pays off to use String.toLowerCase()
- // than String.equalsIgnoreCase(). When you do more than one comparison,
- // the benefits of String.toLowerCase() dominates.
- //
- //
- // for FI,
- // use application/fastinfoset for SOAP 1.1
- // use application/soap+fastinfoset for SOAP 1.2
- // to speed up comparisons, test methods always use lower cases.
-
- /**
- * @param primary
- * must be all lower case
- * @param sub
- * must be all lower case
- */
- private static boolean isSoap1_1Type(String primary, String sub) {
- return primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml")
- || primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml-soap")
- || primary.equals("application")
- && sub.equals("fastinfoset");
- }
-
- /**
- * @param type
- * must be all lower case
- */
- private static boolean isEqualToSoap1_1Type(String type) {
- return type.startsWith("text/xml") ||
- type.startsWith("application/fastinfoset");
- }
-
- /**
- * @param primary
- * must be all lower case
- * @param sub
- * must be all lower case
- */
- private static boolean isSoap1_2Type(String primary, String sub) {
- return primary.equals("application")
- && (sub.equals("soap+xml")
- || sub.equals("soap+fastinfoset"));
- }
-
- /**
- * @param type
- * must be all lower case
- */
- private static boolean isEqualToSoap1_2Type(String type) {
- return type.startsWith("application/soap+xml") ||
- type.startsWith("application/soap+fastinfoset");
- }
-
- /**
- * Construct a new message. This will be invoked before message
- * sends.
- */
- protected MessageImpl() {
- this(false, false);
- attachmentsInitialized = true;
- }
-
- /**
- * Construct a new message. This will be invoked before message
- * sends.
- */
- protected MessageImpl(boolean isFastInfoset, boolean acceptFastInfoset) {
- this.isFastInfoset = isFastInfoset;
- this.acceptFastInfoset = acceptFastInfoset;
-
- headers = new MimeHeaders();
- headers.setHeader("Accept", getExpectedAcceptHeader());
- contentType = new ContentType();
- }
-
- /**
- * Shallow copy.
- */
- protected MessageImpl(SOAPMessage msg) {
- if (!(msg instanceof MessageImpl)) {
- // don't know how to handle this.
- }
- MessageImpl src = (MessageImpl) msg;
- this.headers = src.headers;
- this.soapPartImpl = src.soapPartImpl;
- this.attachments = src.attachments;
- this.saved = src.saved;
- this.messageBytes = src.messageBytes;
- this.messageByteCount = src.messageByteCount;
- this.properties = src.properties;
- this.contentType = src.contentType;
- }
-
- /**
- * @param stat
- * the mask value obtained from {@link #identifyContentType(ContentType)}
- */
- protected static boolean isSoap1_1Content(int stat) {
- return (stat & SOAP1_1_FLAG) != 0;
- }
-
- /**
- * @param stat
- * the mask value obtained from {@link #identifyContentType(ContentType)}
- */
- protected static boolean isSoap1_2Content(int stat) {
- return (stat & SOAP1_2_FLAG) != 0;
- }
-
- private static boolean isMimeMultipartXOPSoap1_2Package(ContentType contentType) {
- String type = contentType.getParameter("type");
- if (type == null) {
- return false;
- }
- type = type.toLowerCase();
- if (!type.startsWith("application/xop+xml")) {
- return false;
- }
- String startinfo = contentType.getParameter("start-info");
- if (startinfo == null) {
- return false;
- }
- startinfo = startinfo.toLowerCase();
- return isEqualToSoap1_2Type(startinfo);
- }
-
-
- //private static boolean isMimeMultipartXOPPackage(ContentType contentType) {
- private static boolean isMimeMultipartXOPSoap1_1Package(ContentType contentType) {
- String type = contentType.getParameter("type");
- if(type==null)
- return false;
-
- type = type.toLowerCase();
- if(!type.startsWith("application/xop+xml"))
- return false;
-
- String startinfo = contentType.getParameter("start-info");
- if(startinfo == null)
- return false;
- startinfo = startinfo.toLowerCase();
- return isEqualToSoap1_1Type(startinfo);
- }
-
- private static boolean isSOAPBodyXOPPackage(ContentType contentType){
- String primary = contentType.getPrimaryType();
- String sub = contentType.getSubType();
-
- if (primary.equalsIgnoreCase("application")) {
- if (sub.equalsIgnoreCase("xop+xml")) {
- String type = getTypeParameter(contentType);
- return isEqualToSoap1_2Type(type) || isEqualToSoap1_1Type(type);
- }
- }
- return false;
- }
-
- /**
- * Construct a message from an input stream. When messages are
- * received, there's two parts -- the transport headers and the
- * message content in a transport specific stream.
- */
- protected MessageImpl(MimeHeaders headers, final InputStream in)
- throws SOAPExceptionImpl {
- contentType = parseContentType(headers);
- init(headers,identifyContentType(contentType),contentType,in);
- }
-
- private static ContentType parseContentType(MimeHeaders headers) throws SOAPExceptionImpl {
- final String ct;
- if (headers != null)
- ct = getContentType(headers);
- else {
- log.severe("SAAJ0550.soap.null.headers");
- throw new SOAPExceptionImpl("Cannot create message: " +
- "Headers can't be null");
- }
-
- if (ct == null) {
- log.severe("SAAJ0532.soap.no.Content-Type");
- throw new SOAPExceptionImpl("Absent Content-Type");
- }
- try {
- return new ContentType(ct);
- } catch (Throwable ex) {
- log.severe("SAAJ0535.soap.cannot.internalize.message");
- throw new SOAPExceptionImpl("Unable to internalize message", ex);
- }
- }
-
- /**
- * Construct a message from an input stream. When messages are
- * received, there's two parts -- the transport headers and the
- * message content in a transport specific stream.
- *
- * @param contentType
- * The parsed content type header from the headers variable.
- * This is redundant parameter, but it avoids reparsing this header again.
- * @param stat
- * The result of {@link #identifyContentType(ContentType)} over
- * the contentType parameter. This redundant parameter, but it avoids
- * recomputing this information again.
- */
- protected MessageImpl(MimeHeaders headers, final ContentType contentType, int stat, final InputStream in) throws SOAPExceptionImpl {
- init(headers, stat, contentType, in);
-
- }
-
- public MessageImpl(MimeHeaders headers, ContentType ct, int stat,
- XMLStreamReader reader) throws SOAPExceptionImpl {
- init(headers, stat, ct, reader);
- }
-
- private void init(MimeHeaders headers, int stat, final ContentType contentType, final Object input) throws SOAPExceptionImpl {
- this.headers = headers;
-
- try {
-
- // Set isFastInfoset/acceptFastInfoset flag based on MIME type
- if ((stat & FI_ENCODED_FLAG) > 0) {
- isFastInfoset = acceptFastInfoset = true;
- }
-
- // If necessary, inspect Accept header to set acceptFastInfoset
- if (!isFastInfoset) {
- String[] values = headers.getHeader("Accept");
- if (values != null) {
- for (int i = 0; i < values.length; i++) {
- StringTokenizer st = new StringTokenizer(values[i], ",");
- while (st.hasMoreTokens()) {
- final String token = st.nextToken().trim();
- if (token.equalsIgnoreCase("application/fastinfoset") ||
- token.equalsIgnoreCase("application/soap+fastinfoset")) {
- acceptFastInfoset = true;
- break;
- }
- }
- }
- }
- }
-
- if (!isCorrectSoapVersion(stat)) {
- log.log(
- Level.SEVERE,
- "SAAJ0533.soap.incorrect.Content-Type",
- new String[] {
- contentType.toString(),
- getExpectedContentType()});
- throw new SOAPVersionMismatchException(
- "Cannot create message: incorrect content-type for SOAP version. Got: "
- + contentType
- + " Expected: "
- + getExpectedContentType());
- }
- InputStream in = null;
- XMLStreamReader rdr = null;
- if (input instanceof InputStream) {
- in = (InputStream) input;
- } else {
- //is a StAX reader
- rdr = (XMLStreamReader) input;
- }
- if ((stat & PLAIN_XML_FLAG) != 0) {
- if (in != null) {
- if (isFastInfoset) {
- getSOAPPart().setContent(
- FastInfosetReflection.FastInfosetSource_new(in));
- } else {
- initCharsetProperty(contentType);
- getSOAPPart().setContent(new StreamSource(in));
- }
- } else {
- //is a StAX reader
- if (isFastInfoset) {
- //need to get FI stax reader
- } else {
- initCharsetProperty(contentType);
- getSOAPPart().setContent(new StAXSource(rdr));
- }
- }
- }
- else if ((stat & MIME_MULTIPART_FLAG) != 0 && in == null) {
- //only parse multipart in the inputstream case
- //in stax reader case, we would be given the attachments separately
- getSOAPPart().setContent(new StAXSource(rdr));
- } else if ((stat & MIME_MULTIPART_FLAG) != 0) {
- final InputStream finalIn = in;
- DataSource ds = new DataSource() {
- public InputStream getInputStream() {
- return finalIn;
- }
-
- public OutputStream getOutputStream() {
- return null;
- }
-
- public String getContentType() {
- return contentType.toString();
- }
-
- public String getName() {
- return "";
- }
- };
-
- multiPart = null;
- if (useMimePull) {
- multiPart = new MimePullMultipart(ds,contentType);
- } else if (switchOffBM) {
- multiPart = new MimeMultipart(ds,contentType);
- } else {
- multiPart = new BMMimeMultipart(ds,contentType);
- }
-
- String startParam = contentType.getParameter("start");
- MimeBodyPart soapMessagePart = null;
- InputStream soapPartInputStream = null;
- String contentID = null;
- String contentIDNoAngle = null;
- if (switchOffBM || switchOffLazyAttachment) {
- if(startParam == null) {
- soapMessagePart = multiPart.getBodyPart(0);
- for (int i = 1; i < multiPart.getCount(); i++) {
- initializeAttachment(multiPart, i);
- }
- } else {
- soapMessagePart = multiPart.getBodyPart(startParam);
- for (int i = 0; i < multiPart.getCount(); i++) {
- contentID = multiPart.getBodyPart(i).getContentID();
- // Old versions of AXIS2 put angle brackets around the content
- // id but not the start param
- contentIDNoAngle = (contentID != null) ?
- contentID.replaceFirst("^<", "").replaceFirst(">$", "") : null;
- if(!startParam.equals(contentID) && !startParam.equals(contentIDNoAngle))
- initializeAttachment(multiPart, i);
- }
- }
- } else {
- if (useMimePull) {
- MimePullMultipart mpMultipart = (MimePullMultipart)multiPart;
- MIMEPart sp = mpMultipart.readAndReturnSOAPPart();
- soapMessagePart = new MimeBodyPart(sp);
- soapPartInputStream = sp.readOnce();
- } else {
- BMMimeMultipart bmMultipart =
- (BMMimeMultipart) multiPart;
- InputStream stream = bmMultipart.initStream();
-
- SharedInputStream sin = null;
- if (stream instanceof SharedInputStream) {
- sin = (SharedInputStream) stream;
- }
-
- String boundary = "--" +
- contentType.getParameter("boundary");
- byte[] bndbytes = ASCIIUtility.getBytes(boundary);
- if (startParam == null) {
- soapMessagePart =
- bmMultipart.getNextPart(stream, bndbytes, sin);
- bmMultipart.removeBodyPart(soapMessagePart);
- } else {
- MimeBodyPart bp = null;
- try {
- while (!startParam.equals(contentID) && !startParam.equals(contentIDNoAngle)) {
- bp = bmMultipart.getNextPart(
- stream, bndbytes, sin);
- contentID = bp.getContentID();
- // Old versions of AXIS2 put angle brackets around the content
- // id but not the start param
- contentIDNoAngle = (contentID != null) ?
- contentID.replaceFirst("^<", "").replaceFirst(">$", "") : null;
- }
- soapMessagePart = bp;
- bmMultipart.removeBodyPart(bp);
- } catch (Exception e) {
- throw new SOAPExceptionImpl(e);
- }
- }
- }
- }
-
- // findbugs correctly points out that we'd NPE instantiating
- // the ContentType (just below here) if soapMessagePart were
- // null. Hence are better off throwing a controlled exception
- // at this point if it is null.
- if (soapMessagePart == null) {
- log.severe("SAAJ0510.soap.cannot.create.envelope");
- throw new SOAPExceptionImpl(
- "Unable to create envelope from given source: SOAP part not found");
- }
-
- if (soapPartInputStream == null) {
- soapPartInputStream = soapMessagePart.getInputStream();
- }
-
- ContentType soapPartCType = new ContentType(
- soapMessagePart.getContentType());
- initCharsetProperty(soapPartCType);
- String baseType = soapPartCType.getBaseType().toLowerCase();
- if(!(isEqualToSoap1_1Type(baseType)
- || isEqualToSoap1_2Type(baseType)
- || isSOAPBodyXOPPackage(soapPartCType))) {
- log.log(Level.SEVERE,
- "SAAJ0549.soap.part.invalid.Content-Type",
- new Object[] {baseType});
- throw new SOAPExceptionImpl(
- "Bad Content-Type for SOAP Part : " +
- baseType);
- }
-
- SOAPPart soapPart = getSOAPPart();
- setMimeHeaders(soapPart, soapMessagePart);
- soapPart.setContent(isFastInfoset ?
- (Source) FastInfosetReflection.FastInfosetSource_new(
- soapPartInputStream) :
- (Source) new StreamSource(soapPartInputStream));
- } else {
- log.severe("SAAJ0534.soap.unknown.Content-Type");
- throw new SOAPExceptionImpl("Unrecognized Content-Type");
- }
- } catch (Throwable ex) {
- log.severe("SAAJ0535.soap.cannot.internalize.message");
- throw new SOAPExceptionImpl("Unable to internalize message", ex);
- }
- needsSave();
- }
-
- public boolean isFastInfoset() {
- return isFastInfoset;
- }
-
- public boolean acceptFastInfoset() {
- return acceptFastInfoset;
- }
-
- public void setIsFastInfoset(boolean value) {
- if (value != isFastInfoset) {
- isFastInfoset = value;
- if (isFastInfoset) {
- acceptFastInfoset = true;
- }
- saved = false; // ensure transcoding if necessary
- }
- }
-
- public boolean isLazySoapBodyParsing() {
- Object lazyParsingProp = getProperty(LAZY_SOAP_BODY_PARSING);
- if (lazyParsingProp == null) return false;
- if (lazyParsingProp instanceof Boolean) {
- return ((Boolean) lazyParsingProp).booleanValue();
- } else {
- return Boolean.valueOf(lazyParsingProp.toString());
- }
- }
- public Object getProperty(String property) {
- return (String) properties.get(property);
- }
-
- public void setProperty(String property, Object value) {
- verify(property, value);
- properties.put(property, value);
- }
-
- private void verify(String property, Object value) {
- if (property.equalsIgnoreCase(SOAPMessage.WRITE_XML_DECLARATION)) {
- if (!("true".equals(value) || "false".equals(value)))
- throw new RuntimeException(
- property + " must have value false or true");
-
- try {
- EnvelopeImpl env = (EnvelopeImpl) getSOAPPart().getEnvelope();
- if ("true".equalsIgnoreCase((String)value)) {
- env.setOmitXmlDecl("no");
- } else if ("false".equalsIgnoreCase((String)value)) {
- env.setOmitXmlDecl("yes");
- }
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0591.soap.exception.in.set.property",
- new Object[] {e.getMessage(), "javax.xml.soap.write-xml-declaration"});
- throw new RuntimeException(e);
- }
- return;
- }
-
- if (property.equalsIgnoreCase(SOAPMessage.CHARACTER_SET_ENCODING)) {
- try {
- ((EnvelopeImpl) getSOAPPart().getEnvelope()).setCharsetEncoding((String)value);
- } catch (Exception e) {
- log.log(Level.SEVERE, "SAAJ0591.soap.exception.in.set.property",
- new Object[] {e.getMessage(), "javax.xml.soap.character-set-encoding"});
- throw new RuntimeException(e);
- }
- }
- }
-
- protected abstract boolean isCorrectSoapVersion(int contentTypeId);
-
- protected abstract String getExpectedContentType();
- protected abstract String getExpectedAcceptHeader();
-
- /**
- * Sniffs the Content-Type header so that we can determine how to process.
- *
- * SOAPExceptionImpl
object with no
- * reason or embedded Throwable
object.
- */
- public SOAPVersionMismatchException() {
- super();
- }
-
- /**
- * Constructs a SOAPExceptionImpl
object with the given
- * String
as the reason for the exception being thrown.
- *
- * @param reason a description of what caused the exception
- */
- public SOAPVersionMismatchException(String reason) {
- super(reason);
- }
-
- /**
- * Constructs a SOAPExceptionImpl
object with the given
- * String
as the reason for the exception being thrown
- * and the given Throwable
object as an embedded
- * exception.
- *
- * @param reason a description of what caused the exception
- * @param cause a Throwable
object that is to
- * be embedded in this SOAPExceptionImpl
object
- */
- public SOAPVersionMismatchException(String reason, Throwable cause) {
- super(reason, cause);
- }
-
- /**
- * Constructs a SOAPExceptionImpl
object initialized
- * with the given Throwable
object.
- */
- public SOAPVersionMismatchException(Throwable cause) {
- super(cause);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import com.sun.xml.internal.messaging.saaj.util.stax.SaajStaxWriter;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
-
-
-/**
- * StaxBridge builds Envelope using a XMLStreamReaderToXMLStreamWriter
- *
- * @author shih-chang.chen@oracle.com
- */
-public abstract class StaxBridge {
- protected SaajStaxWriter saajWriter;
- protected XMLStreamReaderToXMLStreamWriter readerToWriter;
- protected XMLStreamReaderToXMLStreamWriter.Breakpoint breakpoint;
-
-
- public StaxBridge(SOAPPartImpl soapPart) throws SOAPException {
- readerToWriter = new XMLStreamReaderToXMLStreamWriter();
- saajWriter = new SaajStaxWriter(soapPart.message, soapPart.getSOAPNamespace());
- }
-
- public void bridgeEnvelopeAndHeaders() throws XMLStreamException {
- readerToWriter.bridge(breakpoint);
- }
-
- public void bridgePayload() throws XMLStreamException {
- readerToWriter.bridge(breakpoint);
- }
-
- abstract public XMLStreamReader getPayloadReader();
-
- abstract public QName getPayloadQName();
-
- abstract public String getPayloadAttributeValue(String attName) ;
-
- abstract public String getPayloadAttributeValue(QName attName) ;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import com.sun.xml.internal.messaging.saaj.LazyEnvelopeSource;
-import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
-
-
-/**
- * StaxBridge builds Envelope from LazyEnvelopeSource
- *
- * @author shih-chang.chen@oracle.com
- */
-public class StaxLazySourceBridge extends StaxBridge {
- private LazyEnvelopeSource lazySource;
-
- public StaxLazySourceBridge(LazyEnvelopeSource src, SOAPPartImpl soapPart) throws SOAPException {
- super(soapPart);
- lazySource = src;
- final String soapEnvNS = soapPart.getSOAPNamespace();
- try {
- breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(src.readToBodyStarTag(), saajWriter) {
- public boolean proceedAfterStartElement() {
- if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
- return false;
- } else
- return true;
- }
- };
- } catch (XMLStreamException e) {
- throw new SOAPException(e);
- }
- }
-
- @Override
- public XMLStreamReader getPayloadReader() {
- return lazySource.readPayload();
-// throw new UnsupportedOperationException();
- }
-
- @Override
- public QName getPayloadQName() {
- return lazySource.getPayloadQName();
- }
-
- @Override
- public String getPayloadAttributeValue(String attName) {
- if (lazySource.isPayloadStreamReader()) {
- XMLStreamReader reader = lazySource.readPayload();
- if (reader.getEventType() == reader.START_ELEMENT) {
- return reader.getAttributeValue(null, attName);
- }
- }
- return null;
- }
-
- @Override
- public String getPayloadAttributeValue(QName attName) {
- if (lazySource.isPayloadStreamReader()) {
- XMLStreamReader reader = lazySource.readPayload();
- if (reader.getEventType() == reader.START_ELEMENT) {
- return reader.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart());
- }
- }
- return null;
- }
-
- public void bridgePayload() throws XMLStreamException {
- //Assuming out is at Body
- writePayloadTo(saajWriter);
- }
-
- public void writePayloadTo(XMLStreamWriter writer) throws XMLStreamException {
- lazySource.writePayloadTo(writer);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
-
-/**
- * StaxBridge builds Envelope using a XMLStreamReaderToXMLStreamWriter
- *
- * @author shih-chang.chen@oracle.com
- */
-public class StaxReaderBridge extends StaxBridge {
- private XMLStreamReader in;
-
- public StaxReaderBridge(XMLStreamReader reader, SOAPPartImpl soapPart) throws SOAPException {
- super(soapPart);
- in = reader;
- final String soapEnvNS = soapPart.getSOAPNamespace();
- breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, saajWriter) {
- boolean seenBody = false;
- boolean stopedAtBody = false;
- public boolean proceedBeforeStartElement() {
- if (stopedAtBody) return true;
- if (seenBody) {
- stopedAtBody = true;
- return false;
- }
- if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
- seenBody = true;
- }
- return true;
- }
- };
- }
-
- public XMLStreamReader getPayloadReader() {
- return in;
- }
-
- public QName getPayloadQName() {
- return (in.getEventType() == in.START_ELEMENT) ? in.getName() : null;
- }
-
- public String getPayloadAttributeValue(String attName) {
- return (in.getEventType() == in.START_ELEMENT) ? in.getAttributeValue(null, attName) : null;
- }
-
- public String getPayloadAttributeValue(QName attName) {
- return (in.getEventType() == in.START_ELEMENT) ? in.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart()) : null;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.*;
-
-import javax.activation.*;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility;
-import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
-
-/**
- * JAF data content handler for text/plain --> String
- *
- */
-public class StringDataContentHandler implements DataContentHandler {
- private static ActivationDataFlavor myDF = new ActivationDataFlavor(
- java.lang.String.class,
- "text/plain",
- "Text String");
-
- protected ActivationDataFlavor getDF() {
- return myDF;
- }
-
- /**
- * Return the DataFlavors for this DataContentHandler
.
- *
- * @return The DataFlavors
- */
- public DataFlavor[] getTransferDataFlavors() {
- return new DataFlavor[] { getDF() };
- }
-
- /**
- * Return the Transfer Data of type DataFlavor from InputStream.
- *
- * @param df The DataFlavor
- * @param ds The DataSource corresponding to the data
- * @return String object
- */
- public Object getTransferData(DataFlavor df, DataSource ds)
- throws IOException {
- // use myDF.equals to be sure to get ActivationDataFlavor.equals,
- // which properly ignores Content-Type parameters in comparison
- if (getDF().equals(df))
- return getContent(ds);
- else
- return null;
- }
-
- public Object getContent(DataSource ds) throws IOException {
- String enc = null;
- InputStreamReader is = null;
-
- try {
- enc = getCharset(ds.getContentType());
- is = new InputStreamReader(ds.getInputStream(), enc);
- } catch (IllegalArgumentException iex) {
- /*
- * An unknown charset of the form ISO-XXX-XXX will cause
- * the JDK to throw an IllegalArgumentException. The
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes.
- */
- throw new UnsupportedEncodingException(enc);
- }
-
- try {
- int pos = 0;
- int count;
- char buf[] = new char[1024];
-
- while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
- pos += count;
- if (pos >= buf.length) {
- int size = buf.length;
- if (size < 256*1024)
- size += size;
- else
- size += 256*1024;
- char tbuf[] = new char[size];
- System.arraycopy(buf, 0, tbuf, 0, pos);
- buf = tbuf;
- }
- }
- return new String(buf, 0, pos);
- } finally {
- try {
- is.close();
- } catch (IOException ex) { }
- }
- }
-
- /**
- * Write the object to the output stream, using the specified MIME type.
- */
- public void writeTo(Object obj, String type, OutputStream os)
- throws IOException {
- if (!(obj instanceof String))
- throw new IOException("\"" + getDF().getMimeType() +
- "\" DataContentHandler requires String object, " +
- "was given object of type " + obj.getClass().toString());
-
- String enc = null;
- OutputStreamWriter osw = null;
-
- try {
- enc = getCharset(type);
- osw = new OutputStreamWriter(os, enc);
- } catch (IllegalArgumentException iex) {
- /*
- * An unknown charset of the form ISO-XXX-XXX will cause
- * the JDK to throw an IllegalArgumentException. The
- * JDK will attempt to create a classname using this string,
- * but valid classnames must not contain the character '-',
- * and this results in an IllegalArgumentException, rather than
- * the expected UnsupportedEncodingException. Yikes.
- */
- throw new UnsupportedEncodingException(enc);
- }
-
- String s = (String)obj;
- osw.write(s, 0, s.length());
- osw.flush();
- }
-
- private String getCharset(String type) {
- try {
- ContentType ct = new ContentType(type);
- String charset = ct.getParameter("charset");
- if (charset == null)
- // If the charset parameter is absent, use US-ASCII.
- charset = "us-ascii";
- return MimeUtility.javaCharset(charset);
- } catch (Exception ex) {
- return null;
- }
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap;
-
-import java.awt.datatransfer.DataFlavor;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.activation.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
-
-/**
- * JAF data handler for XML content
- *
- * @author Anil Vijendran
- */
-public class XmlDataContentHandler implements DataContentHandler {
- public static final String STR_SRC = "javax.xml.transform.stream.StreamSource";
- private static Class streamSourceClass = null;
-
- public XmlDataContentHandler() throws ClassNotFoundException {
- if (streamSourceClass == null) {
- streamSourceClass = Class.forName(STR_SRC);
- }
- }
-
- /**
- * return the DataFlavors for this DataContentHandler
- * @return The DataFlavors.
- */
- public DataFlavor[] getTransferDataFlavors() { // throws Exception;
- DataFlavor flavors[] = new DataFlavor[2];
-
- flavors[0] =
- new ActivationDataFlavor(streamSourceClass, "text/xml", "XML");
- flavors[1] =
- new ActivationDataFlavor(streamSourceClass, "application/xml", "XML");
-
- return flavors;
- }
-
- /**
- * return the Transfer Data of type DataFlavor from InputStream
- * @param df The DataFlavor.
- * @param ins The InputStream corresponding to the data.
- * @return The constructed Object.
- */
- public Object getTransferData(DataFlavor flavor, DataSource dataSource)
- throws IOException {
- if (flavor.getMimeType().startsWith("text/xml") ||
- flavor.getMimeType().startsWith("application/xml")) {
- if (flavor.getRepresentationClass().getName().equals(STR_SRC)) {
- return new StreamSource(dataSource.getInputStream());
- }
- }
- return null;
- }
-
- /**
- *
- */
- public Object getContent(DataSource dataSource) throws IOException {
- return new StreamSource(dataSource.getInputStream());
- }
-
- /**
- * construct an object from a byte stream
- * (similar semantically to previous method, we are deciding
- * which one to support)
- */
- public void writeTo(Object obj, String mimeType, OutputStream os)
- throws IOException {
- if (!mimeType.startsWith("text/xml") && !mimeType.startsWith("application/xml"))
- throw new IOException(
- "Invalid content type \"" + mimeType + "\" for XmlDCH");
-
-
- try {
- Transformer transformer = EfficientStreamingTransformer.newTransformer();
- StreamResult result = new StreamResult(os);
- if (obj instanceof DataSource) {
- // Streaming transform applies only to javax.xml.transform.StreamSource
- transformer.transform((Source) getContent((DataSource)obj), result);
- } else {
- Source src=null;
- if (obj instanceof String) {
- src= new StreamSource(new java.io.StringReader((String) obj));
- } else {
- src=(Source) obj;
- }
- transformer.transform(src, result);
- }
- } catch (Exception ex) {
- throw new IOException(
- "Unable to run the JAXP transformer on a stream "
- + ex.getMessage());
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.dynamic;
-
-import javax.xml.soap.Detail;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl;
-
-public class SOAPFactoryDynamicImpl extends SOAPFactoryImpl {
- protected SOAPDocumentImpl createDocument() {
- return null;
- }
-
- public Detail createDetail() throws SOAPException {
- throw new UnsupportedOperationException(
- "createDetail() not supported for Dynamic Protocol");
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.dynamic;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl;
-
-public class SOAPMessageFactoryDynamicImpl extends MessageFactoryImpl {
- public SOAPMessage createMessage() throws SOAPException {
- throw new UnsupportedOperationException(
- "createMessage() not supported for Dynamic Protocol");
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-
-/**
- * All elements of the SOAP-ENV:BODY.
- *
- * @author Anil Vijendran (akv@eng.sun.com)
- */
-public abstract class BodyElementImpl
- extends ElementImpl
- implements SOAPBodyElement {
-
- public BodyElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
-
- public BodyElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (! (element instanceof SOAPBody)) {
- log.severe("SAAJ0101.impl.parent.of.body.elem.mustbe.body");
- throw new SOAPException("Parent of a SOAPBodyElement has to be a SOAPBody");
- }
- super.setParentElement(element);
- }
-
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.*;
-import org.w3c.dom.Node;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.StaxBridge;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-/**
- * The implementation of SOAP-ENV:BODY or the SOAPBody abstraction.
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public abstract class BodyImpl extends ElementImpl implements SOAPBody {
- private SOAPFault fault;
-// private XMLStreamReaderToXMLStreamWriter staxBridge;
- private StaxBridge staxBridge;
- private boolean payloadStreamRead = false;
-
- protected BodyImpl(SOAPDocumentImpl ownerDoc, NameImpl bodyName) {
- super(ownerDoc, bodyName);
- }
-
- protected abstract NameImpl getFaultName(String name);
- protected abstract boolean isFault(SOAPElement child);
- protected abstract SOAPBodyElement createBodyElement(Name name);
- protected abstract SOAPBodyElement createBodyElement(QName name);
- protected abstract SOAPFault createFaultElement();
- protected abstract QName getDefaultFaultCode();
-
- public SOAPFault addFault() throws SOAPException {
- if (hasFault()) {
- log.severe("SAAJ0110.impl.fault.already.exists");
- throw new SOAPExceptionImpl("Error: Fault already exists");
- }
-
- fault = createFaultElement();
-
- addNode(fault);
-
- fault.setFaultCode(getDefaultFaultCode());
- fault.setFaultString("Fault string, and possibly fault code, not set");
-
- return fault;
- }
-
- public SOAPFault addFault(
- Name faultCode,
- String faultString,
- Locale locale)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString, locale);
- return fault;
- }
-
- public SOAPFault addFault(
- QName faultCode,
- String faultString,
- Locale locale)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString, locale);
- return fault;
- }
-
- public SOAPFault addFault(Name faultCode, String faultString)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString);
- return fault;
- }
-
- public SOAPFault addFault(QName faultCode, String faultString)
- throws SOAPException {
-
- SOAPFault fault = addFault();
- fault.setFaultCode(faultCode);
- fault.setFaultString(faultString);
- return fault;
- }
-
- void initializeFault() {
- FaultImpl flt = (FaultImpl) findFault();
- fault = flt;
- }
-
- protected SOAPElement findFault() {
- Iterator eachChild = getChildElementNodes();
- while (eachChild.hasNext()) {
- SOAPElement child = (SOAPElement) eachChild.next();
- if (isFault(child)) {
- return child;
- }
- }
-
- return null;
- }
-
- public boolean hasFault() {
- QName payloadQName = getPayloadQName();
- return getFaultQName().equals(payloadQName);
- }
-
- private Object getFaultQName() {
- return new QName(getNamespaceURI(), "Fault");
- }
-
- public SOAPFault getFault() {
- if (hasFault()) {
- if (fault == null) {
- //initialize fault member
- fault = (SOAPFault) getFirstChildElement();
- }
- return fault;
- }
- return null;
- }
-
- public SOAPBodyElement addBodyElement(Name name) throws SOAPException {
- SOAPBodyElement newBodyElement =
- (SOAPBodyElement) ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name.getLocalName(),
- name.getPrefix(),
- name.getURI());
- if (newBodyElement == null) {
- newBodyElement = createBodyElement(name);
- }
- addNode(newBodyElement);
- return newBodyElement;
- }
-
- public SOAPBodyElement addBodyElement(QName qname) throws SOAPException {
- SOAPBodyElement newBodyElement =
- (SOAPBodyElement) ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- qname.getLocalPart(),
- qname.getPrefix(),
- qname.getNamespaceURI());
- if (newBodyElement == null) {
- newBodyElement = createBodyElement(qname);
- }
- addNode(newBodyElement);
- return newBodyElement;
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
-
- if (!(element instanceof SOAPEnvelope)) {
- log.severe("SAAJ0111.impl.body.parent.must.be.envelope");
- throw new SOAPException("Parent of SOAPBody has to be a SOAPEnvelope");
- }
- super.setParentElement(element);
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- return addBodyElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addBodyElement(name);
- }
-
- // public Node insertBefore(Node newElement, Node ref) throws DOMException {
- // if (!(newElement instanceof SOAPBodyElement) && (newElement instanceof SOAPElement)) {
- // newElement = new ElementWrapper((ElementImpl) newElement);
- // }
- // return super.insertBefore(newElement, ref);
- // }
- //
- // public Node replaceChild(Node newElement, Node ref) throws DOMException {
- // if (!(newElement instanceof SOAPBodyElement) && (newElement instanceof SOAPElement)) {
- // newElement = new ElementWrapper((ElementImpl) newElement);
- // }
- // return super.replaceChild(newElement, ref);
- // }
-
- public SOAPBodyElement addDocument(Document document)
- throws SOAPException {
- /*
-
- Element rootNode =
- document.getDocumentElement();
- // Causes all deferred nodes to be inflated
- rootNode.normalize();
- adoptElement(rootNode);
- SOAPBodyElement bodyElement = (SOAPBodyElement) convertToSoapElement(rootNode);
- addNode(bodyElement);
- return bodyElement;
- */
- ///*
- SOAPBodyElement newBodyElement = null;
- DocumentFragment docFrag = document.createDocumentFragment();
- Element rootElement = document.getDocumentElement();
- if(rootElement != null) {
- docFrag.appendChild(rootElement);
-
- Document ownerDoc = getOwnerDocument();
- // This copies the whole tree which could be very big so it's slow.
- // However, it does have the advantage of actually working.
- org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true);
- // Adding replacingNode at the last of the children list of body
- addNode(replacingNode);
- Iterator i =
- getChildElements(NameImpl.copyElementName(rootElement));
- // Return the child element with the required name which is at the
- // end of the list
- while(i.hasNext())
- newBodyElement = (SOAPBodyElement) i.next();
- }
- return newBodyElement;
- //*/
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if ((element instanceof SOAPBodyElement) &&
- //this check is required because ElementImpl currently
- // implements SOAPBodyElement
- !(element.getClass().equals(ElementImpl.class))) {
- return (SOAPElement) element;
- } else {
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) createBodyElement(NameImpl
- .copyElementName(element)));
- }
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
- public Document extractContentAsDocument() throws SOAPException {
-
- Iterator eachChild = getChildElements();
- javax.xml.soap.Node firstBodyElement = null;
-
- while (eachChild.hasNext() &&
- !(firstBodyElement instanceof SOAPElement))
- firstBodyElement = (javax.xml.soap.Node) eachChild.next();
-
- boolean exactlyOneChildElement = true;
- if (firstBodyElement == null)
- exactlyOneChildElement = false;
- else {
- for (org.w3c.dom.Node node = firstBodyElement.getNextSibling();
- node != null;
- node = node.getNextSibling()) {
-
- if (node instanceof Element) {
- exactlyOneChildElement = false;
- break;
- }
- }
- }
-
- if(!exactlyOneChildElement) {
- log.log(Level.SEVERE,
- "SAAJ0250.impl.body.should.have.exactly.one.child");
- throw new SOAPException("Cannot extract Document from body");
- }
-
- Document document = null;
- try {
- DocumentBuilderFactory factory =
- new com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl();
- factory.setNamespaceAware(true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- document = builder.newDocument();
-
- Element rootElement = (Element) document.importNode(
- firstBodyElement,
- true);
-
- document.appendChild(rootElement);
-
- } catch(Exception e) {
- log.log(Level.SEVERE,
- "SAAJ0251.impl.cannot.extract.document.from.body");
- throw new SOAPExceptionImpl(
- "Unable to extract Document from body", e);
- }
-
- firstBodyElement.detachNode();
-
- return document;
- }
-
- private void materializePayloadWrapException() {
- try {
- materializePayload();
- } catch (SOAPException e) {
- throw new RuntimeException(e);
- }
- }
- private void materializePayload() throws SOAPException {
- if (staxBridge != null) {
- if (payloadStreamRead) {
- //the payload has already been read via stream reader and the
- //stream has been exhausted already. Throw an
- //exception since we are now trying to materialize as DOM and
- //there is no stream left to read
- throw new SOAPException("SOAPBody payload stream has been fully read - cannot materialize as DOM!");
- }
- try {
- staxBridge.bridgePayload();
- staxBridge = null;
- payloadStreamRead = true;
- } catch (XMLStreamException e) {
- throw new SOAPException(e);
- }
- }
- }
-
- @Override
- public boolean hasChildNodes() {
- boolean hasChildren = super.hasChildNodes();
- //to answer this question we need to know _whether_ we have at least one child
- //So no need to materialize body if we already know we have a header child
- if (!hasChildren) {
- materializePayloadWrapException();
- }
- return super.hasChildNodes();
- }
-
- @Override
- public NodeList getChildNodes() {
- materializePayloadWrapException();
- return super.getChildNodes();
- }
-
- @Override
- public Node getFirstChild() {
- Node child = super.getFirstChild();
- if (child == null) {
- materializePayloadWrapException();
- }
- return super.getFirstChild();
- }
-
- public Node getFirstChildNoMaterialize() {
- return super.getFirstChild();
- }
-
- @Override
- public Node getLastChild() {
- materializePayloadWrapException();
- return super.getLastChild();
- }
-
- XMLStreamReader getPayloadReader() {
- return staxBridge.getPayloadReader();
- }
-
- void setStaxBridge(StaxBridge bridge) {
- this.staxBridge = bridge;
- }
-
- StaxBridge getStaxBridge() {
- return staxBridge;
- }
-
- void setPayloadStreamRead() {
- this.payloadStreamRead = true;
- }
-
- QName getPayloadQName() {
- if (staxBridge != null) {
- return staxBridge.getPayloadQName();
- } else {
- //not lazy - Just get first child element and return its name
- Element elem = getFirstChildElement();
- if (elem != null) {
- String ns = elem.getNamespaceURI();
- String pref = elem.getPrefix();
- String local = elem.getLocalName();
- if (pref != null) return new QName(ns, local, pref);
- if (ns != null) return new QName(ns, local);
- return new QName(local);
- }
- }
- return null;
- }
-
- String getPayloadAttributeValue(String attName) {
- if (staxBridge != null) {
- return staxBridge.getPayloadAttributeValue(attName);
- } else {
- //not lazy -Just get first child element and return its attribute
- Element elem = getFirstChildElement();
- if (elem != null) {
- return elem.getAttribute(localName);
- }
- }
- return null;
- }
-
- String getPayloadAttributeValue(QName attNAme) {
- if (staxBridge != null) {
- return staxBridge.getPayloadAttributeValue(attNAme);
- } else {
- //not lazy -Just get first child element and return its attribute
- Element elem = getFirstChildElement();
- if (elem != null) {
- return elem.getAttributeNS(attNAme.getNamespaceURI(), attNAme.getLocalPart());
- }
- }
- return null;
- }
-
- public boolean isLazy() {
- return (staxBridge != null && !payloadStreamRead);
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class CDATAImpl
- extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl
- implements javax.xml.soap.Text {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
-
- static final String cdataUC = " 0) {
- setAttributeNS(XMLNS_URI, "xmlns:" + prefix, uri);
- } else {
- setAttributeNS(XMLNS_URI, "xmlns", uri);
- }
- //Fix for CR:6474641
- //tryToFindEncodingStyleAttributeName();
- return this;
- }
-
- public String getAttributeValue(Name name) {
- return getAttributeValueFrom(this, name);
- }
-
- public String getAttributeValue(QName qname) {
- return getAttributeValueFrom(
- this,
- qname.getNamespaceURI(),
- qname.getLocalPart(),
- qname.getPrefix(),
- getQualifiedName(qname));
- }
-
- public Iterator getAllAttributes() {
- Iterator i = getAllAttributesFrom(this);
- ArrayList list = new ArrayList();
- while (i.hasNext()) {
- Name name = (Name) i.next();
- if (!"xmlns".equalsIgnoreCase(name.getPrefix()))
- list.add(name);
- }
- return list.iterator();
- }
-
- public Iterator getAllAttributesAsQNames() {
- Iterator i = getAllAttributesFrom(this);
- ArrayList list = new ArrayList();
- while (i.hasNext()) {
- Name name = (Name) i.next();
- if (!"xmlns".equalsIgnoreCase(name.getPrefix())) {
- list.add(NameImpl.convertToQName(name));
- }
- }
- return list.iterator();
- }
-
-
- public Iterator getNamespacePrefixes() {
- return doGetNamespacePrefixes(false);
- }
-
- public Iterator getVisibleNamespacePrefixes() {
- return doGetNamespacePrefixes(true);
- }
-
- protected Iterator doGetNamespacePrefixes(final boolean deep) {
- return new Iterator() {
- String next = null;
- String last = null;
- NamespaceContextIterator eachNamespace =
- getNamespaceContextNodes(deep);
-
- void findNext() {
- while (next == null && eachNamespace.hasNext()) {
- String attributeKey =
- eachNamespace.nextNamespaceAttr().getNodeName();
- if (attributeKey.startsWith("xmlns:")) {
- next = attributeKey.substring("xmlns:".length());
- }
- }
- }
-
- public boolean hasNext() {
- findNext();
- return next != null;
- }
-
- public Object next() {
- findNext();
- if (next == null) {
- throw new NoSuchElementException();
- }
-
- last = next;
- next = null;
- return last;
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- eachNamespace.remove();
- next = null;
- last = null;
- }
- };
- }
-
- public Name getElementName() {
- return NameImpl.convertToName(elementQName);
- }
-
- public QName getElementQName() {
- return elementQName;
- }
-
- public boolean removeAttribute(Name name) {
- return removeAttribute(name.getURI(), name.getLocalName());
- }
-
- public boolean removeAttribute(QName name) {
- return removeAttribute(name.getNamespaceURI(), name.getLocalPart());
- }
-
- private boolean removeAttribute(String uri, String localName) {
- String nonzeroLengthUri =
- (uri == null || uri.length() == 0) ? null : uri;
- org.w3c.dom.Attr attribute =
- getAttributeNodeNS(nonzeroLengthUri, localName);
- if (attribute == null) {
- return false;
- }
- removeAttributeNode(attribute);
- return true;
- }
-
- public boolean removeNamespaceDeclaration(String prefix) {
- org.w3c.dom.Attr declaration = getNamespaceAttr(prefix);
- if (declaration == null) {
- return false;
- }
- try {
- removeAttributeNode(declaration);
- } catch (DOMException de) {
- // ignore
- }
- return true;
- }
-
- public Iterator getChildElements() {
- return getChildElementsFrom(this);
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof SOAPElement) {
- return (SOAPElement) element;
- } else {
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) createElement(NameImpl.copyElementName(element)));
- }
- }
-
- protected static SOAPElement replaceElementWithSOAPElement(
- Element element,
- ElementImpl copy) {
-
- Iterator eachAttribute = getAllAttributesFrom(element);
- while (eachAttribute.hasNext()) {
- Name name = (Name) eachAttribute.next();
- copy.addAttributeBare(name, getAttributeValueFrom(element, name));
- }
-
- Iterator eachChild = getChildElementsFrom(element);
- while (eachChild.hasNext()) {
- Node nextChild = (Node) eachChild.next();
- copy.insertBefore(nextChild, null);
- }
-
- Node parent = element.getParentNode();
- if (parent != null) {
- parent.replaceChild(copy, element);
- } // XXX else throw an exception?
-
- return copy;
- }
-
- protected Iterator getChildElementNodes() {
- return new Iterator() {
- Iterator eachNode = getChildElements();
- Node next = null;
- Node last = null;
-
- public boolean hasNext() {
- if (next == null) {
- while (eachNode.hasNext()) {
- Node node = (Node) eachNode.next();
- if (node instanceof SOAPElement) {
- next = node;
- break;
- }
- }
- }
- return next != null;
- }
-
- public Object next() {
- if (hasNext()) {
- last = next;
- next = null;
- return last;
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- Node target = last;
- last = null;
- removeChild(target);
- }
- };
- }
-
- public Iterator getChildElements(final Name name) {
- return getChildElements(name.getURI(), name.getLocalName());
- }
-
- public Iterator getChildElements(final QName qname) {
- return getChildElements(qname.getNamespaceURI(), qname.getLocalPart());
- }
-
- private Iterator getChildElements(final String nameUri, final String nameLocal) {
- return new Iterator() {
- Iterator eachElement = getChildElementNodes();
- Node next = null;
- Node last = null;
-
- public boolean hasNext() {
- if (next == null) {
- while (eachElement.hasNext()) {
- Node element = (Node) eachElement.next();
- String elementUri = element.getNamespaceURI();
- elementUri = elementUri == null ? "" : elementUri;
- String elementName = element.getLocalName();
- if (elementUri.equals(nameUri)
- && elementName.equals(nameLocal)) {
- next = element;
- break;
- }
- }
- }
- return next != null;
- }
-
- public Object next() {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- last = next;
- next = null;
- return last;
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- Node target = last;
- last = null;
- removeChild(target);
- }
- };
- }
-
- public void removeContents() {
- Node currentChild = getFirstChild();
-
- while (currentChild != null) {
- Node temp = currentChild.getNextSibling();
- if (currentChild instanceof javax.xml.soap.Node) {
- ((javax.xml.soap.Node) currentChild).detachNode();
- } else {
- Node parent = currentChild.getParentNode();
- if (parent != null) {
- parent.removeChild(currentChild);
- }
-
- }
- currentChild = temp;
- }
- }
-
- public void setEncodingStyle(String encodingStyle) throws SOAPException {
- if (!"".equals(encodingStyle)) {
- try {
- new URI(encodingStyle);
- } catch (URISyntaxException m) {
- log.log(
- Level.SEVERE,
- "SAAJ0105.impl.encoding.style.mustbe.valid.URI",
- new String[] { encodingStyle });
- throw new IllegalArgumentException(
- "Encoding style (" + encodingStyle + ") should be a valid URI");
- }
- }
- encodingStyleAttribute.setValue(encodingStyle);
- tryToFindEncodingStyleAttributeName();
- }
-
- public String getEncodingStyle() {
- String encodingStyle = encodingStyleAttribute.getValue();
- if (encodingStyle != null)
- return encodingStyle;
- String soapNamespace = getSOAPNamespace();
- if (soapNamespace != null) {
- Attr attr = getAttributeNodeNS(soapNamespace, "encodingStyle");
- if (attr != null) {
- encodingStyle = attr.getValue();
- try {
- setEncodingStyle(encodingStyle);
- } catch (SOAPException se) {
- // has to be ignored
- }
- return encodingStyle;
- }
- }
- return null;
- }
-
- // Node methods
- public String getValue() {
- javax.xml.soap.Node valueNode = getValueNode();
- return valueNode == null ? null : valueNode.getValue();
- }
-
- public void setValue(String value) {
- Node valueNode = getValueNodeStrict();
- if (valueNode != null) {
- valueNode.setNodeValue(value);
- } else {
- try {
- addTextNode(value);
- } catch (SOAPException e) {
- throw new RuntimeException(e.getMessage());
- }
- }
- }
-
- protected Node getValueNodeStrict() {
- Node node = getFirstChild();
- if (node != null) {
- if (node.getNextSibling() == null
- && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
- return node;
- } else {
- log.severe("SAAJ0107.impl.elem.child.not.single.text");
- throw new IllegalStateException();
- }
- }
-
- return null;
- }
-
- protected javax.xml.soap.Node getValueNode() {
- Iterator i = getChildElements();
- while (i.hasNext()) {
- javax.xml.soap.Node n = (javax.xml.soap.Node) i.next();
- if (n.getNodeType() == org.w3c.dom.Node.TEXT_NODE ||
- n.getNodeType() == org.w3c.dom.Node.CDATA_SECTION_NODE) {
- // TODO: Hack to fix text node split into multiple lines.
- normalize();
- // Should remove the normalization step when this gets fixed in
- // DOM/Xerces.
- return (javax.xml.soap.Node) n;
- }
- }
- return null;
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (element == null) {
- log.severe("SAAJ0106.impl.no.null.to.parent.elem");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- element.addChildElement(this);
- findEncodingStyleAttributeName();
- }
-
- protected void findEncodingStyleAttributeName() throws SOAPException {
- String soapNamespace = getSOAPNamespace();
- if (soapNamespace != null) {
- String soapNamespacePrefix = getNamespacePrefix(soapNamespace);
- if (soapNamespacePrefix != null) {
- setEncodingStyleNamespace(soapNamespace, soapNamespacePrefix);
- }
- }
- }
-
- protected void setEncodingStyleNamespace(
- String soapNamespace,
- String soapNamespacePrefix)
- throws SOAPException {
- Name encodingStyleAttributeName =
- NameImpl.create(
- "encodingStyle",
- soapNamespacePrefix,
- soapNamespace);
- encodingStyleAttribute.setName(encodingStyleAttributeName);
- }
-
- public SOAPElement getParentElement() {
- Node parentNode = getParentNode();
- if (parentNode instanceof SOAPDocument) {
- return null;
- }
- return (SOAPElement) parentNode;
- }
-
- protected String getSOAPNamespace() {
- String soapNamespace = null;
-
- SOAPElement antecedent = this;
- while (antecedent != null) {
- Name antecedentName = antecedent.getElementName();
- String antecedentNamespace = antecedentName.getURI();
-
- if (NameImpl.SOAP11_NAMESPACE.equals(antecedentNamespace)
- || NameImpl.SOAP12_NAMESPACE.equals(antecedentNamespace)) {
-
- soapNamespace = antecedentNamespace;
- break;
- }
-
- antecedent = antecedent.getParentElement();
- }
-
- return soapNamespace;
- }
-
- public void detachNode() {
- Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- encodingStyleAttribute.clearNameAndValue();
- // Fix for CR: 6474641
- //tryToFindEncodingStyleAttributeName();
- }
-
- public void tryToFindEncodingStyleAttributeName() {
- try {
- findEncodingStyleAttributeName();
- } catch (SOAPException e) { /*okay to fail*/
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- class AttributeManager {
- Name attributeName = null;
- String attributeValue = null;
-
- public void setName(Name newName) throws SOAPException {
- clearAttribute();
- attributeName = newName;
- reconcileAttribute();
- }
- public void clearName() {
- clearAttribute();
- attributeName = null;
- }
- public void setValue(String value) throws SOAPException {
- attributeValue = value;
- reconcileAttribute();
- }
- public Name getName() {
- return attributeName;
- }
- public String getValue() {
- return attributeValue;
- }
-
- /** Note: to be used only in detachNode method */
- public void clearNameAndValue() {
- attributeName = null;
- attributeValue = null;
- }
-
- private void reconcileAttribute() throws SOAPException {
- if (attributeName != null) {
- removeAttribute(attributeName);
- if (attributeValue != null) {
- addAttribute(attributeName, attributeValue);
- }
- }
- }
- private void clearAttribute() {
- if (attributeName != null) {
- removeAttribute(attributeName);
- }
- }
- }
-
- protected static org.w3c.dom.Attr getNamespaceAttrFrom(
- Element element,
- String prefix) {
- NamespaceContextIterator eachNamespace =
- new NamespaceContextIterator(element);
- while (eachNamespace.hasNext()) {
- org.w3c.dom.Attr namespaceDecl = eachNamespace.nextNamespaceAttr();
- String declaredPrefix =
- NameImpl.getLocalNameFromTagName(namespaceDecl.getNodeName());
- if (declaredPrefix.equals(prefix)) {
- return namespaceDecl;
- }
- }
- return null;
- }
-
- protected static Iterator getAllAttributesFrom(final Element element) {
- final NamedNodeMap attributes = element.getAttributes();
-
- return new Iterator() {
- int attributesLength = attributes.getLength();
- int attributeIndex = 0;
- String currentName;
-
- public boolean hasNext() {
- return attributeIndex < attributesLength;
- }
-
- public Object next() {
- if (!hasNext()) {
- throw new NoSuchElementException();
- }
- Node current = attributes.item(attributeIndex++);
- currentName = current.getNodeName();
-
- String prefix = NameImpl.getPrefixFromTagName(currentName);
- if (prefix.length() == 0) {
- return NameImpl.createFromUnqualifiedName(currentName);
- } else {
- Name attributeName =
- NameImpl.createFromQualifiedName(
- currentName,
- current.getNamespaceURI());
- return attributeName;
- }
- }
-
- public void remove() {
- if (currentName == null) {
- throw new IllegalStateException();
- }
- attributes.removeNamedItem(currentName);
- }
- };
- }
-
- protected static String getAttributeValueFrom(Element element, Name name) {
- return getAttributeValueFrom(
- element,
- name.getURI(),
- name.getLocalName(),
- name.getPrefix(),
- name.getQualifiedName());
- }
-
- private static String getAttributeValueFrom(
- Element element,
- String uri,
- String localName,
- String prefix,
- String qualifiedName) {
-
- String nonzeroLengthUri =
- (uri == null || uri.length() == 0) ? null : uri;
-
- boolean mustUseGetAttributeNodeNS = (nonzeroLengthUri != null);
-
- if (mustUseGetAttributeNodeNS) {
-
- if (!element.hasAttributeNS(uri, localName)) {
- return null;
- }
-
- String attrValue =
- element.getAttributeNS(nonzeroLengthUri, localName);
-
- return attrValue;
- }
-
- Attr attribute = null;
- attribute = element.getAttributeNode(qualifiedName);
-
- return attribute == null ? null : attribute.getValue();
- }
-
- protected static Iterator getChildElementsFrom(final Element element) {
- return new Iterator() {
- Node next = element.getFirstChild();
- Node nextNext = null;
- Node last = null;
-
- public boolean hasNext() {
- if (next != null) {
- return true;
- }
- if (next == null && nextNext != null) {
- next = nextNext;
- }
-
- return next != null;
- }
-
- public Object next() {
- if (hasNext()) {
- last = next;
- next = null;
-
- if ((element instanceof ElementImpl)
- && (last instanceof Element)) {
- last =
- ((ElementImpl) element).convertToSoapElement(
- (Element) last);
- }
-
- nextNext = last.getNextSibling();
- return last;
- }
- throw new NoSuchElementException();
- }
-
- public void remove() {
- if (last == null) {
- throw new IllegalStateException();
- }
- Node target = last;
- last = null;
- element.removeChild(target);
- }
- };
- }
-
- public static String getQualifiedName(QName name) {
- String prefix = name.getPrefix();
- String localName = name.getLocalPart();
- String qualifiedName = null;
-
- if (prefix != null && prefix.length() > 0) {
- qualifiedName = prefix + ":" + localName;
- } else {
- qualifiedName = localName;
- }
- return qualifiedName;
- }
-
- public static String getLocalPart(String qualifiedName) {
- if (qualifiedName == null) {
- // Log
- throw new IllegalArgumentException("Cannot get local name for a \"null\" qualified name");
- }
-
- int index = qualifiedName.indexOf(':');
- if (index < 0)
- return qualifiedName;
- else
- return qualifiedName.substring(index + 1);
- }
-
- public static String getPrefix(String qualifiedName) {
- if (qualifiedName == null) {
- // Log
- throw new IllegalArgumentException("Cannot get prefix for a \"null\" qualified name");
- }
-
- int index = qualifiedName.indexOf(':');
- if (index < 0)
- return "";
- else
- return qualifiedName.substring(0, index);
- }
-
- protected boolean isNamespaceQualified(Name name) {
- return !"".equals(name.getURI());
- }
-
- protected boolean isNamespaceQualified(QName name) {
- return !"".equals(name.getNamespaceURI());
- }
-
- protected SOAPElement circumventBug5034339(SOAPElement element) {
-
- Name elementName = element.getElementName();
- if (!isNamespaceQualified(elementName)) {
- String prefix = elementName.getPrefix();
- String defaultNamespace = getNamespaceURI(prefix);
- if (defaultNamespace != null) {
- Name newElementName =
- NameImpl.create(
- elementName.getLocalName(),
- elementName.getPrefix(),
- defaultNamespace);
- SOAPElement newElement = createElement(newElementName);
- replaceChild(newElement, element);
- return newElement;
- }
- }
- return element;
- }
-
- //TODO: This is a temporary SAAJ workaround for optimizing XWS
- // should be removed once the corresponding JAXP bug is fixed
- // It appears the bug will be fixed in JAXP 1.4 (not by Appserver 9 timeframe)
- public void setAttributeNS(
- String namespaceURI,String qualifiedName, String value) {
- int index = qualifiedName.indexOf(':');
- String localName;
- if (index < 0)
- localName = qualifiedName;
- else
- localName = qualifiedName.substring(index + 1);
-
- // Workaround for bug 6467808 - This needs to be fixed in JAXP
-
- // Rolling back this fix, this is a wrong fix, infact its causing other regressions in JAXWS tck and
- // other tests, because of this change the namespace declarations on soapenv:Fault element are never
- // picked up. The fix for bug 6467808 should be in JAXP.
-// if(elementQName.getLocalPart().equals("Fault") &&
-// (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(value) ||
-// SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(value)))
-// return;
-
- super.setAttributeNS(namespaceURI,qualifiedName,value);
- //String tmpLocalName = this.getLocalName();
- String tmpURI = this.getNamespaceURI();
- boolean isIDNS = false;
- if( tmpURI != null && (tmpURI.equals(DSIG_NS) || tmpURI.equals(XENC_NS))){
- isIDNS = true;
- }
- //No need to check for Signature/encryption element
- //just check for namespace.
- if(localName.equals("Id")){
- if(namespaceURI == null || namespaceURI.equals("")){
- setIdAttribute(localName,true);
- }else if(isIDNS || WSU_NS.equals(namespaceURI)){
- setIdAttributeNS(namespaceURI,localName,true);
- }
- }
-
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,438 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.*;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.LazyEnvelope;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.StaxBridge;
-import com.sun.xml.internal.messaging.saaj.soap.StaxLazySourceBridge;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection;
-import com.sun.xml.internal.messaging.saaj.util.stax.LazyEnvelopeStaxReader;
-import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
-
-import com.sun.xml.internal.org.jvnet.staxex.util.DOMStreamReader;
-import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
-
-/**
- * Our implementation of the SOAP envelope.
- *
- * @author Anil Vijendran (anil@sun.com)
- */
-public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope {
- protected HeaderImpl header;
- protected BodyImpl body;
- String omitXmlDecl = "yes";
- String charset = "utf-8";
- String xmlDecl = null;
-
- protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, Name name) {
- super(ownerDoc, name);
- }
-
- protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, QName name) {
- super(ownerDoc, name);
- }
-
- protected EnvelopeImpl(
- SOAPDocumentImpl ownerDoc,
- NameImpl name,
- boolean createHeader,
- boolean createBody)
- throws SOAPException {
- this(ownerDoc, name);
-
- ensureNamespaceIsDeclared(
- getElementQName().getPrefix(), getElementQName().getNamespaceURI());
-
- // XXX
- if (createHeader)
- addHeader();
-
- if (createBody)
- addBody();
- }
-
- protected abstract NameImpl getHeaderName(String prefix);
- protected abstract NameImpl getBodyName(String prefix);
-
- public SOAPHeader addHeader() throws SOAPException {
- return addHeader(null);
- }
-
- public SOAPHeader addHeader(String prefix) throws SOAPException {
-
- if (prefix == null || prefix.equals("")) {
- prefix = getPrefix();
- }
-
- NameImpl headerName = getHeaderName(prefix);
- NameImpl bodyName = getBodyName(prefix);
-
- HeaderImpl header = null;
- SOAPElement firstChild = (SOAPElement) getFirstChildElement();
-
- if (firstChild != null) {
- if (firstChild.getElementName().equals(headerName)) {
- log.severe("SAAJ0120.impl.header.already.exists");
- throw new SOAPExceptionImpl("Can't add a header when one is already present.");
- } else if (!firstChild.getElementName().equals(bodyName)) {
- log.severe("SAAJ0121.impl.invalid.first.child.of.envelope");
- throw new SOAPExceptionImpl("First child of Envelope must be either a Header or Body");
- }
- }
-
- header = (HeaderImpl) createElement(headerName);
- insertBefore(header, firstChild);
- header.ensureNamespaceIsDeclared(headerName.getPrefix(), headerName.getURI());
-
- return header;
- }
-
- protected void lookForHeader() throws SOAPException {
- NameImpl headerName = getHeaderName(null);
-
- HeaderImpl hdr = (HeaderImpl) findChild(headerName);
- header = hdr;
- }
-
- public SOAPHeader getHeader() throws SOAPException {
- lookForHeader();
- return header;
- }
-
- protected void lookForBody() throws SOAPException {
- NameImpl bodyName = getBodyName(null);
-
- BodyImpl bodyChildElement = (BodyImpl) findChild(bodyName);
- body = bodyChildElement;
- }
-
- public SOAPBody addBody() throws SOAPException {
- return addBody(null);
- }
-
- public SOAPBody addBody(String prefix) throws SOAPException {
- lookForBody();
-
- if (prefix == null || prefix.equals("")) {
- prefix = getPrefix();
- }
-
- if (body == null) {
- NameImpl bodyName = getBodyName(prefix);
- body = (BodyImpl) createElement(bodyName);
- insertBefore(body, null);
- body.ensureNamespaceIsDeclared(bodyName.getPrefix(), bodyName.getURI());
- } else {
- log.severe("SAAJ0122.impl.body.already.exists");
- throw new SOAPExceptionImpl("Can't add a body when one is already present.");
- }
-
- return body;
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- if (getBodyName(null).equals(name)) {
- return addBody(name.getPrefix());
- }
- if (getHeaderName(null).equals(name)) {
- return addHeader(name.getPrefix());
- }
-
- return super.addElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- if (getBodyName(null).equals(NameImpl.convertToName(name))) {
- return addBody(name.getPrefix());
- }
- if (getHeaderName(null).equals(NameImpl.convertToName(name))) {
- return addHeader(name.getPrefix());
- }
-
- return super.addElement(name);
- }
-
- public SOAPBody getBody() throws SOAPException {
- lookForBody();
- return body;
- }
-
- public Source getContent() {
- return new DOMSource(getOwnerDocument());
- }
-
- public Name createName(String localName, String prefix, String uri)
- throws SOAPException {
-
- // validating parameters before passing them on
- // to make sure that the namespace specification rules are followed
-
- // reserved xmlns prefix cannot be used.
- if ("xmlns".equals(prefix)) {
- log.severe("SAAJ0123.impl.no.reserved.xmlns");
- throw new SOAPExceptionImpl("Cannot declare reserved xmlns prefix");
- }
- // Qualified name cannot be xmlns.
- if ((prefix == null) && ("xmlns".equals(localName))) {
- log.severe("SAAJ0124.impl.qualified.name.cannot.be.xmlns");
- throw new SOAPExceptionImpl("Qualified name cannot be xmlns");
- }
-
- return NameImpl.create(localName, prefix, uri);
- }
-
- public Name createName(String localName, String prefix)
- throws SOAPException {
- String namespace = getNamespaceURI(prefix);
- if (namespace == null) {
- log.log(
- Level.SEVERE,
- "SAAJ0126.impl.cannot.locate.ns",
- new String[] { prefix });
- throw new SOAPExceptionImpl(
- "Unable to locate namespace for prefix " + prefix);
- }
- return NameImpl.create(localName, prefix, namespace);
- }
-
- public Name createName(String localName) throws SOAPException {
- return NameImpl.createFromUnqualifiedName(localName);
- }
-
- public void setOmitXmlDecl(String value) {
- this.omitXmlDecl = value;
- }
-
- public void setXmlDecl(String value) {
- this.xmlDecl = value;
- }
-
- private String getOmitXmlDecl() {
- return this.omitXmlDecl;
- }
-
- public void setCharsetEncoding(String value) {
- charset = value;
- }
-
- public void output(OutputStream out) throws IOException {
- try {
-// materializeBody();
- Transformer transformer =
- EfficientStreamingTransformer.newTransformer();
-
- transformer.setOutputProperty(
- OutputKeys.OMIT_XML_DECLARATION, "yes");
- /*omitXmlDecl);*/
- // no equivalent for "setExpandEmptyElements"
- transformer.setOutputProperty(
- OutputKeys.ENCODING,
- charset);
-
- if (omitXmlDecl.equals("no") && xmlDecl == null) {
- xmlDecl = "";
- }
-
- StreamResult result = new StreamResult(out);
- if (xmlDecl != null) {
- OutputStreamWriter writer = new OutputStreamWriter(out, charset);
- writer.write(xmlDecl);
- writer.flush();
- result = new StreamResult(writer);
- }
-
- if (log.isLoggable(Level.FINE)) {
- log.log(Level.FINE, "SAAJ0190.impl.set.xml.declaration",
- new String[] { omitXmlDecl });
- log.log(Level.FINE, "SAAJ0191.impl.set.encoding",
- new String[] { charset });
- }
-
- //StreamResult result = new StreamResult(out);
- transformer.transform(getContent(), result);
- } catch (Exception ex) {
- throw new IOException(ex.getMessage());
- }
- }
-
- /**
- * Serialize to FI if boolean parameter set.
- */
- public void output(OutputStream out, boolean isFastInfoset)
- throws IOException
- {
- if (!isFastInfoset) {
- output(out);
- }
- else {
- try {
- // Run transform and generate FI output from content
- Source source = getContent();
- Transformer transformer = EfficientStreamingTransformer.newTransformer();
- transformer.transform(getContent(),
- FastInfosetReflection.FastInfosetResult_new(out));
- }
- catch (Exception ex) {
- throw new IOException(ex.getMessage());
- }
- }
- }
-
- // public void prettyPrint(OutputStream out) throws IOException {
- // if (getDocument() == null)
- // initDocument();
- //
- // OutputFormat format = OutputFormat.createPrettyPrint();
- //
- // format.setIndentSize(2);
- // format.setNewlines(true);
- // format.setTrimText(true);
- // format.setPadText(true);
- // format.setExpandEmptyElements(false);
- //
- // XMLWriter writer = new XMLWriter(out, format);
- // writer.write(getDocument());
- // }
- //
- // public void prettyPrint(Writer out) throws IOException {
- // if (getDocument() == null)
- // initDocument();
- //
- // OutputFormat format = OutputFormat.createPrettyPrint();
- //
- // format.setIndentSize(2);
- // format.setNewlines(true);
- // format.setTrimText(true);
- // format.setPadText(true);
- // format.setExpandEmptyElements(false);
- //
- // XMLWriter writer = new XMLWriter(out, format);
- // writer.write(getDocument());
- // }
-
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
- @Override
- public void setStaxBridge(StaxBridge bridge) throws SOAPException {
- //set it on the body
- ((BodyImpl) getBody()).setStaxBridge(bridge);
- }
-
- @Override
- public StaxBridge getStaxBridge() throws SOAPException {
- return ((BodyImpl) getBody()).getStaxBridge();
- }
-
- @Override
- public XMLStreamReader getPayloadReader() throws SOAPException {
- return ((BodyImpl) getBody()).getPayloadReader();
- }
-
- @Override
- public void writeTo(final XMLStreamWriter writer) throws XMLStreamException, SOAPException {
- StaxBridge readBridge = this.getStaxBridge();
- if (readBridge != null && readBridge instanceof StaxLazySourceBridge) {
-// StaxSoapWriteBridge writingBridge = new StaxSoapWriteBridge(this);
-// writingBridge.write(writer);
- final String soapEnvNS = this.getNamespaceURI();
- final DOMStreamReader reader = new DOMStreamReader(this);
- XMLStreamReaderToXMLStreamWriter writingBridge = new XMLStreamReaderToXMLStreamWriter();
- writingBridge.bridge( new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, writer) {
- public boolean proceedAfterStartElement() {
- if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
- return false;
- } else
- return true;
- }
- });//bridgeToBodyStartTag
- ((StaxLazySourceBridge)readBridge).writePayloadTo(writer);
- writer.writeEndElement();//body
- writer.writeEndElement();//env
- writer.writeEndDocument();
- writer.flush();
- } else {
- LazyEnvelopeStaxReader lazyEnvReader = new LazyEnvelopeStaxReader(this);
- XMLStreamReaderToXMLStreamWriter writingBridge = new XMLStreamReaderToXMLStreamWriter();
- writingBridge.bridge(lazyEnvReader, writer);
-// writingBridge.bridge(new XMLStreamReaderToXMLStreamWriter.Breakpoint(lazyEnvReader, writer));
- }
- //Assume the staxBridge is exhausted now since we would have read the body reader
- ((BodyImpl) getBody()).setPayloadStreamRead();
- }
-
- @Override
- public QName getPayloadQName() throws SOAPException {
- return ((BodyImpl) getBody()).getPayloadQName();
- }
-
- @Override
- public String getPayloadAttributeValue(String localName) throws SOAPException {
- return ((BodyImpl) getBody()).getPayloadAttributeValue(localName);
- }
-
- @Override
- public String getPayloadAttributeValue(QName qName) throws SOAPException {
- return ((BodyImpl) getBody()).getPayloadAttributeValue(qName);
- }
-
- @Override
- public boolean isLazy() {
- try {
- return ((BodyImpl) getBody()).isLazy();
- } catch (SOAPException e) {
- return false;
- }
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPFaultElement;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class FaultElementImpl
- extends ElementImpl
- implements SOAPFaultElement {
-
- protected FaultElementImpl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
- super(ownerDoc, qname);
- }
-
- protected FaultElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- protected abstract boolean isStandardFaultElement();
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,346 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.Locale;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.Element;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class FaultImpl extends ElementImpl implements SOAPFault {
-
- /* This can also represent a fault reason element */
- protected SOAPFaultElement faultStringElement;
-
- /* This can also represent a fault role element */
- protected SOAPFaultElement faultActorElement;
-
- protected SOAPFaultElement faultCodeElement;
-
- protected Detail detail;
-
- protected FaultImpl(SOAPDocumentImpl ownerDoc, NameImpl name) {
- super(ownerDoc, name);
- }
-
-
- protected abstract NameImpl getDetailName();
- protected abstract NameImpl getFaultCodeName();
- protected abstract NameImpl getFaultStringName();
- protected abstract NameImpl getFaultActorName();
- protected abstract DetailImpl createDetail();
- protected abstract FaultElementImpl createSOAPFaultElement(String localName);
- protected abstract FaultElementImpl createSOAPFaultElement(QName qname);
- protected abstract FaultElementImpl createSOAPFaultElement(Name qname);
- protected abstract void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException;
- protected abstract void finallySetFaultCode(String faultcode) throws SOAPException;
- protected abstract boolean isStandardFaultElement(String localName);
- protected abstract QName getDefaultFaultCode();
-
-
- protected void findFaultCodeElement() {
- this.faultCodeElement =
- (SOAPFaultElement) findAndConvertChildElement(getFaultCodeName());
- }
-
- protected void findFaultActorElement() {
- this.faultActorElement =
- (SOAPFaultElement) findAndConvertChildElement(getFaultActorName());
- }
-
- protected void findFaultStringElement() {
- this.faultStringElement =
- (SOAPFaultElement) findAndConvertChildElement(getFaultStringName());
- }
-
- public void setFaultCode(String faultCode) throws SOAPException {
- setFaultCode(
- NameImpl.getLocalNameFromTagName(faultCode),
- NameImpl.getPrefixFromTagName(faultCode),
- null);
- }
-
- public void setFaultCode(String faultCode, String prefix, String uri)
- throws SOAPException {
-
- if (prefix == null || "".equals(prefix)) {
- if (uri != null && !"".equals(uri)) {
- prefix = getNamespacePrefix(uri);
- if (prefix == null || "".equals(prefix)) {
- prefix = "ns0";
- }
- }
- }
- if (this.faultCodeElement == null)
- findFaultCodeElement();
-
- if (this.faultCodeElement == null)
- this.faultCodeElement = addFaultCodeElement();
- else
- this.faultCodeElement.removeContents();
-
- if (uri == null || "".equals(uri)) {
- uri = this.faultCodeElement.getNamespaceURI(prefix);
- }
- if (uri == null || "".equals(uri)) {
- if (prefix != null && !"".equals(prefix)) {
- //cannot allow an empty URI for a non-Empty prefix
- log.log(Level.SEVERE, "SAAJ0140.impl.no.ns.URI", new Object[]{prefix + ":" + faultCode});
- throw new SOAPExceptionImpl("Empty/Null NamespaceURI specified for faultCode \"" + prefix + ":" + faultCode + "\"");
- } else {
- uri = "";
- }
- }
- checkIfStandardFaultCode(faultCode, uri);
- ((FaultElementImpl) this.faultCodeElement).ensureNamespaceIsDeclared(prefix, uri);
-
- if (prefix == null || "".equals(prefix)) {
- finallySetFaultCode(faultCode);
- } else {
- finallySetFaultCode(prefix + ":" + faultCode);
- }
- }
-
- public void setFaultCode(Name faultCodeQName) throws SOAPException {
- setFaultCode(
- faultCodeQName.getLocalName(),
- faultCodeQName.getPrefix(),
- faultCodeQName.getURI());
- }
-
- public void setFaultCode(QName faultCodeQName) throws SOAPException {
- setFaultCode(
- faultCodeQName.getLocalPart(),
- faultCodeQName.getPrefix(),
- faultCodeQName.getNamespaceURI());
- }
-
- protected static QName convertCodeToQName(
- String code,
- SOAPElement codeContainingElement) {
-
- int prefixIndex = code.indexOf(':');
- if (prefixIndex == -1) {
- return new QName(code);
- }
-
- String prefix = code.substring(0, prefixIndex);
- String nsName =((ElementImpl) codeContainingElement).lookupNamespaceURI(prefix);
- //((ElementImpl) codeContainingElement).getNamespaceURI(prefix);
- return new QName(nsName, getLocalPart(code), prefix);
- }
-
- protected void initializeDetail() {
- NameImpl detailName = getDetailName();
- detail = (Detail) findAndConvertChildElement(detailName);
- }
-
- public Detail getDetail() {
- if (detail == null)
- initializeDetail();
- if ((detail != null) && (detail.getParentNode() == null)) {
- // a detach node was called on it
- detail = null;
- }
- return detail;
- }
-
- public Detail addDetail() throws SOAPException {
- if (detail == null)
- initializeDetail();
- if (detail == null) {
- detail = createDetail();
- addNode(detail);
- return detail;
- } else {
- // Log
- throw new SOAPExceptionImpl("Error: Detail already exists");
- }
- }
-
- public boolean hasDetail() {
- return (getDetail() != null);
- }
-
- public abstract void setFaultActor(String faultActor) throws SOAPException;
-
- public String getFaultActor() {
- if (this.faultActorElement == null)
- findFaultActorElement();
- if (this.faultActorElement != null) {
- return this.faultActorElement.getValue();
- }
- return null;
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
-
- log.log(
- Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(), newName.getLocalPart()});
- throw new SOAPException(
- "Cannot change name for " + elementQName.getLocalPart() + " to " + newName.getLocalPart());
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof SOAPFaultElement) {
- return (SOAPElement) element;
- } else if (element instanceof SOAPElement) {
- SOAPElement soapElement = (SOAPElement) element;
- if (getDetailName().equals(soapElement.getElementName())) {
- return replaceElementWithSOAPElement(element, createDetail());
- } else {
- String localName =
- soapElement.getElementName().getLocalName();
- if (isStandardFaultElement(localName))
- return replaceElementWithSOAPElement(
- element,
- createSOAPFaultElement(soapElement.getElementQName()));
- return soapElement;
- }
- } else {
- Name elementName = NameImpl.copyElementName(element);
- ElementImpl newElement;
- if (getDetailName().equals(elementName)) {
- newElement = (ElementImpl) createDetail();
- } else {
- String localName = elementName.getLocalName();
- if (isStandardFaultElement(localName))
- newElement =
- (ElementImpl) createSOAPFaultElement(elementName);
- else
- newElement = (ElementImpl) createElement(elementName);
- }
- return replaceElementWithSOAPElement(element, newElement);
- }
- }
-
- protected SOAPFaultElement addFaultCodeElement() throws SOAPException {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- if (this.faultCodeElement == null) {
- this.faultCodeElement =
- addSOAPFaultElement(getFaultCodeName().getLocalName());
- return this.faultCodeElement;
- } else {
- throw new SOAPExceptionImpl("Error: Faultcode already exists");
- }
- }
-
- private SOAPFaultElement addFaultStringElement() throws SOAPException {
- if (this.faultStringElement == null)
- findFaultStringElement();
- if (this.faultStringElement == null) {
- this.faultStringElement =
- addSOAPFaultElement(getFaultStringName().getLocalName());
- return this.faultStringElement;
- } else {
- // Log
- throw new SOAPExceptionImpl("Error: Faultstring already exists");
- }
- }
-
- private SOAPFaultElement addFaultActorElement() throws SOAPException {
- if (this.faultActorElement == null)
- findFaultActorElement();
- if (this.faultActorElement == null) {
- this.faultActorElement =
- addSOAPFaultElement(getFaultActorName().getLocalName());
- return this.faultActorElement;
- } else {
- // Log
- throw new SOAPExceptionImpl("Error: Faultactor already exists");
- }
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- if (getDetailName().equals(name)) {
- return addDetail();
- } else if(getFaultCodeName().equals(name)) {
- return addFaultCodeElement();
- } else if(getFaultStringName().equals(name)) {
- return addFaultStringElement();
- } else if(getFaultActorName().equals(name)) {
- return addFaultActorElement();
- }
- return super.addElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addElement(NameImpl.convertToName(name));
- }
-
- protected FaultElementImpl addSOAPFaultElement(String localName)
- throws SOAPException {
-
- FaultElementImpl faultElem = createSOAPFaultElement(localName);
- addNode(faultElem);
- return faultElem;
- }
-
- /**
- * Convert an xml:lang attribute value into a Locale object
- */
- protected static Locale xmlLangToLocale(String xmlLang) {
- if (xmlLang == null) {
- return null;
- }
-
- // Spec uses hyphen as separator
- int index = xmlLang.indexOf("-");
-
- // Accept underscore as separator as well
- if (index == -1) {
- index = xmlLang.indexOf("_");
- }
-
- if (index == -1) {
- // No separator so assume only a language component
- return new Locale(xmlLang, "");
- }
-
- String language = xmlLang.substring(0, index);
- String country = xmlLang.substring(index + 1);
- return new Locale(language, country);
- }
-
- protected static String localeToXmlLang(Locale locale) {
- String xmlLang = locale.getLanguage();
- String country = locale.getCountry();
- if (!"".equals(country)) {
- xmlLang += "-" + country;
- }
- return xmlLang;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class HeaderElementImpl
- extends ElementImpl
- implements SOAPHeaderElement {
-
- protected static Name RELAY_ATTRIBUTE_LOCAL_NAME =
- NameImpl.createFromTagName("relay");
- protected static Name MUST_UNDERSTAND_ATTRIBUTE_LOCAL_NAME =
- NameImpl.createFromTagName("mustUnderstand");
-
- public HeaderElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public HeaderElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
-
- protected abstract NameImpl getActorAttributeName();
- protected abstract NameImpl getRoleAttributeName();
- protected abstract NameImpl getMustunderstandAttributeName();
- protected abstract boolean getMustunderstandAttributeValue(String str);
- protected abstract String getMustunderstandLiteralValue(boolean mu);
- protected abstract NameImpl getRelayAttributeName();
- protected abstract boolean getRelayAttributeValue(String str);
- protected abstract String getRelayLiteralValue(boolean mu);
- protected abstract String getActorOrRole();
-
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (!(element instanceof SOAPHeader)) {
- log.severe("SAAJ0130.impl.header.elem.parent.mustbe.header");
- throw new SOAPException("Parent of a SOAPHeaderElement has to be a SOAPHeader");
- }
-
- super.setParentElement(element);
- }
-
- public void setActor(String actorUri) {
- try {
- removeAttribute(getActorAttributeName());
- addAttribute((Name) getActorAttributeName(), actorUri);
- } catch (SOAPException ex) {
- }
- }
-
- //SOAP 1.2 supports Role
- public void setRole(String roleUri) throws SOAPException {
- // runtime exception thrown if called for SOAP 1.1
- removeAttribute(getRoleAttributeName());
- addAttribute((Name) getRoleAttributeName(), roleUri);
- }
-
-
- Name actorAttNameWithoutNS = NameImpl.createFromTagName("actor");
-
- public String getActor() {
- String actor = getAttributeValue(getActorAttributeName());
- return actor;
- }
-
- Name roleAttNameWithoutNS = NameImpl.createFromTagName("role");
-
- public String getRole() {
- // runtime exception thrown for 1.1
- String role = getAttributeValue(getRoleAttributeName());
- return role;
- }
-
- public void setMustUnderstand(boolean mustUnderstand) {
- try {
- removeAttribute(getMustunderstandAttributeName());
- addAttribute(
- (Name) getMustunderstandAttributeName(),
- getMustunderstandLiteralValue(mustUnderstand));
- } catch (SOAPException ex) {
- }
- }
-
- public boolean getMustUnderstand() {
- String mu = getAttributeValue(getMustunderstandAttributeName());
-
- if (mu != null)
- return getMustunderstandAttributeValue(mu);
-
- return false;
- }
-
- public void setRelay(boolean relay) throws SOAPException {
- // runtime exception thrown for 1.1
- removeAttribute(getRelayAttributeName());
- addAttribute(
- (Name) getRelayAttributeName(),
- getRelayLiteralValue(relay));
- }
-
- public boolean getRelay() {
- String mu = getAttributeValue(getRelayAttributeName());
- if (mu != null)
- return getRelayAttributeValue(mu);
-
- return false;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.*;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public abstract class HeaderImpl extends ElementImpl implements SOAPHeader {
- protected static final boolean MUST_UNDERSTAND_ONLY = false;
-
- protected HeaderImpl(SOAPDocumentImpl ownerDoc, NameImpl name) {
- super(ownerDoc, name);
- }
-
- protected abstract SOAPHeaderElement createHeaderElement(Name name)
- throws SOAPException;
- protected abstract SOAPHeaderElement createHeaderElement(QName name)
- throws SOAPException;
- protected abstract NameImpl getNotUnderstoodName();
- protected abstract NameImpl getUpgradeName();
- protected abstract NameImpl getSupportedEnvelopeName();
-
- public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException {
- SOAPElement newHeaderElement =
- ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name.getLocalName(),
- name.getPrefix(),
- name.getURI());
- if (newHeaderElement == null
- || !(newHeaderElement instanceof SOAPHeaderElement)) {
- newHeaderElement = createHeaderElement(name);
- }
-
- // header elements must be namespace qualified
- // check that URI is not empty, ensuring that the element is NS qualified.
- String uri = newHeaderElement.getElementQName().getNamespaceURI();
- if ((uri == null) || ("").equals(uri)) {
- log.severe("SAAJ0131.impl.header.elems.ns.qualified");
- throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
- }
- addNode(newHeaderElement);
- return (SOAPHeaderElement) newHeaderElement;
- }
-
- public SOAPHeaderElement addHeaderElement(QName name) throws SOAPException {
- SOAPElement newHeaderElement =
- ElementFactory.createNamedElement(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name.getLocalPart(),
- name.getPrefix(),
- name.getNamespaceURI());
- if (newHeaderElement == null
- || !(newHeaderElement instanceof SOAPHeaderElement)) {
- newHeaderElement = createHeaderElement(name);
- }
-
- // header elements must be namespace qualified
- // check that URI is not empty, ensuring that the element is NS qualified.
- String uri = newHeaderElement.getElementQName().getNamespaceURI();
- if ((uri == null) || ("").equals(uri)) {
- log.severe("SAAJ0131.impl.header.elems.ns.qualified");
- throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
- }
- addNode(newHeaderElement);
- return (SOAPHeaderElement) newHeaderElement;
- }
-
- protected SOAPElement addElement(Name name) throws SOAPException {
- return addHeaderElement(name);
- }
-
- protected SOAPElement addElement(QName name) throws SOAPException {
- return addHeaderElement(name);
- }
-
- public Iterator examineHeaderElements(String actor) {
- return getHeaderElementsForActor(actor, false, false);
- }
-
- public Iterator extractHeaderElements(String actor) {
- return getHeaderElementsForActor(actor, true, false);
- }
-
- protected Iterator getHeaderElementsForActor(
- String actor,
- boolean detach,
- boolean mustUnderstand) {
- if (actor == null || actor.equals("")) {
- log.severe("SAAJ0132.impl.invalid.value.for.actor.or.role");
- throw new IllegalArgumentException("Invalid value for actor or role");
- }
- return getHeaderElements(actor, detach, mustUnderstand);
- }
-
- protected Iterator getHeaderElements(
- String actor,
- boolean detach,
- boolean mustUnderstand) {
- List elementList = new ArrayList();
-
- Iterator eachChild = getChildElements();
-
- Object currentChild = iterate(eachChild);
- while (currentChild != null) {
- if (!(currentChild instanceof SOAPHeaderElement)) {
- currentChild = iterate(eachChild);
- } else {
- HeaderElementImpl currentElement =
- (HeaderElementImpl) currentChild;
- currentChild = iterate(eachChild);
-
- boolean isMustUnderstandMatching =
- (!mustUnderstand || currentElement.getMustUnderstand());
- boolean doAdd = false;
- if (actor == null && isMustUnderstandMatching) {
- doAdd = true;
- } else {
- String currentActor = currentElement.getActorOrRole();
- if (currentActor == null) {
- currentActor = "";
- }
-
- if (currentActor.equalsIgnoreCase(actor)
- && isMustUnderstandMatching) {
- doAdd = true;
- }
- }
-
- if (doAdd) {
- elementList.add(currentElement);
- if (detach) {
- currentElement.detachNode();
- }
- }
- }
- }
-
- return elementList.listIterator();
- }
-
- private Object iterate(Iterator each) {
- return each.hasNext() ? each.next() : null;
- }
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (!(element instanceof SOAPEnvelope)) {
- log.severe("SAAJ0133.impl.header.parent.mustbe.envelope");
- throw new SOAPException("Parent of SOAPHeader has to be a SOAPEnvelope");
- }
- super.setParentElement(element);
- }
-
- // overriding ElementImpl's method to ensure that HeaderElements are
- // namespace qualified. Holds for both SOAP versions.
- // TODO - This check needs to be made for other addChildElement() methods
- // as well.
- public SOAPElement addChildElement(String localName) throws SOAPException {
-
- SOAPElement element = super.addChildElement(localName);
- // check that URI is not empty, ensuring that the element is NS qualified.
- String uri = element.getElementName().getURI();
- if ((uri == null) || ("").equals(uri)) {
- log.severe("SAAJ0134.impl.header.elems.ns.qualified");
- throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
- }
- return element;
- }
-
- public Iterator examineAllHeaderElements() {
- return getHeaderElements(null, false, MUST_UNDERSTAND_ONLY);
- }
-
- public Iterator examineMustUnderstandHeaderElements(String actor) {
- return getHeaderElements(actor, false, true);
-
- }
-
- public Iterator extractAllHeaderElements() {
- return getHeaderElements(null, true, false);
- }
-
- public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSoapUris)
- throws SOAPException {
- if (supportedSoapUris == null) {
- log.severe("SAAJ0411.ver1_2.no.null.supportedURIs");
- throw new SOAPException("Argument cannot be null; iterator of supportedURIs cannot be null");
- }
- if (!supportedSoapUris.hasNext()) {
- log.severe("SAAJ0412.ver1_2.no.empty.list.of.supportedURIs");
- throw new SOAPException("List of supported URIs cannot be empty");
- }
- Name upgradeName = getUpgradeName();
- SOAPHeaderElement upgradeHeaderElement =
- (SOAPHeaderElement) addChildElement(upgradeName);
- Name supportedEnvelopeName = getSupportedEnvelopeName();
- int i = 0;
- while (supportedSoapUris.hasNext()) {
- SOAPElement subElement =
- upgradeHeaderElement.addChildElement(supportedEnvelopeName);
- String ns = "ns" + Integer.toString(i);
- subElement.addAttribute(
- NameImpl.createFromUnqualifiedName("qname"),
- ns + ":Envelope");
- subElement.addNamespaceDeclaration(
- ns,
- (String) supportedSoapUris.next());
- i ++;
- }
- return upgradeHeaderElement;
- }
-
- public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
- throws SOAPException {
- return addUpgradeHeaderElement(new String[] {supportedSoapUri});
- }
-
- public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
- throws SOAPException {
-
- if (supportedSoapUris == null) {
- log.severe("SAAJ0411.ver1_2.no.null.supportedURIs");
- throw new SOAPException("Argument cannot be null; array of supportedURIs cannot be null");
- }
- if (supportedSoapUris.length == 0) {
- log.severe("SAAJ0412.ver1_2.no.empty.list.of.supportedURIs");
- throw new SOAPException("List of supported URIs cannot be empty");
- }
- Name upgradeName = getUpgradeName();
- SOAPHeaderElement upgradeHeaderElement =
- (SOAPHeaderElement) addChildElement(upgradeName);
- Name supportedEnvelopeName = getSupportedEnvelopeName();
- for (int i = 0; i < supportedSoapUris.length; i ++) {
- SOAPElement subElement =
- upgradeHeaderElement.addChildElement(supportedEnvelopeName);
- String ns = "ns" + Integer.toString(i);
- subElement.addAttribute(
- NameImpl.createFromUnqualifiedName("qname"),
- ns + ":Envelope");
- subElement.addNamespaceDeclaration(ns, supportedSoapUris[i]);
- }
- return upgradeHeaderElement;
- }
-
- protected SOAPElement convertToSoapElement(Element element) {
- if (element instanceof SOAPHeaderElement) {
- return (SOAPElement) element;
- } else {
- SOAPHeaderElement headerElement;
- try {
- headerElement =
- createHeaderElement(NameImpl.copyElementName(element));
- } catch (SOAPException e) {
- throw new ClassCastException("Could not convert Element to SOAPHeaderElement: " + e.getMessage());
- }
- return replaceElementWithSOAPElement(
- element,
- (ElementImpl) headerElement);
- }
- }
-
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- log.log(Level.SEVERE,
- "SAAJ0146.impl.invalid.name.change.requested",
- new Object[] {elementQName.getLocalPart(),
- newName.getLocalPart()});
- throw new SOAPException("Cannot change name for "
- + elementQName.getLocalPart() + " to "
- + newName.getLocalPart());
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: Parent of a SOAPBodyElement has to be a SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Unable to locate namespace for prefix {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Cannot add fragments which contain elements which are in the SOAP namespace
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Encoding style {0} should be a valid URI
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: Cannot pass NULL to setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Cannot setValue on an Element that does not have an only child of type Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Error: Fault already exists
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: Parent of SOAPBody has to be a SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: Cannot pass NULL to setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Cannot split text from a Comment Node
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Cannot replace whole text from a Comment Node
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Can't add a header when one is already present
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: First child of Envelope must be either a Header or Body
-SAAJ0122.impl.body.already.exists=SAAJ0122: Can't add a body when one is already present
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Cannot declare reserved xmlns prefix
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Qualified name cannot be xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Unable to locate namespace for prefix {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Cannot pass NULL to setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: Parent of a SOAPHeaderElement has to be a SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements must be namespace qualified
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Invalid value for actor or role
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: Parent of SOAPHeader has to be a SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements must be namespace qualified
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: Empty/Null NamespaceURI specified for faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail already exists
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text not supported by this SOAP version, try SOAP 1.2 or later
-SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node not supported by this SOAP version, try SOAP 1.2 or later
-SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role not supported by this SOAP version, try SOAP 1.2 or later
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Cannot pass NULL to setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Cannot change name of element {0} to {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Cannot change the URI for prefix {0} from {1} to {2} in setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=Non-empty namespace URI: {0} for an empty prefix in SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: prefix cannot be "null" when creating a QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Cannot extract Document from body
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Unable to extract Document from body
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: Added attribute {0}
-SAAJ0151.impl.no.children=SAAJ0151: Cannot find node containing value: there are no children
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Cannot find node containing value: first child is not a Text node
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Cannot find node containing value: There is more than one child node
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: A SOAPFault element can only be added as a child of SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: A Detail element can only be added as a child of a SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: Cannot add SOAPFault, a SOAPFault should be the only child of a SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Cannot add Detail, Detail already exists
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAP Version mismatch encountered when trying to add SOAPFault to SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: SOAP Version mismatch encountered when trying to add Detail to SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omit XML declaration set to {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: Encoding is set to {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: \u00DCbergeordnetes Element von SOAPBodyElement muss ein SOAPBody sein
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Namespace f\u00FCr Pr\u00E4fix {0} kann nicht gefunden werden
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Es k\u00F6nnen keine Fragmente hinzugef\u00FCgt werden, die Elemente enthalten, die im SOAP-Namespace enthalten sind
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Codierungsstil {0} muss ein g\u00FCltiger URI sein
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: NULL kann nicht an setParentElement \u00FCbergeben werden
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: setValue ist bei einem Element nicht m\u00F6glich, das nicht ein einziges untergeordnetes Element vom Typ Text hat
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Fehler: Fault ist bereits vorhanden
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: \u00DCbergeordnetes Element von SOAPBody muss SOAPEnvelope sein
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: NULL kann nicht an setParentElement \u00FCbergeben werden
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Text aus einem Kommentarknoten kann nicht geteilt werden
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Gesamter Text aus einem Kommentarknoten kann nicht ersetzt werden
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Es kann kein Header hinzugef\u00FCgt werden, wenn bereits ein Header vorhanden ist
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Erstes untergeordnetes Element von Envelope muss "Header" oder "Body" sein
-SAAJ0122.impl.body.already.exists=SAAJ0122: Es kann kein Nachrichtentext hinzugef\u00FCgt werden, wenn bereits ein Nachrichtentext vorhanden ist
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Reserviertes xmlns-Pr\u00E4fix kann nicht deklariert werden
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Vollst\u00E4ndiger Name darf nicht xmlns sein
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Namespace f\u00FCr Pr\u00E4fix {0} kann nicht gefunden werden
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: NULL kann nicht an setParentElement \u00FCbergeben werden
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: \u00DCbergeordnetes Element von SOAPHeaderElement muss ein SOAPHeader sein
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements muss mit Namespace angegeben werden
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Ung\u00FCltiger Wert f\u00FCr Actor oder Rolle
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: \u00DCbergeordnetes Element von SOAPHeader muss SOAPEnvelope sein
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements muss mit Namespace angegeben werden
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: Leerer/Null-NamespaceURI f\u00FCr faultCode {0} angegeben
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail ist bereits vorhanden
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Ursache/Text wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
-SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Knoten wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
-SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Rolle wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: NULL kann nicht an setParentElement \u00FCbergeben werden
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Name des Elements {0} kann nicht in {1} ge\u00E4ndert werden
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Der URI f\u00FCr Pr\u00E4fix {0} kann nicht von {1} in {2} in setElementQName ge\u00E4ndert werden
-SAAJ0148.impl.invalid.prefix.for.uri=Nicht-leerer Namespace-URI: {0} f\u00FCr ein leeres Pr\u00E4fix in SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: Pr\u00E4fix darf bei der Erstellung eines QName nicht "null" sein
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Dokument kann nicht aus Nachrichtentext extrahiert werden
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Dokument kann nicht aus Nachrichtentext extrahiert werden
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: Attribut {0} hinzugef\u00FCgt
-SAAJ0151.impl.no.children=SAAJ0151: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: es sind keine untergeordneten Elemente vorhanden
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: erstes untergeordnetes Element ist kein Textknoten
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: Es ist mehr als ein untergeordneter Knoten vorhanden
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: Ein SOAPFault-Element kann nur als untergeordnetes Element von SOAPBody hinzugef\u00FCgt werden
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Ein "Detail"-Element kann nur als untergeordnetes Element von SOAPFault hinzugef\u00FCgt werden
-SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault kann nicht hinzugef\u00FCgt werden, SOAPFault muss das einzige untergeordnete Element von SOAPBody sein
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail kann nicht hinzugef\u00FCgt werden, Detail ist bereits vorhanden
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: Nicht \u00FCbereinstimmende SOAP-Version beim Versuch aufgetreten, SOAPFault zu SOAPBody hinzuzuf\u00FCgen
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Nicht \u00FCbereinstimmende SOAP-Version beim Versuch aufgetreten, Detail zu SOAPBody hinzuzuf\u00FCgen
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Deklaration "Omit XML" auf {0} gesetzt
-SAAJ0191.impl.set.encoding=SAAJ0191: Codierung ist auf {0} gesetzt
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: el principal de un SOAPBodyElement tiene que ser un SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: no se ha encontrado el espacio de nombres para el prefijo {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: no se pueden agregar fragmentos que contengan elementos que se encuentren en el espacio de nombres de SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: el estilo de codificaci\u00F3n {0} debe ser un URI v\u00E1lido
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: no se puede transferir NULL a setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: no se puede definir un valor en un elemento que no tenga un \u00FAnico secundario de tipo Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Error: ya existe el fallo
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: el principal de SOAPBody tiene que ser SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: no se puede transferir NULL a setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: no se puede dividir el texto de un nodo de comentarios
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: no se puede sustituir el texto completo de un nodo de comentarios
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: no se puede agregar una cabecera si ya hay una
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: el primer secundario de Envelope debe ser Header o Body
-SAAJ0122.impl.body.already.exists=SAAJ0120: no se puede agregar un cuerpo si ya hay uno
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: no se puede declarar el prefijo xmlns reservado
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: el nombre cualificado no puede ser xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: no se ha encontrado el espacio de nombres para el prefijo {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: no se puede transferir NULL a setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: el principal de SOAPHeaderElement tiene que ser SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements debe estar cualificado por espacio de nombres
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: valor no v\u00E1lido para actor o rol
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: el principal de SOAPHeader tiene que ser SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements debe estar cualificado por espacio de nombres
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: se ha especificado un URI de espacio de nombres vac\u00EDo o nulo para el c\u00F3digo de fallo {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: ya existe el detalle
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: el fallo/motivo/texto no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
-SAAJ0143.impl.node.not.supported=SAAJ0143: El fallo/nodo no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
-SAAJ0144.impl.role.not.supported=SAAJ0143: el fallo/rol no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: no se puede transferir NULL a setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: no se puede cambiar el nombre del elemento {0} por {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: no se puede cambiar el URI del prefijo {0} de {1} a {2} en setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI de espacio de nombres no vac\u00EDo: {0} para un prefijo vac\u00EDo en SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: el prefijo no puede ser "null" al crear un QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: no se puede extraer el documento del cuerpo
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: no se ha podido extraer el documento del cuerpo
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: se ha agregado el atributo {0}
-SAAJ0151.impl.no.children=SAAJ0151: no se ha encontrado el nodo que contiene el valor: no hay secundarios
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: no se ha encontrado el nodo que contiene el valor: el primer secundario no es un nodo de texto
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: no se ha encontrado el nodo que contiene el valor: hay m\u00E1s de un nodo secundario
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: un elemento SOAPFault s\u00F3lo se puede agregar como secundario de SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: un elemento Detail s\u00F3lo se puede agregar como secundario de SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: no se puede agregar SOAPFault; SOAPFault debe ser el \u00FAnico secundario de SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: no se puede agregar el detalle. El detalle ya existe
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: se ha encontrado un error de coincidencia de la versi\u00F3n de SOAP al intentar agregar SOAPFault a SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: se ha encontrado un error de coincidencia de la versi\u00F3n de SOAP al intentar agregar Detail a SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: omita la declaraci\u00F3n XML definida en {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: la codificaci\u00F3n se ha definido en {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101 : le parent d'un \u00E9l\u00E9ment SOAPBodyElement doit \u00EAtre un \u00E9l\u00E9ment SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102 : impossible de localiser l''espace de noms pour le pr\u00E9fixe {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103 : impossible d'ajouter les fragments qui contiennent les \u00E9l\u00E9ments figurant dans l'espace de noms SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105 : le style d''encodage {0} doit \u00EAtre un URI valide
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107 : impossible de d\u00E9finir la valeur sur un \u00E9l\u00E9ment qui ne comporte aucun enfant unique de type Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110 : erreur : l'erreur existe d\u00E9j\u00E0
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111 : le parent de SOAPBody doit \u00EAtre un \u00E9l\u00E9ment SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113 : impossible de s\u00E9parer le texte d'un noeud de commentaire
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114 : impossible de remplacer l'ensemble du texte \u00E0 partir d'un noeud de commentaire
-
-SAAJ0120.impl.header.already.exists=SAAJ0120 : impossible d'ajouter un en-t\u00EAte lorsqu'il en existe d\u00E9j\u00E0 un
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121 : le premier enfant de Envelope doit \u00EAtre un \u00E9l\u00E9ment Header ou Body
-SAAJ0122.impl.body.already.exists=SAAJ0122 : impossible d'ajouter un corps lorsqu'il en existe d\u00E9j\u00E0 un
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123 : impossible de d\u00E9clarer le pr\u00E9fixe xmlns r\u00E9serv\u00E9
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124 : le nom qualifi\u00E9 ne peut pas \u00EAtre xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126 : impossible de localiser l''espace de noms pour le pr\u00E9fixe {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130 : le parent d'un \u00E9l\u00E9ment SOAPHeaderElement doit \u00EAtre un \u00E9l\u00E9ment SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131 : les \u00E9l\u00E9ments Header doivent \u00EAtre des espaces de noms qualifi\u00E9s
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132 : valeur non valide pour l'acteur ou le r\u00F4le
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133 : le parent de SOAPHeader doit \u00EAtre un \u00E9l\u00E9ment SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134 : les \u00E9l\u00E9ments Header doivent \u00EAtre des espaces de noms qualifi\u00E9s
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140 : NamespaceURI vide/NULL indiqu\u00E9 pour faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141 : l'\u00E9l\u00E9ment Detail existe d\u00E9j\u00E0
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Reason/Text non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
-SAAJ0143.impl.node.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Node non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
-SAAJ0144.impl.role.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Role non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145 : impossible de transmettre la valeur NULL \u00E0 setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146 : impossible de modifier le nom de l''\u00E9l\u00E9ment {0} en {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147 : impossible de modifier l''URI pour le pr\u00E9fixe {0} de {1} en {2} dans setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI d''espace de noms non vide : {0} pour un pr\u00E9fixe vide dans SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149 : le pr\u00E9fixe ne peut pas \u00EAtre "NULL" lors de la cr\u00E9ation d'un QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250 : impossible d'extraire le document du corps
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251 : impossible d'extraire le document du corps
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150 : attribut {0} ajout\u00E9
-SAAJ0151.impl.no.children=SAAJ0151 : noeud contenant la valeur introuvable : il n'existe aucun enfant
-SAAJ0152.impl.first.child.not.text.node=SAAJ0151 : noeud contenant la valeur introuvable : le premier enfant n'est pas un noeud Text
-SAAJ0153.impl.multiple.children.same.value=SAAJ0151 : noeud contenant la valeur introuvable : il existe plusieurs noeuds enfant
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154 : un \u00E9l\u00E9ment SOAPFault peut \u00EAtre ajout\u00E9 uniquement en tant qu'enfant de SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155 : un \u00E9l\u00E9ment Detail peut \u00EAtre ajout\u00E9 uniquement en tant qu'enfant d'un \u00E9l\u00E9ment SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156 : impossible d'ajouter SOAPFault ; un \u00E9l\u00E9ment SOAPFault doit \u00EAtre le seul enfant d'un \u00E9l\u00E9ment SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157 : impossible d'ajouter l'\u00E9l\u00E9ment Detail, il existe d\u00E9j\u00E0
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158 : non-concordance de versions SOAP d\u00E9tect\u00E9e lors de la tentative d'ajout de SOAPFault \u00E0 SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0158 : non-concordance de versions SOAP d\u00E9tect\u00E9e lors de la tentative d'ajout de Detail \u00E0 SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190 : omettre la d\u00E9claration XML d\u00E9finie sur {0}
-SAAJ0191.impl.set.encoding=SAAJ0191 : l''encodage est d\u00E9fini sur {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: L'elemento padre di un SOAPBodyElement deve essere un SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Impossibile trovare lo spazio di nomi per il prefisso {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Impossibile aggiungere frammenti che contengono elementi presenti nello spazio di nomi SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Lo stile di codifica {0} deve essere un URI valido
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: Impossibile passare NULL a setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Impossibile usare setValue su un elemento che non ha solo un elemento figlio di tipo Text
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: Errore: Fault esiste gi\u00E0
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: L'elemento padre di SOAPBody deve essere un SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: Impossibile passare NULL a setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Impossibile dividere il testo di un Comment Node
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Impossibile sostituire tutto il testo di un Comment Node
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Impossibile aggiungere un'intestazione quando ne \u00E8 gi\u00E0 presente una
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Il primo elemento figlio di Envelope deve essere Header o Body
-SAAJ0122.impl.body.already.exists=SAAJ0122: Impossibile aggiungere un corpo quando ne \u00E8 gi\u00E0 presente uno
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Impossibile dichiarare riservato il prefisso xmlns
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Il nome qualificato non pu\u00F2 essere xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Impossibile trovare lo spazio di nomi per il prefisso {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Impossibile passare NULL a setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: L'elemento padre di un SOAPHeaderElement deve essere un SSOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements deve essere qualificato per lo spazio di nomi
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Valore non valido per l'attore o il ruolo
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: L'elemento padre di SOAPHeader deve essere un SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements deve essere qualificato per lo spazio di nomi
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: URI dello spazio di nomi vuoto/nullo specificato per faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail esiste gi\u00E0
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
-SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
-SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Impossibile passare NULL a setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Impossibile modificare il nome dell''elemento {0} in {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Impossibile modificare l''URI per il prefisso {0} da {1} a {2} in setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI dello spazio di nomi non vuoto: {0} per un prefisso vuoto in SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: Il prefisso non pu\u00F2 essere "null" durante la creazione di un QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Impossibile estrarre Document dal corpo
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Impossibile estrarre Document dal corpo
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: Attributo {0} aggiunto
-SAAJ0151.impl.no.children=SAAJ0151: Impossibile trovare il nodo contenente il valore: non sono presenti elementi figlio
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Impossibile trovare il nodo contenente il valore: il primo elemento figlio non \u00E8 un nodo testo
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Impossibile trovare il nodo contenente il valore: sono presenti pi\u00F9 nodi figlio
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: Un elemento SOAPFault pu\u00F2 essere aggiunto solo come elemento figlio di SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Un elemento Detail pu\u00F2 essere aggiunto solo come elemento figlio di un SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: Impossibile aggiungere SOAPFault. SOAPFault deve essere l'unico elemento figlio di SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Impossibile aggiungere Detail. Detail esiste gi\u00E0.
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: Mancata corrispondenza della versione SOAP rilevata durante il tentativo di aggiungere SOAPFault a SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Mancata corrispondenza della versione SOAP rilevata durante il tentativo di aggiungere il dettaglio a SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omettere la dichiarazione XML impostata su {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: La codifica \u00E8 impostata su {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement\u306E\u89AA\u306FSOAPBody\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u63A5\u982D\u8F9E{0}\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: SOAP\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u5B58\u5728\u3059\u308B\u8981\u7D20\u3092\u542B\u3080\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u30FB\u30B9\u30BF\u30A4\u30EB{0}\u306F\u6709\u52B9\u306AURI\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u30BF\u30A4\u30D7\u304C\u30C6\u30AD\u30B9\u30C8\u306E\u552F\u4E00\u306E\u5B50\u304C\u306A\u3044\u8981\u7D20\u306B\u5024\u3092\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \u30A8\u30E9\u30FC: \u30D5\u30A9\u30EB\u30C8\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody\u306E\u89AA\u306FSOAPEnvelope\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u30B3\u30E1\u30F3\u30C8\u30FB\u30CE\u30FC\u30C9\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u3092\u5206\u5272\u3067\u304D\u307E\u305B\u3093
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u30B3\u30E1\u30F3\u30C8\u30FB\u30CE\u30FC\u30C9\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u5168\u4F53\u3092\u7F6E\u63DB\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: \u30D8\u30C3\u30C0\u30FC\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\u306E\u6700\u521D\u306E\u5B50\u306FHeader\u307E\u305F\u306FBody\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0122.impl.body.already.exists=SAAJ0122: \u672C\u6587\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u4E88\u7D04\u6E08\u306Exmlns\u63A5\u982D\u8F9E\u3092\u5BA3\u8A00\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u4FEE\u98FE\u540D\u3092xmlns\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u63A5\u982D\u8F9E{0}\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement\u306E\u89AA\u306FSOAPHeader\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \u30A2\u30AF\u30BF\u30FC\u307E\u305F\u306F\u30ED\u30FC\u30EB\u306E\u5024\u304C\u7121\u52B9\u3067\u3059
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader\u306E\u89AA\u306FSOAPEnvelope\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: faultCode {0}\u306B\u6307\u5B9A\u3055\u308C\u305FNamespaceURI\u304C\u7A7A/Null\u3067\u3059
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u7406\u7531/\u30C6\u30AD\u30B9\u30C8\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0143.impl.node.not.supported=SAAJ0143: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u30CE\u30FC\u30C9\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0144.impl.role.not.supported=SAAJ0144: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u30ED\u30FC\u30EB\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u8981\u7D20{0}\u306E\u540D\u524D\u3092{1}\u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: setElementQName\u306E\u63A5\u982D\u8F9E{0}\u306EURI\u3092{1}\u304B\u3089{2}\u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName\u306E\u7A7A\u306E\u63A5\u982D\u8F9E\u306B\u7A7A\u767D\u4EE5\u5916\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI: {0}\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0149.impl.null.prefix=SAAJ0149: QName\u3092\u4F5C\u6210\u3059\u308B\u5834\u5408\u3001\u63A5\u982D\u8F9E\u3092\u300Cnull\u300D\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u672C\u6587\u304B\u3089\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u672C\u6587\u304B\u3089\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: \u5C5E\u6027{0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-SAAJ0151.impl.no.children=SAAJ0151: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u5B50\u304C\u3042\u308A\u307E\u305B\u3093
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u6700\u521D\u306E\u5B50\u304C\u30C6\u30AD\u30B9\u30C8\u30FB\u30CE\u30FC\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u8907\u6570\u306E\u5B50\u30CE\u30FC\u30C9\u304C\u3042\u308A\u307E\u3059
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault\u8981\u7D20\u306FSOAPBody\u306E\u5B50\u3068\u3057\u3066\u306E\u307F\u8FFD\u52A0\u3067\u304D\u307E\u3059
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail\u8981\u7D20\u306FSOAPFault\u306E\u5B50\u3068\u3057\u3066\u306E\u307F\u8FFD\u52A0\u3067\u304D\u307E\u3059
-SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002SOAPFault\u306FSOAPBody\u306E\u552F\u4E00\u306E\u5B50\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAPFault\u3092SOAPBody\u306B\u8FFD\u52A0\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E0D\u4E00\u81F4\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Detail\u3092SOAPFault\u306B\u8FFD\u52A0\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E0D\u4E00\u81F4\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omit XML\u5BA3\u8A00\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
-SAAJ0191.impl.set.encoding=SAAJ0191: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement\uC758 \uC0C1\uC704\uB294 SOAPBody\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: SOAP \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC788\uB294 \uC694\uC18C\uAC00 \uD3EC\uD568\uB41C \uB2E8\uD3B8\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \uC778\uCF54\uB529 \uC2A4\uD0C0\uC77C {0}\uC740(\uB294) \uC801\uD569\uD55C URI\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Text \uC720\uD615\uC758 \uC720\uC77C\uD55C \uD558\uC704\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C\uC5D0 \uB300\uD574 \uAC12\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \uC624\uB958: Fault\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody\uC758 \uC0C1\uC704\uB294 SOAPEnvelope\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \uC8FC\uC11D \uB178\uB4DC\uC5D0\uC11C \uD14D\uC2A4\uD2B8\uB97C \uBD84\uD560\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \uC8FC\uC11D \uB178\uB4DC\uC758 \uC804\uCCB4 \uD14D\uC2A4\uD2B8\uB97C \uBC14\uAFC0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: Header\uAC00 \uC874\uC7AC\uD558\uB294 \uACBD\uC6B0 Header\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\uC758 \uCCAB\uBC88\uC9F8 \uD558\uC704\uB294 Header \uB610\uB294 Body\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0122.impl.body.already.exists=SAAJ0122: Body\uAC00 \uC874\uC7AC\uD558\uB294 \uACBD\uC6B0 Body\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \uC608\uC57D\uB41C xmlns \uC811\uB450\uC5B4\uB97C \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \uC815\uADDC\uD654\uB41C \uC774\uB984\uC740 xmlns\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement\uC758 \uC0C1\uC704\uB294 SOAPHeader\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \uC791\uC5C5\uC790 \uB610\uB294 \uB864\uC5D0 \uB300\uD55C \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader\uC758 \uC0C1\uC704\uB294 SOAPEnvelope\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: faultCode {0}\uC5D0 \uB300\uD574 \uBE48/\uB110 NamespaceURI\uAC00 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Reason/Text\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-SAAJ0143.impl.node.not.supported=SAAJ0143: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Node\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-SAAJ0144.impl.role.not.supported=SAAJ0144: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Role\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: {0} \uC694\uC18C\uC758 \uC774\uB984\uC744 {1}(\uC73C)\uB85C \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: setElementQName\uC5D0\uC11C {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C URI\uB97C {1}\uC5D0\uC11C {2}(\uC73C)\uB85C \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName\uC5D0 \uBE48 \uC811\uB450\uC5B4\uC5D0 \uB300\uD574 \uBE44\uC5B4 \uC788\uC9C0 \uC54A\uC740 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI {0}\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0149.impl.null.prefix=SAAJ0149: QName\uC744 \uC0DD\uC131\uD558\uB294 \uACBD\uC6B0 \uC811\uB450\uC5B4\uB294 "null"\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \uBCF8\uBB38\uC5D0\uC11C \uBB38\uC11C\uB97C \uCD94\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \uBCF8\uBB38\uC5D0\uC11C \uBB38\uC11C\uB97C \uCD94\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0151.impl.no.children=SAAJ0151: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uD558\uC704 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uCCAB\uBC88\uC9F8 \uD558\uC704\uAC00 \uD14D\uC2A4\uD2B8 \uB178\uB4DC\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uD558\uC704 \uB178\uB4DC\uAC00 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \uC694\uC18C\uB294 SOAPBody\uC758 \uD558\uC704\uB85C\uB9CC \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail \uC694\uC18C\uB294 SOAPFault\uC758 \uD558\uC704\uB85C\uB9CC \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
-SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. SOAPFault\uB294 SOAPBody\uC758 \uC720\uC77C\uD55C \uD558\uC704\uC5EC\uC57C \uD569\uB2C8\uB2E4.
-SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAPBody\uC5D0 SOAPFault\uB97C \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SOAP \uBC84\uC804 \uBD88\uC77C\uCE58\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: SOAPFault\uC5D0 Detail\uC744 \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SOAP \uBC84\uC804 \uBD88\uC77C\uCE58\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: XML \uC120\uC5B8 \uC0DD\uB7B5\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
-SAAJ0191.impl.set.encoding=SAAJ0191: \uC778\uCF54\uB529\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: o pai de um SOAPBodyElement deve ser um SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: n\u00E3o \u00E9 poss\u00EDvel localizar o namespace do prefixo {0}
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: n\u00E3o \u00E9 poss\u00EDvel adicionar fragmentos que cont\u00EAm elementos que est\u00E3o no namespace de SOAP
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: estilo {0} de codifica\u00E7\u00E3o deve ser um URI v\u00E1lido
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: n\u00E3o \u00E9 poss\u00EDvel setValue em um Elemento que n\u00E3o tem um s\u00F3 filho do tipo Texto
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: erro: j\u00E1 existe falha
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: o pai de SOAPBody deve ser um SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: n\u00E3o \u00E9 poss\u00EDvel dividir o texto de um N\u00F3 do Coment\u00E1rio
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: n\u00E3o \u00E9 poss\u00EDvel substituir todo o texto de um N\u00F3 de Coment\u00E1rio
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: n\u00E3o \u00E9 poss\u00EDvel adicionar um cabe\u00E7alho quando h\u00E1 houver um
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: o primeiro filho do Envelope deve ser um Cabe\u00E7alho ou um Corpo
-SAAJ0122.impl.body.already.exists=SAAJ0122: n\u00E3o \u00E9 poss\u00EDvel adicionar um corpo quando j\u00E1 houver um
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: n\u00E3o \u00E9 poss\u00EDvel declarar o prefixo xmlns reservado
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: o nome qualificado n\u00E3o pode ser xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: n\u00E3o \u00E9 poss\u00EDvel localizar namespace para o prefixo {0}
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: o pai de um SOAPHeaderElement deve ser um SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements deve ser um namespace qualificado
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: valor inv\u00E1lido para ator ou atribui\u00E7\u00E3o
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: o pai de um SOAPHeader deve ser um SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements deve ser um namespace qualificado
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: NamespaceURI Vazio/Nulo especificado para faultCode {0}
-SAAJ0141.impl.detail.exists=SAAJ0141: o detalhe j\u00E1 existe
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: falha/motivo/texto n\u00E3o suportado por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
-SAAJ0143.impl.node.not.supported=SAAJ0143: falha/n\u00F3 n\u00E3o suportados por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
-SAAJ0144.impl.role.not.supported=SAAJ0144: falha/atribui\u00E7\u00E3o n\u00E3o suportada por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: n\u00E3o \u00E9 poss\u00EDvel alterar o nome do elemento {0} para {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: n\u00E3o \u00E9 poss\u00EDvel alterar o URI do prefixo {0} de {1} para {2} no setElementQName
-SAAJ0148.impl.invalid.prefix.for.uri=URI de namespace n\u00E3o vazio: {0} para um prefixo vazio no SetElementQName
-SAAJ0149.impl.null.prefix=SAAJ0149: o prefixo n\u00E3o pode ser "nulo" ao criar um QName
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: n\u00E3o \u00E9 poss\u00EDvel extrair o Documento do corpo
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: n\u00E3o \u00E9 poss\u00EDvel extrair o documento do corpo
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: atributo {0} adicionado
-SAAJ0151.impl.no.children=SAAJ0151: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: n\u00E3o h\u00E1 filhos
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: o primeiro filho n\u00E3o \u00E9 um n\u00F3 de Texto
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: h\u00E1 mais de um n\u00F3 filho
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: um elemento de SOAPFault s\u00F3 pode ser adicionado como filho de SOAPBody
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: um elemento de Detalhe s\u00F3 pode ser adicionado como um filho de um SOAPFault
-SAAJ0156.impl.adding.fault.error=SAAJ0156: n\u00E3o \u00E9 poss\u00EDvel adicionar SOAPFault, um SOAPFault deve ser filho s\u00F3 de um SOAPBody
-SAAJ0157.impl.detail.exists.error=SAAJ0157: n\u00E3o \u00E9 poss\u00EDvel adicionar Detalhe, o Detalhe j\u00E1 existe
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: incompatibilidade da vers\u00E3o SOAP encontrada ao tentar adicionar SOAPFault ao SOAPBody
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: incompatibilidade da vers\u00E3o SOAP encontrada ao tentar adicionar Detalhes \u00E0 SOAPFault
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: omitir conjunto de declara\u00E7\u00F5es de XML para {0}
-SAAJ0191.impl.set.encoding=SAAJ0191: codifica\u00E7\u00E3o definida como {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u627E\u4E0D\u5230\u524D\u7F00{0}\u7684\u540D\u79F0\u7A7A\u95F4
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: \u65E0\u6CD5\u6DFB\u52A0\u5305\u542B\u4F4D\u4E8E SOAP \u540D\u79F0\u7A7A\u95F4\u4E2D\u7684\u5143\u7D20\u7684\u7247\u6BB5
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u7F16\u7801\u6837\u5F0F{0}\u5E94\u8BE5\u662F\u6709\u6548\u7684 URI
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u5BF9\u4E8E\u5E76\u975E\u53EA\u5177\u6709\u6587\u672C\u7C7B\u578B\u5B50\u7EA7\u7684\u5143\u7D20, \u4E0D\u80FD\u6267\u884C setValue
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \u9519\u8BEF: \u6545\u969C\u5DF2\u5B58\u5728
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u65E0\u6CD5\u62C6\u5206\u6765\u81EA\u6CE8\u91CA\u8282\u70B9\u7684\u6587\u672C
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u65E0\u6CD5\u66FF\u6362\u6765\u81EA\u6CE8\u91CA\u8282\u70B9\u7684\u5168\u90E8\u6587\u672C
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: \u5F53\u6807\u5934\u5DF2\u5B58\u5728\u65F6, \u65E0\u6CD5\u6DFB\u52A0\u6807\u5934
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: \u4FE1\u5C01\u7684\u7B2C\u4E00\u4E2A\u5B50\u7EA7\u5FC5\u987B\u662F\u6807\u5934\u6216\u6B63\u6587
-SAAJ0122.impl.body.already.exists=SAAJ0122: \u5F53\u6B63\u6587\u5DF2\u5B58\u5728\u65F6, \u65E0\u6CD5\u6DFB\u52A0\u6B63\u6587
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u65E0\u6CD5\u58F0\u660E\u4FDD\u7559\u7684 xmlns \u524D\u7F00
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u9650\u5B9A\u540D\u4E0D\u80FD\u662F xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u627E\u4E0D\u5230\u524D\u7F00{0}\u7684\u540D\u79F0\u7A7A\u95F4
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \u64CD\u4F5C\u8005\u6216\u89D2\u8272\u7684\u503C\u65E0\u6548
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: \u4E3A faultCode {0} \u6307\u5B9A\u7684 NamespaceURI \u5FC5\u987B\u4E3A\u7A7A/\u7A7A\u503C
-SAAJ0141.impl.detail.exists=SAAJ0141: \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u539F\u56E0/\u6587\u672C, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
-SAAJ0143.impl.node.not.supported=SAAJ0143: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u8282\u70B9, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
-SAAJ0144.impl.role.not.supported=SAAJ0144: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u89D2\u8272, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u65E0\u6CD5\u5C06\u5143\u7D20{0}\u7684\u540D\u79F0\u66F4\u6539\u4E3A{1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: \u65E0\u6CD5\u5C06 setElementQName \u4E2D\u524D\u7F00{0}\u7684 URI \u4ECE {1} \u66F4\u6539\u4E3A {2}
-SAAJ0148.impl.invalid.prefix.for.uri=\u975E\u7A7A\u540D\u79F0\u7A7A\u95F4 URI: {0} \u7528\u4E8E SetElementQName \u4E2D\u7684\u7A7A\u524D\u7F00
-SAAJ0149.impl.null.prefix=SAAJ0149: \u521B\u5EFA QName \u65F6, \u524D\u7F00\u4E0D\u80FD\u4E3A "\u7A7A\u503C"
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u65E0\u6CD5\u4ECE\u6B63\u6587\u4E2D\u63D0\u53D6\u6587\u6863
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u65E0\u6CD5\u4ECE\u6B63\u6587\u4E2D\u63D0\u53D6\u6587\u6863
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: \u5DF2\u6DFB\u52A0\u5C5E\u6027{0}
-SAAJ0151.impl.no.children=SAAJ0151: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u6CA1\u6709\u4EFB\u4F55\u5B50\u7EA7
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u7B2C\u4E00\u4E2A\u5B50\u7EA7\u4E0D\u662F\u6587\u672C\u8282\u70B9
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u5B58\u5728\u591A\u4E2A\u5B50\u8282\u70B9
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \u5143\u7D20\u53EA\u80FD\u4F5C\u4E3A SOAPBody \u7684\u5B50\u7EA7\u6DFB\u52A0
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: \u8BE6\u7EC6\u4FE1\u606F\u5143\u7D20\u53EA\u80FD\u4F5C\u4E3A SOAPFault \u7684\u5B50\u7EA7\u6DFB\u52A0
-SAAJ0156.impl.adding.fault.error=SAAJ0156: \u65E0\u6CD5\u6DFB\u52A0 SOAPFault, SOAPFault \u53EA\u5E94\u8BE5\u662F SOAPBody \u7684\u5B50\u7EA7
-SAAJ0157.impl.detail.exists.error=SAAJ0157: \u65E0\u6CD5\u6DFB\u52A0\u8BE6\u7EC6\u4FE1\u606F, \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: \u5C1D\u8BD5\u5C06 SOAPFault \u6DFB\u52A0\u5230 SOAPBody \u65F6\u9047\u5230 SOAP \u7248\u672C\u4E0D\u5339\u914D\u60C5\u51B5
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: \u5C1D\u8BD5\u5C06\u8BE6\u7EC6\u4FE1\u606F\u6DFB\u52A0\u5230 SOAPFault \u65F6\u9047\u5230 SOAP \u7248\u672C\u4E0D\u5339\u914D\u60C5\u51B5
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: \u9057\u6F0F XML \u58F0\u660E\u8BBE\u7F6E\u4E3A{0}
-SAAJ0191.impl.set.encoding=SAAJ0191: \u7F16\u7801\u8BBE\u7F6E\u4E3A{0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for impl
-# Error messages
-SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPBody
-SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u627E\u4E0D\u5230\u524D\u7F6E\u78BC {0} \u7684\u547D\u540D\u7A7A\u9593
-SAAJ0103.impl.cannot.add.fragements=SAAJ0103: \u7121\u6CD5\u65B0\u589E\u5305\u542B SOAP \u547D\u540D\u7A7A\u9593\u4E2D\u4E4B\u5143\u7D20\u7684\u7247\u6BB5
-SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u7DE8\u78BC\u6A23\u5F0F {0} \u61C9\u662F\u6709\u6548\u7684 URI
-SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u7121\u6CD5\u5728\u4E0D\u542B\u552F\u4E00 Text \u985E\u578B\u5B50\u9805\u7684\u300C\u5143\u7D20\u300D\u4E0A\u4F7F\u7528 setValue
-
-SAAJ0110.impl.fault.already.exists=SAAJ0110: \u932F\u8AA4: Fault \u5DF2\u7D93\u5B58\u5728
-SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPEnvelope
-
-SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u4E0D\u80FD\u5F9E\u300CComment \u7BC0\u9EDE\u300D\u5206\u5272\u6587\u5B57
-SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u4E0D\u80FD\u5F9E\u300CComment \u7BC0\u9EDE\u300D\u53D6\u4EE3\u6574\u500B\u6587\u5B57
-
-SAAJ0120.impl.header.already.exists=SAAJ0120: \u6A19\u982D\u5DF2\u7D93\u5B58\u5728\u6642\u4E0D\u80FD\u65B0\u589E\u6A19\u982D
-SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\u7684\u7B2C\u4E00\u500B\u5B50\u9805\u5FC5\u9808\u662F Header \u6216 Body
-SAAJ0122.impl.body.already.exists=SAAJ0122: \u4E3B\u9AD4\u5DF2\u7D93\u5B58\u5728\u6642\u4E0D\u80FD\u65B0\u589E\u4E3B\u9AD4
-SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u4E0D\u80FD\u5BA3\u544A\u4FDD\u7559\u7684 xmlns \u524D\u7F6E\u78BC
-SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u5B8C\u6574\u540D\u7A31\u4E0D\u80FD\u662F xmlns
-#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
-SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u627E\u4E0D\u5230\u524D\u7F6E\u78BC {0} \u7684\u547D\u540D\u7A7A\u9593
-SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-
-SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPHeader
-SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: actor \u6216 role \u7684\u503C\u7121\u6548
-SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPEnvelope
-SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
-
-SAAJ0140.impl.no.ns.URI=SAAJ0140: \u70BA faultCode {0} \u6307\u5B9A\u7684\u662F\u7A7A\u7684/\u7A7A\u503C NamespaceURI
-SAAJ0141.impl.detail.exists=SAAJ0141: Detail \u5DF2\u7D93\u5B58\u5728
-SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Reason/Text, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
-SAAJ0143.impl.node.not.supported=SAAJ0143: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Node, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
-SAAJ0144.impl.role.not.supported=SAAJ0144: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Role, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
-SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
-SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u4E0D\u80FD\u5C07\u5143\u7D20 {0} \u7684\u540D\u7A31\u8B8A\u66F4\u70BA {1}
-SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: \u4E0D\u80FD\u5C07 setElementQName \u4E2D\u524D\u7F6E\u78BC {0} \u7684 URI \u5F9E {1} \u8B8A\u66F4\u70BA {2}
-SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName \u4E2D\u7684\u7A7A\u524D\u7F6E\u78BC\u6709\u975E\u7A7A\u767D\u7684\u547D\u540D\u7A7A\u9593 URI: {0}
-SAAJ0149.impl.null.prefix=SAAJ0149: \u5EFA\u7ACB QName \u6642, \u524D\u7F6E\u78BC\u4E0D\u80FD\u662F "null"
-
-SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u4E0D\u80FD\u5F9E\u4E3B\u9AD4\u64F7\u53D6 Document
-SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u7121\u6CD5\u5F9E\u4E3B\u9AD4\u64F7\u53D6 Document
-
-# Debug messages
-SAAJ0150.impl.added.attr=SAAJ0150: \u5DF2\u65B0\u589E\u5C6C\u6027 {0}
-SAAJ0151.impl.no.children=SAAJ0151: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u6C92\u6709\u5B50\u9805
-SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u7B2C\u4E00\u500B\u5B50\u9805\u4E0D\u662F Text \u7BC0\u9EDE
-SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u5B50\u7BC0\u9EDE
-SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \u5143\u7D20\u53EA\u80FD\u65B0\u589E\u6210\u70BA SOAPBody \u7684\u5B50\u9805
-SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail \u5143\u7D20\u53EA\u80FD\u65B0\u589E\u6210\u70BA SOAPFault \u7684\u5B50\u9805
-SAAJ0156.impl.adding.fault.error=SAAJ0156: \u7121\u6CD5\u65B0\u589E SOAPFault, SOAPFault \u61C9\u70BA SOAPBody \u7684\u552F\u4E00\u5B50\u9805
-SAAJ0157.impl.detail.exists.error=SAAJ0157: \u7121\u6CD5\u65B0\u589E Detail, Detail \u5DF2\u7D93\u5B58\u5728
-SAAJ0158.impl.version.mismatch.fault=SAAJ0158: \u5617\u8A66\u65B0\u589E SOAPFault \u81F3 SOAPBody \u6642, \u767C\u751F SOAP \u7248\u672C\u4E0D\u7B26
-SAAJ0159.impl.version.mismatch.detail=SAAJ0159: \u5617\u8A66\u65B0\u589E Detail \u81F3 SOAPFault \u6642, \u767C\u751F SOAP \u7248\u672C\u4E0D\u7B26
-
-# Info messages
-SAAJ0190.impl.set.xml.declaration=SAAJ0190: \u7701\u7565\u8A2D\u70BA {0} \u7684 XML \u5BA3\u544A
-SAAJ0191.impl.set.encoding=SAAJ0191: \u7DE8\u78BC\u5DF2\u8A2D\u70BA {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.ResourceBundle;
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Text;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class SOAPCommentImpl
- extends com.sun.org.apache.xerces.internal.dom.CommentImpl
- implements javax.xml.soap.Text, org.w3c.dom.Comment {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
- protected static ResourceBundle rb =
- log.getResourceBundle();
-
- public SOAPCommentImpl(SOAPDocumentImpl ownerDoc, String text) {
- super(ownerDoc, text);
- }
-
- public String getValue() {
- String nodeValue = getNodeValue();
- return (nodeValue.equals("") ? null : nodeValue);
- }
-
- public void setValue(String text) {
- setNodeValue(text);
- }
-
-
- public void setParentElement(SOAPElement element) throws SOAPException {
- if (element == null) {
- log.severe("SAAJ0112.impl.no.null.to.parent.elem");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- ((ElementImpl) element).addNode(this);
- }
-
- public SOAPElement getParentElement() {
- return (SOAPElement) getParentNode();
- }
-
- public void detachNode() {
- org.w3c.dom.Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- public boolean isComment() {
- return true;
- }
-
- public Text splitText(int offset) throws DOMException {
- log.severe("SAAJ0113.impl.cannot.split.text.from.comment");
- throw new UnsupportedOperationException("Cannot split text from a Comment Node.");
- }
-
- public Text replaceWholeText(String content) throws DOMException {
- log.severe("SAAJ0114.impl.cannot.replace.wholetext.from.comment");
- throw new UnsupportedOperationException("Cannot replace Whole Text from a Comment Node.");
- }
-
- public String getWholeText() {
- //TODO: maybe we have to implement this in future.
- throw new UnsupportedOperationException("Not Supported");
- }
-
- public boolean isElementContentWhitespace() {
- //TODO: maybe we have to implement this in future.
- throw new UnsupportedOperationException("Not Supported");
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-import java.util.logging.Logger;
-
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class SOAPTextImpl
- extends com.sun.org.apache.xerces.internal.dom.TextImpl
- implements javax.xml.soap.Text, org.w3c.dom.Text {
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
-
- public SOAPTextImpl(SOAPDocumentImpl ownerDoc, String text) {
- super(ownerDoc, text);
- }
-
- public String getValue() {
- String nodeValue = getNodeValue();
- return (nodeValue.equals("") ? null : nodeValue);
- }
-
- public void setValue(String text) {
- setNodeValue(text);
- }
-
- public void setParentElement(SOAPElement parent) throws SOAPException {
- if (parent == null) {
- log.severe("SAAJ0126.impl.cannot.locate.ns");
- throw new SOAPException("Cannot pass NULL to setParentElement");
- }
- ((ElementImpl) parent).addNode(this);
- }
-
- public SOAPElement getParentElement() {
- return (SOAPElement) getParentNode();
- }
-
-
- public void detachNode() {
- org.w3c.dom.Node parent = getParentNode();
- if (parent != null) {
- parent.removeChild(this);
- }
- }
-
- public void recycleNode() {
- detachNode();
- // TBD
- // - add this to the factory so subsequent
- // creations can reuse this object.
- }
-
- public boolean isComment() {
- String txt = getNodeValue();
- if (txt == null) {
- return false;
- }
- return txt.startsWith("");
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.impl;
-
-public class TreeException extends RuntimeException {
- public TreeException(String reason) {
- super(reason);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Cannot create a name from a null tag
-SAAJ0202.name.invalid.arg.format=SAAJ0202: Argument "{0}" must be of the form: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Name kann nicht aus einem Null-Tag erstellt werden
-SAAJ0202.name.invalid.arg.format=SAAJ0202: Argument "{0}" muss folgende Form aufweisen: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: no se puede crear un nombre desde una etiqueta nula
-SAAJ0202.name.invalid.arg.format=SAAJ0202: El argumento "{0}" debe tener el formato: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201 : impossible de cr\u00E9er un nom \u00E0 partir d'une balise NULL
-SAAJ0202.name.invalid.arg.format=SAAJ0202 : l''argument "{0}" doit avoir le format suivant : prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Impossibile creare un nome da una tag nulla
-SAAJ0202.name.invalid.arg.format=SAAJ0202: L''argomento "{0}" deve avere il formato: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: null\u306E\u30BF\u30B0\u304B\u3089\u540D\u524D\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
-SAAJ0202.name.invalid.arg.format=SAAJ0202: \u5F15\u6570"{0}"\u306Fprefix:localName\u306E\u5F62\u5F0F\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \uB110 \uD0DC\uADF8\uC5D0\uC11C \uC774\uB984\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-SAAJ0202.name.invalid.arg.format=SAAJ0202: "{0}" \uC778\uC218\uB294 prefix:localName \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: n\u00E3o \u00E9 poss\u00EDvel criar um nome a partir de uma tag nula
-SAAJ0202.name.invalid.arg.format=SAAJ0202: o argumento "{0}" deve estar no formato: prefix.localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \u65E0\u6CD5\u4ECE\u7A7A\u503C\u6807\u8BB0\u521B\u5EFA\u540D\u79F0
-SAAJ0202.name.invalid.arg.format=SAAJ0202: \u53C2\u6570 "{0}" \u5FC5\u987B\u91C7\u7528\u4EE5\u4E0B\u5F62\u5F0F: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# SAAJ ResourceBundle properties file
-# Contains Log messages for name pkg
-# Error messages
-SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \u7121\u6CD5\u5F9E\u7A7A\u503C\u6A19\u8A18\u5EFA\u7ACB\u540D\u7A31
-SAAJ0202.name.invalid.arg.format=SAAJ0202: \u5F15\u6578 "{0}" \u7684\u683C\u5F0F\u5FC5\u9808\u662F: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,561 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.soap.name;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPConstants;
-
-//import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
-import org.w3c.dom.Element;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-
-public class NameImpl implements Name {
- public static final String XML_NAMESPACE_PREFIX = "xml";
- public static final String XML_SCHEMA_NAMESPACE_PREFIX = "xs";
- public static final String SOAP_ENVELOPE_PREFIX = "SOAP-ENV";
-
- public static final String XML_NAMESPACE =
- "http://www.w3.org/XML/1998/namespace";
- public static final String SOAP11_NAMESPACE =
- SOAPConstants.URI_NS_SOAP_ENVELOPE;
- public static final String SOAP12_NAMESPACE =
- SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE;
- public static final String XML_SCHEMA_NAMESPACE =
- "http://www.w3.org/2001/XMLSchema";
-
- protected String uri = "";
- protected String localName = "";
- protected String prefix = "";
- private String qualifiedName = null;
-
- protected static final Logger log =
- Logger.getLogger(LogDomainConstants.NAMING_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.name.LocalStrings");
-
- /**
- * XML Information Set REC
- * all namespace attributes (including those named xmlns,
- * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
- */
- public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern();
-
- protected NameImpl(String name) {
- this.localName = name == null ? "" : name;
- }
-
- protected NameImpl(String name, String prefix, String uri) {
- this.uri = uri == null ? "" : uri;
- this.localName = name == null ? "" : name;
- this.prefix = prefix == null ? "" : prefix;
-
- if (this.prefix.equals("xmlns") && this.uri.equals("")) {
- this.uri = XMLNS_URI;
- }
- if (this.uri.equals(XMLNS_URI) && this.prefix.equals("")) {
- this.prefix = "xmlns";
- }
- }
-
- public static Name convertToName(QName qname) {
- return new NameImpl(qname.getLocalPart(),
- qname.getPrefix(),
- qname.getNamespaceURI());
- }
-
- public static QName convertToQName(Name name) {
- return new QName(name.getURI(),
- name.getLocalName(),
- name.getPrefix());
- }
-
- public static NameImpl createFromUnqualifiedName(String name) {
- return new NameImpl(name);
- }
-
- public static Name createFromTagName(String tagName) {
- return createFromTagAndUri(tagName, "");
- }
-
- public static Name createFromQualifiedName(
- String qualifiedName,
- String uri) {
- return createFromTagAndUri(qualifiedName, uri);
- }
-
- protected static Name createFromTagAndUri(String tagName, String uri) {
- if (tagName == null) {
- log.severe("SAAJ0201.name.not.created.from.null.tag");
- throw new IllegalArgumentException("Cannot create a name from a null tag.");
- }
- int index = tagName.indexOf(':');
- if (index < 0) {
- return new NameImpl(tagName, "", uri);
- } else {
- return new NameImpl(
- tagName.substring(index + 1),
- tagName.substring(0, index),
- uri);
- }
- }
-
- protected static int getPrefixSeparatorIndex(String qualifiedName) {
- int index = qualifiedName.indexOf(':');
- if (index < 0) {
- log.log(
- Level.SEVERE,
- "SAAJ0202.name.invalid.arg.format",
- new String[] { qualifiedName });
- throw new IllegalArgumentException(
- "Argument \""
- + qualifiedName
- + "\" must be of the form: \"prefix:localName\"");
- }
- return index;
- }
-
- public static String getPrefixFromQualifiedName(String qualifiedName) {
- return qualifiedName.substring(
- 0,
- getPrefixSeparatorIndex(qualifiedName));
- }
-
- public static String getLocalNameFromQualifiedName(String qualifiedName) {
- return qualifiedName.substring(
- getPrefixSeparatorIndex(qualifiedName) + 1);
- }
-
- public static String getPrefixFromTagName(String tagName) {
- if (isQualified(tagName)) {
- return getPrefixFromQualifiedName(tagName);
- }
- return "";
- }
-
- public static String getLocalNameFromTagName(String tagName) {
- if (isQualified(tagName)) {
- return getLocalNameFromQualifiedName(tagName);
- }
- return tagName;
- }
-
- public static boolean isQualified(String tagName) {
- return tagName.indexOf(':') >= 0;
- }
-
- public static NameImpl create(String name, String prefix, String uri) {
- if (prefix == null)
- prefix = "";
- if (uri == null)
- uri = "";
- if (name == null)
- name = "";
-
- if (!uri.equals("") && !name.equals("")) {
- if (uri.equals(NameImpl.SOAP11_NAMESPACE)) {
- if (name.equalsIgnoreCase("Envelope"))
- return createEnvelope1_1Name(prefix);
- else if (name.equalsIgnoreCase("Header"))
- return createHeader1_1Name(prefix);
- else if (name.equalsIgnoreCase("Body"))
- return createBody1_1Name(prefix);
- else if (name.equalsIgnoreCase("Fault"))
- return createFault1_1Name(prefix);
- else
- return new SOAP1_1Name(name, prefix);
- } else if (uri.equals(SOAP12_NAMESPACE)) {
- if (name.equalsIgnoreCase("Envelope"))
- return createEnvelope1_2Name(prefix);
- else if (name.equalsIgnoreCase("Header"))
- return createHeader1_2Name(prefix);
- else if (name.equalsIgnoreCase("Body"))
- return createBody1_2Name(prefix);
- else if (
- name.equals("Fault")
- || name.equals("Reason")
- || name.equals("Detail"))
- return createFault1_2Name(name, prefix);
- else if (name.equals("Code") || name.equals("Subcode"))
- return createCodeSubcode1_2Name(prefix, name);
- else
- return new SOAP1_2Name(name, prefix);
- }
-
- }
- return new NameImpl(name, prefix, uri);
- }
-
- public static String createQName(String prefix, String localName) {
- if (prefix == null || prefix.equals("")) {
- return localName;
- }
- return prefix + ":" + localName;
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof Name)) {
- return false;
- }
-
- Name otherName = (Name) obj;
-
- if (!uri.equals(otherName.getURI())) {
- return false;
- }
-
- if (!localName.equals(otherName.getLocalName())) {
- return false;
- }
-
- return true;
- }
-
- public int hashCode() {
- return localName.hashCode();
- }
-
- /**
- * Get the local name part of this XML Name.
- *
- * @return a string for the local name.
- */
- public String getLocalName() {
- return localName;
- }
-
- /* getQualifiedName is inherited from QName */
-
- /**
- * Returns the prefix associated with the namespace of the name.
- *
- * @return the prefix as a string.
- */
- public String getPrefix() {
- return prefix;
- }
-
- /**
- * Returns the URI associated of the namespace.
- *
- * @return the uri as a string.
- */
- public String getURI() {
- return uri;
- }
-
- /**
- * Returns a String version of the name suitable for use in an XML document.
- */
- public String getQualifiedName() {
- if (qualifiedName == null) {
- if (prefix != null && prefix.length() > 0) {
- qualifiedName = prefix + ":" + localName;
- } else {
- qualifiedName = localName;
- }
- }
- return qualifiedName;
- }
-
- /**
- * Create a name object for a SOAP1.1 Envelope.
- */
- public static NameImpl createEnvelope1_1Name(String prefix) {
- return new Envelope1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Envelope.
- */
- public static NameImpl createEnvelope1_2Name(String prefix) {
- return new Envelope1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Header.
- */
- public static NameImpl createHeader1_1Name(String prefix) {
- return new Header1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Header.
- */
- public static NameImpl createHeader1_2Name(String prefix) {
- return new Header1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Body.
- */
- public static NameImpl createBody1_1Name(String prefix) {
- return new Body1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Body.
- */
- public static NameImpl createBody1_2Name(String prefix) {
- return new Body1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Fault.
- */
- public static NameImpl createFault1_1Name(String prefix) {
- return new Fault1_1Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 NotUnderstood element.
- */
- public static NameImpl createNotUnderstood1_2Name(String prefix) {
- return new NotUnderstood1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Upgrade element.
- */
- public static NameImpl createUpgrade1_2Name(String prefix) {
- return new Upgrade1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 SupportedEnvelope Upgrade element.
- */
- public static NameImpl createSupportedEnvelope1_2Name(String prefix) {
- return new SupportedEnvelope1_2Name(prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2
- * Fault, Reason or Detail.
- *
- * @param localName Local Name of element
- */
- public static NameImpl createFault1_2Name(
- String localName,
- String prefix) {
- return new Fault1_2Name(localName, prefix);
- }
-
- /**
- * Create a name object for a SOAP1.2 Fault/Code or Subcode.
- *
- * @param localName Either "Code" or "Subcode"
- */
- public static NameImpl createCodeSubcode1_2Name(
- String prefix,
- String localName) {
- return new CodeSubcode1_2Name(localName, prefix);
- }
-
- /**
- * Create a name object for a SOAP1.1 Fault Detail.
- */
- public static NameImpl createDetail1_1Name() {
- return new Detail1_1Name();
- }
-
- public static NameImpl createDetail1_1Name(String prefix) {
- return new Detail1_1Name(prefix);
- }
-
- public static NameImpl createFaultElement1_1Name(String localName) {
- return new FaultElement1_1Name(localName);
- }
-
- public static NameImpl createFaultElement1_1Name(String localName,
- String prefix) {
- return new FaultElement1_1Name(localName, prefix);
- }
-
- public static NameImpl createSOAP11Name(String string) {
- return new SOAP1_1Name(string, null);
- }
- public static NameImpl createSOAP12Name(String string) {
- return new SOAP1_2Name(string, null);
- }
-
- public static NameImpl createSOAP12Name(String localName, String prefix) {
- return new SOAP1_2Name(localName, prefix);
- }
-
- public static NameImpl createXmlName(String localName) {
- return new NameImpl(localName, XML_NAMESPACE_PREFIX, XML_NAMESPACE);
- }
-
- public static Name copyElementName(Element element) {
- String localName = element.getLocalName();
- String prefix = element.getPrefix();
- String uri = element.getNamespaceURI();
- return create(localName, prefix, uri);
- }
-
-
-static class SOAP1_1Name extends NameImpl {
- SOAP1_1Name(String name, String prefix) {
- super(
- name,
- (prefix == null || prefix.equals(""))
- ? NameImpl.SOAP_ENVELOPE_PREFIX
- : prefix,
- NameImpl.SOAP11_NAMESPACE);
- }
-}
-
-static class Envelope1_1Name extends SOAP1_1Name {
- Envelope1_1Name(String prefix) {
- super("Envelope", prefix);
- }
-}
-
-static class Header1_1Name extends SOAP1_1Name {
- Header1_1Name(String prefix) {
- super("Header", prefix);
- }
-}
-
-static class Body1_1Name extends SOAP1_1Name {
- Body1_1Name(String prefix) {
- super("Body", prefix);
- }
-}
-
-static class Fault1_1Name extends NameImpl {
- Fault1_1Name(String prefix) {
- super(
- "Fault",
- (prefix == null || prefix.equals(""))
- ? SOAP_ENVELOPE_PREFIX
- : prefix,
- SOAP11_NAMESPACE);
- }
-}
-
-static class Detail1_1Name extends NameImpl {
- Detail1_1Name() {
- super("detail");
- }
-
- Detail1_1Name(String prefix) {
- super("detail", prefix, "");
- }
-}
-
-static class FaultElement1_1Name extends NameImpl {
- FaultElement1_1Name(String localName) {
- super(localName);
- }
-
- FaultElement1_1Name(String localName, String prefix) {
- super(localName, prefix, "");
- }
-}
-
-static class SOAP1_2Name extends NameImpl {
- SOAP1_2Name(String name, String prefix) {
- super(
- name,
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class Envelope1_2Name extends SOAP1_2Name {
- Envelope1_2Name(String prefix) {
- super("Envelope", prefix);
- }
-}
-
-static class Header1_2Name extends SOAP1_2Name {
- Header1_2Name(String prefix) {
- super("Header", prefix);
- }
-}
-
-static class Body1_2Name extends SOAP1_2Name {
- Body1_2Name(String prefix) {
- super("Body", prefix);
- }
-}
-
-static class Fault1_2Name extends NameImpl {
- Fault1_2Name(String name, String prefix) {
- super(
- (name == null || name.equals("")) ? "Fault" : name,
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class NotUnderstood1_2Name extends NameImpl {
- NotUnderstood1_2Name(String prefix) {
- super(
- "NotUnderstood",
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class Upgrade1_2Name extends NameImpl {
- Upgrade1_2Name(String prefix) {
- super(
- "Upgrade",
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class SupportedEnvelope1_2Name extends NameImpl {
- SupportedEnvelope1_2Name(String prefix) {
- super(
- "SupportedEnvelope",
- (prefix == null || prefix.equals(""))
- ? SOAPConstants.SOAP_ENV_PREFIX
- : prefix,
- SOAP12_NAMESPACE);
- }
-}
-
-static class CodeSubcode1_2Name extends SOAP1_2Name {
- CodeSubcode1_2Name(String prefix, String localName) {
- super(prefix, localName);
- }
-}
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.Locale;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.*;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Body1_1Impl extends BodyImpl {
- public Body1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createBody1_1Name(prefix));
- }
-
- public SOAPFault addSOAP12Fault(QName faultCode, String faultReason, Locale locale) {
- // log message here
- throw new UnsupportedOperationException("Not supported in SOAP 1.1");
- }
-
- protected NameImpl getFaultName(String name) {
- // Ignore name
- return NameImpl.createFault1_1Name(null);
- }
-
- protected SOAPBodyElement createBodyElement(Name name) {
- return new BodyElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected SOAPBodyElement createBodyElement(QName name) {
- return new BodyElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- name);
- }
-
- protected QName getDefaultFaultCode() {
- return new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server");
- }
-
- protected boolean isFault(SOAPElement child) {
- // SOAP 1.1 faults always use the default name
- return child.getElementName().equals(getFaultName(null));
- }
-
- protected SOAPFault createFaultElement() {
- return new Fault1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(), getPrefix());
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.BodyElementImpl;
-
-public class BodyElement1_1Impl extends BodyElementImpl {
-
- public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- BodyElementImpl copy =
- new BodyElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.DetailEntry;
-import javax.xml.soap.Name;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Detail1_1Impl extends DetailImpl {
-
- public Detail1_1Impl(SOAPDocumentImpl ownerDoc, String prefix) {
- super(ownerDoc, NameImpl.createDetail1_1Name(prefix));
- }
- public Detail1_1Impl(SOAPDocumentImpl ownerDoc) {
- super(ownerDoc, NameImpl.createDetail1_1Name());
- }
- protected DetailEntry createDetailEntry(Name name) {
- return new DetailEntry1_1Impl(
- (SOAPDocumentImpl) getOwnerDocument(),
- name);
- }
- protected DetailEntry createDetailEntry(QName name) {
- return new DetailEntry1_1Impl(
- (SOAPDocumentImpl) getOwnerDocument(),
- name);
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Name;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.DetailEntryImpl;
-
-public class DetailEntry1_1Impl extends DetailEntryImpl {
-
- public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
- super(ownerDoc, qname);
- }
- public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
- super(ownerDoc, qname);
- }
- public SOAPElement setElementQName(QName newName) throws SOAPException {
- DetailEntryImpl copy =
- new DetailEntry1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
- return replaceElementWithSOAPElement(this,copy);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import javax.xml.soap.SOAPException;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-
-public class Envelope1_1Impl extends EnvelopeImpl {
-
- public Envelope1_1Impl(SOAPDocumentImpl ownerDoc, String prefix){
- super(ownerDoc, NameImpl.createEnvelope1_1Name(prefix));
- }
- Envelope1_1Impl(
- SOAPDocumentImpl ownerDoc,
- String prefix,
- boolean createHeader,
- boolean createBody)
- throws SOAPException {
- super(
- ownerDoc,
- NameImpl.createEnvelope1_1Name(prefix),
- createHeader,
- createBody);
- }
- protected NameImpl getBodyName(String prefix) {
- return NameImpl.createBody1_1Name(prefix);
- }
-
- protected NameImpl getHeaderName(String prefix) {
- return NameImpl.createHeader1_1Name(prefix);
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,387 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
-*
-* @author SAAJ RI Development Team
-*/
-package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
-
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPFaultElement;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPConstants;
-import javax.xml.soap.Name;
-import javax.xml.soap.Name;
-
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
-import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
-import com.sun.xml.internal.messaging.saaj.soap.impl.*;
-import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
-import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
-import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
-
-
-public class Fault1_1Impl extends FaultImpl {
-
- protected static final Logger log =
- Logger.getLogger(
- LogDomainConstants.SOAP_VER1_1_DOMAIN,
- "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
-
- public Fault1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
- super(ownerDocument, NameImpl.createFault1_1Name(prefix));
- }
-
- protected NameImpl getDetailName() {
- return NameImpl.createDetail1_1Name();
- }
-
- protected NameImpl getFaultCodeName() {
- return NameImpl.createFromUnqualifiedName("faultcode");
- }
-
- protected NameImpl getFaultStringName() {
- return NameImpl.createFromUnqualifiedName("faultstring");
- }
-
- protected NameImpl getFaultActorName() {
- return NameImpl.createFromUnqualifiedName("faultactor");
- }
-
- protected DetailImpl createDetail() {
- return new Detail1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument());
- }
-
- protected FaultElementImpl createSOAPFaultElement(String localName) {
- return new FaultElement1_1Impl(
- ((SOAPDocument) getOwnerDocument()).getDocument(),
- localName);
- }
-
- protected void checkIfStandardFaultCode(String faultCode, String uri)
- throws SOAPException {
- // SOAP 1.1 doesn't seem to mandate using faultcode from a particular
- // set of values.
- // Also need to be backward compatible.
- }
-
- protected void finallySetFaultCode(String faultcode) throws SOAPException {
- this.faultCodeElement.addTextNode(faultcode);
- }
-
- public String getFaultCode() {
- if (this.faultCodeElement == null)
- findFaultCodeElement();
- return this.faultCodeElement.getValue();
- }
-
- public Name getFaultCodeAsName() {
-
- String faultcodeString = getFaultCode();
- if (faultcodeString == null) {
- return null;
- }
- int prefixIndex = faultcodeString.indexOf(':');
- if (prefixIndex == -1) {
- // Not a valid SOAP message, but we return the unqualified name
- // anyway since some apps do not strictly conform to SOAP
- // specs. A message that does not contain a
- *
FastInfosetSource.serialize(Document)
method via reflection.
- */
- static Method fiDOMDocumentSerializer_serialize;
-
- /**
- * FI FastInfosetSource.setOutputStream(OutputStream)
method via reflection.
- */
- static Method fiDOMDocumentSerializer_setOutputStream;
-
- /**
- * FI FastInfosetSource constructor using reflection.
- */
- static Class fiFastInfosetSource_class;
-
- /**
- * FI FastInfosetSource constructor using reflection.
- */
- static Constructor fiFastInfosetSource_new;
-
- /**
- * FI FastInfosetSource.getInputStream()
method via reflection.
- */
- static Method fiFastInfosetSource_getInputStream;
-
- /**
- * FI FastInfosetSource.setInputSTream()
method via reflection.
- */
- static Method fiFastInfosetSource_setInputStream;
-
- /**
- * FI FastInfosetResult constructor using reflection.
- */
- static Constructor fiFastInfosetResult_new;
-
- /**
- * FI FastInfosetResult.getOutputSTream()
method via reflection.
- */
- static Method fiFastInfosetResult_getOutputStream;
-
- static {
- try {
- Class clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentParser");
- fiDOMDocumentParser_new = clazz.getConstructor((Class[]) null);
- fiDOMDocumentParser_parse = clazz.getMethod("parse",
- new Class[] { org.w3c.dom.Document.class, java.io.InputStream.class });
-
- clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentSerializer");
- fiDOMDocumentSerializer_new = clazz.getConstructor((Class[])null);
- fiDOMDocumentSerializer_serialize = clazz.getMethod("serialize",
- new Class[] { org.w3c.dom.Node.class });
- fiDOMDocumentSerializer_setOutputStream = clazz.getMethod("setOutputStream",
- new Class[] { java.io.OutputStream.class });
-
- fiFastInfosetSource_class = clazz = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
- fiFastInfosetSource_new = clazz.getConstructor(
- new Class[] { java.io.InputStream.class });
- fiFastInfosetSource_getInputStream = clazz.getMethod("getInputStream", (Class[]) null);
- fiFastInfosetSource_setInputStream = clazz.getMethod("setInputStream",
- new Class[] { java.io.InputStream.class });
-
- clazz = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult");
- fiFastInfosetResult_new = clazz.getConstructor(
- new Class[] { java.io.OutputStream.class });
- fiFastInfosetResult_getOutputStream = clazz.getMethod("getOutputStream", (Class[]) null);
- }
- catch (Exception e) {
- // falls through
- }
- }
-
- // -- DOMDocumentParser ----------------------------------------------
-
- public static Object DOMDocumentParser_new() throws Exception {
- if (fiDOMDocumentParser_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return fiDOMDocumentParser_new.newInstance((Object[])null);
- }
-
- public static void DOMDocumentParser_parse(Object parser,
- Document d, InputStream s) throws Exception
- {
- if (fiDOMDocumentParser_parse == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiDOMDocumentParser_parse.invoke(parser, new Object[] { d, s });
- }
-
- // -- DOMDocumentSerializer-------------------------------------------
-
- public static Object DOMDocumentSerializer_new() throws Exception {
- if (fiDOMDocumentSerializer_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return fiDOMDocumentSerializer_new.newInstance((Object[])null);
- }
-
- public static void DOMDocumentSerializer_serialize(Object serializer, Node node)
- throws Exception
- {
- if (fiDOMDocumentSerializer_serialize == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiDOMDocumentSerializer_serialize.invoke(serializer, new Object[] { node });
- }
-
- public static void DOMDocumentSerializer_setOutputStream(Object serializer,
- OutputStream os) throws Exception
- {
- if (fiDOMDocumentSerializer_setOutputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiDOMDocumentSerializer_setOutputStream.invoke(serializer, new Object[] { os });
- }
-
- // -- FastInfosetSource ----------------------------------------------
-
- public static boolean isFastInfosetSource(Source source) {
- return source.getClass().getName().equals(
- "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
- }
-
- public static Class getFastInfosetSource_class() {
- if (fiFastInfosetSource_class == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
-
- return fiFastInfosetSource_class;
- }
- public static Source FastInfosetSource_new(InputStream is)
- throws Exception
- {
- if (fiFastInfosetSource_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (Source) fiFastInfosetSource_new.newInstance(new Object[] { is });
- }
-
- public static InputStream FastInfosetSource_getInputStream(Source source)
- throws Exception
- {
- if (fiFastInfosetSource_getInputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (InputStream) fiFastInfosetSource_getInputStream.invoke(source, (Object[])null);
- }
-
- public static void FastInfosetSource_setInputStream(Source source,
- InputStream is) throws Exception
- {
- if (fiFastInfosetSource_setInputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- fiFastInfosetSource_setInputStream.invoke(source, new Object[] { is });
- }
-
- // -- FastInfosetResult ----------------------------------------------
-
- public static boolean isFastInfosetResult(Result result) {
- return result.getClass().getName().equals(
- "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult");
- }
-
- public static Result FastInfosetResult_new(OutputStream os)
- throws Exception
- {
- if (fiFastInfosetResult_new == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (Result) fiFastInfosetResult_new.newInstance(new Object[] { os });
- }
-
- public static OutputStream FastInfosetResult_getOutputStream(Result result)
- throws Exception
- {
- if (fiFastInfosetResult_getOutputStream == null) {
- throw new RuntimeException("Unable to locate Fast Infoset implementation");
- }
- return (OutputStream) fiFastInfosetResult_getOutputStream.invoke(result, (Object[])null);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-/**
- * {@link ArrayList} with a final marker to help JIT.
- * @author Kohsuke Kawaguchi
- */
-public final class FinalArrayList extends ArrayList {
- public FinalArrayList(int initialCapacity) {
- super(initialCapacity);
- }
-
- public FinalArrayList() {
- }
-
- public FinalArrayList(Collection collection) {
- super(collection);
- }
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-import java.io.*;
-
-import javax.xml.transform.stream.StreamSource;
-
-
-/**
- *
- * @author Anil Vijendran
- */
-public class JAXMStreamSource extends StreamSource {
- InputStream in;
- Reader reader;
- private static final boolean lazyContentLength;
- static {
- lazyContentLength = SAAJUtil.getSystemBoolean("saaj.lazy.contentlength");
- }
- public JAXMStreamSource(InputStream is) throws IOException {
- if (lazyContentLength) {
- in = is;
- } else if (is instanceof ByteInputStream) {
- this.in = (ByteInputStream) is;
- } else {
- ByteOutputStream bout = null;
- try {
- bout = new ByteOutputStream();
- bout.write(is);
- this.in = bout.newInputStream();
- } finally {
- if (bout != null)
- bout.close();
- }
- }
- }
-
- public JAXMStreamSource(Reader rdr) throws IOException {
-
- if (lazyContentLength) {
- this.reader = rdr;
- return;
- }
- CharWriter cout = new CharWriter();
- char[] temp = new char[1024];
- int len;
-
- while (-1 != (len = rdr.read(temp)))
- cout.write(temp, 0, len);
-
- this.reader = new CharReader(cout.getChars(), cout.getCount());
- }
-
- public InputStream getInputStream() {
- return in;
- }
-
- public Reader getReader() {
- return reader;
- }
-
- public void reset() throws IOException {
- if (in != null)
- in.reset();
- if (reader != null)
- reader.reset();
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
--- a/jaxws/src/java.xml.soap/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1380 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.xml.internal.messaging.saaj.util;
-
-// Imported from: org.apache.xerces.util
-// Needed to work around differences in JDK1.2 and 1.3 and deal with userInfo
-
-import java.io.IOException;
-import java.io.Serializable;
-
-
-/**********************************************************************
-* A class to represent a Uniform Resource Identifier (URI). This class
-* is designed to handle the parsing of URIs and provide access to
-* the various components (scheme, host, port, userinfo, path, query
-* string and fragment) that may constitute a URI.
-* MalformedURIException
with no specified
- * detail message.
- ******************************************************************/
- public MalformedURIException() {
- super();
- }
-
- /*****************************************************************
- * Constructs a MalformedURIException
with the
- * specified detail message.
- *
- * @param p_msg the detail message.
- ******************************************************************/
- public MalformedURIException(String p_msg) {
- super(p_msg);
- }
- }
-
- /** reserved characters */
- private static final String RESERVED_CHARACTERS = ";/?:@&=+$,";
-
- /** URI punctuation mark characters - these, combined with
- alphanumerics, constitute the "unreserved" characters */
- private static final String MARK_CHARACTERS = "-_.!~*'() ";
-
- /** scheme can be composed of alphanumerics and these characters */
- private static final String SCHEME_CHARACTERS = "+-.";
-
- /** userinfo can be composed of unreserved, escaped and these
- characters */
- private static final String USERINFO_CHARACTERS = ";:&=+$,";
-
- /** Stores the scheme (usually the protocol) for this URI. */
- private String m_scheme = null;
-
- /** If specified, stores the userinfo for this URI; otherwise null */
- private String m_userinfo = null;
-
- /** If specified, stores the host for this URI; otherwise null */
- private String m_host = null;
-
- /** If specified, stores the port for this URI; otherwise -1 */
- private int m_port = -1;
-
- /** If specified, stores the path for this URI; otherwise null */
- private String m_path = null;
-
- /** If specified, stores the query string for this URI; otherwise
- null. */
- private String m_queryString = null;
-
- /** If specified, stores the fragment for this URI; otherwise null */
- private String m_fragment = null;
-
- private static boolean DEBUG = false;
-
- /**
- * Construct a new and uninitialized URI.
- */
- public JaxmURI() {
- }
-
- /**
- * Construct a new URI from another URI. All fields for this URI are
- * set equal to the fields of the URI passed in.
- *
- * @param p_other the URI to copy (cannot be null)
- */
- public JaxmURI(JaxmURI p_other) {
- initialize(p_other);
- }
-
- /**
- * Construct a new URI from a URI specification string. If the
- * specification follows the "generic URI" syntax, (two slashes
- * following the first colon), the specification will be parsed
- * accordingly - setting the scheme, userinfo, host,port, path, query
- * string and fragment fields as necessary. If the specification does
- * not follow the "generic URI" syntax, the specification is parsed
- * into a scheme and scheme-specific part (stored as the path) only.
- *
- * @param p_uriSpec the URI specification string (cannot be null or
- * empty)
- *
- * @exception MalformedURIException if p_uriSpec violates any syntax
- * rules
- */
- public JaxmURI(String p_uriSpec) throws MalformedURIException {
- this((JaxmURI)null, p_uriSpec);
- }
-
- /**
- * Construct a new URI from a base URI and a URI specification string.
- * The URI specification string may be a relative URI.
- *
- * @param p_base the base URI (cannot be null if p_uriSpec is null or
- * empty)
- * @param p_uriSpec the URI specification string (cannot be null or
- * empty if p_base is null)
- *
- * @exception MalformedURIException if p_uriSpec violates any syntax
- * rules
- */
- public JaxmURI(JaxmURI p_base, String p_uriSpec) throws MalformedURIException {
- initialize(p_base, p_uriSpec);
- }
-
- /**
- * Construct a new URI that does not follow the generic URI syntax.
- * Only the scheme and scheme-specific part (stored as the path) are
- * initialized.
- *
- * @param p_scheme the URI scheme (cannot be null or empty)
- * @param p_schemeSpecificPart the scheme-specific part (cannot be
- * null or empty)
- *
- * @exception MalformedURIException if p_scheme violates any
- * syntax rules
- */
- public JaxmURI(String p_scheme, String p_schemeSpecificPart)
- throws MalformedURIException {
- if (p_scheme == null || p_scheme.trim().length() == 0) {
- throw new MalformedURIException(
- "Cannot construct URI with null/empty scheme!");
- }
- if (p_schemeSpecificPart == null ||
- p_schemeSpecificPart.trim().length() == 0) {
- throw new MalformedURIException(
- "Cannot construct URI with null/empty scheme-specific part!");
- }
- setScheme(p_scheme);
- setPath(p_schemeSpecificPart);
- }
-
- /**
- * Construct a new URI that follows the generic URI syntax from its
- * component parts. Each component is validated for syntax and some
- * basic semantic checks are performed as well. See the individual
- * setter methods for specifics.
- *
- * @param p_scheme the URI scheme (cannot be null or empty)
- * @param p_host the hostname or IPv4 address for the URI
- * @param p_path the URI path - if the path contains '?' or '#',
- * then the query string and/or fragment will be
- * set from the path; however, if the query and
- * fragment are specified both in the path and as
- * separate parameters, an exception is thrown
- * @param p_queryString the URI query string (cannot be specified
- * if path is null)
- * @param p_fragment the URI fragment (cannot be specified if path
- * is null)
- *
- * @exception MalformedURIException if any of the parameters violates
- * syntax rules or semantic rules
- */
- public JaxmURI(String p_scheme, String p_host, String p_path,
- String p_queryString, String p_fragment)
- throws MalformedURIException {
- this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment);
- }
-
- /**
- * Construct a new URI that follows the generic URI syntax from its
- * component parts. Each component is validated for syntax and some
- * basic semantic checks are performed as well. See the individual
- * setter methods for specifics.
- *
- * @param p_scheme the URI scheme (cannot be null or empty)
- * @param p_userinfo the URI userinfo (cannot be specified if host
- * is null)
- * @param p_host the hostname or IPv4 address for the URI
- * @param p_port the URI port (may be -1 for "unspecified"; cannot
- * be specified if host is null)
- * @param p_path the URI path - if the path contains '?' or '#',
- * then the query string and/or fragment will be
- * set from the path; however, if the query and
- * fragment are specified both in the path and as
- * separate parameters, an exception is thrown
- * @param p_queryString the URI query string (cannot be specified
- * if path is null)
- * @param p_fragment the URI fragment (cannot be specified if path
- * is null)
- *
- * @exception MalformedURIException if any of the parameters violates
- * syntax rules or semantic rules
- */
- public JaxmURI(String p_scheme, String p_userinfo,
- String p_host, int p_port, String p_path,
- String p_queryString, String p_fragment)
- throws MalformedURIException {
- if (p_scheme == null || p_scheme.trim().length() == 0) {
- throw new MalformedURIException("Scheme is required!");
- }
-
- if (p_host == null) {
- if (p_userinfo != null) {
- throw new MalformedURIException(
- "Userinfo may not be specified if host is not specified!");
- }
- if (p_port != -1) {
- throw new MalformedURIException(
- "Port may not be specified if host is not specified!");
- }
- }
-
- if (p_path != null) {
- if (p_path.indexOf('?') != -1 && p_queryString != null) {
- throw new MalformedURIException(
- "Query string cannot be specified in path and query string!");
- }
-
- if (p_path.indexOf('#') != -1 && p_fragment != null) {
- throw new MalformedURIException(
- "Fragment cannot be specified in both the path and fragment!");
- }
- }
-
- setScheme(p_scheme);
- setHost(p_host);
- setPort(p_port);
- setUserinfo(p_userinfo);
- setPath(p_path);
- setQueryString(p_queryString);
- setFragment(p_fragment);
- }
-
- /**
- * Initialize all fields of this URI from another URI.
- *
- * @param p_other the URI to copy (cannot be null)
- */
- private void initialize(JaxmURI p_other) {
- m_scheme = p_other.getScheme();
- m_userinfo = p_other.getUserinfo();
- m_host = p_other.getHost();
- m_port = p_other.getPort();
- m_path = p_other.getPath();
- m_queryString = p_other.getQueryString();
- m_fragment = p_other.getFragment();
- }
-
- /**
- * Initializes this URI from a base URI and a URI specification string.
- * See RFC 2396 Section 4 and Appendix B for specifications on parsing
- * the URI and Section 5 for specifications on resolving relative URIs
- * and relative paths.
- *
- * @param p_base the base URI (may be null if p_uriSpec is an absolute
- * URI)
- * @param p_uriSpec the URI spec string which may be an absolute or
- * relative URI (can only be null/empty if p_base
- * is not null)
- *
- * @exception MalformedURIException if p_base is null and p_uriSpec
- * is not an absolute URI or if
- * p_uriSpec violates syntax rules
- */
- private void initialize(JaxmURI p_base, String p_uriSpec)
- throws MalformedURIException {
- if (p_base == null &&
- (p_uriSpec == null || p_uriSpec.trim().length() == 0)) {
- throw new MalformedURIException(
- "Cannot initialize URI with empty parameters.");
- }
-
- // just make a copy of the base if spec is empty
- if (p_uriSpec == null || p_uriSpec.trim().length() == 0) {
- initialize(p_base);
- return;
- }
-
- String uriSpec = p_uriSpec.trim();
- int uriSpecLen = uriSpec.length();
- int index = 0;
-
- // Check for scheme, which must be before `/'. Also handle names with
- // DOS drive letters ('D:'), so 1-character schemes are not allowed.
- int colonIdx = uriSpec.indexOf(':');
- int slashIdx = uriSpec.indexOf('/');
- if ((colonIdx < 2) || (colonIdx > slashIdx && slashIdx != -1)) {
- int fragmentIdx = uriSpec.indexOf('#');
- // A standalone base is a valid URI according to spec
- if (p_base == null && fragmentIdx != 0 ) {
- throw new MalformedURIException("No scheme found in URI.");
- }
- }
- else {
- initializeScheme(uriSpec);
- index = m_scheme.length()+1;
- }
-
- // two slashes means generic URI syntax, so we get the authority
- if (((index+1) < uriSpecLen) &&
- (uriSpec.substring(index).startsWith("//"))) {
- index += 2;
- int startPos = index;
-
- // get authority - everything up to path, query or fragment
- char testChar = '\0';
- while (index < uriSpecLen) {
- testChar = uriSpec.charAt(index);
- if (testChar == '/' || testChar == '?' || testChar == '#') {
- break;
- }
- index++;
- }
-
- // if we found authority, parse it out, otherwise we set the
- // host to empty string
- if (index > startPos) {
- initializeAuthority(uriSpec.substring(startPos, index));
- }
- else {
- m_host = "";
- }
- }
-
- initializePath(uriSpec.substring(index));
-
- // Resolve relative URI to base URI - see RFC 2396 Section 5.2
- // In some cases, it might make more sense to throw an exception
- // (when scheme is specified is the string spec and the base URI
- // is also specified, for example), but we're just following the
- // RFC specifications
- if (p_base != null) {
-
- // check to see if this is the current doc - RFC 2396 5.2 #2
- // note that this is slightly different from the RFC spec in that
- // we don't include the check for query string being null
- // - this handles cases where the urispec is just a query
- // string or a fragment (e.g. "?y" or "#s") -
- // see SOAPMessage
object. A SOAPMessage
- * object may contain zero, one, or many AttachmentPart
objects.
- * Each AttachmentPart
object consists of two parts,
- * application-specific content and associated MIME headers. The
- * MIME headers consists of name/value pairs that can be used to
- * identify and describe the content.
- * AttachmentPart
object must conform to certain standards.
- *
- *
- *
- *
- * Content-Type
- * This header identifies the type of data in the content of an
- * AttachmentPart
object and MUST conform to [RFC2045].
- * The following is an example of a Content-Type header:
- *
- * Content-Type: application/xml
- *
- * The following line of code, in which ap
is an
- * AttachmentPart
object, sets the header shown in
- * the previous example.
- *
- * ap.setMimeHeader("Content-Type", "application/xml");
- *
- *
- * AttachmentPart
object. The content may be anything from a
- * simple plain text object to a complex XML document or image file.
- *
- * AttachmentPart
object is created with the method
- * SOAPMessage.createAttachmentPart
. After setting its MIME headers,
- * the AttachmentPart
object is added to the message
- * that created it with the method SOAPMessage.addAttachmentPart
.
- *
- * m
is a
- * SOAPMessage
object and contentStringl
is a
- * String
, creates an instance of AttachmentPart
,
- * sets the AttachmentPart
object with some content and
- * header information, and adds the AttachmentPart
object to
- * the SOAPMessage
object.
- *
- * AttachmentPart ap1 = m.createAttachmentPart();
- * ap1.setContent(contentString1, "text/plain");
- * m.addAttachmentPart(ap1);
- *
- *
- *
- * AttachmentPart
instance to the same message. jpegData
- * is a binary byte buffer representing the jpeg file.
- *
- * AttachmentPart ap2 = m.createAttachmentPart();
- * byte[] jpegData = ...;
- * ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg");
- * m.addAttachmentPart(ap2);
- *
- * getContent
method retrieves the contents and header from
- * an AttachmentPart
object. Depending on the
- * DataContentHandler
objects present, the returned
- * Object
can either be a typed Java object corresponding
- * to the MIME type or an InputStream
object that contains the
- * content as bytes.
- *
- * String content1 = ap1.getContent();
- * java.io.InputStream content2 = ap2.getContent();
- *
- *
- * The method clearContent
removes all the content from an
- * AttachmentPart
object but does not affect its header information.
- *
- * ap1.clearContent();
- *
- *
- * @since 1.6
- */
-
-public abstract class AttachmentPart {
- /**
- * Returns the number of bytes in this AttachmentPart
- * object.
- *
- * @return the size of this AttachmentPart
object in bytes
- * or -1 if the size cannot be determined
- * @exception SOAPException if the content of this attachment is
- * corrupted of if there was an exception while trying
- * to determine the size.
- */
- public abstract int getSize() throws SOAPException;
-
- /**
- * Clears out the content of this AttachmentPart
object.
- * The MIME header portion is left untouched.
- */
- public abstract void clearContent();
-
- /**
- * Gets the content of this AttachmentPart
object as a Java
- * object. The type of the returned Java object depends on (1) the
- * DataContentHandler
object that is used to interpret the bytes
- * and (2) the Content-Type
given in the header.
- * DataContentHandler
object does the conversions to and
- * from the Java types corresponding to the MIME types.
- * For other MIME types,the DataContentHandler
object
- * can return an InputStream
object that contains the content data
- * as raw bytes.
- * java.lang.String
object corresponding to any content
- * stream with a Content-Type
value of
- * text/plain
, a
- * javax.xml.transform.stream.StreamSource
object corresponding to a
- * content stream with a Content-Type
value of
- * text/xml
, a java.awt.Image
object
- * corresponding to a content stream with a
- * Content-Type
value of image/gif
or
- * image/jpeg
. For those content types that an
- * installed DataContentHandler
object does not understand, the
- * DataContentHandler
object is required to return a
- * java.io.InputStream
object with the raw bytes.
- *
- * @return a Java object with the content of this AttachmentPart
- * object
- *
- * @exception SOAPException if there is no content set into this
- * AttachmentPart
object or if there was a data
- * transformation error
- */
- public abstract Object getContent() throws SOAPException;
-
- /**
- * Gets the content of this AttachmentPart
object as an
- * InputStream as if a call had been made to getContent
and no
- * DataContentHandler
had been registered for the
- * content-type
of this AttachmentPart
.
- *InputStream
from which the raw data contained by
- * the AttachmentPart
can be accessed.
- *
- * @throws SOAPException if there is no content set into this
- * AttachmentPart
object or if there was a data
- * transformation error.
- *
- * @since 1.6, SAAJ 1.3
- * @see #getRawContentBytes
- */
- public abstract InputStream getRawContent() throws SOAPException;
-
- /**
- * Gets the content of this AttachmentPart
object as a
- * byte[] array as if a call had been made to getContent
and no
- * DataContentHandler
had been registered for the
- * content-type
of this AttachmentPart
.
- *
- * @return a byte[]
array containing the raw data of the
- * AttachmentPart
.
- *
- * @throws SOAPException if there is no content set into this
- * AttachmentPart
object or if there was a data
- * transformation error.
- *
- * @since 1.6, SAAJ 1.3
- */
- public abstract byte[] getRawContentBytes() throws SOAPException;
-
- /**
- * Returns an InputStream
which can be used to obtain the
- * content of AttachmentPart
as Base64 encoded
- * character data, this method would base64 encode the raw bytes
- * of the attachment and return.
- *
- * @return an InputStream
from which the Base64 encoded
- * AttachmentPart
can be read.
- *
- * @throws SOAPException if there is no content set into this
- * AttachmentPart
object or if there was a data
- * transformation error.
- *
- * @since 1.6, SAAJ 1.3
- */
- public abstract InputStream getBase64Content() throws SOAPException;
-
- /**
- * Sets the content of this attachment part to that of the given
- * Object
and sets the value of the Content-Type
- * header to the given type. The type of the
- * Object
should correspond to the value given for the
- * Content-Type
. This depends on the particular
- * set of DataContentHandler
objects in use.
- *
- *
- * @param object the Java object that makes up the content for
- * this attachment part
- * @param contentType the MIME string that specifies the type of
- * the content
- *
- * @exception IllegalArgumentException may be thrown if the contentType
- * does not match the type of the content object, or if there
- * was no DataContentHandler
object for this
- * content object
- *
- * @see #getContent
- */
- public abstract void setContent(Object object, String contentType);
-
- /**
- * Sets the content of this attachment part to that contained by the
- * InputStream
content
and sets the value of the
- * Content-Type
header to the value contained in
- * contentType
.
- * Content-Type
- * header
- *
- * @exception SOAPException if an there is an error in setting the content
- * @exception NullPointerException if content
is null
- * @since 1.6, SAAJ 1.3
- */
- public abstract void setRawContent(InputStream content, String contentType) throws SOAPException;
-
- /**
- * Sets the content of this attachment part to that contained by the
- * byte[]
array content
and sets the value of the
- * Content-Type
header to the value contained in
- * contentType
.
- *
- * @param content the raw data to add to the attachment part
- * @param contentType the value to set into the Content-Type
- * header
- * @param offset the offset in the byte array of the content
- * @param len the number of bytes that form the content
- *
- * @exception SOAPException if an there is an error in setting the content
- * or content is null
- * @since 1.6, SAAJ 1.3
- */
- public abstract void setRawContentBytes(
- byte[] content, int offset, int len, String contentType)
- throws SOAPException;
-
-
- /**
- * Sets the content of this attachment part from the Base64 source
- * InputStream
and sets the value of the
- * Content-Type
header to the value contained in
- * contentType
, This method would first decode the base64
- * input and write the resulting raw bytes to the attachment.
- * Content-Type
- * header
- *
- * @exception SOAPException if an there is an error in setting the content
- * @exception NullPointerException if content
is null
- *
- * @since 1.6, SAAJ 1.3
- */
- public abstract void setBase64Content(
- InputStream content, String contentType) throws SOAPException;
-
-
- /**
- * Gets the DataHandler
object for this AttachmentPart
- * object.
- *
- * @return the DataHandler
object associated with this
- * AttachmentPart
object
- *
- * @exception SOAPException if there is no data in
- * this AttachmentPart
object
- */
- public abstract DataHandler getDataHandler()
- throws SOAPException;
-
- /**
- * Sets the given DataHandler
object as the data handler
- * for this AttachmentPart
object. Typically, on an incoming
- * message, the data handler is automatically set. When
- * a message is being created and populated with content, the
- * setDataHandler
method can be used to get data from
- * various data sources into the message.
- *
- * @param dataHandler the DataHandler
object to be set
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified DataHandler
object
- */
- public abstract void setDataHandler(DataHandler dataHandler);
-
-
- /**
- * Gets the value of the MIME header whose name is "Content-ID".
- *
- * @return a String
giving the value of the
- * "Content-ID" header or null
if there
- * is none
- * @see #setContentId
- */
- public String getContentId() {
- String[] values = getMimeHeader("Content-ID");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Gets the value of the MIME header whose name is "Content-Location".
- *
- * @return a String
giving the value of the
- * "Content-Location" header or null
if there
- * is none
- */
- public String getContentLocation() {
- String[] values = getMimeHeader("Content-Location");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Gets the value of the MIME header whose name is "Content-Type".
- *
- * @return a String
giving the value of the
- * "Content-Type" header or null
if there
- * is none
- */
- public String getContentType() {
- String[] values = getMimeHeader("Content-Type");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Sets the MIME header whose name is "Content-ID" with the given value.
- *
- * @param contentId a String
giving the value of the
- * "Content-ID" header
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified contentId
value
- * @see #getContentId
- */
- public void setContentId(String contentId)
- {
- setMimeHeader("Content-ID", contentId);
- }
-
-
- /**
- * Sets the MIME header whose name is "Content-Location" with the given value.
- *
- *
- * @param contentLocation a String
giving the value of the
- * "Content-Location" header
- * @exception IllegalArgumentException if there was a problem with
- * the specified content location
- */
- public void setContentLocation(String contentLocation)
- {
- setMimeHeader("Content-Location", contentLocation);
- }
-
- /**
- * Sets the MIME header whose name is "Content-Type" with the given value.
- *
- * @param contentType a String
giving the value of the
- * "Content-Type" header
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified content type
- */
- public void setContentType(String contentType)
- {
- setMimeHeader("Content-Type", contentType);
- }
-
- /**
- * Removes all MIME headers that match the given name.
- *
- * @param header the string name of the MIME header/s to
- * be removed
- */
- public abstract void removeMimeHeader(String header);
-
- /**
- * Removes all the MIME header entries.
- */
- public abstract void removeAllMimeHeaders();
-
-
- /**
- * Gets all the values of the header identified by the given
- * String
.
- *
- * @param name the name of the header; example: "Content-Type"
- * @return a String
array giving the value for the
- * specified header
- * @see #setMimeHeader
- */
- public abstract String[] getMimeHeader(String name);
-
-
- /**
- * Changes the first header entry that matches the given name
- * to the given value, adding a new header if no existing header
- * matches. This method also removes all matching headers but the first. String
giving the name of the header
- * for which to search
- * @param value a String
giving the value to be set for
- * the header whose name matches the given name
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- */
- public abstract void setMimeHeader(String name, String value);
-
-
- /**
- * Adds a MIME header with the specified name and value to this
- * AttachmentPart
object.
- * String
giving the name of the header
- * to be added
- * @param value a String
giving the value of the header
- * to be added
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- */
- public abstract void addMimeHeader(String name, String value);
-
- /**
- * Retrieves all the headers for this AttachmentPart
object
- * as an iterator over the MimeHeader
objects.
- *
- * @return an Iterator
object with all of the Mime
- * headers for this AttachmentPart
object
- */
- public abstract Iterator getAllMimeHeaders();
-
- /**
- * Retrieves all MimeHeader
objects that match a name in
- * the given array.
- *
- * @param names a String
array with the name(s) of the
- * MIME headers to be returned
- * @return all of the MIME headers that match one of the names in the
- * given array as an Iterator
object
- */
- public abstract Iterator getMatchingMimeHeaders(String[] names);
-
- /**
- * Retrieves all MimeHeader
objects whose name does
- * not match a name in the given array.
- *
- * @param names a String
array with the name(s) of the
- * MIME headers not to be returned
- * @return all of the MIME headers in this AttachmentPart
object
- * except those that match one of the names in the
- * given array. The nonmatching MIME headers are returned as an
- * Iterator
object.
- */
- public abstract Iterator getNonMatchingMimeHeaders(String[] names);
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Detail.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Detail.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A container for DetailEntry
objects. DetailEntry
- * objects give detailed error information that is application-specific and
- * related to the SOAPBody
object that contains it.
- *Detail
object, which is part of a SOAPFault
- * object, can be retrieved using the method SOAPFault.getDetail
.
- * The Detail
interface provides two methods. One creates a new
- * DetailEntry
object and also automatically adds it to
- * the Detail
object. The second method gets a list of the
- * DetailEntry
objects contained in a Detail
- * object.
- * SOAPFault
- * object, gets its Detail
object (d), adds a new
- * DetailEntry
object to d, and then gets a list of all the
- * DetailEntry
objects in d. The code also creates a
- * Name
object to pass to the method addDetailEntry
.
- * The variable se, used to create the Name
object,
- * is a SOAPEnvelope
object.
- *
- * Detail d = sf.getDetail();
- * Name name = se.createName("GetLastTradePrice", "WOMBAT",
- * "http://www.wombat.org/trader");
- * d.addDetailEntry(name);
- * Iterator it = d.getDetailEntries();
- *
- *
- * @since 1.6
- */
-public interface Detail extends SOAPFaultElement {
-
- /**
- * Creates a new DetailEntry
object with the given
- * name and adds it to this Detail
object.
- *
- * @param name a Name
object identifying the
- * new DetailEntry
object
- *
- * @exception SOAPException thrown when there is a problem in adding a
- * DetailEntry object to this Detail object.
- *
- * @see Detail#addDetailEntry(QName qname)
- */
- public DetailEntry addDetailEntry(Name name) throws SOAPException;
-
- /**
- * Creates a new DetailEntry
object with the given
- * QName and adds it to this Detail
object. This method
- * is the preferred over the one using Name.
- *
- * @param qname a QName
object identifying the
- * new DetailEntry
object
- *
- * @exception SOAPException thrown when there is a problem in adding a
- * DetailEntry object to this Detail object.
- *
- * @see Detail#addDetailEntry(Name name)
- * @since 1.6, SAAJ 1.3
- */
- public DetailEntry addDetailEntry(QName qname) throws SOAPException;
-
- /**
- * Gets an Iterator over all of the DetailEntry
s in this Detail
object.
- *
- * @return an Iterator
object over the DetailEntry
- * objects in this Detail
object
- */
- public Iterator getDetailEntries();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/DetailEntry.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/DetailEntry.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * The content for a Detail
object, giving details for
- * a SOAPFault
object. A DetailEntry
object,
- * which carries information about errors related to the SOAPBody
- * object that contains it, is application-specific.
- *
- * @since 1.6
- */
-public interface DetailEntry extends SOAPElement {
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/FactoryFinder.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/FactoryFinder.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.io.*;
-import java.util.Properties;
-
-
-class FactoryFinder {
-
- /**
- * Creates an instance of the specified class using the specified
- * ClassLoader
object.
- *
- * @exception SOAPException if the given class could not be found
- * or could not be instantiated
- */
- private static Object newInstance(String className,
- ClassLoader classLoader)
- throws SOAPException
- {
- try {
- Class spiClass = safeLoadClass(className, classLoader);
- return spiClass.newInstance();
-
- } catch (ClassNotFoundException x) {
- throw new SOAPException("Provider " + className + " not found", x);
- } catch (Exception x) {
- throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
- }
- }
-
- /**
- * Finds the implementation Class
object for the given
- * factory name, or null if that fails.
- * Class
object of the specified message factory;
- * or null
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @exception SOAPException if there is a SOAP error
- */
- static Object find(String factoryId)
- throws SOAPException
- {
- return find(factoryId, null, false);
- }
-
- /**
- * Finds the implementation Class
object for the given
- * factory name, or if that fails, finds the Class
object
- * for the given fallback class name. The arguments supplied must be
- * used in order. If using the first argument is successful, the second
- * one will not be used.
- * Class
object of the specified message factory;
- * may be null
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @param fallbackClassName the implementation class name, which is
- * to be used only if nothing else
- * is found; null
to indicate that
- * there is no fallback class name
- * @exception SOAPException if there is a SOAP error
- */
- static Object find(String factoryId, String fallbackClassName)
- throws SOAPException
- {
- return find(factoryId, fallbackClassName, true);
- }
-
- /**
- * Finds the implementation Class
object for the given
- * factory name, or if that fails, finds the Class
object
- * for the given default class name, but only if tryFallback
- * is true
. The arguments supplied must be used in order
- * If using the first argument is successful, the second one will not
- * be used. Note the default class name may be needed even if fallback
- * is not to be attempted, so certain error conditions can be handled.
- * Class
object of the specified message factory;
- * may not be null
- *
- * @param factoryId the name of the factory to find, which is
- * a system property
- * @param defaultClassName the implementation class name, which is
- * to be used only if nothing else
- * is found; null
to indicate
- * that there is no default class name
- * @param tryFallback whether to try the default class as a
- * fallback
- * @exception SOAPException if there is a SOAP error
- */
- static Object find(String factoryId, String defaultClassName,
- boolean tryFallback) throws SOAPException {
- ClassLoader classLoader;
- try {
- classLoader = Thread.currentThread().getContextClassLoader();
- } catch (Exception x) {
- throw new SOAPException(x.toString(), x);
- }
-
- // Use the system property first
- try {
- String systemProp =
- System.getProperty( factoryId );
- if( systemProp!=null) {
- return newInstance(systemProp, classLoader);
- }
- } catch (SecurityException se) {
- }
-
- // try to read from $java.home/lib/jaxm.properties
- try {
- String javah=System.getProperty( "java.home" );
- String configFile = javah + File.separator +
- "lib" + File.separator + "jaxm.properties";
- File f=new File( configFile );
- if( f.exists()) {
- Properties props=new Properties();
- props.load( new FileInputStream(f));
- String factoryClassName = props.getProperty(factoryId);
- return newInstance(factoryClassName, classLoader);
- }
- } catch(Exception ex ) {
- }
-
- String serviceId = "META-INF/services/" + factoryId;
- // try to find services in CLASSPATH
- try {
- InputStream is=null;
- if (classLoader == null) {
- is=ClassLoader.getSystemResourceAsStream(serviceId);
- } else {
- is=classLoader.getResourceAsStream(serviceId);
- }
-
- if( is!=null ) {
- BufferedReader rd =
- new BufferedReader(new InputStreamReader(is, "UTF-8"));
-
- String factoryClassName = rd.readLine();
- rd.close();
-
- if (factoryClassName != null &&
- ! "".equals(factoryClassName)) {
- return newInstance(factoryClassName, classLoader);
- }
- }
- } catch( Exception ex ) {
- }
-
- // If not found and fallback should not be tried, return a null result.
- if (!tryFallback)
- return null;
-
- // We didn't find the class through the usual means so try the default
- // (built in) factory if specified.
- if (defaultClassName == null) {
- throw new SOAPException(
- "Provider for " + factoryId + " cannot be found", null);
- }
- return newInstance(defaultClassName, classLoader);
- }
-
- /**
- * Loads the class, provided that the calling thread has an access to the
- * class being loaded. If this is the specified default factory class and it
- * is restricted by package.access we get a SecurityException and can do a
- * Class.forName() on it so it will be loaded by the bootstrap class loader.
- */
- private static Class safeLoadClass(String className,
- ClassLoader classLoader)
- throws ClassNotFoundException {
- try {
- // make sure that the current thread has an access to the package of the given name.
- SecurityManager s = System.getSecurityManager();
- if (s != null) {
- int i = className.lastIndexOf('.');
- if (i != -1) {
- s.checkPackageAccess(className.substring(0, i));
- }
- }
-
- if (classLoader == null)
- return Class.forName(className);
- else
- return classLoader.loadClass(className);
- } catch (SecurityException se) {
- // (only) default implementation can be loaded
- // using bootstrap class loader:
- if (isDefaultImplementation(className))
- return Class.forName(className);
-
- throw se;
- }
- }
-
- private static boolean isDefaultImplementation(String className) {
- return MessageFactory.DEFAULT_MESSAGE_FACTORY.equals(className) ||
- SOAPFactory.DEFAULT_SOAP_FACTORY.equals(className) ||
- SOAPConnectionFactory.DEFAULT_SOAP_CONNECTION_FACTORY.equals(className) ||
- SAAJMetaFactory.DEFAULT_META_FACTORY_CLASS.equals(className);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MessageFactory.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MessageFactory.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * A factory for creating SOAPMessage
objects.
- * MessageFactory
object
- * using the method newInstance
, as shown in the following
- * lines of code.
- *
- * MessageFactory mf = MessageFactory.newInstance();
- * MessageFactory mf12 = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
- *
- * MessageFactory
objects, regardless of how they are
- * created, will produce SOAPMessage
objects that
- * have the following elements by default:
- *
- *
- * In some cases, specialized MessageFactory objects may be obtained that produce messages
- * prepopulated with additional entries in the SOAPPart
object
- * SOAPEnvelope
object
- * SOAPBody
object
- * SOAPHeader
object
- * SOAPHeader
object and the
- * SOAPBody
object.
- * The content of a new SOAPMessage
object depends on which of the two
- * MessageFactory
methods is used to create it.
- *
- *
- *
- * @since 1.6
- */
-public abstract class MessageFactory {
-
- static final String DEFAULT_MESSAGE_FACTORY
- = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl";
-
- static private final String MESSAGE_FACTORY_PROPERTY
- = "javax.xml.soap.MessageFactory";
-
- /**
- * Creates a new createMessage()
- * This is the method clients would normally use to create a request message.
- * createMessage(MimeHeaders, java.io.InputStream)
-- message has
- * content from the InputStream
object and headers from the
- * MimeHeaders
object
- * This method can be used internally by a service implementation to
- * create a message that is a response to a request.
- * MessageFactory
object that is an instance
- * of the default implementation (SOAP 1.1),
- *
- * This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load:
- *
- *
-
- *
- * @return a new instance of a MessageFactory
- *
- * @exception SOAPException if there was an error in creating the
- * default implementation of the
- * MessageFactory
.
- * @see SAAJMetaFactory
- */
-
- public static MessageFactory newInstance() throws SOAPException {
-
-
- try {
- MessageFactory factory = (MessageFactory) FactoryFinder.find(
- MESSAGE_FACTORY_PROPERTY,
- DEFAULT_MESSAGE_FACTORY,
- false);
-
- if (factory != null) {
- return factory;
- }
- return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
-
- } catch (Exception ex) {
- throw new SOAPException(
- "Unable to create message factory for SOAP: "
- +ex.getMessage());
- }
-
- }
-
- /**
- * Creates a new MessageFactory
object that is an instance
- * of the specified implementation. May be a dynamic message factory,
- * a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic
- * message factory creates messages based on the MIME headers specified
- * as arguments to the createMessage
method.
- *
- * This method uses the SAAJMetaFactory to locate the implementation class
- * and create the MessageFactory instance.
- *
- * @return a new instance of a MessageFactory
- *
- * @param protocol a string constant representing the class of the
- * specified message factory implementation. May be
- * either DYNAMIC_SOAP_PROTOCOL
,
- * DEFAULT_SOAP_PROTOCOL
(which is the same
- * as) SOAP_1_1_PROTOCOL
, or
- * SOAP_1_2_PROTOCOL
.
- *
- * @exception SOAPException if there was an error in creating the
- * specified implementation of MessageFactory
.
- * @see SAAJMetaFactory
- * @since 1.6, SAAJ 1.3
- */
- public static MessageFactory newInstance(String protocol) throws SOAPException {
- return SAAJMetaFactory.getInstance().newMessageFactory(protocol);
- }
-
- /**
- * Creates a new SOAPMessage
object with the default
- * SOAPPart
, SOAPEnvelope
, SOAPBody
,
- * and SOAPHeader
objects. Profile-specific message factories
- * can choose to prepopulate the SOAPMessage
object with
- * profile-specific headers.
- * SOAPPart
object, and
- * the message can be sent "as is" when a message containing only a SOAP part
- * is sufficient. Otherwise, the SOAPMessage
object needs
- * to create one or more AttachmentPart
objects and
- * add them to itself. Any content that is not in XML format must be
- * in an AttachmentPart
object.
- *
- * @return a new SOAPMessage
object
- * @exception SOAPException if a SOAP error occurs
- * @exception UnsupportedOperationException if the protocol of this
- * MessageFactory
instance is DYNAMIC_SOAP_PROTOCOL
- */
- public abstract SOAPMessage createMessage()
- throws SOAPException;
-
- /**
- * Internalizes the contents of the given InputStream
object into a
- * new SOAPMessage
object and returns the SOAPMessage
- * object.
- *
- * @param in the InputStream
object that contains the data
- * for a message
- * @param headers the transport-specific headers passed to the
- * message in a transport-independent fashion for creation of the
- * message
- * @return a new SOAPMessage
object containing the data from
- * the given InputStream
object
- *
- * @exception IOException if there is a problem in reading data from
- * the input stream
- *
- * @exception SOAPException may be thrown if the message is invalid
- *
- * @exception IllegalArgumentException if the MessageFactory
- * requires one or more MIME headers to be present in the
- * headers
parameter and they are missing.
- * MessageFactory
implementations for
- * SOAP_1_1_PROTOCOL
or
- * SOAP_1_2_PROTOCOL
must not throw
- * IllegalArgumentException
for this reason.
- */
- public abstract SOAPMessage createMessage(MimeHeaders headers,
- InputStream in)
- throws IOException, SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeader.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeader.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-/**
- * An object that stores a MIME header name and its value. One or more
- * MimeHeader
objects may be contained in a MimeHeaders
- * object.
- *
- * @see MimeHeaders
- * @since 1.6
- */
-public class MimeHeader {
-
- private String name;
- private String value;
-
- /**
- * Constructs a MimeHeader
object initialized with the given
- * name and value.
- *
- * @param name a String
giving the name of the header
- * @param value a String
giving the value of the header
- */
- public MimeHeader(String name, String value) {
- this.name = name;
- this.value = value;
- }
-
- /**
- * Returns the name of this MimeHeader
object.
- *
- * @return the name of the header as a String
- */
- public String getName() {
- return name;
- }
-
- /**
- * Returns the value of this MimeHeader
object.
- *
- * @return the value of the header as a String
- */
- public String getValue() {
- return value;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeaders.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/MimeHeaders.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,270 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-import java.util.Vector;
-
-/**
- * A container for MimeHeader
objects, which represent
- * the MIME headers present in a MIME part of a message.
- *
- * AttachmentPart
and other MIME dependent parts of the SAAJ
- * API.
- * @see SOAPMessage#getAttachments
- * @see AttachmentPart
- * @since 1.6
- */
-public class MimeHeaders {
- private Vector headers;
-
- /**
- * Constructs a default MimeHeaders
object initialized with
- * an empty Vector
object.
- */
- public MimeHeaders() {
- headers = new Vector();
- }
-
- /**
- * Returns all of the values for the specified header as an array of
- * String
objects.
- *
- * @param name the name of the header for which values will be returned
- * @return a String
array with all of the values for the
- * specified header
- * @see #setHeader
- */
- public String[] getHeader(String name) {
- Vector values = new Vector();
-
- for(int i = 0; i < headers.size(); i++) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name)
- && hdr.getValue() != null)
- values.addElement(hdr.getValue());
- }
-
- if (values.size() == 0)
- return null;
-
- String r[] = new String[values.size()];
- values.copyInto(r);
- return r;
- }
-
- /**
- * Replaces the current value of the first header entry whose name matches
- * the given name with the given value, adding a new header if no existing header
- * name matches. This method also removes all matching headers after the first one.
- * String
with the name of the header for
- * which to search
- * @param value a String
with the value that will replace the
- * current value of the specified header
- *
- * @exception IllegalArgumentException if there was a problem in the
- * mime header name or the value being set
- * @see #getHeader
- */
- public void setHeader(String name, String value)
- {
- boolean found = false;
-
- if ((name == null) || name.equals(""))
- throw new IllegalArgumentException("Illegal MimeHeader name");
-
- for(int i = 0; i < headers.size(); i++) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name)) {
- if (!found) {
- headers.setElementAt(new MimeHeader(hdr.getName(),
- value), i);
- found = true;
- }
- else
- headers.removeElementAt(i--);
- }
- }
-
- if (!found)
- addHeader(name, value);
- }
-
- /**
- * Adds a MimeHeader
object with the specified name and value
- * to this MimeHeaders
object's list of headers.
- * String
with the name of the header to
- * be added
- * @param value a String
with the value of the header to
- * be added
- *
- * @exception IllegalArgumentException if there was a problem in the
- * mime header name or value being added
- */
- public void addHeader(String name, String value)
- {
- if ((name == null) || name.equals(""))
- throw new IllegalArgumentException("Illegal MimeHeader name");
-
- int pos = headers.size();
-
- for(int i = pos - 1 ; i >= 0; i--) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name)) {
- headers.insertElementAt(new MimeHeader(name, value),
- i+1);
- return;
- }
- }
- headers.addElement(new MimeHeader(name, value));
- }
-
- /**
- * Remove all MimeHeader
objects whose name matches the
- * given name.
- *
- * @param name a String
with the name of the header for
- * which to search
- */
- public void removeHeader(String name) {
- for(int i = 0; i < headers.size(); i++) {
- MimeHeader hdr = (MimeHeader) headers.elementAt(i);
- if (hdr.getName().equalsIgnoreCase(name))
- headers.removeElementAt(i--);
- }
- }
-
- /**
- * Removes all the header entries from this MimeHeaders
object.
- */
- public void removeAllHeaders() {
- headers.removeAllElements();
- }
-
-
- /**
- * Returns all the MimeHeader
s in this MimeHeaders
object.
- *
- * @return an Iterator
object over this MimeHeaders
- * object's list of MimeHeader
objects
- */
- public Iterator getAllHeaders() {
- return headers.iterator();
- }
-
- class MatchingIterator implements Iterator {
- private boolean match;
- private Iterator iterator;
- private String[] names;
- private Object nextHeader;
-
- MatchingIterator(String[] names, boolean match) {
- this.match = match;
- this.names = names;
- this.iterator = headers.iterator();
- }
-
- private Object nextMatch() {
- next:
- while (iterator.hasNext()) {
- MimeHeader hdr = (MimeHeader) iterator.next();
-
- if (names == null)
- return match ? null : hdr;
-
- for(int i = 0; i < names.length; i++)
- if (hdr.getName().equalsIgnoreCase(names[i]))
- if (match)
- return hdr;
- else
- continue next;
- if (!match)
- return hdr;
- }
- return null;
- }
-
-
- public boolean hasNext() {
- if (nextHeader == null)
- nextHeader = nextMatch();
- return nextHeader != null;
- }
-
- public Object next() {
- // hasNext should've prefetched the header for us,
- // return it.
- if (nextHeader != null) {
- Object ret = nextHeader;
- nextHeader = null;
- return ret;
- }
- if (hasNext())
- return nextHeader;
- return null;
- }
-
- public void remove() {
- iterator.remove();
- }
- }
-
-
- /**
- * Returns all the MimeHeader
objects whose name matches
- * a name in the given array of names.
- *
- * @param names an array of String
objects with the names
- * for which to search
- * @return an Iterator
object over the MimeHeader
- * objects whose name matches one of the names in the given list
- */
- public Iterator getMatchingHeaders(String[] names) {
- return new MatchingIterator(names, true);
- }
-
- /**
- * Returns all of the MimeHeader
objects whose name does not
- * match a name in the given array of names.
- *
- * @param names an array of String
objects with the names
- * for which to search
- * @return an Iterator
object over the MimeHeader
- * objects whose name does not match one of the names in the given list
- */
- public Iterator getNonMatchingHeaders(String[] names) {
- return new MatchingIterator(names, false);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Name.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Name.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of an XML name. This interface provides methods for
- * getting the local and namespace-qualified names and also for getting the
- * prefix associated with the namespace for the name. It is also possible
- * to get the URI of the namespace.
- *
- * <wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader">
- *
- * ("xmlns" stands for "XML namespace".)
- * The following
- * shows what the methods in the Name
interface will return.
- *
- *
- * getQualifiedName
will return "prefix:LocalName" =
- * "WOMBAT:GetLastTradePrice"
- * getURI
will return "http://www.wombat.org/trader"
- * getLocalName
will return "GetLastTracePrice"
- * getPrefix
will return "WOMBAT"
- * Name
objects are created using the method
- * SOAPEnvelope.createName
, which has two versions.
- * One method creates Name
objects with
- * a local name, a namespace prefix, and a namespace URI.
- * and the second creates Name
objects with just a local name.
- * The following line of
- * code, in which se is a SOAPEnvelope
object, creates a new
- * Name
object with all three.
- *
- * Name name = se.createName("GetLastTradePrice", "WOMBAT",
- * "http://www.wombat.org/trader");
- *
- * The following line of code gives an example of how a Name
object
- * can be used. The variable element is a SOAPElement
object.
- * This code creates a new SOAPElement
object with the given name and
- * adds it to element.
- *
- * element.addChildElement(name);
- *
- * Name
interface may be deprecated in a future release of SAAJ
- * in favor of javax.xml.namespace.QName
in the range
- * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
- * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
- * @since 1.6
- */
-public interface Name {
- /**
- * Gets the local name part of the XML name that this
, only the first header is
+ * returned.
+ *
+ * @param name the name of this header
+ * @param delimiter delimiter between fields in returned string
+ * @return the value fields for all headers with
+ * this name
+ */
+ public String getHeader(String name, String delimiter) {
+ return headers.getHeader(name, delimiter);
+ }
+
+ /**
+ * Set the value for this header_name. Replaces all existing
+ * header values with this new value. Note that RFC 822 headers
+ * must contain only US-ASCII characters, so a header that
+ * contains non US-ASCII characters must be encoded as per the
+ * rules of RFC 2047.
+ *
+ * @param name header name
+ * @param value header value
+ * @see MimeUtility
+ */
+ public void setHeader(String name, String value) {
+ headers.setHeader(name, value);
+ }
+
+ /**
+ * Add this value to the existing values for this header_name.
+ * Note that RFC 822 headers must contain only US-ASCII
+ * characters, so a header that contains non US-ASCII characters
+ * must be encoded as per the rules of RFC 2047.
+ *
+ * @param name header name
+ * @param value header value
+ * @see MimeUtility
+ */
+ public void addHeader(String name, String value) {
+ headers.addHeader(name, value);
+ }
+
+ /**
+ * Remove all headers with this name.
+ */
+ public void removeHeader(String name) {
+ headers.removeHeader(name);
+ }
+
+ /**
+ * Return all the headers from this Message as an Enumeration of
+ * Header objects.
+ */
+ public FinalArrayList getAllHeaders() {
+ return headers.getAllHeaders();
+ }
+
+
+ /**
+ * Add a header line to this body part
+ */
+ public void addHeaderLine(String line) {
+ headers.addHeaderLine(line);
+ }
+
+ /**
+ * Examine the content of this body part and update the appropriate
+ * MIME headers. Typical headers that get set here are
+ * Name
- * object represents.
- *
- * @return a string giving the local name
- */
- String getLocalName();
-
- /**
- * Gets the namespace-qualified name of the XML name that this
- * Name
object represents.
- *
- * @return the namespace-qualified name as a string
- */
- String getQualifiedName();
-
- /**
- * Returns the prefix that was specified when this Name
object
- * was initialized. This prefix is associated with the namespace for the XML
- * name that this Name
object represents.
- *
- * @return the prefix as a string
- */
- String getPrefix();
-
- /**
- * Returns the URI of the namespace for the XML
- * name that this Name
object represents.
- *
- * @return the URI as a string
- */
- String getURI();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Node.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Node.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of a node (element) in an XML document.
- * This interface extnends the standard DOM Node interface with methods for
- * getting and setting the value of a node, for
- * getting and setting the parent of a node, and for removing a node.
- *
- * @since 1.6
- */
-public interface Node extends org.w3c.dom.Node {
- /**
- * Returns the value of this node if this is a Text
node or the
- * value of the immediate child of this node otherwise.
- * If there is an immediate child of this Node
that it is a
- * Text
node then it's value will be returned. If there is
- * more than one Text
node then the value of the first
- * Text
Node will be returned.
- * Otherwise null
is returned.
- *
- * @return a String
with the text of this node if this is a
- * Text
node or the text contained by the first
- * immediate child of this Node
object that is a
- * Text
object if such a child exists;
- * null
otherwise.
- */
- public String getValue();
-
- /**
- * If this is a Text node then this method will set its value,
- * otherwise it sets the value of the immediate (Text) child of this node.
- * The value of the immediate child of this node can be set only if, there is
- * one child node and that node is a Text
node, or if
- * there are no children in which case a child Text
node will be
- * created.
- *
- * @exception IllegalStateException if the node is not a Text
- * node and either has more than one child node or has a child
- * node that is not a Text
node.
- *
- * @since 1.6, SAAJ 1.2
- */
- public void setValue(String value);
-
- /**
- * Sets the parent of this Node
object to the given
- * SOAPElement
object.
- *
- * @param parent the SOAPElement
object to be set as
- * the parent of this Node
object
- *
- * @exception SOAPException if there is a problem in setting the
- * parent to the given element
- * @see #getParentElement
- */
- public void setParentElement(SOAPElement parent) throws SOAPException;
-
- /**
- * Returns the parent element of this Node
object.
- * This method can throw an UnsupportedOperationException
- * if the tree is not kept in memory.
- *
- * @return the SOAPElement
object that is the parent of
- * this Node
object or null
if this
- * Node
object is root
- *
- * @exception UnsupportedOperationException if the whole tree is not
- * kept in memory
- * @see #setParentElement
- */
- public SOAPElement getParentElement();
-
- /**
- * Removes this Node
object from the tree.
- */
- public void detachNode();
-
- /**
- * Notifies the implementation that this Node
- * object is no longer being used by the application and that the
- * implementation is free to reuse this object for nodes that may
- * be created later.
- * recycleNode
implies that the method
- * detachNode
has been called previously.
- */
- public void recycleNode();
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJMetaFactory.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJMetaFactory.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
-* The access point for the implementation classes of the factories defined in the
-* SAAJ API. All of the newInstance
methods defined on factories in
-* SAAJ 1.3 defer to instances of this class to do the actual object creation.
-* The implementations of newInstance()
methods (in SOAPFactory and MessageFactory)
-* that existed in SAAJ 1.2 have been updated to also delegate to the SAAJMetaFactory when the SAAJ 1.2
-* defined lookup fails to locate the Factory implementation class name.
-*
-* SAAJMetaFactory
object.
- * The SAAJMetaFactory is an SPI, it pulls the creation of the other factories together into a
- * single place. Changing out the SAAJMetaFactory has the effect of changing out the entire SAAJ
- * implementation. Service providers provide the name of their SAAJMetaFactory
- * implementation.
- *
- * This method uses the following ordered lookup procedure to determine the SAAJMetaFactory implementation class to load:
- *
- *
- *
- * @return a concrete SAAJMetaFactory
object
- * @exception SOAPException if there is an error in creating the SAAJMetaFactory
- */
- static SAAJMetaFactory getInstance() throws SOAPException {
- try {
- SAAJMetaFactory instance =
- (SAAJMetaFactory) FactoryFinder.find(
- META_FACTORY_CLASS_PROPERTY,
- DEFAULT_META_FACTORY_CLASS);
- return instance;
- } catch (Exception e) {
- throw new SOAPException(
- "Unable to create SAAJ meta-factory" + e.getMessage());
- }
- }
-
- protected SAAJMetaFactory() { }
-
- /**
- * Creates a MessageFactory
object for
- * the given String
protocol.
- *
- * @param protocol a String
indicating the protocol
- * @exception SOAPException if there is an error in creating the
- * MessageFactory
- * @see SOAPConstants#SOAP_1_1_PROTOCOL
- * @see SOAPConstants#SOAP_1_2_PROTOCOL
- * @see SOAPConstants#DYNAMIC_SOAP_PROTOCOL
- */
- protected abstract MessageFactory newMessageFactory(String protocol)
- throws SOAPException;
-
- /**
- * Creates a SOAPFactory
object for
- * the given String
protocol.
- *
- * @param protocol a String
indicating the protocol
- * @exception SOAPException if there is an error in creating the
- * SOAPFactory
- * @see SOAPConstants#SOAP_1_1_PROTOCOL
- * @see SOAPConstants#SOAP_1_2_PROTOCOL
- * @see SOAPConstants#DYNAMIC_SOAP_PROTOCOL
- */
- protected abstract SOAPFactory newSOAPFactory(String protocol)
- throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJResult.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SAAJResult.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import javax.xml.transform.dom.DOMResult;
-
-/**
- * Acts as a holder for the results of a JAXP transformation or a JAXB
- * marshalling, in the form of a SAAJ tree. These results should be accessed
- * by using the {@link #getResult()} method. The {@link DOMResult#getNode()}
- * method should be avoided in almost all cases.
- *
- * @author XWS-Security Development Team
- *
- * @since 1.6, SAAJ 1.3
- */
-public class SAAJResult extends DOMResult {
-
- /**
- * Creates a SAAJResult
that will present results in the form
- * of a SAAJ tree that supports the default (SOAP 1.1) protocol.
- * SAAJResult
is meant for use in situations where the
- * results will be used as a parameter to a method that takes a parameter
- * whose type, such as SOAPElement
, is drawn from the SAAJ
- * API. When used in a transformation, the results are populated into the
- * SOAPPart
of a SOAPMessage
that is created internally.
- * The SOAPPart
returned by {@link DOMResult#getNode()}
- * is not guaranteed to be well-formed.
- *
- * @throws SOAPException if there is a problem creating a SOAPMessage
- *
- * @since 1.6, SAAJ 1.3
- */
- public SAAJResult() throws SOAPException {
- this(MessageFactory.newInstance().createMessage());
- }
-
- /**
- * Creates a SAAJResult
that will present results in the form
- * of a SAAJ tree that supports the specified protocol. The
- * DYNAMIC_SOAP_PROTOCOL
is ambiguous in this context and will
- * cause this constructor to throw an UnsupportedOperationException
.
- * SAAJResult
is meant for use in situations where the
- * results will be used as a parameter to a method that takes a parameter
- * whose type, such as SOAPElement
, is drawn from the SAAJ
- * API. When used in a transformation the results are populated into the
- * SOAPPart
of a SOAPMessage
that is created
- * internally. The SOAPPart
returned by {@link DOMResult#getNode()}
- * is not guaranteed to be well-formed.
- *
- * @param protocol - the name of the SOAP protocol that the resulting SAAJ
- * tree should support
- *
- * @throws SOAPException if a SOAPMessage
supporting the
- * specified protocol cannot be created
- *
- * @since 1.6, SAAJ 1.3
- */
- public SAAJResult(String protocol) throws SOAPException {
- this(MessageFactory.newInstance(protocol).createMessage());
- }
-
- /**
- * Creates a SAAJResult
that will write the results into the
- * SOAPPart
of the supplied SOAPMessage
.
- * In the normal case these results will be written using DOM APIs and,
- * as a result, the finished SOAPPart
will not be guaranteed
- * to be well-formed unless the data used to create it is also well formed.
- * When used in a transformation the validity of the SOAPMessage
- * after the transformation can be guaranteed only by means outside SAAJ
- * specification.
- *
- * @param message - the message whose SOAPPart
will be
- * populated as a result of some transformation or
- * marshalling operation
- *
- * @since 1.6, SAAJ 1.3
- */
- public SAAJResult(SOAPMessage message) {
- super(message.getSOAPPart());
- }
-
- /**
- * Creates a SAAJResult
that will write the results as a
- * child node of the SOAPElement
specified. In the normal
- * case these results will be written using DOM APIs and as a result may
- * invalidate the structure of the SAAJ tree. This kind of
- * SAAJResult
should only be used when the validity of the
- * incoming data can be guaranteed by means outside of the SAAJ
- * specification.
- *
- * @param rootNode - the root to which the results will be appended
- *
- * @since 1.6, SAAJ 1.3
- */
- public SAAJResult(SOAPElement rootNode) {
- super(rootNode);
- }
-
-
- /**
- * @return the resulting Tree that was created under the specified root Node.
- * @since 1.6, SAAJ 1.3
- */
- public javax.xml.soap.Node getResult() {
- return (javax.xml.soap.Node)super.getNode().getFirstChild();
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBody.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBody.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Locale;
-
-import org.w3c.dom.Document;
-
-import javax.xml.namespace.QName;
-
-/**
- * An object that represents the contents of the SOAP body
- * element in a SOAP message. A SOAP body element consists of XML data
- * that affects the way the application-specific content is processed.
- * SOAPBody
object contains SOAPBodyElement
- * objects, which have the content for the SOAP body.
- * A SOAPFault
object, which carries status and/or
- * error information, is an example of a SOAPBodyElement
object.
- *
- * @see SOAPFault
- * @since 1.6
- */
-public interface SOAPBody extends SOAPElement {
-
- /**
- * Creates a new SOAPFault
object and adds it to
- * this SOAPBody
object. The new SOAPFault
will
- * have default values set for the mandatory child elements. The type of
- * the SOAPFault
will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
- * depending on the protocol
specified while creating the
- * MessageFactory
instance.
- * SOAPBody
may contain at most one SOAPFault
- * child element.
- *
- * @return the new SOAPFault
object
- * @exception SOAPException if there is a SOAP error
- */
- public SOAPFault addFault() throws SOAPException;
-
-
- /**
- * Creates a new SOAPFault
object and adds it to
- * this SOAPBody
object. The type of the
- * SOAPFault
will be a SOAP 1.1 or a SOAP 1.2
- * SOAPFault
depending on the protocol
- * specified while creating the MessageFactory
instance.
- * faultCode
parameter is the value of the
- * Fault/Code/Value element and the faultString
parameter
- * is the value of the Fault/Reason/Text element. For SOAP 1.1
- * the faultCode
parameter is the value of the faultcode
- * element and the faultString
parameter is the value of the faultstring
- * element.
- * SOAPBody
may contain at most one SOAPFault
- * child element.
- *
- * @param faultCode a Name
object giving the fault
- * code to be set; must be one of the fault codes defined in the Version
- * of SOAP specification in use
- * @param faultString a String
giving an explanation of
- * the fault
- * @param locale a {@link java.util.Locale} object indicating
- * the native language of the faultString
- * @return the new SOAPFault
object
- * @exception SOAPException if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @since 1.6, SAAJ 1.2
- */
- public SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException;
-
- /**
- * Creates a new SOAPFault
object and adds it to this
- * SOAPBody
object. The type of the SOAPFault
- * will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on
- * the protocol
specified while creating the MessageFactory
- * instance.
- * faultCode
parameter is the value of the
- * Fault/Code/Value element and the faultString
parameter
- * is the value of the Fault/Reason/Text element. For SOAP 1.1
- * the faultCode
parameter is the value of the faultcode
- * element and the faultString
parameter is the value of the faultstring
- * element.
- * SOAPBody
may contain at most one SOAPFault
- * child element.
- *
- * @param faultCode
- * a QName
object giving the fault code to be
- * set; must be one of the fault codes defined in the version
- * of SOAP specification in use.
- * @param faultString
- * a String
giving an explanation of the fault
- * @param locale
- * a {@link java.util.Locale Locale} object indicating the
- * native language of the faultString
- * @return the new SOAPFault
object
- * @exception SOAPException
- * if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @see SOAPBody#addFault(Name faultCode, String faultString, Locale locale)
- *
- * @since 1.6, SAAJ 1.3
- */
- public SOAPFault addFault(QName faultCode, String faultString, Locale locale)
- throws SOAPException;
-
- /**
- * Creates a new SOAPFault
object and adds it to this
- * SOAPBody
object. The type of the SOAPFault
- * will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on
- * the protocol
specified while creating the MessageFactory
- * instance.
- * faultCode
parameter is the value of the
- * Fault/Code/Value element and the faultString
parameter
- * is the value of the Fault/Reason/Text element. For SOAP 1.1
- * the faultCode
parameter is the value of the faultcode
- * element and the faultString
parameter is the value of the faultstring
- * element.
- * xml:lang
- * attribute on the Fault/Reason/Text element will be set to
- * java.util.Locale.getDefault()
- * SOAPBody
may contain at most one SOAPFault
- * child element.
- *
- * @param faultCode
- * a Name
object giving the fault code to be set;
- * must be one of the fault codes defined in the version of SOAP
- * specification in use
- * @param faultString
- * a String
giving an explanation of the fault
- * @return the new SOAPFault
object
- * @exception SOAPException
- * if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @since 1.6, SAAJ 1.2
- */
- public SOAPFault addFault(Name faultCode, String faultString)
- throws SOAPException;
-
- /**
- * Creates a new SOAPFault
object and adds it to this SOAPBody
- * object. The type of the SOAPFault
- * will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on
- * the protocol
specified while creating the MessageFactory
- * instance.
- * faultCode
parameter is the value of the
- * Fault/Code/Value element and the faultString
parameter
- * is the value of the Fault/Reason/Text element. For SOAP 1.1
- * the faultCode
parameter is the value of the faultcode
- * element and the faultString
parameter is the value of the faultstring
- * element.
- * xml:lang
- * attribute on the Fault/Reason/Text element will be set to
- * java.util.Locale.getDefault()
- * SOAPBody
may contain at most one SOAPFault
- * child element
- *
- * @param faultCode
- * a QName
object giving the fault code to be
- * set; must be one of the fault codes defined in the version
- * of SOAP specification in use
- * @param faultString
- * a String
giving an explanation of the fault
- * @return the new SOAPFault
object
- * @exception SOAPException
- * if there is a SOAP error
- * @see SOAPFault#setFaultCode
- * @see SOAPFault#setFaultString
- * @see SOAPBody#addFault(Name faultCode, String faultString)
- * @since 1.6, SAAJ 1.3
- */
- public SOAPFault addFault(QName faultCode, String faultString)
- throws SOAPException;
-
- /**
- * Indicates whether a SOAPFault
object exists in this
- * SOAPBody
object.
- *
- * @return true
if a SOAPFault
object exists
- * in this SOAPBody
object; false
- * otherwise
- */
- public boolean hasFault();
-
- /**
- * Returns the SOAPFault
object in this SOAPBody
- * object.
- *
- * @return the SOAPFault
object in this SOAPBody
- * object if present, null otherwise.
- */
- public SOAPFault getFault();
-
- /**
- * Creates a new SOAPBodyElement
object with the specified
- * name and adds it to this SOAPBody
object.
- *
- * @param name
- * a Name
object with the name for the new SOAPBodyElement
- * object
- * @return the new SOAPBodyElement
object
- * @exception SOAPException
- * if a SOAP error occurs
- * @see SOAPBody#addBodyElement(javax.xml.namespace.QName)
- */
- public SOAPBodyElement addBodyElement(Name name) throws SOAPException;
-
-
- /**
- * Creates a new SOAPBodyElement
object with the specified
- * QName and adds it to this SOAPBody
object.
- *
- * @param qname
- * a QName
object with the qname for the new
- * SOAPBodyElement
object
- * @return the new SOAPBodyElement
object
- * @exception SOAPException
- * if a SOAP error occurs
- * @see SOAPBody#addBodyElement(Name)
- * @since 1.6, SAAJ 1.3
- */
- public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
-
- /**
- * Adds the root node of the DOM {@link org.w3c.dom.Document}
- * to this SOAPBody
object.
- * document
parameter.
- * The client application should discard all references to this Document
- * and its contents upon calling addDocument
. The behavior
- * of an application that continues to use such references is undefined.
- *
- * @param document
- * the Document
object whose root node will be
- * added to this SOAPBody
.
- * @return the SOAPBodyElement
that represents the root node
- * that was added.
- * @exception SOAPException
- * if the Document
cannot be added
- * @since 1.6, SAAJ 1.2
- */
- public SOAPBodyElement addDocument(org.w3c.dom.Document document)
- throws SOAPException;
-
- /**
- * Creates a new DOM {@link org.w3c.dom.Document}
and sets
- * the first child of this SOAPBody
as it's document
- * element. The child SOAPElement
is removed as part of the
- * process.
- *
- * @return the {@link org.w3c.dom.Document}
representation
- * of the SOAPBody
content.
- *
- * @exception SOAPException
- * if there is not exactly one child SOAPElement
of the
- *
, only the first header is
+ * returned. Returns SOAPBody
.
- *
- * @since 1.6, SAAJ 1.3
- */
- public org.w3c.dom.Document extractContentAsDocument()
- throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBodyElement.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPBodyElement.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A SOAPBodyElement
object represents the contents in
- * a SOAPBody
object. The SOAPFault
interface
- * is a SOAPBodyElement
object that has been defined.
- * SOAPBodyElement
object can be created and added
- * to a SOAPBody
object with the SOAPBody
- * method addBodyElement
. In the following line of code,
- * sb
is a SOAPBody
object, and
- * myName
is a Name
object.
- *
- * SOAPBodyElement sbe = sb.addBodyElement(myName);
- *
- *
- * @since 1.6
- */
-public interface SOAPBodyElement extends SOAPElement {
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnection.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnection.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-/**
- * A point-to-point connection that a client can use for sending messages
- * directly to a remote party (represented by a URL, for instance).
- * SOAPConnectionFactory.newInstance()
(see below) will
- * throw an UnsupportedOperationException
.
- * SOAPConnection
object using a
- * {@link SOAPConnectionFactory} object as in the following example:
- *
- * SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
- * SOAPConnection con = factory.createConnection();
- *
- * A SOAPConnection
object can be used to send messages
- * directly to a URL following the request/response paradigm. That is,
- * messages are sent using the method call
, which sends the
- * message and then waits until it gets a reply.
- *
- * @since 1.6
- */
-public abstract class SOAPConnection {
-
- /**
- * Sends the given message to the specified endpoint and blocks until
- * it has returned the response.
- *
- * @param request the SOAPMessage
object to be sent
- * @param to an Object
that identifies
- * where the message should be sent. It is required to
- * support Objects of type
- * java.lang.String
,
- * java.net.URL
, and when JAXM is present
- * javax.xml.messaging.URLEndpoint
- *
- * @return the SOAPMessage
object that is the response to the
- * message that was sent
- * @throws SOAPException if there is a SOAP error
- */
- public abstract SOAPMessage call(SOAPMessage request,
- Object to) throws SOAPException;
-
- /**
- * Gets a message from a specific endpoint and blocks until it receives,
- *
- * @param to an Object
that identifies where
- * the request should be sent. Objects of type
- * java.lang.String
and
- * java.net.URL
must be supported.
- *
- * @return the SOAPMessage
object that is the response to the
- * get message request
- * @throws SOAPException if there is a SOAP error
- * @since 1.6, SAAJ 1.3
- */
- public SOAPMessage get(Object to)
- throws SOAPException {
- throw new UnsupportedOperationException("All subclasses of SOAPConnection must override get()");
- }
-
- /**
- * Closes this SOAPConnection
object.
- *
- * @throws SOAPException if there is a SOAP error
- */
- public abstract void close()
- throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnectionFactory.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConnectionFactory.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A factory for creating SOAPConnection
objects. Implementation of this class
- * is optional. If SOAPConnectionFactory.newInstance()
throws an
- * UnsupportedOperationException then the implementation does not support the
- * SAAJ communication infrastructure. Otherwise {@link SOAPConnection} objects
- * can be created by calling createConnection()
on the newly
- * created SOAPConnectionFactory
object.
- *
- * @since 1.6
- */
-public abstract class SOAPConnectionFactory {
- /**
- * A constant representing the default value for a SOAPConnection
- * object. The default is the point-to-point SOAP connection.
- */
- static final String DEFAULT_SOAP_CONNECTION_FACTORY
- = "com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory";
-
- /**
- * A constant representing the SOAPConnection
class.
- */
- static private final String SF_PROPERTY
- = "javax.xml.soap.SOAPConnectionFactory";
-
- /**
- * Creates an instance of the default
- * SOAPConnectionFactory
object.
- *
- * @return a new instance of a default
- * SOAPConnectionFactory
object
- *
- * @exception SOAPException if there was an error creating the
- * SOAPConnectionFactory
- *
- * @exception UnsupportedOperationException if newInstance is not
- * supported.
- */
- public static SOAPConnectionFactory newInstance()
- throws SOAPException, UnsupportedOperationException
- {
- try {
- return (SOAPConnectionFactory)
- FactoryFinder.find(SF_PROPERTY,
- DEFAULT_SOAP_CONNECTION_FACTORY);
- } catch (Exception ex) {
- throw new SOAPException("Unable to create SOAP connection factory: "
- +ex.getMessage());
- }
- }
-
- /**
- * Create a new SOAPConnection
.
- *
- * @return the new SOAPConnection
object.
- *
- * @exception SOAPException if there was an exception creating the
- * SOAPConnection
object.
- */
- public abstract SOAPConnection createConnection()
- throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConstants.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPConstants.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import javax.xml.namespace.QName;
-
-/**
- * The definition of constants pertaining to the SOAP protocol.
- *
- * @since 1.6
- */
-public interface SOAPConstants {
- /**
- * Used to create MessageFactory
instances that create
- * SOAPMessages
whose concrete type is based on the
- * Content-Type
MIME header passed to the
- * createMessage
method. If no Content-Type
- * header is passed then the createMessage
may throw an
- * IllegalArgumentException
or, in the case of the no
- * argument version of createMessage
, an
- * UnsupportedOperationException
.
- *
- * @since 1.6, SAAJ 1.3
- */
- public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
-
- /**
- * Used to create MessageFactory
instances that create
- * SOAPMessages
whose behavior supports the SOAP 1.1 specification.
- *
- * @since 1.6, SAAJ 1.3
- */
- public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
-
- /**
- * Used to create MessageFactory
instances that create
- * SOAPMessages
whose behavior supports the SOAP 1.2
- * specification
- *
- * @since 1.6, SAAJ 1.3
- */
- public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
-
- /**
- * The default protocol: SOAP 1.1 for backwards compatibility.
- *
- * @since 1.6, SAAJ 1.3
- */
- public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
-
- /**
- * The namespace identifier for the SOAP 1.1 envelope.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
- /**
- * The namespace identifier for the SOAP 1.2 envelope.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope";
-
- /**
- * The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this
- * namespace are defined by the SOAP 1.1 specification.
- */
- public static final String
- URI_NS_SOAP_ENVELOPE = URI_NS_SOAP_1_1_ENVELOPE;
-
- /**
- * The namespace identifier for the SOAP 1.1 encoding.
- * An attribute named encodingStyle
in the
- * URI_NS_SOAP_ENVELOPE
namespace and set to the value
- * URI_NS_SOAP_ENCODING
can be added to an element to indicate
- * that it is encoded using the rules in section 5 of the SOAP 1.1
- * specification.
- */
- public static final String
- URI_NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
-
- /**
- * The namespace identifier for the SOAP 1.2 encoding.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding";
-
- /**
- * The media type of the Content-Type
MIME header in SOAP 1.1.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- SOAP_1_1_CONTENT_TYPE = "text/xml";
-
- /**
- * The media type of the Content-Type
MIME header in SOAP 1.2.
- * @since 1.6, SAAJ 1.3
- */
- public static final String
- SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
-
- /**
- * The URI identifying the next application processing a SOAP request as the intended
- * actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification).
- * SOAPElement
object initialized with the
- * given Name
object and adds the new element to this
- * SOAPElement
object.
- * Name
object with the XML name for the
- * new element
- *
- * @return the new SOAPElement
object that was created
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- * @see SOAPElement#addChildElement(javax.xml.namespace.QName)
- */
- public SOAPElement addChildElement(Name name) throws SOAPException;
-
- /**
- * Creates a new SOAPElement
object initialized with the given
- * QName
object and adds the new element to this SOAPElement
- * object. The namespace, localname and prefix of the new
- * SOAPElement
are all taken from the qname
argument.
- *
- * @param qname a QName
object with the XML name for the
- * new element
- *
- * @return the new SOAPElement
object that was created
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- * @see SOAPElement#addChildElement(Name)
- * @since 1.6, SAAJ 1.3
- */
- public SOAPElement addChildElement(QName qname) throws SOAPException;
-
- /**
- * Creates a new SOAPElement
object initialized with the
- * specified local name and adds the new element to this
- * SOAPElement
object.
- * The new SOAPElement
inherits any in-scope default namespace.
- *
- * @param localName a String
giving the local name for
- * the element
- * @return the new SOAPElement
object that was created
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- */
- public SOAPElement addChildElement(String localName) throws SOAPException;
-
- /**
- * Creates a new SOAPElement
object initialized with the
- * specified local name and prefix and adds the new element to this
- * SOAPElement
object.
- *
- * @param localName a String
giving the local name for
- * the new element
- * @param prefix a String
giving the namespace prefix for
- * the new element
- *
- * @return the new SOAPElement
object that was created
- * @exception SOAPException if the prefix
is not valid in the
- * context of this SOAPElement
or if there is an error in creating the
- * SOAPElement
object
- */
- public SOAPElement addChildElement(String localName, String prefix)
- throws SOAPException;
-
- /**
- * Creates a new SOAPElement
object initialized with the
- * specified local name, prefix, and URI and adds the new element to this
- * SOAPElement
object.
- *
- * @param localName a String
giving the local name for
- * the new element
- * @param prefix a String
giving the namespace prefix for
- * the new element
- * @param uri a String
giving the URI of the namespace
- * to which the new element belongs
- *
- * @return the new SOAPElement
object that was created
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- */
- public SOAPElement addChildElement(String localName, String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Add a SOAPElement
as a child of this
- * SOAPElement
instance. The SOAPElement
- * is expected to be created by a
- * SOAPFactory
. Callers should not rely on the
- * element instance being added as is into the XML
- * tree. Implementations could end up copying the content
- * of the SOAPElement
passed into an instance of
- * a different SOAPElement
implementation. For
- * instance if addChildElement()
is called on a
- * SOAPHeader
, element
will be copied
- * into an instance of a SOAPHeaderElement
.
- *
- * element
is either added
- * as a whole or not at all, if there was an error.
- *
- * element
cannot contain
- * elements named "Envelope", "Header" or "Body" and in the SOAP
- * namespace. Any namespace prefixes present in the fragment
- * should be fully resolved using appropriate namespace
- * declarations within the fragment itself.
- *
- * @param element the SOAPElement
to be added as a
- * new child
- *
- * @exception SOAPException if there was an error in adding this
- * element as a child
- *
- * @return an instance representing the new SOAP element that was
- * actually added to the tree.
- */
- public SOAPElement addChildElement(SOAPElement element)
- throws SOAPException;
-
- /**
- * Detaches all children of this SOAPElement
.
- * SOAPHeaders
and SOAPBodys
in
- * preparation for sending a fault when an error condition is detected. It
- * is also useful for recycling portions of a document within a SOAP
- * message.
- *
- * @since 1.6, SAAJ 1.2
- */
- public abstract void removeContents();
-
- /**
- * Creates a new Text
object initialized with the given
- * String
and adds it to this SOAPElement
object.
- *
- * @param text a String
object with the textual content to be added
- *
- * @return the SOAPElement
object into which
- * the new Text
object was inserted
- * @exception SOAPException if there is an error in creating the
- * new Text
object or if it is not legal to
- * attach it as a child to this
- * SOAPElement
- */
- public SOAPElement addTextNode(String text) throws SOAPException;
-
- /**
- * Adds an attribute with the specified name and value to this
- * SOAPElement
object.
- *
- * @param name a Name
object with the name of the attribute
- * @param value a String
giving the value of the attribute
- * @return the SOAPElement
object into which the attribute was
- * inserted
- *
- * @exception SOAPException if there is an error in creating the
- * Attribute, or it is invalid to set
- an attribute with Name
- name
on this SOAPElement.
- * @see SOAPElement#addAttribute(javax.xml.namespace.QName, String)
- */
- public SOAPElement addAttribute(Name name, String value)
- throws SOAPException;
-
- /**
- * Adds an attribute with the specified name and value to this
- * SOAPElement
object.
- *
- * @param qname a QName
object with the name of the attribute
- * @param value a String
giving the value of the attribute
- * @return the SOAPElement
object into which the attribute was
- * inserted
- *
- * @exception SOAPException if there is an error in creating the
- * Attribute, or it is invalid to set
- an attribute with QName
- qname
on this SOAPElement.
- * @see SOAPElement#addAttribute(Name, String)
- * @since 1.6, SAAJ 1.3
- */
- public SOAPElement addAttribute(QName qname, String value)
- throws SOAPException;
-
- /**
- * Adds a namespace declaration with the specified prefix and URI to this
- * SOAPElement
object.
- *
- * @param prefix a String
giving the prefix of the namespace
- * @param uri a String
giving the uri of the namespace
- * @return the SOAPElement
object into which this
- * namespace declaration was inserted.
- *
- * @exception SOAPException if there is an error in creating the
- * namespace
- */
- public SOAPElement addNamespaceDeclaration(String prefix, String uri)
- throws SOAPException;
-
- /**
- * Returns the value of the attribute with the specified name.
- *
- * @param name a Name
object with the name of the attribute
- * @return a String
giving the value of the specified
- * attribute, Null if there is no such attribute
- * @see SOAPElement#getAttributeValue(javax.xml.namespace.QName)
- */
- public String getAttributeValue(Name name);
-
- /**
- * Returns the value of the attribute with the specified qname.
- *
- * @param qname a QName
object with the qname of the attribute
- * @return a String
giving the value of the specified
- * attribute, Null if there is no such attribute
- * @see SOAPElement#getAttributeValue(Name)
- * @since 1.6, SAAJ 1.3
- */
- public String getAttributeValue(QName qname);
-
- /**
- * Returns an Iterator
over all of the attribute
- * Name
objects in this
- * SOAPElement
object. The iterator can be used to get
- * the attribute names, which can then be passed to the method
- * getAttributeValue
to retrieve the value of each
- * attribute.
- *
- * @see SOAPElement#getAllAttributesAsQNames()
- * @return an iterator over the names of the attributes
- */
- public Iterator getAllAttributes();
-
- /**
- * Returns an Iterator
over all of the attributes
- * in this SOAPElement
as QName
objects.
- * The iterator can be used to get the attribute QName, which can then
- * be passed to the method getAttributeValue
to retrieve
- * the value of each attribute.
- *
- * @return an iterator over the QNames of the attributes
- * @see SOAPElement#getAllAttributes()
- * @since 1.6, SAAJ 1.3
- */
- public Iterator getAllAttributesAsQNames();
-
-
- /**
- * Returns the URI of the namespace that has the given prefix.
- *
- * @param prefix a String
giving the prefix of the namespace
- * for which to search
- * @return a String
with the uri of the namespace that has
- * the given prefix
- */
- public String getNamespaceURI(String prefix);
-
- /**
- * Returns an Iterator
over the namespace prefix
- * String
s declared by this element. The prefixes returned by
- * this iterator can be passed to the method
- * getNamespaceURI
to retrieve the URI of each namespace.
- *
- * @return an iterator over the namespace prefixes in this
- * SOAPElement
object
- */
- public Iterator getNamespacePrefixes();
-
- /**
- * Returns an Iterator
over the namespace prefix
- * String
s visible to this element. The prefixes returned by
- * this iterator can be passed to the method
- * getNamespaceURI
to retrieve the URI of each namespace.
- *
- * @return an iterator over the namespace prefixes are within scope of this
- * SOAPElement
object
- *
- * @since 1.6, SAAJ 1.2
- */
- public Iterator getVisibleNamespacePrefixes();
-
- /**
- * Creates a QName
whose namespace URI is the one associated
- * with the parameter, prefix
, in the context of this
- * SOAPElement
. The remaining elements of the new
- * QName
are taken directly from the parameters,
- * localName
and prefix
.
- *
- * @param localName
- * a String
containing the local part of the name.
- * @param prefix
- * a String
containing the prefix for the name.
- *
- * @return a QName
with the specified localName
- * and prefix
, and with a namespace that is associated
- * with the prefix
in the context of this
- * SOAPElement
. This namespace will be the same as
- * the one that would be returned by
- * {@link #getNamespaceURI(String)}
if it were given
- * prefix
as it's parameter.
- *
- * @exception SOAPException if the QName
cannot be created.
- *
- * @since 1.6, SAAJ 1.3
- */
- public QName createQName(String localName, String prefix)
- throws SOAPException;
- /**
- * Returns the name of this SOAPElement
object.
- *
- * @return a Name
object with the name of this
- * SOAPElement
object
- */
- public Name getElementName();
-
- /**
- * Returns the qname of this SOAPElement
object.
- *
- * @return a QName
object with the qname of this
- * SOAPElement
object
- * @see SOAPElement#getElementName()
- * @since 1.6, SAAJ 1.3
- */
- public QName getElementQName();
-
- /**
- * Changes the name of this Element
to newName
if
- * possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
- * etc. cannot have their names changed using this method. Any attempt to do
- * so will result in a SOAPException being thrown.
- *SOAPElement
to a renamed instance.
- *
- * @param newName the new name for the Element
.
- *
- * @exception SOAPException if changing the name of this Element
- * is not allowed.
- * @return The renamed Node
- *
- * @since 1.6, SAAJ 1.3
- */
- public SOAPElement setElementQName(QName newName) throws SOAPException;
-
- /**
- * Removes the attribute with the specified name.
- *
- * @param name the Name
object with the name of the
- * attribute to be removed
- * @return true
if the attribute was
- * removed successfully; false
if it was not
- * @see SOAPElement#removeAttribute(javax.xml.namespace.QName)
- */
- public boolean removeAttribute(Name name);
-
- /**
- * Removes the attribute with the specified qname.
- *
- * @param qname the QName
object with the qname of the
- * attribute to be removed
- * @return true
if the attribute was
- * removed successfully; false
if it was not
- * @see SOAPElement#removeAttribute(Name)
- * @since 1.6, SAAJ 1.3
- */
- public boolean removeAttribute(QName qname);
-
- /**
- * Removes the namespace declaration corresponding to the given prefix.
- *
- * @param prefix a String
giving the prefix for which
- * to search
- * @return true
if the namespace declaration was
- * removed successfully; false
if it was not
- */
- public boolean removeNamespaceDeclaration(String prefix);
-
- /**
- * Returns an Iterator
over all the immediate child
- * {@link Node}s of this element. This includes javax.xml.soap.Text
- * objects as well as SOAPElement
objects.
- * Element
,
- * SOAPElement
and org.w3c.dom.Text
nodes to be
- * replaced by SOAPElement
, SOAPHeaderElement
,
- * SOAPBodyElement
or javax.xml.soap.Text
nodes as
- * appropriate for the type of this parent node. As a result the calling
- * application must treat any existing references to these child nodes that
- * have been obtained through DOM APIs as invalid and either discard them or
- * refresh them with the values returned by this Iterator
. This
- * behavior can be avoided by calling the equivalent DOM APIs. See
- * {@link javax.xml.soap}
- * for more details.
- *
- * @return an iterator with the content of this SOAPElement
- * object
- */
- public Iterator getChildElements();
-
- /**
- * Returns an Iterator
over all the immediate child
- * {@link Node}s of this element with the specified name. All of these
- * children will be SOAPElement
nodes.
- * Element
,
- * SOAPElement
and org.w3c.dom.Text
nodes to be
- * replaced by SOAPElement
, SOAPHeaderElement
,
- * SOAPBodyElement
or javax.xml.soap.Text
nodes as
- * appropriate for the type of this parent node. As a result the calling
- * application must treat any existing references to these child nodes that
- * have been obtained through DOM APIs as invalid and either discard them or
- * refresh them with the values returned by this Iterator
. This
- * behavior can be avoided by calling the equivalent DOM APIs. See
- * {@link javax.xml.soap}
- * for more details.
- *
- * @param name a Name
object with the name of the child
- * elements to be returned
- *
- * @return an Iterator
object over all the elements
- * in this SOAPElement
object with the
- * specified name
- * @see SOAPElement#getChildElements(javax.xml.namespace.QName)
- */
- public Iterator getChildElements(Name name);
-
- /**
- * Returns an Iterator
over all the immediate child
- * {@link Node}s of this element with the specified qname. All of these
- * children will be SOAPElement
nodes.
- * Element
,
- * SOAPElement
and org.w3c.dom.Text
nodes to be
- * replaced by SOAPElement
, SOAPHeaderElement
,
- * SOAPBodyElement
or javax.xml.soap.Text
nodes as
- * appropriate for the type of this parent node. As a result the calling
- * application must treat any existing references to these child nodes that
- * have been obtained through DOM APIs as invalid and either discard them or
- * refresh them with the values returned by this Iterator
. This
- * behavior can be avoided by calling the equivalent DOM APIs. See
- * {@link javax.xml.soap}
- * for more details.
- *
- * @param qname a QName
object with the qname of the child
- * elements to be returned
- *
- * @return an Iterator
object over all the elements
- * in this SOAPElement
object with the
- * specified qname
- * @see SOAPElement#getChildElements(Name)
- * @since 1.6, SAAJ 1.3
- */
- public Iterator getChildElements(QName qname);
-
- /**
- * Sets the encoding style for this SOAPElement
object
- * to one specified.
- *
- * @param encodingStyle a String
giving the encoding style
- *
- * @exception IllegalArgumentException if there was a problem in the
- * encoding style being set.
- * @exception SOAPException if setting the encodingStyle is invalid for this SOAPElement.
- * @see #getEncodingStyle
- */
- public void setEncodingStyle(String encodingStyle)
- throws SOAPException;
- /**
- * Returns the encoding style for this SOAPElement
object.
- *
- * @return a String
giving the encoding style
- *
- * @see #setEncodingStyle
- */
- public String getEncodingStyle();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElementFactory.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPElementFactory.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * SOAPElementFactory
is a factory for XML fragments that
- * will eventually end up in the SOAP part. These fragments
- * can be inserted as children of the SOAPHeader
or
- * SOAPBody
or SOAPEnvelope
.
- *
- * javax.xml.soap.SOAPFactory
for creating SOAPElements.
- * @see javax.xml.soap.SOAPFactory
- * @since 1.6
- */
-public class SOAPElementFactory {
-
- private SOAPFactory soapFactory;
-
- private SOAPElementFactory(SOAPFactory soapFactory) {
- this.soapFactory = soapFactory;
- }
-
- /**
- * Create a SOAPElement
object initialized with the
- * given Name
object.
- *
- * @param name a Name
object with the XML name for
- * the new element
- *
- * @return the new SOAPElement
object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- *
- * @deprecated Use
- * javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
- * instead
- *
- * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.soap.Name)
- * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.namespace.QName)
- */
- public SOAPElement create(Name name) throws SOAPException {
- return soapFactory.createElement(name);
- }
-
- /**
- * Create a SOAPElement
object initialized with the
- * given local name.
- *
- * @param localName a String
giving the local name for
- * the new element
- *
- * @return the new SOAPElement
object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- *
- * @deprecated Use
- * javax.xml.soap.SOAPFactory.createElement(String localName) instead
- *
- * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String)
- */
- public SOAPElement create(String localName) throws SOAPException {
- return soapFactory.createElement(localName);
- }
-
- /**
- * Create a new SOAPElement
object with the given
- * local name, prefix and uri.
- *
- * @param localName a String
giving the local name
- * for the new element
- * @param prefix the prefix for this SOAPElement
- * @param uri a String
giving the URI of the
- * namespace to which the new element belongs
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- *
- * @deprecated Use
- * javax.xml.soap.SOAPFactory.createElement(String localName,
- * String prefix,
- * String uri)
- * instead
- *
- * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String, java.lang.String, java.lang.String)
- */
- public SOAPElement create(String localName, String prefix, String uri)
- throws SOAPException {
- return soapFactory.createElement(localName, prefix, uri);
- }
-
- /**
- * Creates a new instance of SOAPElementFactory
.
- *
- * @return a new instance of a SOAPElementFactory
- *
- * @exception SOAPException if there was an error creating the
- * default SOAPElementFactory
- */
- public static SOAPElementFactory newInstance() throws SOAPException {
- try {
- return new SOAPElementFactory(SOAPFactory.newInstance());
- } catch (Exception ex) {
- throw new SOAPException(
- "Unable to create SOAP Element Factory: " + ex.getMessage());
- }
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPEnvelope.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPEnvelope.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-
-/**
- * The container for the SOAPHeader and SOAPBody portions of a
- * SOAPPart
object. By default, a SOAPMessage
- * object is created with a SOAPPart
object that has a
- * SOAPEnvelope
object. The SOAPEnvelope
object
- * by default has an empty SOAPBody
object and an empty
- * SOAPHeader
object. The SOAPBody
object is
- * required, and the SOAPHeader
object, though
- * optional, is used in the majority of cases. If the
- * SOAPHeader
object is not needed, it can be deleted,
- * which is shown later.
- * SOAPHeader
and SOAPBody
- * objects by calling the methods SOAPEnvelope.getHeader
and
- * SOAPEnvelope.getBody
. The
- * following lines of code use these two methods after starting with
- * the SOAPMessage
- * object message to get the SOAPPart
object sp,
- * which is then used to get the SOAPEnvelope
object se.
- *
- *
- * SOAPPart sp = message.getSOAPPart();
- * SOAPEnvelope se = sp.getEnvelope();
- * SOAPHeader sh = se.getHeader();
- * SOAPBody sb = se.getBody();
- *
- * SOAPEnvelope
- * object by retrieving the current one, deleting it, and then adding
- * a new body or header. The javax.xml.soap.Node
method
- * deleteNode
deletes the XML element (node) on which it is
- * called. For example, the following line of code deletes the
- * SOAPBody
object that is retrieved by the method getBody
.
- *
- * se.getBody().detachNode();
- *
- * To create a SOAPHeader
object to replace the one that was removed,
- * a client uses
- * the method SOAPEnvelope.addHeader
, which creates a new header and
- * adds it to the SOAPEnvelope
object. Similarly, the method
- * addBody
creates a new SOAPBody
object and adds
- * it to the SOAPEnvelope
object. The following code fragment
- * retrieves the current header, removes it, and adds a new one. Then
- * it retrieves the current body, removes it, and adds a new one.
- *
- *
- * SOAPPart sp = message.getSOAPPart();
- * SOAPEnvelope se = sp.getEnvelope();
- * se.getHeader().detachNode();
- * SOAPHeader sh = se.addHeader();
- * se.getBody().detachNode();
- * SOAPBody sb = se.addBody();
- *
- * It is an error to add a SOAPBody
or SOAPHeader
- * object if one already exists.
- * SOAPEnvelope
interface provides three methods for creating
- * Name
objects. One method creates Name
objects with
- * a local name, a namespace prefix, and a namesapce URI. The second method creates
- * Name
objects with a local name and a namespace prefix, and the third
- * creates Name
objects with just a local name. The following line of
- * code, in which se is a SOAPEnvelope
object, creates a new
- * Name
object with all three.
- *
- * Name name = se.createName("GetLastTradePrice", "WOMBAT",
- * "http://www.wombat.org/trader");
- *
- *
- * @since 1.6
- */
-public interface SOAPEnvelope extends SOAPElement {
-
- /**
- * Creates a new Name
object initialized with the
- * given local name, namespace prefix, and namespace URI.
- * Name
objects for use in
- * the SOAP/XML document.
- *
- * @param localName a String
giving the local name
- * @param prefix a String
giving the prefix of the namespace
- * @param uri a String
giving the URI of the namespace
- * @return a Name
object initialized with the given
- * local name, namespace prefix, and namespace URI
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(String localName, String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Creates a new Name
object initialized with the
- * given local name.
- * Name
objects for use in
- * the SOAP/XML document.
- *
- * @param localName a String
giving the local name
- * @return a Name
object initialized with the given
- * local name
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(String localName)
- throws SOAPException;
-
- /**
- * Returns the SOAPHeader
object for
- * this SOAPEnvelope
object.
- * SOAPMessage
object is by default created with a
- * SOAPEnvelope
object that contains an empty
- * SOAPHeader
object. As a result, the method
- * getHeader
will always return a SOAPHeader
- * object unless the header has been removed and a new one has not
- * been added.
- *
- * @return the SOAPHeader
object or null
if
- * there is none
- * @exception SOAPException if there is a problem obtaining the
- * SOAPHeader
object
- */
- public SOAPHeader getHeader() throws SOAPException;
-
- /**
- * Returns the SOAPBody
object associated with this
- * SOAPEnvelope
object.
- * SOAPMessage
object is by default created with a
- * SOAPEnvelope
object that contains an empty
- * SOAPBody
object. As a result, the method
- * getBody
will always return a SOAPBody
- * object unless the body has been removed and a new one has not
- * been added.
- *
- * @return the SOAPBody
object for this
- * SOAPEnvelope
object or null
- * if there is none
- * @exception SOAPException if there is a problem obtaining the
- * SOAPBody
object
- */
- public SOAPBody getBody() throws SOAPException;
- /**
- * Creates a SOAPHeader
object and sets it as the
- * SOAPHeader
object for this SOAPEnvelope
- * object.
- * SOAPHeader
object
- *
- * @exception SOAPException if this
- * SOAPEnvelope
object already contains a
- * valid SOAPHeader
object
- */
- public SOAPHeader addHeader() throws SOAPException;
- /**
- * Creates a SOAPBody
object and sets it as the
- * SOAPBody
object for this SOAPEnvelope
- * object.
- * SOAPBody
object
- *
- * @exception SOAPException if this
- * SOAPEnvelope
object already contains a
- * valid SOAPBody
object
- */
- public SOAPBody addBody() throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPException.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPException.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * An exception that signals that a SOAP exception has occurred. A
- * SOAPException
object may contain a String
- * that gives the reason for the exception, an embedded
- * Throwable
object, or both. This class provides methods
- * for retrieving reason messages and for retrieving the embedded
- * Throwable
object.
- *
- * SOAPException
- * object are problems such as difficulty setting a header, not being
- * able to send a message, and not being able to get a connection with
- * the provider. Reasons for embedding a Throwable
- * object include problems such as input/output errors or a parsing
- * problem, such as an error in parsing a header.
- *
- * @since 1.6
- */
-public class SOAPException extends Exception {
- private Throwable cause;
-
- /**
- * Constructs a SOAPException
object with no
- * reason or embedded Throwable
object.
- */
- public SOAPException() {
- super();
- this.cause = null;
- }
-
- /**
- * Constructs a SOAPException
object with the given
- * String
as the reason for the exception being thrown.
- *
- * @param reason a description of what caused the exception
- */
- public SOAPException(String reason) {
- super(reason);
- this.cause = null;
- }
-
- /**
- * Constructs a SOAPException
object with the given
- * String
as the reason for the exception being thrown
- * and the given Throwable
object as an embedded
- * exception.
- *
- * @param reason a description of what caused the exception
- * @param cause a Throwable
object that is to
- * be embedded in this SOAPException
object
- */
- public SOAPException(String reason, Throwable cause) {
- super(reason);
- initCause(cause);
- }
-
- /**
- * Constructs a SOAPException
object initialized
- * with the given Throwable
object.
- */
- public SOAPException(Throwable cause) {
- super(cause.toString());
- initCause(cause);
- }
-
- /**
- * Returns the detail message for this SOAPException
- * object.
- * Throwable
object, and if the
- * SOAPException
object has no detail message of its
- * own, this method will return the detail message from the embedded
- * Throwable
object.
- *
- * @return the error or warning message for this
- * SOAPException
or, if it has none, the
- * message of the embedded Throwable
object,
- * if there is one
- */
- public String getMessage() {
- String message = super.getMessage();
- if (message == null && cause != null) {
- return cause.getMessage();
- } else {
- return message;
- }
- }
-
- /**
- * Returns the Throwable
object embedded in this
- * SOAPException
if there is one. Otherwise, this method
- * returns null
.
- *
- * @return the embedded Throwable
object or null
- * if there is none
- */
-
- public Throwable getCause() {
- return cause;
- }
-
- /**
- * Initializes the cause
field of this SOAPException
- * object with the given Throwable
object.
- * SOAPException
object.
- * If this SOAPException
object was created with the
- * constructor {@link #SOAPException(Throwable)} or
- * {@link #SOAPException(String,Throwable)}, meaning that its
- * cause
field already has a value, this method cannot be
- * called even once.
- *
- * @param cause the Throwable
object that caused this
- * SOAPException
object to be thrown. The value of this
- * parameter is saved for later retrieval by the
- * {@link #getCause()} method. A null value is
- * permitted and indicates that the cause is nonexistent or
- * unknown.
- * @return a reference to this SOAPException
instance
- * @throws IllegalArgumentException if cause
is this
- * Throwable
object. (A Throwable
object
- * cannot be its own cause.)
- * @throws IllegalStateException if the cause for this SOAPException
object
- * has already been initialized
- */
- public synchronized Throwable initCause(Throwable cause) {
- if (this.cause != null) {
- throw new IllegalStateException("Can't override cause");
- }
- if (cause == this) {
- throw new IllegalArgumentException("Self-causation not permitted");
- }
- this.cause = cause;
-
- return this;
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFactory.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFactory.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Element;
-
-/**
- * SOAPFactory
is a factory for creating various objects
- * that exist in the SOAP XML tree.
-
- * SOAPFactory
can be
- * used to create XML fragments that will eventually end up in the
- * SOAP part. These fragments can be inserted as children of the
- * {@link SOAPHeaderElement} or {@link SOAPBodyElement} or
- * {@link SOAPEnvelope} or other {@link SOAPElement} objects.
- *
- * SOAPFactory
also has methods to create
- * javax.xml.soap.Detail
objects as well as
- * java.xml.soap.Name
objects.
- *
- * @since 1.6
- */
-public abstract class SOAPFactory {
-
- /**
- * A constant representing the property used to lookup the name of
- * a SOAPFactory
implementation class.
- */
- static private final String SOAP_FACTORY_PROPERTY =
- "javax.xml.soap.SOAPFactory";
-
- /**
- * Class name of default SOAPFactory
implementation.
- */
- static final String DEFAULT_SOAP_FACTORY
- = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl";
-
- /**
- * Creates a SOAPElement
object from an existing DOM
- * Element
. If the DOM Element
that is passed in
- * as an argument is already a SOAPElement
then this method
- * must return it unmodified without any further work. Otherwise, a new
- * SOAPElement
is created and a deep copy is made of the
- * domElement
argument. The concrete type of the return value
- * will depend on the name of the domElement
argument. If any
- * part of the tree rooted in domElement
violates SOAP rules, a
- * SOAPException
will be thrown.
- *
- * @param domElement - the Element
to be copied.
- *
- * @return a new SOAPElement
that is a copy of domElement
.
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- *
- * @since 1.6, SAAJ 1.3
- */
- public SOAPElement createElement(Element domElement) throws SOAPException {
- throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory.");
- }
-
- /**
- * Creates a SOAPElement
object initialized with the
- * given Name
object. The concrete type of the return value
- * will depend on the name given to the new SOAPElement
. For
- * instance, a new SOAPElement
with the name
- * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
- * SOAPEnvelope
that supports SOAP 1.2 behavior to be created.
- *
- * @param name a Name
object with the XML name for
- * the new element
- *
- * @return the new SOAPElement
object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- * @see SOAPFactory#createElement(javax.xml.namespace.QName)
- */
- public abstract SOAPElement createElement(Name name) throws SOAPException;
-
- /**
- * Creates a SOAPElement
object initialized with the
- * given QName
object. The concrete type of the return value
- * will depend on the name given to the new SOAPElement
. For
- * instance, a new SOAPElement
with the name
- * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
- * SOAPEnvelope
that supports SOAP 1.2 behavior to be created.
- *
- * @param qname a QName
object with the XML name for
- * the new element
- *
- * @return the new SOAPElement
object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- * @see SOAPFactory#createElement(Name)
- * @since 1.6, SAAJ 1.3
- */
- public SOAPElement createElement(QName qname) throws SOAPException {
- throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory.");
- }
-
- /**
- * Creates a SOAPElement
object initialized with the
- * given local name.
- *
- * @param localName a String
giving the local name for
- * the new element
- *
- * @return the new SOAPElement
object that was
- * created
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- */
- public abstract SOAPElement createElement(String localName)
- throws SOAPException;
-
-
- /**
- * Creates a new SOAPElement
object with the given
- * local name, prefix and uri. The concrete type of the return value
- * will depend on the name given to the new SOAPElement
. For
- * instance, a new SOAPElement
with the name
- * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
- * SOAPEnvelope
that supports SOAP 1.2 behavior to be created.
- *
- * @param localName a String
giving the local name
- * for the new element
- * @param prefix the prefix for this SOAPElement
- * @param uri a String
giving the URI of the
- * namespace to which the new element belongs
- *
- * @exception SOAPException if there is an error in creating the
- * SOAPElement
object
- */
- public abstract SOAPElement createElement(
- String localName,
- String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Creates a new Detail
object which serves as a container
- * for DetailEntry
objects.
- * Detail
objects for use in
- * situations where it is not practical to use the SOAPFault
- * abstraction.
- *
- * @return a Detail
object
- * @throws SOAPException if there is a SOAP error
- * @throws UnsupportedOperationException if the protocol specified
- * for the SOAPFactory was DYNAMIC_SOAP_PROTOCOL
- */
- public abstract Detail createDetail() throws SOAPException;
-
- /**
- *Creates a new SOAPFault
object initialized with the given reasonText
- * and faultCode
- *@param reasonText the ReasonText/FaultString for the fault
- *@param faultCode the FaultCode for the fault
- *@return a SOAPFault
object
- *@throws SOAPException if there is a SOAP error
- *@since 1.6, SAAJ 1.3
- */
- public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException;
-
- /**
- *Creates a new default SOAPFault
object
- *@return a SOAPFault
object
- *@throws SOAPException if there is a SOAP error
- *@since 1.6, SAAJ 1.3
- */
- public abstract SOAPFault createFault() throws SOAPException;
-
- /**
- * Creates a new Name
object initialized with the
- * given local name, namespace prefix, and namespace URI.
- * Name
objects for use in
- * situations where it is not practical to use the SOAPEnvelope
- * abstraction.
- *
- * @param localName a String
giving the local name
- * @param prefix a String
giving the prefix of the namespace
- * @param uri a String
giving the URI of the namespace
- * @return a Name
object initialized with the given
- * local name, namespace prefix, and namespace URI
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(
- String localName,
- String prefix,
- String uri)
- throws SOAPException;
-
- /**
- * Creates a new Name
object initialized with the
- * given local name.
- * Name
objects for use in
- * situations where it is not practical to use the SOAPEnvelope
- * abstraction.
- *
- * @param localName a String
giving the local name
- * @return a Name
object initialized with the given
- * local name
- * @throws SOAPException if there is a SOAP error
- */
- public abstract Name createName(String localName) throws SOAPException;
-
- /**
- * Creates a new SOAPFactory
object that is an instance of
- * the default implementation (SOAP 1.1),
- *
- * This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load:
- *
- *
- *
- * @return a new instance of a SOAPFactory
- *
- * @exception SOAPException if there was an error creating the
- * default SOAPFactory
- * @see SAAJMetaFactory
- */
- public static SOAPFactory newInstance()
- throws SOAPException
- {
- try {
- SOAPFactory factory = (SOAPFactory) FactoryFinder.find(
- SOAP_FACTORY_PROPERTY, DEFAULT_SOAP_FACTORY, false);
- if (factory != null)
- return factory;
- return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
- } catch (Exception ex) {
- throw new SOAPException(
- "Unable to create SOAP Factory: " + ex.getMessage());
- }
-
- }
-
- /**
- * Creates a new SOAPFactory
object that is an instance of
- * the specified implementation, this method uses the SAAJMetaFactory to
- * locate the implementation class and create the SOAPFactory instance.
- *
- * @return a new instance of a SOAPFactory
- *
- * @param protocol a string constant representing the protocol of the
- * specified SOAP factory implementation. May be
- * either DYNAMIC_SOAP_PROTOCOL
,
- * DEFAULT_SOAP_PROTOCOL
(which is the same
- * as) SOAP_1_1_PROTOCOL
, or
- * SOAP_1_2_PROTOCOL
.
- *
- * @exception SOAPException if there was an error creating the
- * specified SOAPFactory
- * @see SAAJMetaFactory
- * @since 1.6, SAAJ 1.3
- */
- public static SOAPFactory newInstance(String protocol)
- throws SOAPException {
- return SAAJMetaFactory.getInstance().newSOAPFactory(protocol);
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFault.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFault.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,513 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-import java.util.Locale;
-
-import javax.xml.namespace.QName;
-
-/**
- * An element in the SOAPBody
object that contains
- * error and/or status information. This information may relate to
- * errors in the SOAPMessage
object or to problems
- * that are not related to the content in the message itself. Problems
- * not related to the message itself are generally errors in
- * processing, such as the inability to communicate with an upstream
- * server.
- * protocol
specified while creating the
- * MessageFactory
instance, a SOAPFault
has
- * sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
- *
- * @since 1.6
- */
-public interface SOAPFault extends SOAPBodyElement {
-
- /**
- * Sets this SOAPFault
object with the given fault code.
- *
- * Name
. This method provides a convenient
- * way to set a fault code. For example,
- *
- *
- * SOAPEnvelope se = ...;
- * // Create a qualified name in the SOAP namespace with a localName
- * // of "Client". Note that prefix parameter is optional and is null
- * // here which causes the implementation to use an appropriate prefix.
- * Name qname = se.createName("Client", null,
- * SOAPConstants.URI_NS_SOAP_ENVELOPE);
- * SOAPFault fault = ...;
- * fault.setFaultCode(qname);
- *
- * It is preferable to use this method over {@link #setFaultCode(String)}.
- *
- * @param faultCodeQName a Name
object giving the fault
- * code to be set. It must be namespace qualified.
- * @see #getFaultCodeAsName
- *
- * @exception SOAPException if there was an error in adding the
- * faultcode element to the underlying XML tree.
- *
- * @since 1.6, SAAJ 1.2
- */
- public void setFaultCode(Name faultCodeQName) throws SOAPException;
-
- /**
- * Sets this SOAPFault
object with the given fault code.
- *
- * It is preferable to use this method over {@link #setFaultCode(Name)}.
- *
- * @param faultCodeQName a QName
object giving the fault
- * code to be set. It must be namespace qualified.
- * @see #getFaultCodeAsQName
- *
- * @exception SOAPException if there was an error in adding the
- * faultcode
element to the underlying XML tree.
- *
- * @see #setFaultCode(Name)
- * @see #getFaultCodeAsQName()
- *
- * @since 1.6, SAAJ 1.3
- */
- public void setFaultCode(QName faultCodeQName) throws SOAPException;
-
- /**
- * Sets this SOAPFault
object with the give fault code.
- * String
giving the fault code to be set.
- * It must be of the form "prefix:localName" where the prefix has
- * been defined in a namespace declaration.
- * @see #setFaultCode(Name)
- * @see #getFaultCode
- * @see SOAPElement#addNamespaceDeclaration
- *
- * @exception SOAPException if there was an error in adding the
- * faultCode
to the underlying XML tree.
- */
- public void setFaultCode(String faultCode) throws SOAPException;
-
- /**
- * Gets the mandatory SOAP 1.1 fault code for this
- * SOAPFault
object as a SAAJ Name
object.
- * The SOAP 1.1 specification requires the value of the "faultcode"
- * element to be of type QName. This method returns the content of the
- * element as a QName in the form of a SAAJ Name object. This method
- * should be used instead of the getFaultCode
method since
- * it allows applications to easily access the namespace name without
- * additional parsing.
- *
- * @return a Name
representing the faultcode
- * @see #setFaultCode(Name)
- *
- * @since 1.6, SAAJ 1.2
- */
- public Name getFaultCodeAsName();
-
-
- /**
- * Gets the fault code for this
- * SOAPFault
object as a QName
object.
- *
- * @return a QName
representing the faultcode
- *
- * @see #setFaultCode(QName)
- *
- * @since 1.6, SAAJ 1.3
- */
- public QName getFaultCodeAsQName();
-
- /**
- * Gets the Subcodes for this SOAPFault
as an iterator over
- * QNames
.
- *
- * @return an Iterator
that accesses a sequence of
- * QNames
. This Iterator
should not support
- * the optional remove
method. The order in which the
- * Subcodes are returned reflects the hierarchy of Subcodes present
- * in the fault from top to bottom.
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Subcode.
- *
- * @since 1.6, SAAJ 1.3
- */
- public Iterator getFaultSubcodes();
-
- /**
- * Removes any Subcodes that may be contained by this
- * SOAPFault
. Subsequent calls to
- * getFaultSubcodes
will return an empty iterator until a call
- * to appendFaultSubcode
is made.
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Subcode.
- *
- * @since 1.6, SAAJ 1.3
- */
- public void removeAllFaultSubcodes();
-
- /**
- * Adds a Subcode to the end of the sequence of Subcodes contained by this
- * SOAPFault
. Subcodes, which were introduced in SOAP 1.2, are
- * represented by a recursive sequence of subelements rooted in the
- * mandatory Code subelement of a SOAP Fault.
- *
- * @param subcode a QName containing the Value of the Subcode.
- *
- * @exception SOAPException if there was an error in setting the Subcode
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Subcode.
- *
- * @since 1.6, SAAJ 1.3
- */
- public void appendFaultSubcode(QName subcode) throws SOAPException;
-
- /**
- * Gets the fault code for this SOAPFault
object.
- *
- * @return a String
with the fault code
- * @see #getFaultCodeAsName
- * @see #setFaultCode
- */
- public String getFaultCode();
-
- /**
- * Sets this SOAPFault
object with the given fault actor.
- * SOAPFault
supports SOAP 1.2 then this call is
- * equivalent to {@link #setFaultRole(String)}
- *
- * @param faultActor a String
identifying the actor that
- * caused this SOAPFault
object
- * @see #getFaultActor
- *
- * @exception SOAPException if there was an error in adding the
- * faultActor
to the underlying XML tree.
- */
- public void setFaultActor(String faultActor) throws SOAPException;
-
- /**
- * Gets the fault actor for this SOAPFault
object.
- * SOAPFault
supports SOAP 1.2 then this call is
- * equivalent to {@link #getFaultRole()}
- *
- * @return a String
giving the actor in the message path
- * that caused this SOAPFault
object
- * @see #setFaultActor
- */
- public String getFaultActor();
-
- /**
- * Sets the fault string for this SOAPFault
object
- * to the given string.
- * SOAPFault
is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- *
- * addFaultReasonText(faultString, Locale.getDefault());
- *
- *
- * @param faultString a String
giving an explanation of
- * the fault
- * @see #getFaultString
- *
- * @exception SOAPException if there was an error in adding the
- * faultString
to the underlying XML tree.
- */
- public void setFaultString(String faultString) throws SOAPException;
-
- /**
- * Sets the fault string for this SOAPFault
object
- * to the given string and localized to the given locale.
- * SOAPFault
is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- *
- * addFaultReasonText(faultString, locale);
- *
- *
- * @param faultString a String
giving an explanation of
- * the fault
- * @param locale a {@link java.util.Locale Locale} object indicating
- * the native language of the faultString
- * @see #getFaultString
- *
- * @exception SOAPException if there was an error in adding the
- * faultString
to the underlying XML tree.
- *
- * @since 1.6, SAAJ 1.2
- */
- public void setFaultString(String faultString, Locale locale)
- throws SOAPException;
-
- /**
- * Gets the fault string for this SOAPFault
object.
- * SOAPFault
is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- *
- * String reason = null;
- * try {
- * reason = (String) getFaultReasonTexts().next();
- * } catch (SOAPException e) {}
- * return reason;
- *
- *
- * @return a String
giving an explanation of
- * the fault
- * @see #setFaultString(String)
- * @see #setFaultString(String, Locale)
- */
- public String getFaultString();
-
- /**
- * Gets the locale of the fault string for this SOAPFault
- * object.
- * SOAPFault
is part of a message that supports SOAP 1.2 then
- * this call is equivalent to:
- *
- * Locale locale = null;
- * try {
- * locale = (Locale) getFaultReasonLocales().next();
- * } catch (SOAPException e) {}
- * return locale;
- *
- *
- * @return a Locale
object indicating the native language of
- * the fault string or null
if no locale was specified
- * @see #setFaultString(String, Locale)
- *
- * @since 1.6, SAAJ 1.2
- */
- public Locale getFaultStringLocale();
-
- /**
- * Returns true if this SOAPFault
has a Detail
- * subelement and false otherwise. Equivalent to
- * (getDetail()!=null)
.
- *
- * @return true if this SOAPFault
has a Detail
- * subelement and false otherwise.
- *
- * @since 1.6, SAAJ 1.3
- */
- public boolean hasDetail();
-
- /**
- * Returns the optional detail element for this SOAPFault
- * object.
- * Detail
object carries application-specific error
- * information, the scope of the error information is restricted to
- * faults in the SOAPBodyElement
objects if this is a
- * SOAP 1.1 Fault.
- *
- * @return a Detail
object with application-specific
- * error information if present, null otherwise
- */
- public Detail getDetail();
-
- /**
- * Creates an optional Detail
object and sets it as the
- * Detail
object for this SOAPFault
- * object.
- * Detail
object
- *
- * @exception SOAPException if this
- * SOAPFault
object already contains a
- * valid Detail
object
- */
- public Detail addDetail() throws SOAPException;
-
- /**
- * Returns an Iterator
over a distinct sequence of
- * Locale
s for which there are associated Reason Text items.
- * Any of these Locale
s can be used in a call to
- * getFaultReasonText
in order to obtain a localized version
- * of the Reason Text string.
- *
- * @return an Iterator
over a sequence of Locale
- * objects for which there are associated Reason Text items.
- *
- * @exception SOAPException if there was an error in retrieving
- * the fault Reason locales.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since 1.6, SAAJ 1.3
- */
- public Iterator getFaultReasonLocales() throws SOAPException;
-
- /**
- * Returns an Iterator
over a sequence of
- * String
objects containing all of the Reason Text items for
- * this SOAPFault
.
- *
- * @return an Iterator
over env:Fault/env:Reason/env:Text items.
- *
- * @exception SOAPException if there was an error in retrieving
- * the fault Reason texts.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since 1.6, SAAJ 1.3
- */
- public Iterator getFaultReasonTexts() throws SOAPException;
-
- /**
- * Returns the Reason Text associated with the given Locale
.
- * If more than one such Reason Text exists the first matching Text is
- * returned
- *
- * @param locale -- the Locale
for which a localized
- * Reason Text is desired
- *
- * @return the Reason Text associated with locale
- *
- * @see #getFaultString
- *
- * @exception SOAPException if there was an error in retrieving
- * the fault Reason text for the specified locale .
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since 1.6, SAAJ 1.3
- */
- public String getFaultReasonText(Locale locale) throws SOAPException;
-
- /**
- * Appends or replaces a Reason Text item containing the specified
- * text message and an xml:lang derived from
- * locale
. If a Reason Text item with this
- * xml:lang already exists its text value will be replaced
- * with text
.
- * The locale
parameter should not be null
- *
- * SOAPFault fault = ...;
- * fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
- *
- *
- * @param text -- reason message string
- * @param locale -- Locale object representing the locale of the message
- *
- * @exception SOAPException if there was an error in adding the Reason text
- * or the locale
passed was null
.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Reason.
- *
- * @since 1.6, SAAJ 1.3
- */
- public void addFaultReasonText(String text, java.util.Locale locale)
- throws SOAPException;
-
- /**
- * Returns the optional Node element value for this
- * SOAPFault
object. The Node element is
- * optional in SOAP 1.2.
- *
- * @return Content of the env:Fault/env:Node element as a String
- * or null
if none
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Node.
- *
- * @since 1.6, SAAJ 1.3
- */
- public String getFaultNode();
-
- /**
- * Creates or replaces any existing Node element value for
- * this SOAPFault
object. The Node element
- * is optional in SOAP 1.2.
- *
- * @exception SOAPException if there was an error in setting the
- * Node for this SOAPFault
object.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Node.
- *
- *
- * @since 1.6, SAAJ 1.3
- */
- public void setFaultNode(String uri) throws SOAPException;
-
- /**
- * Returns the optional Role element value for this
- * SOAPFault
object. The Role element is
- * optional in SOAP 1.2.
- *
- * @return Content of the env:Fault/env:Role element as a String
- * or null
if none
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since 1.6, SAAJ 1.3
- */
- public String getFaultRole();
-
- /**
- * Creates or replaces any existing Role element value for
- * this SOAPFault
object. The Role element
- * is optional in SOAP 1.2.
- *
- * @param uri - the URI of the Role
- *
- * @exception SOAPException if there was an error in setting the
- * Role for this SOAPFault
object.
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since 1.6, SAAJ 1.3
- */
- public void setFaultRole(String uri) throws SOAPException;
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFaultElement.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPFaultElement.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of the contents in
- * a SOAPFault
object. The Detail
interface
- * is a SOAPFaultElement
.
- * SOAPFaultElement
using the
- * SOAPElement
method addTextNode
.
- *
- * @since 1.6
- */
-public interface SOAPFaultElement extends SOAPElement {
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeader.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeader.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-
-/**
- * A representation of the SOAP header
- * element. A SOAP header element consists of XML data that affects
- * the way the application-specific content is processed by the message
- * provider. For example, transaction semantics, authentication information,
- * and so on, can be specified as the content of a SOAPHeader
- * object.
- * SOAPEnvelope
object contains an empty
- * SOAPHeader
object by default. If the SOAPHeader
- * object, which is optional, is not needed, it can be retrieved and deleted
- * with the following line of code. The variable se is a
- * SOAPEnvelope
object.
- *
- * se.getHeader().detachNode();
- *
- *
- * A SOAPHeader
object is created with the SOAPEnvelope
- * method addHeader
. This method, which creates a new header and adds it
- * to the envelope, may be called only after the existing header has been removed.
- *
- *
- * se.getHeader().detachNode();
- * SOAPHeader sh = se.addHeader();
- *
- * SOAPHeader
object can have only SOAPHeaderElement
- * objects as its immediate children. The method addHeaderElement
- * creates a new HeaderElement
object and adds it to the
- * SOAPHeader
object. In the following line of code, the
- * argument to the method addHeaderElement
is a Name
- * object that is the name for the new HeaderElement
object.
- *
- * SOAPHeaderElement shElement = sh.addHeaderElement(name);
- *
- *
- * @see SOAPHeaderElement
- * @since 1.6
- */
-public interface SOAPHeader extends SOAPElement {
- /**
- * Creates a new SOAPHeaderElement
object initialized with the
- * specified name and adds it to this SOAPHeader
object.
- *
- * @param name a Name
object with the name of the new
- * SOAPHeaderElement
object
- * @return the new SOAPHeaderElement
object that was
- * inserted into this SOAPHeader
object
- * @exception SOAPException if a SOAP error occurs
- * @see SOAPHeader#addHeaderElement(javax.xml.namespace.QName)
- */
- public SOAPHeaderElement addHeaderElement(Name name)
- throws SOAPException;
-
- /**
- * Creates a new SOAPHeaderElement
object initialized with the
- * specified qname and adds it to this SOAPHeader
object.
- *
- * @param qname a QName
object with the qname of the new
- * SOAPHeaderElement
object
- * @return the new SOAPHeaderElement
object that was
- * inserted into this SOAPHeader
object
- * @exception SOAPException if a SOAP error occurs
- * @see SOAPHeader#addHeaderElement(Name)
- * @since 1.6, SAAJ 1.3
- */
- public SOAPHeaderElement addHeaderElement(QName qname)
- throws SOAPException;
-
- /**
- * Returns an Iterator
over all the SOAPHeaderElement
objects
- * in this SOAPHeader
object
- * that have the specified actor and that have a MustUnderstand attribute
- * whose value is equivalent to true
.
- * String
giving the URI of the actor
/ role
- * for which to search
- * @return an Iterator
object over all the
- * SOAPHeaderElement
objects that contain the specified
- * actor
/ role
and are marked as MustUnderstand
- * @see #examineHeaderElements
- * @see #extractHeaderElements
- * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
- *
- * @since 1.6, SAAJ 1.2
- */
- public Iterator examineMustUnderstandHeaderElements(String actor);
-
- /**
- * Returns an Iterator
over all the SOAPHeaderElement
objects
- * in this SOAPHeader
object
- * that have the specified actor.
- *
- * An actor is a global attribute that indicates the intermediate
- * parties that should process a message before it reaches its ultimate
- * receiver. An actor receives the message and processes it before sending
- * it on to the next actor. The default actor is the ultimate intended
- * recipient for the message, so if no actor attribute is included in a
- * SOAPHeader
object, it is sent to the ultimate receiver
- * along with the message body.
- * String
giving the URI of the actor
/ role
- * for which to search
- * @return an Iterator
object over all the
- * SOAPHeaderElement
objects that contain the specified
- * actor
/ role
- * @see #extractHeaderElements
- * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
- */
- public Iterator examineHeaderElements(String actor);
-
- /**
- * Returns an Iterator
over all the SOAPHeaderElement
objects
- * in this SOAPHeader
object
- * that have the specified actor and detaches them
- * from this SOAPHeader
object.
- * SOAPHeader
object that apply to it and to remove
- * them before passing the message on to the next actor.
- * String
giving the URI of the actor
/ role
- * for which to search
- * @return an Iterator
object over all the
- * SOAPHeaderElement
objects that contain the specified
- * actor
/ role
- *
- * @see #examineHeaderElements
- * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
- */
- public Iterator extractHeaderElements(String actor);
-
- /**
- * Creates a new NotUnderstood SOAPHeaderElement
object initialized
- * with the specified name and adds it to this SOAPHeader
object.
- * This operation is supported only by SOAP 1.2.
- *
- * @param name a QName
object with the name of the
- * SOAPHeaderElement
object that was not understood.
- * @return the new SOAPHeaderElement
object that was
- * inserted into this SOAPHeader
object
- * @exception SOAPException if a SOAP error occurs.
- * @exception UnsupportedOperationException if this is a SOAP 1.1 Header.
- * @since 1.6, SAAJ 1.3
- */
- public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
- throws SOAPException;
-
- /**
- * Creates a new Upgrade SOAPHeaderElement
object initialized
- * with the specified List of supported SOAP URIs and adds it to this
- * SOAPHeader
object.
- * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
- *
- * @param supportedSOAPURIs an Iterator
object with the URIs of SOAP
- * versions supported.
- * @return the new SOAPHeaderElement
object that was
- * inserted into this SOAPHeader
object
- * @exception SOAPException if a SOAP error occurs.
- * @since 1.6, SAAJ 1.3
- */
- public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
- throws SOAPException;
-
- /**
- * Creates a new Upgrade SOAPHeaderElement
object initialized
- * with the specified array of supported SOAP URIs and adds it to this
- * SOAPHeader
object.
- * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
- *
- * @param supportedSoapUris an array of the URIs of SOAP versions supported.
- * @return the new SOAPHeaderElement
object that was
- * inserted into this SOAPHeader
object
- * @exception SOAPException if a SOAP error occurs.
- * @since 1.6, SAAJ 1.3
- */
- public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
- throws SOAPException;
-
- /**
- * Creates a new Upgrade SOAPHeaderElement
object initialized
- * with the specified supported SOAP URI and adds it to this
- * SOAPHeader
object.
- * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
- *
- * @param supportedSoapUri the URI of SOAP the version that is supported.
- * @return the new SOAPHeaderElement
object that was
- * inserted into this SOAPHeader
object
- * @exception SOAPException if a SOAP error occurs.
- * @since 1.6, SAAJ 1.3
- */
- public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
- throws SOAPException;
-
- /**
- * Returns an Iterator
over all the SOAPHeaderElement
objects
- * in this SOAPHeader
object.
- *
- * @return an Iterator
object over all the
- * SOAPHeaderElement
objects contained by this
- * SOAPHeader
- * @see #extractAllHeaderElements
- *
- * @since 1.6, SAAJ 1.2
- */
- public Iterator examineAllHeaderElements();
-
- /**
- * Returns an Iterator
over all the SOAPHeaderElement
objects
- * in this SOAPHeader
object and detaches them
- * from this SOAPHeader
object.
- *
- * @return an Iterator
object over all the
- * SOAPHeaderElement
objects contained by this
- * SOAPHeader
- *
- * @see #examineAllHeaderElements
- *
- * @since 1.6, SAAJ 1.2
- */
- public Iterator extractAllHeaderElements();
-
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeaderElement.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPHeaderElement.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * An object representing the contents in the SOAP header part of the
- * SOAP envelope.
- * The immediate children of a SOAPHeader
object can
- * be represented only as SOAPHeaderElement
objects.
- * SOAPHeaderElement
object can have other
- * SOAPElement
objects as its children.
- *
- * @since 1.6
- */
-public interface SOAPHeaderElement extends SOAPElement {
-
- /**
- * Sets the actor associated with this SOAPHeaderElement
- * object to the specified actor. The default value of an actor is:
- * SOAPConstants.URI_SOAP_ACTOR_NEXT
- * SOAPHeaderElement
supports SOAP 1.2 then this call is
- * equivalent to {@link #setRole(String)}
- *
- * @param actorURI a String
giving the URI of the actor
- * to set
- *
- * @exception IllegalArgumentException if there is a problem in
- * setting the actor.
- *
- * @see #getActor
- */
- public void setActor(String actorURI);
-
- /**
- * Sets the Role
associated with this SOAPHeaderElement
- * object to the specified Role
.
- *
- * @param uri - the URI of the Role
- *
- * @throws SOAPException if there is an error in setting the role
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since 1.6, SAAJ 1.3
- */
- public void setRole(String uri) throws SOAPException;
-
- /**
- * Returns the uri of the actor attribute of this
- * SOAPHeaderElement
.
- *SOAPHeaderElement
supports SOAP 1.2 then this call is
- * equivalent to {@link #getRole()}
- * @return a String
giving the URI of the actor
- * @see #setActor
- */
- public String getActor();
-
- /**
- * Returns the value of the Role attribute of this
- * SOAPHeaderElement
.
- *
- * @return a String
giving the URI of the Role
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Fault Role.
- *
- * @since 1.6, SAAJ 1.3
- */
- public String getRole();
-
- /**
- * Sets the mustUnderstand attribute for this SOAPHeaderElement
- * object to be either true or false.
- * SOAPHeaderElement
must process it correctly. This
- * ensures, for example, that if the SOAPHeaderElement
- * object modifies the message, that the message is being modified correctly.
- *
- * @param mustUnderstand true
to set the mustUnderstand
- * attribute to true; false
to set it to false
- *
- * @exception IllegalArgumentException if there is a problem in
- * setting the mustUnderstand attribute
- * @see #getMustUnderstand
- * @see #setRelay
- */
- public void setMustUnderstand(boolean mustUnderstand);
-
- /**
- * Returns the boolean value of the mustUnderstand attribute for this
- * SOAPHeaderElement
.
- *
- * @return true
if the mustUnderstand attribute of this
- * SOAPHeaderElement
object is turned on; false
- * otherwise
- */
- public boolean getMustUnderstand();
-
- /**
- * Sets the relay attribute for this SOAPHeaderElement
to be
- * either true or false.
- * false
.
- *
- * @param relay the new value of the relay attribute
- *
- * @exception SOAPException if there is a problem in setting the
- * relay attribute.
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Relay attribute.
- *
- * @see #setMustUnderstand
- * @see #getRelay
- *
- * @since 1.6, SAAJ 1.3
- */
- public void setRelay(boolean relay) throws SOAPException;
-
- /**
- * Returns the boolean value of the relay attribute for this
- * SOAPHeaderElement
- *
- * @return true
if the relay attribute is turned on;
- * false
otherwise
- *
- * @exception UnsupportedOperationException if this message does not
- * support the SOAP 1.2 concept of Relay attribute.
- *
- * @see #getMustUnderstand
- * @see #setRelay
- *
- * @since 1.6, SAAJ 1.3
- */
- public boolean getRelay();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPMessage.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPMessage.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,457 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-import java.io.OutputStream;
-import java.io.IOException;
-
-import java.util.Iterator;
-
-import javax.activation.DataHandler;
-
-/**
- * The root class for all SOAP messages. As transmitted on the "wire", a SOAP
- * message is an XML document or a MIME message whose first body part is an
- * XML/SOAP document.
- * SOAPMessage
object consists of a SOAP part and optionally
- * one or more attachment parts. The SOAP part for a SOAPMessage
- * object is a SOAPPart
object, which contains information used
- * for message routing and identification, and which can contain
- * application-specific content. All data in the SOAP Part of a message must be
- * in XML format.
- * SOAPMessage
object contains the following by default:
- *
- *
- * The SOAP part of a message can be retrieved by calling the method SOAPPart
object
- * SOAPEnvelope
object
- * SOAPBody
object
- * SOAPHeader
object
- * SOAPMessage.getSOAPPart()
.
- * The SOAPEnvelope
object is retrieved from the SOAPPart
- * object, and the SOAPEnvelope
object is used to retrieve the
- * SOAPBody
and SOAPHeader
objects.
- *
- *
- * SOAPPart sp = message.getSOAPPart();
- * SOAPEnvelope se = sp.getEnvelope();
- * SOAPBody sb = se.getBody();
- * SOAPHeader sh = se.getHeader();
- *
- *
- * SOAPPart
object, a SOAPMessage
- * object may contain zero or more AttachmentPart
objects, each
- * of which contains application-specific data. The SOAPMessage
- * interface provides methods for creating AttachmentPart
- * objects and also for adding them to a SOAPMessage
object. A
- * party that has received a SOAPMessage
object can examine its
- * contents by retrieving individual attachment parts.
- * AttachmentPart
object.
- * MessageFactory
object may create SOAPMessage
- * objects with behavior that is specialized to a particular implementation or
- * application of SAAJ. For instance, a MessageFactory
object
- * may produce SOAPMessage
objects that conform to a particular
- * Profile such as ebXML. In this case a MessageFactory
object
- * might produce SOAPMessage
objects that are initialized with
- * ebXML headers.
- * UnsupportedOperationException
- * and the SAAJ implementation code must override them with methods that
- * provide the specified behavior. Legacy client code does not have this
- * restriction, however, so long as there is no claim made that it conforms to
- * some later version of the specification than it was originally written for.
- * A legacy class that extends the SOAPMessage class can be compiled and/or run
- * against succeeding versions of the SAAJ API without modification. If such a
- * class was correctly implemented then it will continue to behave correctly
- * relative to the version of the specification against which it was written.
- *
- * @see MessageFactory
- * @see AttachmentPart
- * @since 1.6
- */
-public abstract class SOAPMessage {
- /**
- * Specifies the character type encoding for the SOAP Message. Valid values
- * include "utf-8" and "utf-16". See vendor documentation for additional
- * supported values. The default is "utf-8".
- *
- * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
- * @since 1.6, SAAJ 1.2
- */
- public static final String CHARACTER_SET_ENCODING =
- "javax.xml.soap.character-set-encoding";
-
- /**
- * Specifies whether the SOAP Message will contain an XML declaration when
- * it is sent. The only valid values are "true" and "false". The default is
- * "false".
- *
- * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
- * @since 1.6, SAAJ 1.2
- */
- public static final String WRITE_XML_DECLARATION =
- "javax.xml.soap.write-xml-declaration";
-
- /**
- * Sets the description of this SOAPMessage
object's
- * content with the given description.
- *
- * @param description a String
describing the content of this
- * message
- * @see #getContentDescription
- */
- public abstract void setContentDescription(String description);
-
- /**
- * Retrieves a description of this SOAPMessage
object's
- * content.
- *
- * @return a String
describing the content of this
- * message or null
if no description has been set
- * @see #setContentDescription
- */
- public abstract String getContentDescription();
-
- /**
- * Gets the SOAP part of this SOAPMessage
object.
- * SOAPMessage
object contains one or more attachments, the
- * SOAP Part must be the first MIME body part in the message.
- *
- * @return the SOAPPart
object for this SOAPMessage
- * object
- */
- public abstract SOAPPart getSOAPPart();
-
- /**
- * Gets the SOAP Body contained in this SOAPMessage
object.
- * SOAPBody
object contained by this SOAPMessage
- * object
- * @exception SOAPException
- * if the SOAP Body does not exist or cannot be retrieved
- * @since 1.6, SAAJ 1.2
- */
- public SOAPBody getSOAPBody() throws SOAPException {
- throw new UnsupportedOperationException("getSOAPBody must be overridden by all subclasses of SOAPMessage");
- }
-
- /**
- * Gets the SOAP Header contained in this SOAPMessage
- * object.
- * SOAPHeader
object contained by this SOAPMessage
- * object
- * @exception SOAPException
- * if the SOAP Header does not exist or cannot be retrieved
- * @since 1.6, SAAJ 1.2
- */
- public SOAPHeader getSOAPHeader() throws SOAPException {
- throw new UnsupportedOperationException("getSOAPHeader must be overridden by all subclasses of SOAPMessage");
- }
-
- /**
- * Removes all AttachmentPart
objects that have been added
- * to this SOAPMessage
object.
- * AttachmentPart
objects that are
- * part of this SOAPMessage
object
- */
- public abstract int countAttachments();
-
- /**
- * Retrieves all the AttachmentPart
objects that are part of
- * this SOAPMessage
object.
- *
- * @return an iterator over all the attachments in this message
- */
- public abstract Iterator getAttachments();
-
- /**
- * Retrieves all the AttachmentPart
objects that have header
- * entries that match the specified headers. Note that a returned
- * attachment could have headers in addition to those specified.
- *
- * @param headers
- * a MimeHeaders
object containing the MIME
- * headers for which to search
- * @return an iterator over all attachments that have a header that matches
- * one of the given headers
- */
- public abstract Iterator getAttachments(MimeHeaders headers);
-
- /**
- * Removes all the AttachmentPart
objects that have header
- * entries that match the specified headers. Note that the removed
- * attachment could have headers in addition to those specified.
- *
- * @param headers
- * a MimeHeaders
object containing the MIME
- * headers for which to search
- * @since 1.6, SAAJ 1.3
- */
- public abstract void removeAttachments(MimeHeaders headers);
-
-
- /**
- * Returns an AttachmentPart
object that is associated with an
- * attachment that is referenced by this SOAPElement
or
- * null
if no such attachment exists. References can be made
- * via an href
attribute as described in
- * {@link SOAP Messages with Attachments},
- * or via a single Text
child node containing a URI as
- * described in the WS-I Attachments Profile 1.0 for elements of schema
- * type {@link ref:swaRef}. These two mechanisms must be supported.
- * The support for references via href
attribute also implies that
- * this method should also be supported on an element that is an
- * xop:Include element (
- * {@link XOP}).
- * other reference mechanisms may be supported by individual
- * implementations of this standard. Contact your vendor for details.
- *
- * @param element The SOAPElement
containing the reference to an Attachment
- * @return the referenced AttachmentPart
or null if no such
- * AttachmentPart
exists or no reference can be
- * found in this SOAPElement
.
- * @throws SOAPException if there is an error in the attempt to access the
- * attachment
- *
- * @since 1.6, SAAJ 1.3
- */
- public abstract AttachmentPart getAttachment(SOAPElement element) throws SOAPException;
-
-
- /**
- * Adds the given AttachmentPart
object to this SOAPMessage
- * object. An AttachmentPart
object must be created before
- * it can be added to a message.
- *
- * @param AttachmentPart
- * an AttachmentPart
object that is to become part
- * of this SOAPMessage
object
- * @exception IllegalArgumentException
- */
- public abstract void addAttachmentPart(AttachmentPart AttachmentPart);
-
- /**
- * Creates a new empty AttachmentPart
object. Note that the
- * method addAttachmentPart
must be called with this new
- * AttachmentPart
object as the parameter in order for it to
- * become an attachment to this SOAPMessage
object.
- *
- * @return a new AttachmentPart
object that can be populated
- * and added to this SOAPMessage
object
- */
- public abstract AttachmentPart createAttachmentPart();
-
- /**
- * Creates an AttachmentPart
object and populates it using
- * the given DataHandler
object.
- *
- * @param dataHandler
- * the javax.activation.DataHandler
object that
- * will generate the content for this SOAPMessage
- * object
- * @return a new AttachmentPart
object that contains data
- * generated by the given DataHandler
object
- * @exception IllegalArgumentException
- * if there was a problem with the specified DataHandler
- * object
- * @see javax.activation.DataHandler
- * @see javax.activation.DataContentHandler
- */
- public AttachmentPart createAttachmentPart(DataHandler dataHandler) {
- AttachmentPart attachment = createAttachmentPart();
- attachment.setDataHandler(dataHandler);
- return attachment;
- }
-
- /**
- * Returns all the transport-specific MIME headers for this SOAPMessage
- * object in a transport-independent fashion.
- *
- * @return a MimeHeaders
object containing the MimeHeader
- * objects
- */
- public abstract MimeHeaders getMimeHeaders();
-
- /**
- * Creates an AttachmentPart
object and populates it with
- * the specified data of the specified content type. The type of the
- * Object
should correspond to the value given for the
- * Content-Type
.
- *
- * @param content
- * an Object
containing the content for the
- * AttachmentPart
object to be created
- * @param contentType
- * a String
object giving the type of content;
- * examples are "text/xml", "text/plain", and "image/jpeg"
- * @return a new AttachmentPart
object that contains the
- * given data
- * @exception IllegalArgumentException
- * may be thrown if the contentType does not match the type
- * of the content object, or if there was no
- * DataContentHandler
object for the given
- * content object
- * @see javax.activation.DataHandler
- * @see javax.activation.DataContentHandler
- */
- public AttachmentPart createAttachmentPart(
- Object content,
- String contentType) {
- AttachmentPart attachment = createAttachmentPart();
- attachment.setContent(content, contentType);
- return attachment;
- }
-
- /**
- * Updates this SOAPMessage
object with all the changes that
- * have been made to it. This method is called automatically when
- * {@link SOAPMessage#writeTo(OutputStream)} is called. However, if
- * changes are made to a message that was received or to one that has
- * already been sent, the method saveChanges
needs to be
- * called explicitly in order to save the changes. The method saveChanges
- * also generates any changes that can be read back (for example, a
- * MessageId in profiles that support a message id). All MIME headers in a
- * message that is created for sending purposes are guaranteed to have
- * valid values only after saveChanges
has been called.
- * AttachmentPart
objects are pulled into the
- * message.
- * SOAPException
if there was a problem saving
- * changes to this message.
- */
- public abstract void saveChanges() throws SOAPException;
-
- /**
- * Indicates whether this SOAPMessage
object needs to have
- * the method saveChanges
called on it.
- *
- * @return true
if saveChanges
needs to be
- * called; false
otherwise.
- */
- public abstract boolean saveRequired();
-
- /**
- * Writes this SOAPMessage
object to the given output
- * stream. The externalization format is as defined by the SOAP 1.1 with
- * Attachments specification.
- * writeTo
writes a
- * MIME-encoded byte stream.
- * OutputStream
object to which this SOAPMessage
- * object will be written
- * @exception IOException
- * if an I/O error occurs
- * @exception SOAPException
- * if there was a problem in externalizing this SOAP message
- */
- public abstract void writeTo(OutputStream out)
- throws SOAPException, IOException;
-
- /**
- * Associates the specified value with the specified property. If there was
- * already a value associated with this property, the old value is
- * replaced.
- * WRITE_XML_DECLARATION
to "true"
- * will cause an XML Declaration to be written out at the start of the SOAP
- * message. The default value of "false" suppresses this declaration.
- * CHARACTER_SET_ENCODING
defaults to the value
- * "utf-8"
which causes the SOAP message to be encoded using
- * UTF-8. Setting CHARACTER_SET_ENCODING
to "utf-16"
- * causes the SOAP message to be encoded using UTF-16.
- * null
- * if no such property exists.
- * @exception SOAPException
- * if the property name is not recognized.
- * @since 1.6, SAAJ 1.2
- */
- public Object getProperty(String property) throws SOAPException {
- throw new UnsupportedOperationException("getProperty must be overridden by all subclasses of SOAPMessage");
- }
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPPart.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/SOAPPart.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-import java.util.Iterator;
-
-import javax.xml.transform.Source;
-
-/**
- * The container for the SOAP-specific portion of a SOAPMessage
- * object. All messages are required to have a SOAP part, so when a
- * SOAPMessage
object is created, it will automatically
- * have a SOAPPart
object.
- *SOAPPart
object is a MIME part and has the MIME headers
- * Content-Id, Content-Location, and Content-Type. Because the value of
- * Content-Type must be "text/xml", a SOAPPart
object automatically
- * has a MIME header of Content-Type with its value set to "text/xml".
- * The value must be "text/xml" because content in the SOAP part of a
- * message must be in XML format. Content that is not of type "text/xml"
- * must be in an AttachmentPart
object rather than in the
- * SOAPPart
object.
- * SOAPPart
object of a
- * SOAPMessage
object by
- * calling the method SOAPMessage.getSOAPPart
. The
- * following line of code, in which message
is a
- * SOAPMessage
object, retrieves the SOAP part of a message.
- *
- * SOAPPart soapPart = message.getSOAPPart();
- *
- * SOAPPart
object contains a SOAPEnvelope
object,
- * which in turn contains a SOAPBody
object and a
- * SOAPHeader
object.
- * The SOAPPart
method getEnvelope
can be used
- * to retrieve the SOAPEnvelope
object.
- * SOAPEnvelope
object associated with this
- * SOAPPart
object. Once the SOAP envelope is obtained, it
- * can be used to get its contents.
- *
- * @return the SOAPEnvelope
object for this
- * SOAPPart
object
- * @exception SOAPException if there is a SOAP error
- */
- public abstract SOAPEnvelope getEnvelope() throws SOAPException;
-
- /**
- * Retrieves the value of the MIME header whose name is "Content-Id".
- *
- * @return a String
giving the value of the MIME header
- * named "Content-Id"
- * @see #setContentId
- */
- public String getContentId() {
- String[] values = getMimeHeader("Content-Id");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Retrieves the value of the MIME header whose name is "Content-Location".
- *
- * @return a String
giving the value of the MIME header whose
- * name is "Content-Location"
- * @see #setContentLocation
- */
- public String getContentLocation() {
- String[] values = getMimeHeader("Content-Location");
- if (values != null && values.length > 0)
- return values[0];
- return null;
- }
-
- /**
- * Sets the value of the MIME header named "Content-Id"
- * to the given String
.
- *
- * @param contentId a String
giving the value of the MIME
- * header "Content-Id"
- *
- * @exception IllegalArgumentException if there is a problem in
- * setting the content id
- * @see #getContentId
- */
- public void setContentId(String contentId)
- {
- setMimeHeader("Content-Id", contentId);
- }
- /**
- * Sets the value of the MIME header "Content-Location"
- * to the given String
.
- *
- * @param contentLocation a String
giving the value
- * of the MIME
- * header "Content-Location"
- * @exception IllegalArgumentException if there is a problem in
- * setting the content location.
- * @see #getContentLocation
- */
- public void setContentLocation(String contentLocation)
- {
- setMimeHeader("Content-Location", contentLocation);
- }
- /**
- * Removes all MIME headers that match the given name.
- *
- * @param header a String
giving the name of the MIME header(s) to
- * be removed
- */
- public abstract void removeMimeHeader(String header);
-
- /**
- * Removes all the MimeHeader
objects for this
- * SOAPEnvelope
object.
- */
- public abstract void removeAllMimeHeaders();
-
- /**
- * Gets all the values of the MimeHeader
object
- * in this SOAPPart
object that
- * is identified by the given String
.
- *
- * @param name the name of the header; example: "Content-Type"
- * @return a String
array giving all the values for the
- * specified header
- * @see #setMimeHeader
- */
- public abstract String[] getMimeHeader(String name);
-
- /**
- * Changes the first header entry that matches the given header name
- * so that its value is the given value, adding a new header with the
- * given name and value if no
- * existing header is a match. If there is a match, this method clears
- * all existing values for the first header that matches and sets the
- * given value instead. If more than one header has
- * the given name, this method removes all of the matching headers after
- * the first one.
- * String
giving the header name
- * for which to search
- * @param value a String
giving the value to be set.
- * This value will be substituted for the current value(s)
- * of the first header that is a match if there is one.
- * If there is no match, this value will be the value for
- * a new MimeHeader
object.
- *
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- * @see #getMimeHeader
- */
- public abstract void setMimeHeader(String name, String value);
-
- /**
- * Creates a MimeHeader
object with the specified
- * name and value and adds it to this SOAPPart
object.
- * If a MimeHeader
with the specified name already
- * exists, this method adds the specified value to the already
- * existing value(s).
- * String
giving the header name
- * @param value a String
giving the value to be set
- * or added
- * @exception IllegalArgumentException if there was a problem with
- * the specified mime header name or value
- */
- public abstract void addMimeHeader(String name, String value);
-
- /**
- * Retrieves all the headers for this SOAPPart
object
- * as an iterator over the MimeHeader
objects.
- *
- * @return an Iterator
object with all of the Mime
- * headers for this SOAPPart
object
- */
- public abstract Iterator getAllMimeHeaders();
-
- /**
- * Retrieves all MimeHeader
objects that match a name in
- * the given array.
- *
- * @param names a String
array with the name(s) of the
- * MIME headers to be returned
- * @return all of the MIME headers that match one of the names in the
- * given array, returned as an Iterator
object
- */
- public abstract Iterator getMatchingMimeHeaders(String[] names);
-
- /**
- * Retrieves all MimeHeader
objects whose name does
- * not match a name in the given array.
- *
- * @param names a String
array with the name(s) of the
- * MIME headers not to be returned
- * @return all of the MIME headers in this SOAPPart
object
- * except those that match one of the names in the
- * given array. The nonmatching MIME headers are returned as an
- * Iterator
object.
- */
- public abstract Iterator getNonMatchingMimeHeaders(String[] names);
-
- /**
- * Sets the content of the SOAPEnvelope
object with the data
- * from the given Source
object. This Source
- * must contain a valid SOAP document.
- *
- * @param source the javax.xml.transform.Source
object with the
- * data to be set
- *
- * @exception SOAPException if there is a problem in setting the source
- * @see #getContent
- */
- public abstract void setContent(Source source) throws SOAPException;
-
- /**
- * Returns the content of the SOAPEnvelope as a JAXP Source
- * object.
- *
- * @return the content as a javax.xml.transform.Source
object
- *
- * @exception SOAPException if the implementation cannot convert
- * the specified Source
object
- * @see #setContent
- */
- public abstract Source getContent() throws SOAPException;
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Text.java
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/Text.java Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javax.xml.soap;
-
-/**
- * A representation of a node whose value is text. A Text
object
- * may represent text that is content or text that is a comment.
- *
- * @since 1.6
- */
-public interface Text extends Node, org.w3c.dom.Text {
-
- /**
- * Retrieves whether this Text
object represents a comment.
- *
- * @return true
if this Text
object is a
- * comment; false
otherwise
- */
- public boolean isComment();
-}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.soap/share/classes/javax/xml/soap/package.html
--- a/jaxws/src/java.xml.soap/share/classes/javax/xml/soap/package.html Thu Jan 15 11:18:14 2015 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-
-
-
-
-javax.xml.soap
package allows you to do the
- following:
-
-
-javax.xml.soap
package extend
-their counterparts in the org.w3c.dom
package. This means that
-the SOAPPart
of a SOAPMessage
is also a DOM Level
-2 Document
, and can be manipulated as such by applications,
-tools and libraries that use DOM (see http://www.w3.org/DOM/ for more information).
-It is important to note that, while it is possible to use DOM APIs to add
-ordinary DOM nodes to a SAAJ tree, the SAAJ APIs are still required to return
-SAAJ types when examining or manipulating the tree. In order to accomplish
-this the SAAJ APIs (specifically {@link javax.xml.soap.SOAPElement#getChildElements()})
-are allowed to silently replace objects that are incorrectly typed relative
-to SAAJ requirements with equivalent objects of the required type. These
-replacements must never cause the logical structure of the tree to change,
-so from the perspective of the DOM APIs the tree will remain unchanged. However,
-the physical composition of the tree will have changed so that references
-to the nodes that were replaced will refer to nodes that are no longer a
-part of the tree. The SAAJ APIs are not allowed to make these replacements
-if they are not required so the replacement objects will never subsequently
-be silently replaced by future calls to the SAAJ API.
-
-
-
-
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/LazyEnvelopeSource.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * LazyEnvelopeSource provides the source to create lazy Envelope
+ *
+ * @author shih-chang.chen@oracle.com
+ */
+public interface LazyEnvelopeSource extends javax.xml.transform.Source {
+ /**
+ * Retrieve payload qname without materializing its contents
+ * @return
+ * @throws SOAPException
+ */
+ public QName getPayloadQName();
+ public XMLStreamReader readToBodyStarTag() throws XMLStreamException;
+ public XMLStreamReader readPayload();
+ public void writePayloadTo(XMLStreamWriter writer)throws XMLStreamException;
+ public boolean isPayloadStreamReader();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/SOAPExceptionImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import javax.xml.soap.SOAPException;
+
+/**
+ * An exception that signals that a SOAP exception has occurred. A
+ * SOAPExceptionImpl
object may contain a String
+ * that gives the reason for the exception, an embedded
+ * Throwable
object, or both. This class provides methods
+ * for retrieving reason messages and for retrieving the embedded
+ * Throwable
object.
+ *
+ * SOAPExceptionImpl
+ * object are problems such as difficulty setting a header, not being
+ * able to send a message, and not being able to get a connection with
+ * the provider. Reasons for embedding a Throwable
+ * object include problems such as input/output errors or a parsing
+ * problem, such as an error in parsing a header.
+ */
+public class SOAPExceptionImpl extends SOAPException {
+ private Throwable cause;
+
+ /**
+ * Constructs a SOAPExceptionImpl
object with no
+ * reason or embedded Throwable
object.
+ */
+ public SOAPExceptionImpl() {
+ super();
+ this.cause = null;
+ }
+
+ /**
+ * Constructs a SOAPExceptionImpl
object with the given
+ * String
as the reason for the exception being thrown.
+ *
+ * @param reason a description of what caused the exception
+ */
+ public SOAPExceptionImpl(String reason) {
+ super(reason);
+ this.cause = null;
+ }
+
+ /**
+ * Constructs a SOAPExceptionImpl
object with the given
+ * String
as the reason for the exception being thrown
+ * and the given Throwable
object as an embedded
+ * exception.
+ *
+ * @param reason a description of what caused the exception
+ * @param cause a Throwable
object that is to
+ * be embedded in this SOAPExceptionImpl
object
+ */
+ public SOAPExceptionImpl(String reason, Throwable cause) {
+ super (reason);
+ initCause(cause);
+ }
+
+ /**
+ * Constructs a SOAPExceptionImpl
object initialized
+ * with the given Throwable
object.
+ */
+ public SOAPExceptionImpl(Throwable cause) {
+ super (cause.toString());
+ initCause(cause);
+ }
+
+ /**
+ * Returns the detail message for this SOAPExceptionImpl
+ * object.
+ * Throwable
object, and if the
+ * SOAPExceptionImpl
object has no detail message of its
+ * own, this method will return the detail message from the embedded
+ * Throwable
object.
+ *
+ * @return the error or warning message for this
+ * SOAPExceptionImpl
or, if it has none, the
+ * message of the embedded Throwable
object,
+ * if there is one
+ */
+ public String getMessage() {
+ String message = super.getMessage ();
+ if (message == null && cause != null) {
+ return cause.getMessage();
+ } else {
+ return message;
+ }
+ }
+
+ /**
+ * Returns the Throwable
object embedded in this
+ * SOAPExceptionImpl
if there is one. Otherwise, this method
+ * returns null
.
+ *
+ * @return the embedded Throwable
object or null
+ * if there is none
+ */
+
+ public Throwable getCause() {
+ return cause;
+ }
+
+ /**
+ * Initializes the cause
field of this SOAPExceptionImpl
+ * object with the given Throwable
object.
+ * SOAPExceptionImpl
object.
+ * If this SOAPExceptionImpl
object was created with the
+ * constructor {@link #SOAPExceptionImpl(Throwable)} or
+ * {@link #SOAPExceptionImpl(String,Throwable)}, meaning that its
+ * cause
field already has a value, this method cannot be
+ * called even once.
+ *
+ * @param cause the Throwable
object that caused this
+ * SOAPExceptionImpl
object to be thrown. The value of this
+ * parameter is saved for later retrieval by the
+ * {@link #getCause()} method. A null value is
+ * permitted and indicates that the cause is nonexistent or
+ * unknown.
+ * @return a reference to this SOAPExceptionImpl
instance
+ * @throws IllegalArgumentException if cause
is this
+ * Throwable
object. (A Throwable
object
+ * cannot be its own cause.)
+ * @throws IllegalStateException if this SOAPExceptionImpl
object
+ * was created with {@link #SOAPExceptionImpl(Throwable)} or
+ * {@link #SOAPExceptionImpl(String,Throwable)}, or this
+ * method has already been called on this SOAPExceptionImpl
+ * object
+ */
+ public synchronized Throwable initCause(Throwable cause)
+ {
+ if(this.cause != null) {
+ throw new IllegalStateException("Can't override cause");
+ }
+ if(cause == this) {
+ throw new IllegalArgumentException("Self-causation not permitted");
+ }
+ this.cause = cause;
+
+ return this;
+ }
+
+ public void printStackTrace() {
+ super.printStackTrace();
+ if (cause != null) {
+ System.err.println("\nCAUSE:\n");
+ cause.printStackTrace();
+ }
+ }
+
+ public void printStackTrace(PrintStream s) {
+ super.printStackTrace(s);
+ if (cause != null) {
+ s.println("\nCAUSE:\n");
+ cause.printStackTrace(s);
+ }
+ }
+
+ public void printStackTrace(PrintWriter s) {
+ super.printStackTrace(s);
+ if (cause != null) {
+ s.println("\nCAUSE:\n");
+ cause.printStackTrace(s);
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,657 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.client.p2p;
+
+import java.io.*;
+import java.lang.reflect.Method;
+import java.net.*;
+import java.security.*;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.soap.*;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.util.*;
+
+/**
+ * This represents a "connection" to the simple HTTP-based provider.
+ *
+ * @author Anil Vijendran (akv@eng.sun.com)
+ * @author Rajiv Mordani (rajiv.mordani@sun.com)
+ * @author Manveen Kaur (manveen.kaur@sun.com)
+ *
+ */
+class HttpSOAPConnection extends SOAPConnection {
+
+ public static final String vmVendor = SAAJUtil.getSystemProperty("java.vendor.url");
+ private static final String sunVmVendor = "http://java.sun.com/";
+ private static final String ibmVmVendor = "http://www.ibm.com/";
+ private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false;
+ private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false;
+ private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint";
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.client.p2p.LocalStrings");
+
+
+ MessageFactory messageFactory = null;
+
+ boolean closed = false;
+
+ public HttpSOAPConnection() throws SOAPException {
+
+ try {
+ messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL);
+ } catch (NoSuchMethodError ex) {
+ //fallback to default SOAP 1.1 in this case for backward compatibility
+ messageFactory = MessageFactory.newInstance();
+ } catch (Exception ex) {
+ log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex);
+ throw new SOAPExceptionImpl("Unable to create message factory", ex);
+ }
+ }
+
+ public void close() throws SOAPException {
+ if (closed) {
+ log.severe("SAAJ0002.p2p.close.already.closed.conn");
+ throw new SOAPExceptionImpl("Connection already closed");
+ }
+
+ messageFactory = null;
+ closed = true;
+ }
+
+ public SOAPMessage call(SOAPMessage message, Object endPoint)
+ throws SOAPException {
+ if (closed) {
+ log.severe("SAAJ0003.p2p.call.already.closed.conn");
+ throw new SOAPExceptionImpl("Connection is closed");
+ }
+
+ Class urlEndpointClass = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ try {
+ if (loader != null) {
+ urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT);
+ } else {
+ urlEndpointClass = Class.forName(JAXM_URLENDPOINT);
+ }
+ } catch (ClassNotFoundException ex) {
+ //Do nothing. URLEndpoint is available only when JAXM is there.
+ if (log.isLoggable(Level.FINEST))
+ log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM");
+ }
+
+ if (urlEndpointClass != null) {
+ if (urlEndpointClass.isInstance(endPoint)) {
+ String url = null;
+
+ try {
+ Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
+ url = (String) m.invoke(endPoint, (Object[])null);
+ } catch (Exception ex) {
+ // TBD -- exception chaining
+ log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex);
+ throw new SOAPExceptionImpl(
+ "Internal error: " + ex.getMessage());
+ }
+ try {
+ endPoint = new URL(url);
+ } catch (MalformedURLException mex) {
+ log.log(Level.SEVERE,"SAAJ0005.p2p.", mex);
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ }
+ }
+ }
+
+ if (endPoint instanceof java.lang.String) {
+ try {
+ endPoint = new URL((String) endPoint);
+ } catch (MalformedURLException mex) {
+ log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex);
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ }
+ }
+
+ if (endPoint instanceof URL)
+ try {
+ SOAPMessage response = post(message, (URL)endPoint);
+ return response;
+ } catch (Exception ex) {
+ // TBD -- chaining?
+ throw new SOAPExceptionImpl(ex);
+ } else {
+ log.severe("SAAJ0007.p2p.bad.endPoint.type");
+ throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
+ }
+ }
+
+ SOAPMessage post(SOAPMessage message, URL endPoint) throws SOAPException, IOException {
+ boolean isFailure = false;
+
+ URL url = null;
+ HttpURLConnection httpConnection = null;
+
+ int responseCode = 0;
+ try {
+ if (endPoint.getProtocol().equals("https"))
+ //if(!setHttps)
+ initHttps();
+ // Process the URL
+ URI uri = new URI(endPoint.toString());
+ String userInfo = uri.getRawUserInfo();
+
+ url = endPoint;
+
+ if (dL > 0)
+ d("uri: " + userInfo + " " + url + " " + uri);
+
+ // TBD
+ // Will deal with https later.
+ if (!url.getProtocol().equalsIgnoreCase("http")
+ && !url.getProtocol().equalsIgnoreCase("https")) {
+ log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
+ throw new IllegalArgumentException(
+ "Protocol "
+ + url.getProtocol()
+ + " not supported in URL "
+ + url);
+ }
+ httpConnection = (HttpURLConnection) createConnection(url);
+
+ httpConnection.setRequestMethod("POST");
+
+ httpConnection.setDoOutput(true);
+ httpConnection.setDoInput(true);
+ httpConnection.setUseCaches(false);
+ httpConnection.setInstanceFollowRedirects(true);
+
+ if (message.saveRequired())
+ message.saveChanges();
+
+ MimeHeaders headers = message.getMimeHeaders();
+
+ Iterator it = headers.getAllHeaders();
+ boolean hasAuth = false; // true if we find explicit Auth header
+ while (it.hasNext()) {
+ MimeHeader header = (MimeHeader) it.next();
+
+ String[] values = headers.getHeader(header.getName());
+ if (values.length == 1)
+ httpConnection.setRequestProperty(
+ header.getName(),
+ header.getValue());
+ else {
+ StringBuffer concat = new StringBuffer();
+ int i = 0;
+ while (i < values.length) {
+ if (i != 0)
+ concat.append(',');
+ concat.append(values[i]);
+ i++;
+ }
+
+ httpConnection.setRequestProperty(
+ header.getName(),
+ concat.toString());
+ }
+
+ if ("Authorization".equals(header.getName())) {
+ hasAuth = true;
+ if (log.isLoggable(Level.FINE))
+ log.fine("SAAJ0091.p2p.https.auth.in.POST.true");
+ }
+ }
+
+ if (!hasAuth && userInfo != null) {
+ initAuthUserInfo(httpConnection, userInfo);
+ }
+
+ OutputStream out = httpConnection.getOutputStream();
+ try {
+ message.writeTo(out);
+ out.flush();
+ } finally {
+ out.close();
+ }
+
+ httpConnection.connect();
+
+ try {
+
+ responseCode = httpConnection.getResponseCode();
+
+ // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
+ if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
+ isFailure = true;
+ }
+ //else if (responseCode != HttpURLConnection.HTTP_OK)
+ //else if (!(responseCode >= HttpURLConnection.HTTP_OK && responseCode < 207))
+ else if ((responseCode / 100) != 2) {
+ log.log(Level.SEVERE,
+ "SAAJ0008.p2p.bad.response",
+ new String[] {httpConnection.getResponseMessage()});
+ throw new SOAPExceptionImpl(
+ "Bad response: ("
+ + responseCode
+ + httpConnection.getResponseMessage());
+
+ }
+ } catch (IOException e) {
+ // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
+ responseCode = httpConnection.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
+ isFailure = true;
+ } else {
+ throw e;
+ }
+
+ }
+
+ } catch (SOAPException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ log.severe("SAAJ0009.p2p.msg.send.failed");
+ throw new SOAPExceptionImpl("Message send failed", ex);
+ }
+
+ SOAPMessage response = null;
+ InputStream httpIn = null;
+ if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
+ try {
+ MimeHeaders headers = new MimeHeaders();
+
+ String key, value;
+
+ // Header field 0 is the status line so we skip it.
+
+ int i = 1;
+
+ while (true) {
+ key = httpConnection.getHeaderFieldKey(i);
+ value = httpConnection.getHeaderField(i);
+
+ if (key == null && value == null)
+ break;
+
+ if (key != null) {
+ StringTokenizer values =
+ new StringTokenizer(value, ",");
+ while (values.hasMoreTokens())
+ headers.addHeader(key, values.nextToken().trim());
+ }
+ i++;
+ }
+
+ httpIn =
+ (isFailure
+ ? httpConnection.getErrorStream()
+ : httpConnection.getInputStream());
+
+ byte[] bytes = readFully(httpIn);
+
+ int length =
+ httpConnection.getContentLength() == -1
+ ? bytes.length
+ : httpConnection.getContentLength();
+
+ // If no reply message is returned,
+ // content-Length header field value is expected to be zero.
+ if (length == 0) {
+ response = null;
+ log.warning("SAAJ0014.p2p.content.zero");
+ } else {
+ ByteInputStream in = new ByteInputStream(bytes, length);
+ response = messageFactory.createMessage(headers, in);
+ }
+
+ } catch (SOAPException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex);
+ throw new SOAPExceptionImpl(
+ "Unable to read response: " + ex.getMessage());
+ } finally {
+ if (httpIn != null)
+ httpIn.close();
+ httpConnection.disconnect();
+ }
+ }
+ return response;
+ }
+
+ // Object identifies where the request should be sent.
+ // It is required to support objects of type String and java.net.URL.
+
+ public SOAPMessage get(Object endPoint) throws SOAPException {
+ if (closed) {
+ log.severe("SAAJ0011.p2p.get.already.closed.conn");
+ throw new SOAPExceptionImpl("Connection is closed");
+ }
+ Class urlEndpointClass = null;
+
+ try {
+ urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint");
+ } catch (Exception ex) {
+ //Do nothing. URLEndpoint is available only when JAXM is there.
+ }
+
+ if (urlEndpointClass != null) {
+ if (urlEndpointClass.isInstance(endPoint)) {
+ String url = null;
+
+ try {
+ Method m = urlEndpointClass.getMethod("getURL", (Class[])null);
+ url = (String) m.invoke(endPoint, (Object[])null);
+ } catch (Exception ex) {
+ log.severe("SAAJ0004.p2p.internal.err");
+ throw new SOAPExceptionImpl(
+ "Internal error: " + ex.getMessage());
+ }
+ try {
+ endPoint = new URL(url);
+ } catch (MalformedURLException mex) {
+ log.severe("SAAJ0005.p2p.");
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ }
+ }
+ }
+
+ if (endPoint instanceof java.lang.String) {
+ try {
+ endPoint = new URL((String) endPoint);
+ } catch (MalformedURLException mex) {
+ log.severe("SAAJ0006.p2p.bad.URL");
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ }
+ }
+
+ if (endPoint instanceof URL)
+ try {
+ SOAPMessage response = doGet((URL)endPoint);
+ return response;
+ } catch (Exception ex) {
+ throw new SOAPExceptionImpl(ex);
+ } else
+ throw new SOAPExceptionImpl("Bad endPoint type " + endPoint);
+ }
+
+ SOAPMessage doGet(URL endPoint) throws SOAPException, IOException {
+ boolean isFailure = false;
+
+ URL url = null;
+ HttpURLConnection httpConnection = null;
+
+ int responseCode = 0;
+ try {
+ /// Is https GET allowed??
+ if (endPoint.getProtocol().equals("https"))
+ initHttps();
+ // Process the URL
+ URI uri = new URI(endPoint.toString());
+ String userInfo = uri.getRawUserInfo();
+
+ url = endPoint;
+
+ if (dL > 0)
+ d("uri: " + userInfo + " " + url + " " + uri);
+
+ // TBD
+ // Will deal with https later.
+ if (!url.getProtocol().equalsIgnoreCase("http")
+ && !url.getProtocol().equalsIgnoreCase("https")) {
+ log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https");
+ throw new IllegalArgumentException(
+ "Protocol "
+ + url.getProtocol()
+ + " not supported in URL "
+ + url);
+ }
+ httpConnection = (HttpURLConnection) createConnection(url);
+
+ httpConnection.setRequestMethod("GET");
+
+ httpConnection.setDoOutput(true);
+ httpConnection.setDoInput(true);
+ httpConnection.setUseCaches(false);
+ httpConnection.setFollowRedirects(true);
+
+ httpConnection.connect();
+
+ try {
+
+ responseCode = httpConnection.getResponseCode();
+
+ // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults
+ if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
+ isFailure = true;
+ } else if ((responseCode / 100) != 2) {
+ log.log(Level.SEVERE,
+ "SAAJ0008.p2p.bad.response",
+ new String[] { httpConnection.getResponseMessage()});
+ throw new SOAPExceptionImpl(
+ "Bad response: ("
+ + responseCode
+ + httpConnection.getResponseMessage());
+
+ }
+ } catch (IOException e) {
+ // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds!
+ responseCode = httpConnection.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) {
+ isFailure = true;
+ } else {
+ throw e;
+ }
+
+ }
+
+ } catch (SOAPException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ log.severe("SAAJ0012.p2p.get.failed");
+ throw new SOAPExceptionImpl("Get failed", ex);
+ }
+
+ SOAPMessage response = null;
+ InputStream httpIn = null;
+ if (responseCode == HttpURLConnection.HTTP_OK || isFailure) {
+ try {
+ MimeHeaders headers = new MimeHeaders();
+
+ String key, value;
+
+ // Header field 0 is the status line so we skip it.
+
+ int i = 1;
+
+ while (true) {
+ key = httpConnection.getHeaderFieldKey(i);
+ value = httpConnection.getHeaderField(i);
+
+ if (key == null && value == null)
+ break;
+
+ if (key != null) {
+ StringTokenizer values =
+ new StringTokenizer(value, ",");
+ while (values.hasMoreTokens())
+ headers.addHeader(key, values.nextToken().trim());
+ }
+ i++;
+ }
+
+ httpIn =
+ (isFailure
+ ? httpConnection.getErrorStream()
+ : httpConnection.getInputStream());
+ // If no reply message is returned,
+ // content-Length header field value is expected to be zero.
+ // java SE 6 documentation says :
+ // available() : an estimate of the number of bytes that can be read
+ //(or skipped over) from this input stream without blocking
+ //or 0 when it reaches the end of the input stream.
+ if ((httpIn == null )
+ || (httpConnection.getContentLength() == 0)
+ || (httpIn.available() == 0)) {
+ response = null;
+ log.warning("SAAJ0014.p2p.content.zero");
+ } else {
+ response = messageFactory.createMessage(headers, httpIn);
+ }
+
+ } catch (SOAPException ex) {
+ throw ex;
+ } catch (Exception ex) {
+ log.log(Level.SEVERE,
+ "SAAJ0010.p2p.cannot.read.resp",
+ ex);
+ throw new SOAPExceptionImpl(
+ "Unable to read response: " + ex.getMessage());
+ } finally {
+ if (httpIn != null)
+ httpIn.close();
+ httpConnection.disconnect();
+ }
+ }
+ return response;
+ }
+
+ private byte[] readFully(InputStream istream) throws IOException {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ byte[] buf = new byte[1024];
+ int num = 0;
+
+ while ((num = istream.read(buf)) != -1) {
+ bout.write(buf, 0, num);
+ }
+
+ byte[] ret = bout.toByteArray();
+
+ return ret;
+ }
+
+ //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
+ //private static String SSL_PROVIDER =
+ // "com.sun.net.ssl.internal.ssl.Provider";
+ private static final String SSL_PKG;
+ private static final String SSL_PROVIDER;
+
+ static {
+ if (isIBMVM) {
+ SSL_PKG ="com.ibm.net.ssl.internal.www.protocol";
+ SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider";
+ } else {
+ //if not IBM VM default to Sun.
+ SSL_PKG = "com.sun.net.ssl.internal.www.protocol";
+ SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider";
+ }
+ }
+
+ private void initHttps() {
+ //if(!setHttps) {
+ String pkgs = SAAJUtil.getSystemProperty("java.protocol.handler.pkgs");
+ if (log.isLoggable(Level.FINE))
+ log.log(Level.FINE, "SAAJ0053.p2p.providers", new String[] { pkgs });
+
+ if (pkgs == null || pkgs.indexOf(SSL_PKG) < 0) {
+ if (pkgs == null)
+ pkgs = SSL_PKG;
+ else
+ pkgs = pkgs + "|" + SSL_PKG;
+ System.setProperty("java.protocol.handler.pkgs", pkgs);
+ if (log.isLoggable(Level.FINE))
+ log.log(Level.FINE, "SAAJ0054.p2p.set.providers",
+ new String[] { pkgs });
+ try {
+ Class c = Class.forName(SSL_PROVIDER);
+ Provider p = (Provider) c.newInstance();
+ Security.addProvider(p);
+ if (log.isLoggable(Level.FINE))
+ log.log(Level.FINE, "SAAJ0055.p2p.added.ssl.provider",
+ new String[] { SSL_PROVIDER });
+ //System.out.println("Added SSL_PROVIDER " + SSL_PROVIDER);
+ //setHttps = true;
+ } catch (Exception ex) {
+ }
+ }
+ //}
+ }
+
+ private void initAuthUserInfo(HttpURLConnection conn, String userInfo) {
+ String user;
+ String password;
+ if (userInfo != null) { // get the user and password
+ //System.out.println("UserInfo= " + userInfo );
+ int delimiter = userInfo.indexOf(':');
+ if (delimiter == -1) {
+ user = ParseUtil.decode(userInfo);
+ password = null;
+ } else {
+ user = ParseUtil.decode(userInfo.substring(0, delimiter++));
+ password = ParseUtil.decode(userInfo.substring(delimiter));
+ }
+
+ String plain = user + ":";
+ byte[] nameBytes = plain.getBytes();
+ byte[] passwdBytes = (password == null ? new byte[0] : password
+ .getBytes());
+
+ // concatenate user name and password bytes and encode them
+ byte[] concat = new byte[nameBytes.length + passwdBytes.length];
+
+ System.arraycopy(nameBytes, 0, concat, 0, nameBytes.length);
+ System.arraycopy(
+ passwdBytes,
+ 0,
+ concat,
+ nameBytes.length,
+ passwdBytes.length);
+ String auth = "Basic " + new String(Base64.encode(concat));
+ conn.setRequestProperty("Authorization", auth);
+ if (dL > 0)
+ d("Adding auth " + auth);
+ }
+ }
+
+ private static final int dL = 0;
+ private void d(String s) {
+ log.log(Level.SEVERE,
+ "SAAJ0013.p2p.HttpSOAPConnection",
+ new String[] { s });
+ System.err.println("HttpSOAPConnection: " + s);
+ }
+
+ private java.net.HttpURLConnection createConnection(URL endpoint)
+ throws IOException {
+ return (HttpURLConnection) endpoint.openConnection();
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnectionFactory.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.client.p2p;
+
+import javax.xml.soap.*;
+
+/**
+ * Implementation of the SOAPConnectionFactory
+ *
+ * @author Anil Vijendran (anil@sun.com)
+ */
+public class HttpSOAPConnectionFactory extends SOAPConnectionFactory {
+
+ public SOAPConnection createConnection()
+ throws SOAPException
+ {
+ return new HttpSOAPConnection();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Unable to create Message Factory
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connection already closed (from close method)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connection already closed (from call)
+SAAJ0004.p2p.internal.err=SAAJ0004: Internal error
+SAAJ0005.p2p.=SAAJ0005: Bad URL (endPoint instance of javax.xml.messaging.URLEndpoint)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: Bad URL (endPoint instance of String)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Bad endPoint type (endPoint instance of URL)
+SAAJ0008.p2p.bad.response=SAAJ0008: Bad Response; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: Message send failed
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Unable to read response
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connection already closed (from get)
+SAAJ0012.p2p.get.failed=SAAJ0012: Get failed
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: Invalid reply message. Content length of reply was zero.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: Proxy host: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: Proxy Port: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocol not supported in URL, must be http or https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: Providers {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: Setting Providers {0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: Added SSL_PROVIDER {0}
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint is available only when JAXM is there
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS Authorization in POST set to true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Nachrichten-Factory kann nicht erstellt werden
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Verbindung ist bereits beendet (mit close-Methode)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Verbindung ist bereits beendet (mit call)
+SAAJ0004.p2p.internal.err=SAAJ0004: Interner Fehler
+SAAJ0005.p2p.=SAAJ0005: Ung\u00FCltige URL (endPoint-Instanz von javax.xml.messaging.URLEndpoint)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: Ung\u00FCltige URL (endPoint-Instanz von Zeichenfolge)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Ung\u00FCltiger endPoint-Typ (endPoint-Instanz von URL)
+SAAJ0008.p2p.bad.response=SAAJ0008: Ung\u00FCltige Antwort; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: Nachricht konnte nicht gesendet werden
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Antwort konnte nicht gelesen werden
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Verbindung ist bereits beendet (mit get)
+SAAJ0012.p2p.get.failed=SAAJ0012: Get-Vorgang nicht erfolgreich
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: Ung\u00FCltige Antwortnachricht. Contentl\u00E4nge von Antwort war null.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: Proxyhost: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: Proxyport: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protokoll in URL nicht unterst\u00FCtzt, muss http oder https sein
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: Provider {0} werden festgelegt
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} hinzugef\u00FCgt
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint ist nur verf\u00FCgbar, wenn JAXM vorhanden ist
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: HTTPS-Autorisierung in POST auf "True" festgelegt
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: no se ha podido crear la f\u00E1brica de mensajes
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: la conexi\u00F3n ya est\u00E1 cerrada (desde el m\u00E9todo de cierre)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: la conexi\u00F3n ya est\u00E1 cerrada (desde la llamada)
+SAAJ0004.p2p.internal.err=SAAJ0004: error interno
+SAAJ0005.p2p.=SAAJ0005: URL err\u00F3nea (instancia endPoint de javax.xml.messaging.URLEndpoint)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: URL err\u00F3nea (instancia endPoint de String)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo endPoint err\u00F3neo (instancia endPoint de URL)
+SAAJ0008.p2p.bad.response=SAAJ0008: respuesta err\u00F3nea; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: fallo de env\u00EDo de mensaje
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: no se ha podido leer la respuesta
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: la conexi\u00F3n ya est\u00E1 cerrada (desde la obtenci\u00F3n)
+SAAJ0012.p2p.get.failed=SAAJ0012: fallo de obtenci\u00F3n
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: mensaje de respuesta no v\u00E1lido. La longitud del contenido de respuesta es cero.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: Host de proxy: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: Puerto de proxy: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: el protocolo no est\u00E1 soportado en la URL. Debe ser http o https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: proveedores {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: definici\u00F3n de Proveedores {0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: se ha agregado SSL_PROVIDER {0}
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint s\u00F3lo est\u00E1 disponible cuando JAXM est\u00E1 all\u00ED
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: la autorizaci\u00F3n de HTTPS en POST se ha definido en true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001 : impossible de cr\u00E9er une fabrique de messages
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode de fermeture)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de l'appel)
+SAAJ0004.p2p.internal.err=SAAJ0004 : erreur interne
+SAAJ0005.p2p.=SAAJ0005 : URL incorrecte (instance d'adresse de javax.xml.messaging.URLEndpoint)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006 : URL incorrecte (instance d'adresse de la cha\u00EEne)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007 : type d'adresse incorrect (instance d'adresse de l'URL)
+SAAJ0008.p2p.bad.response=SAAJ0008 : r\u00E9ponse incorrecte ; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009 : \u00E9chec de l'envoi du message
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010 : impossible de lire la r\u00E9ponse
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011 : connexion d\u00E9j\u00E0 ferm\u00E9e (\u00E0 partir de la m\u00E9thode get)
+SAAJ0012.p2p.get.failed=SAAJ0012 : \u00E9chec de la m\u00E9thode get
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013 : HttpSOAPConnection : {0}
+SAAJ0014.p2p.content.zero=SAAJ0014 : message de r\u00E9ponse non valide. La longueur du contenu de la r\u00E9ponse \u00E9tait de z\u00E9ro.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050 : h\u00F4te proxy : {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051 : port proxy : {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052 : protocole non pris en charge dans l'URL, il doit s'agir de http ou https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053 : fournisseurs {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054 : d\u00E9finition des fournisseurs {0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055 : SSL_PROVIDER {0} ajout\u00E9
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090 : URLEndpoint est disponible uniquement lorsque JAXM est pr\u00E9sent
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091 : autorisation HTTPS dans POST d\u00E9finie sur True
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: Impossibile creare il message factory
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: Connessione gi\u00E0 chiusa (dal metodo close)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: Connessione gi\u00E0 chiusa (dal metodo call)
+SAAJ0004.p2p.internal.err=SAAJ0004: Errore interno
+SAAJ0005.p2p.=SAAJ0005: URL non valido (istanza endPoint di javax.xml.messaging.URLEndpoint)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: URL non valido (istanza endPoint di String)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: Tipo endPoint non valido (istanza endPoint dell'URL)
+SAAJ0008.p2p.bad.response=SAAJ0008: Risposta non valida; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: Invio del messaggio non riuscito
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: Impossibile leggere la risposta
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: Connessione gi\u00E0 chiusa (dal metodo get)
+SAAJ0012.p2p.get.failed=SAAJ0012: Metodo get non riuscito
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: Messaggio di risposta non valido. La lunghezza del contenuto della risposta era pari a zero.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: Host proxy: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: Porta proxy: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: Protocollo non supportato nell'URL, deve essere http o https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: Provider {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: Impostazione dei provider {0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} aggiunto
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: L'endpoint dell'URL \u00E8 disponibile solo quando \u00E8 presente JAXM
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: Autorizzazione HTTPS in POST impostata su true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: (close\u30E1\u30BD\u30C3\u30C9\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: (call\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
+SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u30A8\u30E9\u30FC
+SAAJ0005.p2p.=SAAJ0005: \u7121\u52B9\u306AURL (javax.xml.messaging.URLEndpoint\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: \u7121\u52B9\u306AURL (\u6587\u5B57\u5217\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u7121\u52B9\u306AendPoint\u30BF\u30A4\u30D7(URL\u306EendPoint\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9)
+SAAJ0008.p2p.bad.response=SAAJ0008: \u4E0D\u6B63\u306A\u30EC\u30B9\u30DD\u30F3\u30B9; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u30E1\u30C3\u30BB\u30FC\u30B8\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: (get\u304B\u3089)\u63A5\u7D9A\u306F\u3059\u3067\u306B\u30AF\u30ED\u30FC\u30BA\u3055\u308C\u3066\u3044\u307E\u3059
+SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: \u5FDC\u7B54\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7121\u52B9\u3067\u3059\u3002\u5FDC\u7B54\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u9577\u304C\u30BC\u30ED\u3067\u3057\u305F\u3002
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DB\u30B9\u30C8: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: \u30D7\u30ED\u30AD\u30B7\u30FB\u30DD\u30FC\u30C8: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u3059\u3002http\u307E\u305F\u306Fhttps\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: \u30D7\u30ED\u30D0\u30A4\u30C0{0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: \u30D7\u30ED\u30D0\u30A4\u30C0{0}\u3092\u8A2D\u5B9A\u3057\u3066\u3044\u307E\u3059
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306FJAXM\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u3067\u3059
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\u306EHTTPS\u8A8D\u8A3C\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: close \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \uD638\uCD9C\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0004.p2p.internal.err=SAAJ0004: \uB0B4\uBD80 \uC624\uB958
+SAAJ0005.p2p.=SAAJ0005: URL(javax.xml.messaging.URLEndpoint\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: URL(\uBB38\uC790\uC5F4\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \uB05D\uC810 \uC720\uD615(URL\uC758 \uB05D\uC810 \uC778\uC2A4\uD134\uC2A4)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0008.p2p.bad.response=SAAJ0008: \uC798\uBABB\uB41C \uC751\uB2F5: {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: \uBA54\uC2DC\uC9C0 \uC804\uC1A1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \uC751\uB2F5\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \uAC00\uC838\uC624\uAE30\uC5D0\uC11C \uC811\uC18D\uC774 \uC774\uBBF8 \uD574\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0012.p2p.get.failed=SAAJ0012: \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: \uD68C\uC2E0 \uBA54\uC2DC\uC9C0\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uD68C\uC2E0\uC758 \uCF58\uD150\uCE20 \uAE38\uC774\uAC00 0\uC785\uB2C8\uB2E4.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: \uD504\uB85D\uC2DC \uD638\uC2A4\uD2B8: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: \uD504\uB85D\uC2DC \uD3EC\uD2B8: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD504\uB85C\uD1A0\uCF5C\uC785\uB2C8\uB2E4. http \uB610\uB294 https\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: {0} \uC81C\uACF5\uC790
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: {0} \uC81C\uACF5\uC790\uB97C \uC124\uC815\uD558\uB294 \uC911
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0}\uC744(\uB97C) \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: JAXM\uC774 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC URLEndpoint\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST\uC758 HTTPS \uAD8C\uD55C \uBD80\uC5EC\uAC00 true\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: n\u00E3o \u00E9 poss\u00EDvel criar a factory da mensagem
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: a conex\u00E3o j\u00E1 foi fechada (do m\u00E9todo de fechamento)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: conex\u00E3o j\u00E1 fechada (da chamada)
+SAAJ0004.p2p.internal.err=SAAJ0004: erro interno
+SAAJ0005.p2p.=SAAJ0005: URL incorreto (a inst\u00E2ncia do endPoint de javax.xml.messaging.URLEndpoint)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: URL incorreto (inst\u00E2ncia de endPoint da String)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: tipo de endPoint incorreto (inst\u00E2ncia de endPoint do URL)
+SAAJ0008.p2p.bad.response=SAAJ0008: Resposta Incorreta; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: falha no envio da mensagem
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: n\u00E3o \u00E9 poss\u00EDvel ler a resposta
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: conex\u00E3o j\u00E1 fechada (de get)
+SAAJ0012.p2p.get.failed=SAAJ0012: falha de get
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: mensagem de resposta inv\u00E1lida. O tamanho do conte\u00FAdo da resposta era zero.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: host proxy: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: porta proxy: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: protocolo n\u00E3o suportado no URL, deve ser http ou https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: provedores {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: definindo provedores {0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: SSL_PROVIDER {0} adicionado
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: URLEndpoint est\u00E1 dispon\u00EDvel s\u00F3 quando JAXM est\u00E1 presente
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: autoriza\u00E7\u00E3o de HTTPS no POST definida como verdadeira
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F\u5DE5\u5382
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE close \u65B9\u6CD5)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE\u8C03\u7528)
+SAAJ0004.p2p.internal.err=SAAJ0004: \u5185\u90E8\u9519\u8BEF
+SAAJ0005.p2p.=SAAJ0005: URL \u9519\u8BEF (javax.xml.messaging.URLEndpoint \u7684 endPoint \u5B9E\u4F8B)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: URL \u9519\u8BEF (\u5B57\u7B26\u4E32\u7684 endPoint \u5B9E\u4F8B)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: endPoint \u7C7B\u578B\u9519\u8BEF (URL \u7684 endPoint \u5B9E\u4F8B)
+SAAJ0008.p2p.bad.response=SAAJ0008: \u54CD\u5E94\u9519\u8BEF; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u672A\u80FD\u53D1\u9001\u6D88\u606F
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u8FDE\u63A5\u5DF2\u5173\u95ED (\u4ECE get \u65B9\u6CD5)
+SAAJ0012.p2p.get.failed=SAAJ0012: Get \u5931\u8D25
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: \u56DE\u590D\u6D88\u606F\u65E0\u6548\u3002\u56DE\u590D\u7684\u5185\u5BB9\u957F\u5EA6\u4E3A\u96F6\u3002
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u673A: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u7AEF\u53E3: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: URL \u4E2D\u4E0D\u652F\u6301\u534F\u8BAE, \u5FC5\u987B\u662F http \u6216 https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u65B9{0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: \u8BBE\u7F6E\u63D0\u4F9B\u65B9{0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u6DFB\u52A0 SSL_PROVIDER {0}
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u4F7F\u7528 JAXM \u65F6, URLEndpoint \u624D\u53EF\u7528
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6743\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,58 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages
+# Error messages
+SAAJ0001.p2p.cannot.create.msg.factory=SAAJ0001: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F\u8655\u7406\u7AD9
+SAAJ0002.p2p.close.already.closed.conn=SAAJ0002: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u95DC\u9589\u65B9\u6CD5)
+SAAJ0003.p2p.call.already.closed.conn=SAAJ0003: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u547C\u53EB)
+SAAJ0004.p2p.internal.err=SAAJ0004: \u5167\u90E8\u932F\u8AA4
+SAAJ0005.p2p.=SAAJ0005: \u932F\u8AA4\u7684 URL (javax.xml.messaging.URLEndpoint \u7684 endPoint \u57F7\u884C\u8655\u7406)
+# 0005 : getURL failed on javax.xml.messaging.URLEndpoint
+SAAJ0006.p2p.bad.URL=SAAJ0006: \u932F\u8AA4\u7684 URL (\u5B57\u4E32\u7684 endPoint \u57F7\u884C\u8655\u7406)
+SAAJ0007.p2p.bad.endPoint.type=SAAJ0007: \u932F\u8AA4\u7684 endPoint \u985E\u578B (URL \u7684 endPoint \u57F7\u884C\u8655\u7406)
+SAAJ0008.p2p.bad.response=SAAJ0008: \u932F\u8AA4\u7684\u56DE\u61C9; {0}
+SAAJ0009.p2p.msg.send.failed=SAAJ0009: \u8A0A\u606F\u50B3\u9001\u5931\u6557
+SAAJ0010.p2p.cannot.read.resp=SAAJ0010: \u7121\u6CD5\u8B80\u53D6\u56DE\u61C9
+SAAJ0011.p2p.get.already.closed.conn=SAAJ0011: \u9023\u7DDA\u5DF2\u7D93\u95DC\u9589 (\u5F9E\u53D6\u5F97)
+SAAJ0012.p2p.get.failed=SAAJ0012: \u53D6\u5F97\u5931\u6557
+SAAJ0013.p2p.HttpSOAPConnection=SAAJ0013: HttpSOAPConnection: {0}
+SAAJ0014.p2p.content.zero=SAAJ0014: \u7121\u6548\u7684\u56DE\u8986\u8A0A\u606F. \u56DE\u8986\u7684\u5167\u5BB9\u9577\u5EA6\u70BA\u96F6.
+
+# Debug messages
+SAAJ0050.p2p.proxy.host=SAAJ0050: \u4EE3\u7406\u4E3B\u6A5F: {0}
+SAAJ0051.p2p.proxy.port=SAAJ0051: \u4EE3\u7406\u4E3B\u6A5F\u9023\u63A5\u57E0: {0}
+SAAJ0052.p2p.protocol.mustbe.http.or.https=SAAJ0052: \u4E0D\u652F\u63F4 URL \u4E2D\u7684\u5354\u5B9A, \u5FC5\u9808\u662F http \u6216 https
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0053.p2p.providers=SAAJ0053: \u63D0\u4F9B\u8005 {0}
+# {0} - list of package name prefixes (e.g. "foo.bar,bar.foo")
+SAAJ0054.p2p.set.providers=SAAJ0054: \u8A2D\u5B9A\u63D0\u4F9B\u8005 {0}
+# {0} - "com.sun.net.ssl.internal.ssl.Provider"/"com.ibm.net.ssl.internal.ssl.Provider"
+SAAJ0055.p2p.added.ssl.provider=SAAJ0055: \u5DF2\u65B0\u589E SSL_PROVIDER {0}
+
+# Trace messages
+SAAJ0090.p2p.endpoint.available.only.for.JAXM=SAAJ0090: \u53EA\u6709\u5728\u6709 JAXM \u6642\u624D\u80FD\u4F7F\u7528 URLEndpoint
+SAAJ0091.p2p.https.auth.in.POST.true=SAAJ0091: POST \u4E2D\u7684 HTTPS \u6388\u6B0A\u8A2D\u70BA true
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/Header.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)Header.java 1.3 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime;
+
+
+/**
+ * The Header class stores a name/value pair to represent headers.
+ *
+ * @author John Mani
+ */
+
+public interface Header {
+
+ /**
+ * Returns the name of this header.
+ *
+ * @return name of the header
+ */
+ String getName();
+
+ /**
+ * Returns the value of this header.
+ *
+ * @return value of the header
+ */
+ String getValue();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MessagingException.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)MessagingException.java 1.10 02/06/13
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime;
+
+
+/**
+ * The base class for all exceptions thrown by the Messaging classes
+ *
+ * @author John Mani
+ * @author Bill Shannon
+ */
+
+public class MessagingException extends Exception {
+
+ /**
+ * The next exception in the chain.
+ *
+ * @serial
+ */
+ private Exception next;
+
+ /**
+ * Constructs a MessagingException with no detail message.
+ */
+ public MessagingException() {
+ super();
+ }
+
+ /**
+ * Constructs a MessagingException with the specified detail message.
+ * @param s the detail message
+ */
+ public MessagingException(String s) {
+ super(s);
+ }
+
+ /**
+ * Constructs a MessagingException with the specified
+ * Exception and detail message. The specified exception is chained
+ * to this exception.
+ * @param s the detail message
+ * @param e the embedded exception
+ * @see #getNextException
+ * @see #setNextException
+ */
+ public MessagingException(String s, Exception e) {
+ super(s);
+ next = e;
+ }
+
+ /**
+ * Get the next exception chained to this one. If the
+ * next exception is a MessagingException, the chain
+ * may extend further.
+ *
+ * @return next Exception, null if none.
+ */
+ public synchronized Exception getNextException() {
+ return next;
+ }
+
+ /**
+ * Add an exception to the end of the chain. If the end
+ * is not a MessagingException, this
+ * exception cannot be added to the end.
+ *
+ * @param ex the new end of the Exception chain
+ * @return true
if the this Exception
+ * was added, false
otherwise.
+ */
+ public synchronized boolean setNextException(Exception ex) {
+ Exception theEnd = this;
+ while (theEnd instanceof MessagingException &&
+ ((MessagingException)theEnd).next != null) {
+ theEnd = ((MessagingException)theEnd).next;
+ }
+ // If the end is a MessagingException, we can add this
+ // exception to the chain.
+ if (theEnd instanceof MessagingException) {
+ ((MessagingException)theEnd).next = ex;
+ return true;
+ } else
+ return false;
+ }
+
+ /**
+ * Produce the message, include the message from the nested
+ * exception if there is one.
+ */
+ public String getMessage() {
+ if (next == null)
+ return super.getMessage();
+ Exception n = next;
+ String s = super.getMessage();
+ StringBuffer sb = new StringBuffer(s == null ? "" : s);
+ while (n != null) {
+ sb.append(";\n nested exception is:\n\t");
+ if (n instanceof MessagingException) {
+ MessagingException mex = (MessagingException)n;
+ sb.append(n.getClass().toString());
+ String msg = mex.getSuperMessage();
+ if (msg != null) {
+ sb.append(": ");
+ sb.append(msg);
+ }
+ n = mex.next;
+ } else {
+ sb.append(n.toString());
+ n = null;
+ }
+ }
+ return sb.toString();
+ }
+
+ private String getSuperMessage() {
+ return super.getMessage();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/MultipartDataSource.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)MultipartDataSource.java 1.6 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeBodyPart;
+
+import javax.activation.DataSource;
+
+/**
+ * MultipartDataSource is a DataSource
that contains body
+ * parts. This allows "mail aware" DataContentHandlers
to
+ * be implemented more efficiently by being aware of such
+ * DataSources
and using the appropriate methods to access
+ * BodyParts
. getContent()
method)
+ * or it can be created by a client as part of creating a new MimeMessage. MimeMultipart(String subtype)
+ * constructor. For example, to create a "multipart/alternative" object,
+ * use new MimeMultipart("alternative")
.
+ *
+ */
+
+//TODO: cleanup the SharedInputStream handling
+public class BMMimeMultipart extends MimeMultipart {
+
+ /*
+ * When true it indicates parsing hasnt been done at all
+ */
+ private boolean begining = true;
+
+ int[] bcs = new int[256];
+ int[] gss = null;
+ private static final int BUFFER_SIZE = 4096;
+ private byte[] buffer = new byte[BUFFER_SIZE];
+ private byte[] prevBuffer = new byte[BUFFER_SIZE];
+ private BitSet lastPartFound = new BitSet(1);
+
+ // cached inputstream which is possibly partially consumed
+ private InputStream in = null;
+ private String boundary = null;
+ // current stream position, set to -1 on EOF
+ int b = 0;
+
+ // property to indicate if lazyAttachments is ON
+ private boolean lazyAttachments = false;
+
+ /**
+ * Default constructor. An empty MimeMultipart object
+ * is created. Its content type is set to "multipart/mixed".
+ * A unique boundary string is generated and this string is
+ * setup as the "boundary" parameter for the
+ * contentType
field. contentType
field. parsed
flag is set to false. When
+ * the data for the body parts are needed, the parser extracts the
+ * "boundary" parameter from the content type of this DataSource,
+ * skips the 'preamble' and reads bytes till the terminating
+ * boundary and creates MimeBodyParts for each part of the stream.
+ *
+ * @param ds DataSource, can be a MultipartDataSource
+ */
+ public BMMimeMultipart(DataSource ds, ContentType ct)
+ throws MessagingException {
+ super(ds,ct);
+ boundary = ct.getParameter("boundary");
+ /*
+ if (ds instanceof MultipartDataSource) {
+ // ask super to do this for us.
+ setMultipartDataSource((MultipartDataSource)ds);
+ return;
+ }
+
+ // 'ds' was not a MultipartDataSource, we have
+ // to parse this ourself.
+ parsed = false;
+ this.ds = ds;
+ if (ct==null)
+ contentType = new ContentType(ds.getContentType());
+ else
+ contentType = ct;
+ */
+
+ }
+
+ public InputStream initStream() throws MessagingException {
+
+ if (in == null) {
+ try {
+ in = ds.getInputStream();
+ if (!(in instanceof ByteArrayInputStream) &&
+ !(in instanceof BufferedInputStream) &&
+ !(in instanceof SharedInputStream))
+ in = new BufferedInputStream(in);
+ } catch (Exception ex) {
+ throw new MessagingException("No inputstream from datasource");
+ }
+
+ if (!in.markSupported()) {
+ throw new MessagingException(
+ "InputStream does not support Marking");
+ }
+ }
+ return in;
+ }
+
+ /**
+ * Parse the InputStream from our DataSource, constructing the
+ * appropriate MimeBodyParts. The parsed
flag is
+ * set to true, and if true on entry nothing is done. This
+ * method is called by all other methods that need data for
+ * the body parts, to make sure the data has been parsed.
+ *
+ * @since JavaMail 1.2
+ */
+ protected void parse() throws MessagingException {
+ if (parsed)
+ return;
+
+ initStream();
+
+ SharedInputStream sin = null;
+ if (in instanceof SharedInputStream) {
+ sin = (SharedInputStream)in;
+ }
+
+ String bnd = "--" + boundary;
+ byte[] bndbytes = ASCIIUtility.getBytes(bnd);
+ try {
+ parse(in, bndbytes, sin);
+ } catch (IOException ioex) {
+ throw new MessagingException("IO Error", ioex);
+ } catch (Exception ex) {
+ throw new MessagingException("Error", ex);
+ }
+
+ parsed = true;
+ }
+
+ public boolean lastBodyPartFound() {
+ return lastPartFound.get(0);
+ }
+
+ public MimeBodyPart getNextPart(
+ InputStream stream, byte[] pattern, SharedInputStream sin)
+ throws Exception {
+
+ if (!stream.markSupported()) {
+ throw new Exception("InputStream does not support Marking");
+ }
+
+ if (begining) {
+ compile(pattern);
+ if (!skipPreamble(stream, pattern, sin)) {
+ throw new Exception(
+ "Missing Start Boundary, or boundary does not start on a new line");
+ }
+ begining = false;
+ }
+
+ if (lastBodyPartFound()) {
+ throw new Exception("No parts found in Multipart InputStream");
+ }
+
+ if (sin != null) {
+ long start = sin.getPosition();
+ b = readHeaders(stream);
+ if (b == -1) {
+ throw new Exception(
+ "End of Stream encountered while reading part headers");
+ }
+ long[] v = new long[1];
+ v[0] = -1; // just to ensure the code later sets it correctly
+ b = readBody(stream, pattern, v, null, sin);
+ // looks like this check has to be disabled
+ // it is allowed to have Mime Package without closing boundary
+ if (!ignoreMissingEndBoundary) {
+ if ((b == -1) && !lastBodyPartFound()) {
+ throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
+ }
+ }
+ long end = v[0];
+ MimeBodyPart mbp = createMimeBodyPart(sin.newStream(start, end));
+ addBodyPart(mbp);
+ return mbp;
+
+ } else {
+ InternetHeaders headers = createInternetHeaders(stream);
+ ByteOutputStream baos = new ByteOutputStream();
+ b = readBody(stream, pattern, null,baos, null);
+ // looks like this check has to be disabled
+ // in the old impl it is allowed to have Mime Package
+ // without closing boundary
+ if (!ignoreMissingEndBoundary) {
+ if ((b == -1) && !lastBodyPartFound()) {
+ throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
+ }
+ }
+ MimeBodyPart mbp = createMimeBodyPart(
+ headers, baos.getBytes(), baos.getCount());
+ addBodyPart(mbp);
+ return mbp;
+ }
+
+ }
+
+ public boolean parse(
+ InputStream stream, byte[] pattern, SharedInputStream sin)
+ throws Exception {
+
+ while (!lastPartFound.get(0) && (b != -1)) {
+ getNextPart(stream, pattern, sin);
+ }
+ return true;
+ }
+
+ private int readHeaders(InputStream is) throws Exception {
+ // if the headers are to end properly then there has to be CRLF
+ // actually we just need to mark the start and end positions
+ int b = is.read();
+ while(b != -1) {
+ // when it is a shared input stream no need to copy
+ if (b == '\r') {
+ b = is.read();
+ if (b == '\n') {
+ b = is.read();
+ if (b == '\r') {
+ b = is.read();
+ if (b == '\n') {
+ return b;
+ } else {
+ continue;
+ }
+ } else {
+ continue;
+ }
+ } else {
+ continue;
+ }
+ }
+ b = is.read();
+ }
+ if (b == -1) {
+ throw new Exception(
+ "End of inputstream while reading Mime-Part Headers");
+ }
+ return b;
+ }
+
+ private int readBody(
+ InputStream is, byte[] pattern, long[] posVector,
+ ByteOutputStream baos, SharedInputStream sin)
+ throws Exception {
+ if (!find(is, pattern, posVector, baos, sin)) {
+ throw new Exception(
+ "Missing boundary delimitier while reading Body Part");
+ }
+ return b;
+ }
+
+ private boolean skipPreamble(
+ InputStream is, byte[] pattern, SharedInputStream sin)
+ throws Exception {
+ if (!find(is, pattern, sin)) {
+ return false;
+ }
+ if (lastPartFound.get(0)) {
+ throw new Exception(
+ "Found closing boundary delimiter while trying to skip preamble");
+ }
+ return true;
+ }
+
+
+ public int readNext(InputStream is, byte[] buff, int patternLength,
+ BitSet eof, long[] posVector, SharedInputStream sin)
+ throws Exception {
+
+ int bufferLength = is.read(buffer, 0, patternLength);
+ if (bufferLength == -1) {
+ eof.flip(0);
+ } else if (bufferLength < patternLength) {
+ //repeatedly read patternLength - bufferLength
+ int temp = 0;
+ long pos = 0;
+ int i = bufferLength;
+ for (; i < patternLength; i++) {
+ if (sin != null) {
+ pos = sin.getPosition();
+ }
+ temp = is.read();
+ if (temp == -1) {
+ eof.flip(0);
+ if (sin != null) {
+ posVector[0] = pos;
+ }
+ break;
+ }
+ buffer[i] = (byte)temp;
+ }
+ bufferLength=i;
+ }
+ return bufferLength;
+ }
+
+ public boolean find(InputStream is, byte[] pattern, SharedInputStream sin)
+ throws Exception {
+ int i;
+ int l = pattern.length;
+ int lx = l -1;
+ BitSet eof = new BitSet(1);
+ long[] posVector = new long[1];
+
+ while (true) {
+ is.mark(l);
+ readNext(is, buffer, l, eof, posVector, sin);
+ if (eof.get(0)) {
+ // End of stream
+ return false;
+ }
+
+ /*
+ if (bufferLength < l) {
+ //is.reset();
+ return false;
+ }*/
+
+ for(i = lx; i >= 0; i--) {
+ if (buffer[i] != pattern[i]) {
+ break;
+ }
+ }
+
+ if (i < 0) {
+ // found the boundary, skip *LWSP-char and CRLF
+ if (!skipLWSPAndCRLF(is)) {
+ throw new Exception("Boundary does not terminate with CRLF");
+ }
+ return true;
+ }
+
+ int s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
+ is.reset();
+ is.skip(s);
+ }
+ }
+
+ public boolean find(
+ InputStream is, byte[] pattern, long[] posVector,
+ ByteOutputStream out, SharedInputStream sin) throws Exception {
+ int i;
+ int l = pattern.length;
+ int lx = l -1;
+ int bufferLength = 0;
+ int s = 0;
+ long endPos = -1;
+ byte[] tmp = null;
+
+ boolean first = true;
+ BitSet eof = new BitSet(1);
+
+ while (true) {
+ is.mark(l);
+ if (!first) {
+ tmp = prevBuffer;
+ prevBuffer = buffer;
+ buffer = tmp;
+ }
+ if (sin != null) {
+ endPos = sin.getPosition();
+ }
+
+ bufferLength = readNext(is, buffer, l, eof, posVector, sin);
+
+ if (bufferLength == -1) {
+ // End of stream
+ // looks like it is allowed to not have a closing boundary
+ //return false;
+ //if (sin != null) {
+ // posVector[0] = endPos;
+ //}
+ b = -1;
+ if ((s == l) && (sin == null)) {
+ out.write(prevBuffer, 0, s);
+ }
+ return true;
+ }
+
+ if (bufferLength < l) {
+ if (sin != null) {
+ //endPos = sin.getPosition();
+ //posVector[0] = endPos;
+ } else {
+ // looks like it is allowed to not have a closing boundary
+ // in the old implementation
+ out.write(buffer, 0, bufferLength);
+ }
+ // looks like it is allowed to not have a closing boundary
+ // in the old implementation
+ //return false;
+ b = -1;
+ return true;
+ }
+
+ for(i = lx; i >= 0; i--) {
+ if (buffer[i] != pattern[i]) {
+ break;
+ }
+ }
+
+ if (i < 0) {
+ if (s > 0) {
+ //looks like the earlier impl allowed just an LF
+ // so if s == 1 : it must be an LF
+ // if s == 2 : it must be a CR LF
+ if (s <= 2) {
+ //it could be "some-char\n" so write some-char
+ if (s == 2) {
+ if (prevBuffer[1] == '\n') {
+ if (prevBuffer[0] != '\r' && prevBuffer[0] != '\n') {
+ out.write(prevBuffer,0,1);
+ }
+ if (sin != null) {
+ posVector[0] = endPos;
+ }
+
+ } else {
+ throw new Exception(
+ "Boundary characters encountered in part Body " +
+ "without a preceeding CRLF");
+ }
+
+ } else if (s==1) {
+ if (prevBuffer[0] != '\n') {
+ throw new Exception(
+ "Boundary characters encountered in part Body " +
+ "without a preceeding CRLF");
+ }else {
+ if (sin != null) {
+ posVector[0] = endPos;
+ }
+ }
+ }
+
+ } else if (s > 2) {
+ if ((prevBuffer[s-2] == '\r') && (prevBuffer[s-1] == '\n')) {
+ if (sin != null) {
+ posVector[0] = endPos - 2;
+ } else {
+ out.write(prevBuffer, 0, s - 2);
+ }
+ } else if (prevBuffer[s-1] == '\n') {
+ //old impl allowed just a \n
+ if (sin != null) {
+ posVector[0] = endPos - 1;
+ } else {
+ out.write(prevBuffer, 0, s - 1);
+ }
+ } else {
+ throw new Exception(
+ "Boundary characters encountered in part Body " +
+ "without a preceeding CRLF");
+ }
+ }
+ }
+ // found the boundary, skip *LWSP-char and CRLF
+ if (!skipLWSPAndCRLF(is)) {
+ //throw new Exception(
+ // "Boundary does not terminate with CRLF");
+ }
+ return true;
+ }
+
+ if ((s > 0) && (sin == null)) {
+ if (prevBuffer[s-1] == (byte)13) {
+ // if buffer[0] == (byte)10
+ if (buffer[0] == (byte)10) {
+ int j;
+ for(j = lx-1; j > 0; j--) {
+ if (buffer[j+1] != pattern[j]) {
+ break;
+ }
+ }
+ if (j == 0) {
+ // matched the pattern excluding the last char of the pattern
+ // so dont write the CR into stream
+ out.write(prevBuffer,0,s-1);
+ } else {
+ out.write(prevBuffer,0,s);
+ }
+ } else {
+ out.write(prevBuffer, 0, s);
+ }
+ } else {
+ out.write(prevBuffer, 0, s);
+ }
+ }
+
+ s = Math.max(i + 1 - bcs[buffer[i] & 0x7f], gss[i]);
+ is.reset();
+ is.skip(s);
+ if (first) {
+ first = false;
+ }
+ }
+ }
+
+ private boolean skipLWSPAndCRLF(InputStream is) throws Exception {
+
+ b = is.read();
+ //looks like old impl allowed just a \n as well
+ if (b == '\n') {
+ return true;
+ }
+
+ if (b == '\r') {
+ b = is.read();
+ //skip any multiple '\r' "\r\n" --> "\r\r\n" on Win2k
+ if (b == '\r') {
+ b = is.read();
+ }
+ if (b == '\n') {
+ return true;
+ } else {
+ throw new Exception(
+ "transport padding after a Mime Boundary should end in a CRLF, found CR only");
+ }
+ }
+
+ if (b == '-') {
+ b = is.read();
+ if (b != '-') {
+ throw new Exception(
+ "Unexpected singular '-' character after Mime Boundary");
+ } else {
+ //System.out.println("Last Part Found");
+ lastPartFound.flip(0);
+ // read the next char
+ b = is.read();
+ }
+ }
+
+ while ((b != -1) && ((b == ' ') || (b == '\t'))) {
+ b = is.read();
+ if (b == '\n') {
+ return true;
+ }
+ if (b == '\r') {
+ b = is.read();
+ //skip any multiple '\r': "\r\n" --> "\r\r\n" on Win2k
+ if (b == '\r') {
+ b = is.read();
+ }
+ if (b == '\n') {
+ return true;
+ }
+ }
+ }
+
+ if (b == -1) {
+ // the last boundary need not have CRLF
+ if (!lastPartFound.get(0)) {
+ throw new Exception(
+ "End of Multipart Stream before encountering closing boundary delimiter");
+ }
+ return true;
+ }
+ return false;
+ }
+
+ private void compile(byte[] pattern) {
+ int l = pattern.length;
+
+ int i;
+ int j;
+
+ // Copied from J2SE 1.4 regex code
+ // java.util.regex.Pattern.java
+
+ // Initialise Bad Character Shift table
+ for (i = 0; i < l; i++) {
+ bcs[pattern[i]] = i + 1;
+ }
+
+ // Initialise Good Suffix Shift table
+ gss = new int[l];
+ NEXT: for (i = l; i > 0; i--) {
+ // j is the beginning index of suffix being considered
+ for (j = l - 1; j >= i; j--) {
+ // Testing for good suffix
+ if (pattern[j] == pattern[j - i]) {
+ // pattern[j..len] is a good suffix
+ gss[j - 1] = i;
+ } else {
+ // No match. The array has already been
+ // filled up with correct values before.
+ continue NEXT;
+ }
+ }
+ while (j > 0) {
+ gss[--j] = i;
+ }
+ }
+ gss[l - 1] = 1;
+ }
+
+
+ /**
+ * Iterates through all the parts and outputs each Mime part
+ * separated by a boundary.
+ */
+
+ public void writeTo(OutputStream os)
+ throws IOException, MessagingException {
+
+ // inputStream was not null
+ if (in != null) {
+ contentType.setParameter("boundary", this.boundary);
+ }
+
+ String bnd = "--" + contentType.getParameter("boundary");
+ for (int i = 0; i < parts.size(); i++) {
+ OutputUtil.writeln(bnd, os); // put out boundary
+ ((MimeBodyPart)parts.get(i)).writeTo(os);
+ OutputUtil.writeln(os); // put out empty line
+ }
+
+ if (in != null) {
+ OutputUtil.writeln(bnd, os); // put out boundary
+ if ((os instanceof ByteOutputStream) && lazyAttachments) {
+ ((ByteOutputStream) os).write(in);
+ } else {
+ ByteOutputStream baos = null;
+ try {
+ baos = new ByteOutputStream(in.available());
+ baos.write(in);
+ baos.writeTo(os);
+ // reset the inputstream so that we can support a
+ // getAttachment later
+ in = baos.newInputStream();
+ } finally {
+ if (baos != null)
+ baos.close();
+ }
+ }
+
+ // this will endup writing the end boundary
+ } else {
+ // put out last boundary
+ OutputUtil.writeAsAscii(bnd, os);
+ OutputUtil.writeAsAscii("--", os);
+ }
+ }
+
+ public void setInputStream(InputStream is) {
+ this.in = is;
+ }
+
+ public InputStream getInputStream() {
+ return this.in;
+ }
+
+ public void setBoundary(String bnd) {
+ this.boundary = bnd;
+ if (this.contentType != null) {
+ this.contentType.setParameter("boundary", bnd);
+ }
+ }
+ public String getBoundary() {
+ return this.boundary;
+ }
+
+ public boolean isEndOfStream() {
+ return (b == -1);
+ }
+
+ public void setLazyAttachments(boolean flag) {
+ lazyAttachments = flag;
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentDisposition.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)ContentDisposition.java 1.6 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+
+/**
+ * This class represents a MIME ContentDisposition value. It provides
+ * methods to parse a ContentDisposition string into individual components
+ * and to generate a MIME style ContentDisposition string.
+ *
+ * @version 1.6, 02/03/27
+ * @author John Mani
+ */
+
+public class ContentDisposition {
+
+ private String disposition; // disposition
+ private ParameterList list; // parameter list
+
+ /**
+ * No-arg Constructor.
+ */
+ public ContentDisposition() { }
+
+ /**
+ * Constructor.
+ *
+ * @param disposition disposition
+ * @param list ParameterList
+ * @since JavaMail 1.2
+ */
+ public ContentDisposition(String disposition, ParameterList list) {
+ this.disposition = disposition;
+ this.list = list;
+ }
+
+ /**
+ * Constructor that takes a ContentDisposition string. The String
+ * is parsed into its constituents: dispostion and parameters.
+ * A ParseException is thrown if the parse fails.
+ *
+ * @param s the ContentDisposition string.
+ * @exception ParseException if the parse fails.
+ * @since JavaMail 1.2
+ */
+ public ContentDisposition(String s) throws ParseException {
+ HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
+ HeaderTokenizer.Token tk;
+
+ // First "disposition" ..
+ tk = h.next();
+ if (tk.getType() != HeaderTokenizer.Token.ATOM)
+ throw new ParseException();
+ disposition = tk.getValue();
+
+ // Then parameters ..
+ String rem = h.getRemainder();
+ if (rem != null)
+ list = new ParameterList(rem);
+ }
+
+ /**
+ * Return the disposition value.
+ * @return the disposition
+ * @since JavaMail 1.2
+ */
+ public String getDisposition() {
+ return disposition;
+ }
+
+ /**
+ * Return the specified parameter value. Returns null
+ * if this parameter is absent.
+ * @return parameter value
+ * @since JavaMail 1.2
+ */
+ public String getParameter(String name) {
+ if (list == null)
+ return null;
+
+ return list.get(name);
+ }
+
+ /**
+ * Return a ParameterList object that holds all the available
+ * parameters. Returns null if no parameters are available.
+ *
+ * @return ParameterList
+ * @since JavaMail 1.2
+ */
+ public ParameterList getParameterList() {
+ return list;
+ }
+
+ /**
+ * Set the primary type. Overrides existing primary type.
+ * @param primaryType primary type
+ * @since JavaMail 1.2
+ */
+ public void setDisposition(String disposition) {
+ this.disposition = disposition;
+ }
+
+ /**
+ * Set the specified parameter. If this parameter already exists,
+ * it is replaced by this new value.
+ *
+ * @param name parameter name
+ * @param value parameter value
+ * @since JavaMail 1.2
+ */
+ public void setParameter(String name, String value) {
+ if (list == null)
+ list = new ParameterList();
+
+ list.set(name, value);
+ }
+
+ /**
+ * Set a new ParameterList.
+ * @param list ParameterList
+ * @since JavaMail 1.2
+ */
+ public void setParameterList(ParameterList list) {
+ this.list = list;
+ }
+
+ /**
+ * Retrieve a RFC2045 style string representation of
+ * this ContentDisposition. Returns null
if
+ * the conversion failed.
+ *
+ * @return RFC2045 style string
+ * @since JavaMail 1.2
+ */
+ public String toString() {
+ if (disposition == null)
+ return null;
+
+ if (list == null)
+ return disposition;
+
+ StringBuffer sb = new StringBuffer(disposition);
+
+ // append the parameter list
+ // use the length of the string buffer + the length of
+ // the header name formatted as follows "Content-Disposition: "
+ sb.append(list.toString(sb.length() + 21));
+ return sb.toString();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ContentType.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,277 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)ContentType.java 1.7 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+
+/**
+ * This class represents a MIME ContentType value. It provides
+ * methods to parse a ContentType string into individual components
+ * and to generate a MIME style ContentType string.
+ *
+ * @version 1.7, 02/03/27
+ * @author John Mani
+ */
+public final class ContentType {
+
+ private String primaryType; // primary type
+ private String subType; // subtype
+ private ParameterList list; // parameter list
+
+ /**
+ * No-arg Constructor.
+ */
+ public ContentType() { }
+
+ /**
+ * Constructor.
+ *
+ * @param primaryType primary type
+ * @param subType subType
+ * @param list ParameterList
+ */
+ public ContentType(String primaryType, String subType,
+ ParameterList list) {
+ this.primaryType = primaryType;
+ this.subType = subType;
+ if (list == null)
+ list = new ParameterList();
+ this.list = list;
+ }
+
+ /**
+ * Constructor that takes a Content-Type string. The String
+ * is parsed into its constituents: primaryType, subType
+ * and parameters. A ParseException is thrown if the parse fails.
+ *
+ * @param s the Content-Type string.
+ * @exception ParseException if the parse fails.
+ */
+ public ContentType(String s) throws ParseException {
+ HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
+ HeaderTokenizer.Token tk;
+
+ // First "type" ..
+ tk = h.next();
+ if (tk.getType() != HeaderTokenizer.Token.ATOM)
+ throw new ParseException();
+ primaryType = tk.getValue();
+
+ // The '/' separator ..
+ tk = h.next();
+ if ((char)tk.getType() != '/')
+ throw new ParseException();
+
+ // Then "subType" ..
+ tk = h.next();
+ if (tk.getType() != HeaderTokenizer.Token.ATOM)
+ throw new ParseException();
+ subType = tk.getValue();
+
+ // Finally parameters ..
+ String rem = h.getRemainder();
+ if (rem != null)
+ list = new ParameterList(rem);
+ }
+
+ public ContentType copy() {
+ return new ContentType(primaryType,subType,list.copy());
+ }
+
+ /**
+ * Return the primary type.
+ * @return the primary type
+ */
+ public String getPrimaryType() {
+ return primaryType;
+ }
+
+ /**
+ * Return the subType.
+ * @return the subType
+ */
+ public String getSubType() {
+ return subType;
+ }
+
+ /**
+ * Return the MIME type string, without the parameters.
+ * The returned value is basically the concatenation of
+ * the primaryType, the '/' character and the secondaryType.
+ *
+ * @return the type
+ */
+ public String getBaseType() {
+ return primaryType + '/' + subType;
+ }
+
+ /**
+ * Return the specified parameter value. Returns null
+ * if this parameter is absent.
+ * @return parameter value
+ */
+ public String getParameter(String name) {
+ if (list == null)
+ return null;
+
+ return list.get(name);
+ }
+
+ /**
+ * Return a ParameterList object that holds all the available
+ * parameters. Returns null if no parameters are available.
+ *
+ * @return ParameterList
+ */
+ public ParameterList getParameterList() {
+ return list;
+ }
+
+ /**
+ * Set the primary type. Overrides existing primary type.
+ * @param primaryType primary type
+ */
+ public void setPrimaryType(String primaryType) {
+ this.primaryType = primaryType;
+ }
+
+ /**
+ * Set the subType. Overrides existing subType
+ * @param subType subType
+ */
+ public void setSubType(String subType) {
+ this.subType = subType;
+ }
+
+ /**
+ * Set the specified parameter. If this parameter already exists,
+ * it is replaced by this new value.
+ *
+ * @param name parameter name
+ * @param value parameter value
+ */
+ public void setParameter(String name, String value) {
+ if (list == null)
+ list = new ParameterList();
+
+ list.set(name, value);
+ }
+
+ /**
+ * Set a new ParameterList.
+ * @param list ParameterList
+ */
+ public void setParameterList(ParameterList list) {
+ this.list = list;
+ }
+
+ /**
+ * Retrieve a RFC2045 style string representation of
+ * this Content-Type. Returns null
if
+ * the conversion failed.
+ *
+ * @return RFC2045 style string
+ */
+ public String toString() {
+ if (primaryType == null || subType == null) // need both
+ return null;
+
+ StringBuffer sb = new StringBuffer();
+ sb.append(primaryType).append('/').append(subType);
+ if (list != null)
+ // Http Binding section of the "SOAP with attachments" specification says,
+ // "SOAP message senders should send Content-Type headers on a single long line."
+ // (http://www.w3.org/TR/SOAP-attachments#HTTPBinding)
+ sb.append(list.toString());
+
+ return sb.toString();
+ }
+
+ /**
+ * Match with the specified ContentType object. This method
+ * compares only the primaryType
and
+ * subType
. The parameters of both operands
+ * are ignored. true
when
+ * comparing the ContentTypes for "text/plain"
+ * and "text/plain; charset=foobar".
+ *
+ * If the subType
of either operand is the special
+ * character '*', then the subtype is ignored during the match.
+ * For example, this method will return true
when
+ * comparing the ContentTypes for "text/plain"
+ * and "text/*"
+ *
+ * @param cType to compare this against
+ */
+ public boolean match(ContentType cType) {
+ // Match primaryType
+ if (!primaryType.equalsIgnoreCase(cType.getPrimaryType()))
+ return false;
+
+ String sType = cType.getSubType();
+
+ // If either one of the subTypes is wildcarded, return true
+ if ((subType.charAt(0) == '*') || (sType.charAt(0) == '*'))
+ return true;
+
+ // Match subType
+ if (!subType.equalsIgnoreCase(sType))
+ return false;
+
+ return true;
+ }
+
+ /**
+ * Match with the specified content-type string. This method
+ * compares only the primaryType
and
+ * subType
.
+ * The parameters of both operands are ignored. true
when
+ * comparing the ContentType for "text/plain"
+ * with "text/plain; charset=foobar".
+ *
+ * If the subType
of either operand is the special
+ * character '*', then the subtype is ignored during the match.
+ * For example, this method will return true
when
+ * comparing the ContentType for "text/plain"
+ * with "text/*"
+ */
+ public boolean match(String s) {
+ try {
+ return match(new ContentType(s));
+ } catch (ParseException pex) {
+ return false;
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/HeaderTokenizer.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,382 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)HeaderTokenizer.java 1.9 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+
+/**
+ * This class tokenizes RFC822 and MIME headers into the basic
+ * symbols specified by RFC822 and MIME.
+ *
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * Returns the value of the token just read. When the current
+ * token is a quoted string, this field contains the body of the
+ * string, without the quotes. When the current token is a comment,
+ * this field contains the body of the comment.
+ *
+ * @return token value
+ */
+ public String getValue() {
+ return value;
+ }
+ }
+
+ private String string; // the string to be tokenized
+ private boolean skipComments; // should comments be skipped ?
+ private String delimiters; // delimiter string
+ private int currentPos; // current parse position
+ private int maxPos; // string length
+ private int nextPos; // track start of next Token for next()
+ private int peekPos; // track start of next Token for peek()
+
+ /**
+ * RFC822 specials
+ */
+ public final static String RFC822 = "()<>@,;:\\\"\t .[]";
+
+ /**
+ * MIME specials
+ */
+ public final static String MIME = "()<>@,;:\\\"\t []/?=";
+
+ // The EOF Token
+ private final static Token EOFToken = new Token(Token.EOF, null);
+
+ /**
+ * Constructor that takes a rfc822 style header.
+ *
+ * @param header The rfc822 header to be tokenized
+ * @param delimiters Set of delimiter characters
+ * to be used to delimit ATOMS. These
+ * are usually ATOM
A sequence of ASCII characters
+ * delimited by either SPACE, CTL, "(", <"> or the
+ * specified SPECIALS
+ * QUOTEDSTRING
A sequence of ASCII characters
+ * within quotes
+ * COMMENT
A sequence of ASCII characters
+ * within "(" and ")".
+ * EOF
End of header
+ * RFC822
or
+ * MIME
+ * @param skipComments If true, comments are skipped and
+ * not returned as tokens
+ */
+ public HeaderTokenizer(String header, String delimiters,
+ boolean skipComments) {
+ string = (header == null) ? "" : header; // paranoia ?!
+ this.skipComments = skipComments;
+ this.delimiters = delimiters;
+ currentPos = nextPos = peekPos = 0;
+ maxPos = string.length();
+ }
+
+ /**
+ * Constructor. Comments are ignored and not returned as tokens
+ *
+ * @param header The header that is tokenized
+ * @param delimiters The delimiters to be used
+ */
+ public HeaderTokenizer(String header, String delimiters) {
+ this(header, delimiters, true);
+ }
+
+ /**
+ * Constructor. The RFC822 defined delimiters - RFC822 - are
+ * used to delimit ATOMS. Also comments are skipped and not
+ * returned as tokens
+ */
+ public HeaderTokenizer(String header) {
+ this(header, RFC822);
+ }
+
+ /**
+ * Parses the next token from this String. next()
is
+ * called.
A note on RFC822 and MIME headerssetHeader
, addHeader
, and
+ * addHeaderLine
methods are responsible for enforcing
+ * the MIME requirements for the specified headers. In addition, these
+ * header fields must be folded (wrapped) before being sent if they
+ * exceed the line length limitation for the transport (1000 bytes for
+ * SMTP). Received headers may have been folded. The application is
+ * responsible for folding and unfolding headers as appropriate. null
+ * if no headers with the specified name exist.
+ *
+ * @param name header name
+ * @return array of header values, or null if none
+ */
+ public String[] getHeader(String name) {
+ // XXX - should we just step through in index order?
+ FinalArrayList v = new FinalArrayList(); // accumulate return values
+
+ int len = headers.size();
+ for( int i=0; inull
+ * if no headers with the specified name exist.
+ *
+ * @param delimiter delimiter
+ * @return the value fields for all headers with
+ * this name, or null if none
+ * @param name header name
+ */
+ public String getHeader(String name, String delimiter) {
+ String[] s = getHeader(name);
+
+ if (s == null)
+ return null;
+
+ if ((s.length == 1) || delimiter == null)
+ return s[0];
+
+ StringBuffer r = new StringBuffer(s[0]);
+ for (int i = 1; i < s.length; i++) {
+ r.append(delimiter);
+ r.append(s[i]);
+ }
+ return r.toString();
+ }
+
+ /**
+ * Change the first header line that matches name
+ * to have value, adding a new header if no existing header
+ * matches. Remove all matching headers but the first. MimeMultipart
+ * objects. InternetHeaders
class to parse
+ * and store the headers of that body part.
A note on RFC 822 and MIME headerssetHeader
, addHeader
, and
+ * addHeaderLine
methods are responsible for enforcing
+ * the MIME requirements for the specified headers. In addition, these
+ * header fields must be folded (wrapped) before being sent if they
+ * exceed the line length limitation for the transport (1000 bytes for
+ * SMTP). Received headers may have been folded. The application is
+ * responsible for folding and unfolding headers as appropriate. contentStream
is another such stream representing
+ * the content of this body part. In this case, content
+ * will be null.
+ *
+ * @since JavaMail 1.2
+ */
+ private InputStream contentStream;
+
+
+
+ /**
+ * The InternetHeaders object that stores all the headers
+ * of this body part.
+ */
+ private final InternetHeaders headers;
+
+ /**
+ * The MimeMultipart
object containing this MimeBodyPart
,
+ * if known.
+ * @since JavaMail 1.1
+ */
+ private MimeMultipart parent;
+
+ private MIMEPart mimePart;
+
+ /**
+ * An empty MimeBodyPart object is created.
+ * This body part maybe filled in by a client constructing a multipart
+ * message.
+ */
+ public MimeBodyPart() {
+ headers = new InternetHeaders();
+ }
+
+ /**
+ * Constructs a MimeBodyPart by reading and parsing the data from
+ * the specified input stream. The parser consumes data till the end
+ * of the given input stream. The input stream must start at the
+ * beginning of a valid MIME body part and must terminate at the end
+ * of that body part. MimeMultipart
object,
+ * or null
if not known.
+ */
+ public MimeMultipart getParent() {
+ return parent;
+ }
+
+ /**
+ * Set the parent of this MimeBodyPart
to be the specified
+ * MimeMultipart
. Normally called by MimeMultipart
's
+ * addBodyPart
method. parent
may be
+ * null
if the MimeBodyPart
is being removed
+ * from its containing MimeMultipart
.
+ * @since JavaMail 1.1
+ */
+ public void setParent(MimeMultipart parent) {
+ this.parent = parent;
+ }
+
+ /**
+ * Return the size of the content of this body part in bytes.
+ * Return -1 if the size cannot be determined. content
+ * array (if not null), or, if contentStream
is not
+ * null, and the available
method returns a positive
+ * number, it returns that number as the size. Otherwise, it returns
+ * -1.
+ *
+ * @return size in bytes, or -1 if not known
+ */
+ public int getSize() {
+
+ if (mimePart != null) {
+ try {
+ return mimePart.read().available();
+ } catch (IOException ex) {
+ return -1;
+ }
+ }
+ if (content != null)
+ return contentLength;
+ if (contentStream != null) {
+ try {
+ int size = contentStream.available();
+ // only believe the size if it's greate than zero, since zero
+ // is the default returned by the InputStream class itself
+ if (size > 0)
+ return size;
+ } catch (IOException ex) {
+ // ignore it
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Return the number of lines for the content of this MimeBodyPart.
+ * Return -1 if this number cannot be determined. getHeader(name)
+ * to obtain the requisite header field.
+ *
+ * @return Content-Type of this body part
+ */
+ public String getContentType() {
+ if (mimePart != null) {
+ return mimePart.getContentType();
+ }
+ String s = getHeader("Content-Type", null);
+ if (s == null)
+ s = "text/plain";
+
+ return s;
+ }
+
+ /**
+ * Is this MimeBodyPart of the specified MIME type? This method
+ * compares only the primaryType
and
+ * subType
.
+ * The parameters of the content types are ignored. true
when
+ * comparing a MimeBodyPart of content type "text/plain"
+ * with "text/plain; charset=foobar". subType
of mimeType
is the
+ * special character '*', then the subtype is ignored during the
+ * comparison.
+ */
+ public boolean isMimeType(String mimeType) {
+ boolean result;
+ // XXX - lots of room for optimization here!
+ try {
+ ContentType ct = new ContentType(getContentType());
+ result = ct.match(mimeType);
+ } catch (ParseException ex) {
+ result = getContentType().equalsIgnoreCase(mimeType);
+ }
+ return result;
+ }
+
+ /**
+ * Returns the value of the "Content-Disposition" header field.
+ * This represents the disposition of this part. The disposition
+ * describes how the part should be presented to the user. getHeader(name)
+ * to obtain the requisite header field.
+ *
+ * @see #headers
+ */
+ public String getDisposition() throws MessagingException {
+ String s = getHeader("Content-Disposition", null);
+
+ if (s == null)
+ return null;
+
+ ContentDisposition cd = new ContentDisposition(s);
+ return cd.getDisposition();
+ }
+
+ /**
+ * Set the "Content-Disposition" header field of this body part.
+ * If the disposition is null, any existing "Content-Disposition"
+ * header field is removed.
+ *
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ */
+ public void setDisposition(String disposition) throws MessagingException {
+ if (disposition == null)
+ removeHeader("Content-Disposition");
+ else {
+ String s = getHeader("Content-Disposition", null);
+ if (s != null) {
+ /* A Content-Disposition header already exists ..
+ *
+ * Override disposition, but attempt to retain
+ * existing disposition parameters
+ */
+ ContentDisposition cd = new ContentDisposition(s);
+ cd.setDisposition(disposition);
+ disposition = cd.toString();
+ }
+ setHeader("Content-Disposition", disposition);
+ }
+ }
+
+ /**
+ * Returns the content transfer encoding from the
+ * "Content-Transfer-Encoding" header
+ * field. Returns null
if the header is unavailable
+ * or its value is absent. getHeader(name)
+ * to obtain the requisite header field.
+ *
+ * @see #headers
+ */
+ public String getEncoding() throws MessagingException {
+ String s = getHeader("Content-Transfer-Encoding", null);
+
+ if (s == null)
+ return null;
+
+ s = s.trim(); // get rid of trailing spaces
+ // quick check for known values to avoid unnecessary use
+ // of tokenizer.
+ if (s.equalsIgnoreCase("7bit") || s.equalsIgnoreCase("8bit") ||
+ s.equalsIgnoreCase("quoted-printable") ||
+ s.equalsIgnoreCase("base64"))
+ return s;
+
+ // Tokenize the header to obtain the encoding (skip comments)
+ HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
+
+ HeaderTokenizer.Token tk;
+ int tkType;
+
+ for (;;) {
+ tk = h.next(); // get a token
+ tkType = tk.getType();
+ if (tkType == HeaderTokenizer.Token.EOF)
+ break; // done
+ else if (tkType == HeaderTokenizer.Token.ATOM)
+ return tk.getValue();
+ else // invalid token, skip it.
+ continue;
+ }
+ return s;
+ }
+
+ /**
+ * Returns the value of the "Content-ID" header field. Returns
+ * null
if the field is unavailable or its value is
+ * absent. getHeader(name)
+ * to obtain the requisite header field.
+ */
+ public String getContentID() {
+ return getHeader("Content-ID", null);
+ }
+
+ /**
+ * Set the "Content-ID" header field of this body part.
+ * If the cid
parameter is null, any existing
+ * "Content-ID" is removed.
+ *
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ * @since JavaMail 1.3
+ */
+ public void setContentID(String cid) {
+ if (cid == null)
+ removeHeader("Content-ID");
+ else
+ setHeader("Content-ID", cid);
+ }
+
+ /**
+ * Return the value of the "Content-MD5" header field. Returns
+ * null
if this field is unavailable or its value
+ * is absent. getHeader(name)
+ * to obtain the requisite header field.
+ */
+ public String getContentMD5() {
+ return getHeader("Content-MD5", null);
+ }
+
+ /**
+ * Set the "Content-MD5" header field of this body part.
+ *
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ */
+ public void setContentMD5(String md5) {
+ setHeader("Content-MD5", md5);
+ }
+
+ /**
+ * Get the languages specified in the Content-Language header
+ * of this MimeBodyPart. The Content-Language header is defined by
+ * RFC 1766. Returns null
if this header is not
+ * available or its value is absent. getHeader(name)
+ * to obtain the requisite header field.
+ */
+ public String[] getContentLanguage() throws MessagingException {
+ String s = getHeader("Content-Language", null);
+
+ if (s == null)
+ return null;
+
+ // Tokenize the header to obtain the Language-tags (skip comments)
+ HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
+ FinalArrayList v = new FinalArrayList();
+
+ HeaderTokenizer.Token tk;
+ int tkType;
+
+ while (true) {
+ tk = h.next(); // get a language-tag
+ tkType = tk.getType();
+ if (tkType == HeaderTokenizer.Token.EOF)
+ break; // done
+ else if (tkType == HeaderTokenizer.Token.ATOM) v.add(tk.getValue());
+ else // invalid token, skip it.
+ continue;
+ }
+
+ if (v.size() == 0)
+ return null;
+
+ return (String[])v.toArray(new String[v.size()]);
+ }
+
+ /**
+ * Set the Content-Language header of this MimeBodyPart. The
+ * Content-Language header is defined by RFC 1766.
+ *
+ * @param languages array of language tags
+ */
+ public void setContentLanguage(String[] languages) {
+ StringBuffer sb = new StringBuffer(languages[0]);
+ for (int i = 1; i < languages.length; i++)
+ sb.append(',').append(languages[i]);
+ setHeader("Content-Language", sb.toString());
+ }
+
+ /**
+ * Returns the "Content-Description" header field of this body part.
+ * This typically associates some descriptive information with
+ * this part. Returns null if this field is unavailable or its
+ * value is absent. getHeader(name)
+ * to obtain the requisite header field.
+ *
+ * @return content description
+ */
+ public String getDescription() {
+ String rawvalue = getHeader("Content-Description", null);
+
+ if (rawvalue == null)
+ return null;
+
+ try {
+ return MimeUtility.decodeText(MimeUtility.unfold(rawvalue));
+ } catch (UnsupportedEncodingException ex) {
+ return rawvalue;
+ }
+ }
+
+ /**
+ * Set the "Content-Description" header field for this body part.
+ * If the description parameter is null
, then any
+ * existing "Content-Description" fields are removed. null
, then any
+ * existing "Content-Description" fields are removed. null
if both are absent.
+ *
+ * @return filename
+ */
+ public String getFileName() throws MessagingException {
+ String filename = null;
+ String s = getHeader("Content-Disposition", null);
+
+ if (s != null) {
+ // Parse the header ..
+ ContentDisposition cd = new ContentDisposition(s);
+ filename = cd.getParameter("filename");
+ }
+ if (filename == null) {
+ // Still no filename ? Try the "name" ContentType parameter
+ s = getHeader("Content-Type", null);
+ if (s != null) {
+ try {
+ ContentType ct = new ContentType(s);
+ filename = ct.getParameter("name");
+ } catch (ParseException pex) { } // ignore it
+ }
+ }
+ return filename;
+ }
+
+ /**
+ * Set the filename associated with this body part, if possible. getInputStream
method or getContent
method
+ * from returning the correct data. In such a case the application may
+ * use this method and attempt to decode the raw data itself. getContentStream
+ * method.
+ *
+ * @see #getInputStream
+ * @see #getContentStream
+ * @since JavaMail 1.2
+ */
+ public InputStream getRawInputStream() throws MessagingException {
+ return getContentStream();
+ }
+
+ /**
+ * Return a DataHandler for this body part's content. setContent(foobar, "application/x-foobar")
,
+ * a DataContentHandler for "application/x-foobar" should be installed.
+ * Refer to the Java Activation Framework for more information.
+ *
+ * @param o the content object
+ * @param type Mime type of the object
+ * @exception IllegalStateException if this body part is
+ * obtained from a READ_ONLY folder.
+ */
+ public void setContent(Object o, String type) {
+ if (mimePart != null) {
+ mimePart = null;
+ }
+ if (o instanceof MimeMultipart) {
+ setContent((MimeMultipart)o);
+ } else {
+ setDataHandler(new DataHandler(o, type));
+ }
+ }
+
+ /**
+ * Convenience method that sets the given String as this
+ * part's content, with a MIME type of "text/plain". If the
+ * string contains non US-ASCII characters, it will be encoded
+ * using the platform's default charset. The charset is also
+ * used to set the "charset" parameter. text
is large, since this method may have
+ * to scan all the characters to determine what charset to
+ * use. Content-Type
and Content-Transfer-Encoding
.
+ * Headers might need to be updated in two cases:
+ *
+ *
+ * - A message being crafted by a mail application will certainly
+ * need to activate this method at some point to fill up its internal
+ * headers.
+ *
+ *
+ * - A message read in from a Store will have obtained
+ * all its headers from the store, and so doesn't need this.
+ * However, if this message is editable and if any edits have
+ * been made to either the content or message structure, we might
+ * need to resync our headers.
+ *
+ *
+ * In both cases this method is typically called by the
+ * Message.saveChanges
method.
+ */
+ protected void updateHeaders() throws MessagingException {
+ DataHandler dh = getDataHandler();
+ /*
+ * Code flow indicates null is never returned from
+ * getdataHandler() - findbugs
+ */
+ //if (dh == null) // Huh ?
+ // return;
+
+ try {
+ String type = dh.getContentType();
+ boolean composite = false;
+ boolean needCTHeader = getHeader("Content-Type") == null;
+
+ ContentType cType = new ContentType(type);
+ if (cType.match("multipart/*")) {
+ // If multipart, recurse
+ composite = true;
+ Object o = dh.getContent();
+ ((MimeMultipart) o).updateHeaders();
+ } else if (cType.match("message/rfc822")) {
+ composite = true;
+ }
+
+ // Content-Transfer-Encoding, but only if we don't
+ // already have one
+ if (!composite) { // not allowed on composite parts
+ if (getHeader("Content-Transfer-Encoding") == null)
+ setEncoding(MimeUtility.getEncoding(dh));
+
+ if (needCTHeader && setDefaultTextCharset &&
+ cType.match("text/*") &&
+ cType.getParameter("charset") == null) {
+ /*
+ * Set a default charset for text parts.
+ * We really should examine the data to determine
+ * whether or not it's all ASCII, but that's too
+ * expensive so we make an assumption: If we
+ * chose 7bit encoding for this data, it's probably
+ * ASCII. (MimeUtility.getEncoding will choose
+ * 7bit only in this case, but someone might've
+ * set the Content-Transfer-Encoding header manually.)
+ */
+ String charset;
+ String enc = getEncoding();
+ if (enc != null && enc.equalsIgnoreCase("7bit"))
+ charset = "us-ascii";
+ else
+ charset = MimeUtility.getDefaultMIMECharset();
+ cType.setParameter("charset", charset);
+ type = cType.toString();
+ }
+ }
+
+ // Now, let's update our own headers ...
+
+ // Content-type, but only if we don't already have one
+ if (needCTHeader) {
+ /*
+ * Pull out "filename" from Content-Disposition, and
+ * use that to set the "name" parameter. This is to
+ * satisfy older MUAs (DtMail, Roam and probably
+ * a bunch of others).
+ */
+ String s = getHeader("Content-Disposition", null);
+ if (s != null) {
+ // Parse the header ..
+ ContentDisposition cd = new ContentDisposition(s);
+ String filename = cd.getParameter("filename");
+ if (filename != null) {
+ cType.setParameter("name", filename);
+ type = cType.toString();
+ }
+ }
+
+ setHeader("Content-Type", type);
+ }
+ } catch (IOException ex) {
+ throw new MessagingException("IOException updating headers", ex);
+ }
+ }
+
+ private void setEncoding(String encoding) {
+ setHeader("Content-Transfer-Encoding", encoding);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimeMultipart.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,657 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)MimeMultipart.java 1.31 03/01/29
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+import java.io.*;
+
+import javax.activation.DataSource;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.*;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
+import com.sun.xml.internal.messaging.saaj.util.FinalArrayList;
+import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
+import com.sun.xml.internal.messaging.saaj.util.SAAJUtil;
+
+/**
+ * The MimeMultipart class is an implementation
+ * that uses MIME conventions for the multipart data. getContent()
method)
+ * or it can be created by a client as part of creating a new MimeMessage. MimeMultipart(String subtype)
+ * constructor. For example, to create a "multipart/alternative" object,
+ * use new MimeMultipart("alternative")
.
+ *
+ * @version 1.31, 03/01/29
+ * @author John Mani
+ * @author Bill Shannon
+ * @author Max Spivak
+ */
+
+//BM MimeMultipart can extend this
+public class MimeMultipart {
+
+ /**
+ * The DataSource supplying our InputStream.
+ */
+ protected DataSource ds = null;
+
+ /**
+ * Have we parsed the data from our InputStream yet?
+ * Defaults to true; set to false when our constructor is
+ * given a DataSource with an InputStream that we need to
+ * parse.
+ */
+ protected boolean parsed = true;
+
+ /**
+ * Vector of MimeBodyPart objects.
+ */
+ protected FinalArrayList parts = new FinalArrayList(); // Holds BodyParts
+
+ /**
+ * This field specifies the content-type of this multipart
+ * object. It defaults to "multipart/mixed".
+ */
+ protected ContentType contentType;
+
+ /**
+ * The MimeBodyPart
containing this MimeMultipart
,
+ * if known.
+ * @since JavaMail 1.1
+ */
+ protected MimeBodyPart parent;
+
+ protected static final boolean ignoreMissingEndBoundary;
+ static {
+ ignoreMissingEndBoundary = SAAJUtil.getSystemBoolean("saaj.mime.multipart.ignoremissingendboundary");
+ }
+
+ /**
+ * Default constructor. An empty MimeMultipart object
+ * is created. Its content type is set to "multipart/mixed".
+ * A unique boundary string is generated and this string is
+ * setup as the "boundary" parameter for the
+ * contentType
field. contentType
field. parsed
flag is set to false. When
+ * the data for the body parts are needed, the parser extracts the
+ * "boundary" parameter from the content type of this DataSource,
+ * skips the 'preamble' and reads bytes till the terminating
+ * boundary and creates MimeBodyParts for each part of the stream.
+ *
+ * @param ds DataSource, can be a MultipartDataSource
+ * @param ct
+ * This must be the same information as {@link DataSource#getContentType()}.
+ * All the callers of this method seem to have this object handy, so
+ * for performance reason this method accepts it. Can be null.
+ */
+ public MimeMultipart(DataSource ds, ContentType ct) throws MessagingException {
+ // 'ds' was not a MultipartDataSource, we have
+ // to parse this ourself.
+ parsed = false;
+ this.ds = ds;
+ if (ct==null)
+ contentType = new ContentType(ds.getContentType());
+ else
+ contentType = ct;
+ }
+
+ /**
+ * Set the subtype. This method should be invoked only on a new
+ * MimeMultipart object created by the client. The default subtype
+ * of such a multipart object is "mixed". updateHeaders
method on each of its
+ * children BodyParts. saveChanges
+ * method is invoked on the Message object containing this
+ * MimeMultipart. This is typically done as part of the Message
+ * send process, however note that a client is free to call
+ * it any number of times. So if the header updating process is
+ * expensive for a specific MimeMultipart subclass, then it
+ * might itself want to track whether its internal state actually
+ * did change, and do the header updating only if necessary.
+ */
+ protected void updateHeaders() throws MessagingException {
+ for (int i = 0; i < parts.size(); i++)
+ ((MimeBodyPart)parts.get(i)).updateHeaders();
+ }
+
+ /**
+ * Iterates through all the parts and outputs each Mime part
+ * separated by a boundary.
+ */
+ public void writeTo(OutputStream os)
+ throws IOException, MessagingException {
+ parse();
+
+ String boundary = "--" + contentType.getParameter("boundary");
+
+ for (int i = 0; i < parts.size(); i++) {
+ OutputUtil.writeln(boundary, os); // put out boundary
+ getBodyPart(i).writeTo(os);
+ OutputUtil.writeln(os); // put out empty line
+ }
+
+ // put out last boundary
+ OutputUtil.writeAsAscii(boundary, os);
+ OutputUtil.writeAsAscii("--", os);
+ os.flush();
+ }
+
+ /**
+ * Parse the InputStream from our DataSource, constructing the
+ * appropriate MimeBodyParts. The parsed
flag is
+ * set to true, and if true on entry nothing is done. This
+ * method is called by all other methods that need data for
+ * the body parts, to make sure the data has been parsed.
+ *
+ * @since JavaMail 1.2
+ */
+ protected void parse() throws MessagingException {
+ if (parsed)
+ return;
+
+ InputStream in;
+ SharedInputStream sin = null;
+ long start = 0, end = 0;
+ boolean foundClosingBoundary = false;
+
+ try {
+ in = ds.getInputStream();
+ if (!(in instanceof ByteArrayInputStream) &&
+ !(in instanceof BufferedInputStream) &&
+ !(in instanceof SharedInputStream))
+ in = new BufferedInputStream(in);
+ } catch (Exception ex) {
+ throw new MessagingException("No inputstream from datasource");
+ }
+ if (in instanceof SharedInputStream)
+ sin = (SharedInputStream)in;
+
+ String boundary = "--" + contentType.getParameter("boundary");
+ byte[] bndbytes = ASCIIUtility.getBytes(boundary);
+ int bl = bndbytes.length;
+
+ ByteOutputStream buf = null;
+ try {
+ // Skip the preamble
+ LineInputStream lin = new LineInputStream(in);
+ String line;
+ while ((line = lin.readLine()) != null) {
+ /*
+ * Strip trailing whitespace. Can't use trim method
+ * because it's too aggressive. Some bogus MIME
+ * messages will include control characters in the
+ * boundary string.
+ */
+ int i;
+ for (i = line.length() - 1; i >= 0; i--) {
+ char c = line.charAt(i);
+ if (!(c == ' ' || c == '\t'))
+ break;
+ }
+ line = line.substring(0, i + 1);
+ if (line.equals(boundary))
+ break;
+ }
+ if (line == null)
+ throw new MessagingException("Missing start boundary");
+
+ /*
+ * Read and process body parts until we see the
+ * terminating boundary line (or EOF).
+ */
+ boolean done = false;
+ getparts:
+ while (!done) {
+ InternetHeaders headers = null;
+ if (sin != null) {
+ start = sin.getPosition();
+ // skip headers
+ while ((line = lin.readLine()) != null && line.length() > 0)
+ ;
+ if (line == null) {
+ if (!ignoreMissingEndBoundary) {
+ throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
+ }
+ // assume there's just a missing end boundary
+ break getparts;
+ }
+ } else {
+ // collect the headers for this body part
+ headers = createInternetHeaders(in);
+ }
+
+ if (!in.markSupported())
+ throw new MessagingException("Stream doesn't support mark");
+
+ buf = null;
+ // if we don't have a shared input stream, we copy the data
+ if (sin == null)
+ buf = new ByteOutputStream();
+ int b;
+ boolean bol = true; // beginning of line flag
+ // the two possible end of line characters
+ int eol1 = -1, eol2 = -1;
+
+ /*
+ * Read and save the content bytes in buf.
+ */
+ for (;;) {
+ if (bol) {
+ /*
+ * At the beginning of a line, check whether the
+ * next line is a boundary.
+ */
+ int i;
+ in.mark(bl + 4 + 1000); // bnd + "--\r\n" + lots of LWSP
+ // read bytes, matching against the boundary
+ for (i = 0; i < bl; i++)
+ if (in.read() != bndbytes[i])
+ break;
+ if (i == bl) {
+ // matched the boundary, check for last boundary
+ int b2 = in.read();
+ if (b2 == '-') {
+ if (in.read() == '-') {
+ done = true;
+ foundClosingBoundary = true;
+ break; // ignore trailing text
+ }
+ }
+ // skip linear whitespace
+ while (b2 == ' ' || b2 == '\t')
+ b2 = in.read();
+ // check for end of line
+ if (b2 == '\n')
+ break; // got it! break out of the loop
+ if (b2 == '\r') {
+ in.mark(1);
+ if (in.read() != '\n')
+ in.reset();
+ break; // got it! break out of the loop
+ }
+ }
+ // failed to match, reset and proceed normally
+ in.reset();
+
+ // if this is not the first line, write out the
+ // end of line characters from the previous line
+ if (buf != null && eol1 != -1) {
+ buf.write(eol1);
+ if (eol2 != -1)
+ buf.write(eol2);
+ eol1 = eol2 = -1;
+ }
+ }
+
+ // read the next byte
+ if ((b = in.read()) < 0) {
+ done = true;
+ break;
+ }
+
+ /*
+ * If we're at the end of the line, save the eol characters
+ * to be written out before the beginning of the next line.
+ */
+ if (b == '\r' || b == '\n') {
+ bol = true;
+ if (sin != null)
+ end = sin.getPosition() - 1;
+ eol1 = b;
+ if (b == '\r') {
+ in.mark(1);
+ if ((b = in.read()) == '\n')
+ eol2 = b;
+ else
+ in.reset();
+ }
+ } else {
+ bol = false;
+ if (buf != null)
+ buf.write(b);
+ }
+ }
+
+ /*
+ * Create a MimeBody element to represent this body part.
+ */
+ MimeBodyPart part;
+ if (sin != null)
+ part = createMimeBodyPart(sin.newStream(start, end));
+ else
+ part = createMimeBodyPart(headers, buf.getBytes(), buf.getCount());
+ addBodyPart(part);
+ }
+ } catch (IOException ioex) {
+ throw new MessagingException("IO Error", ioex);
+ } finally {
+ if (buf != null)
+ buf.close();
+ }
+
+ if (!ignoreMissingEndBoundary && !foundClosingBoundary && sin== null) {
+ throw new MessagingException("Missing End Boundary for Mime Package : EOF while skipping headers");
+ }
+ parsed = true;
+ }
+
+ /**
+ * Create and return an InternetHeaders object that loads the
+ * headers from the given InputStream. Subclasses can override
+ * this method to return a subclass of InternetHeaders, if
+ * necessary. This implementation simply constructs and returns
+ * an InternetHeaders object.
+ *
+ * @param is the InputStream to read the headers from
+ * @exception MessagingException
+ * @since JavaMail 1.2
+ */
+ protected InternetHeaders createInternetHeaders(InputStream is)
+ throws MessagingException {
+ return new InternetHeaders(is);
+ }
+
+ /**
+ * Create and return a MimeBodyPart object to represent a
+ * body part parsed from the InputStream. Subclasses can override
+ * this method to return a subclass of MimeBodyPart, if
+ * necessary. This implementation simply constructs and returns
+ * a MimeBodyPart object.
+ *
+ * @param headers the headers for the body part
+ * @param content the content of the body part
+ * @since JavaMail 1.2
+ */
+ protected MimeBodyPart createMimeBodyPart(InternetHeaders headers, byte[] content, int len) {
+ return new MimeBodyPart(headers, content,len);
+ }
+
+ /**
+ * Create and return a MimeBodyPart object to represent a
+ * body part parsed from the InputStream. Subclasses can override
+ * this method to return a subclass of MimeBodyPart, if
+ * necessary. This implementation simply constructs and returns
+ * a MimeBodyPart object.
+ *
+ * @param is InputStream containing the body part
+ * @exception MessagingException
+ * @since JavaMail 1.2
+ */
+ protected MimeBodyPart createMimeBodyPart(InputStream is) throws MessagingException {
+ return new MimeBodyPart(is);
+ }
+
+ /**
+ * Setup this MimeMultipart object from the given MultipartDataSource. contentType
field.
+ *
+ * @return content-type
+ * @see #contentType
+ */
+ public ContentType getContentType() {
+ return contentType;
+ }
+
+ /**
+ * Remove the specified part from the multipart message.
+ * Shifts all the parts after the removed part down one.
+ *
+ * @param part The part to remove
+ * @return true if part removed, false otherwise
+ * @exception MessagingException if no such MimeBodyPart exists
+ */
+ public boolean removeBodyPart(MimeBodyPart part) throws MessagingException {
+ if (parts == null)
+ throw new MessagingException("No such body part");
+
+ boolean ret = parts.remove(part);
+ part.setParent(null);
+ return ret;
+ }
+
+ /**
+ * Remove the part at specified location (starting from 0).
+ * Shifts all the parts after the removed part down one.
+ *
+ * @param index Index of the part to remove
+ * @exception IndexOutOfBoundsException if the given index
+ * is out of range.
+ */
+ public void removeBodyPart(int index) {
+ if (parts == null)
+ throw new IndexOutOfBoundsException("No such BodyPart");
+
+ MimeBodyPart part = (MimeBodyPart)parts.get(index);
+ parts.remove(index);
+ part.setParent(null);
+ }
+
+ /**
+ * Adds a MimeBodyPart to the multipart. The MimeBodyPart is appended to
+ * the list of existing Parts.
+ *
+ * @param part The MimeBodyPart to be appended
+ */
+ public synchronized void addBodyPart(MimeBodyPart part) {
+ if (parts == null)
+ parts = new FinalArrayList();
+
+ parts.add(part);
+ part.setParent(this);
+ }
+
+ /**
+ * Adds a MimeBodyPart at position index
.
+ * If index
is not the last one in the list,
+ * the subsequent parts are shifted up. If index
+ * is larger than the number of parts present, the
+ * MimeBodyPart is appended to the end.
+ *
+ * @param part The MimeBodyPart to be inserted
+ * @param index Location where to insert the part
+ */
+ public synchronized void addBodyPart(MimeBodyPart part, int index) {
+ if (parts == null)
+ parts = new FinalArrayList();
+
+ parts.add(index,part);
+ part.setParent(this);
+ }
+
+ /**
+ * Return the MimeBodyPart
that contains this MimeMultipart
+ * object, or null
if not known.
+ * @since JavaMail 1.1
+ */
+ MimeBodyPart getParent() {
+ return parent;
+ }
+
+ /**
+ * Set the parent of this MimeMultipart
to be the specified
+ * MimeBodyPart
. Normally called by the Message
+ * or MimeBodyPart
setContent(MimeMultipart)
method.
+ * parent
may be null
if the
+ * MimeMultipart
is being removed from its containing
+ * MimeBodyPart
.
+ * @since JavaMail 1.1
+ */
+ void setParent(MimeBodyPart parent) {
+ this.parent = parent;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/MimePartDataSource.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)MimePartDataSource.java 1.9 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+import java.io.*;
+import java.net.UnknownServiceException;
+
+import javax.activation.DataSource;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
+
+/**
+ * A utility class that implements a DataSource out of
+ * a MimeBodyPart. This class is primarily meant for service providers.
+ *
+ * @author John Mani
+ */
+
+public final class MimePartDataSource implements DataSource {
+ private final MimeBodyPart part;
+
+ /**
+ * Constructor, that constructs a DataSource from a MimeBodyPart.
+ */
+ public MimePartDataSource(MimeBodyPart part) {
+ this.part = part;
+ }
+
+ /**
+ * Returns an input stream from this MimeBodyPart. getContentStream()
method and decodes
+ * it using the MimeUtility.decode()
method.
+ *
+ * @return decoded input stream
+ */
+ public InputStream getInputStream() throws IOException {
+
+ try {
+ InputStream is = part.getContentStream();
+
+ String encoding = part.getEncoding();
+ if (encoding != null)
+ return MimeUtility.decode(is, encoding);
+ else
+ return is;
+ } catch (MessagingException mex) {
+ throw new IOException(mex.getMessage());
+ }
+ }
+
+ /**
+ * DataSource method to return an output stream. getContentType
+ * method on the MimeBodyPart.
+ */
+ public String getContentType() {
+ return part.getContentType();
+ }
+
+ /**
+ * DataSource method to return a name.
+ *
+ * byte[] bytes = string.getBytes("iso-8859-1");
+ *
+ *
setHeader
and addHeader
methods
+ * on MimeMessage and MimeBodyPart assume that the given header values
+ * are Unicode strings that contain only US-ASCII characters. Hence
+ * the callers of those methods must insure that the values they pass
+ * do not contain non US-ASCII characters. The methods in this class
+ * help do this. getHeader
family of methods on MimeMessage and
+ * MimeBodyPart return the raw header value. These might be encoded
+ * as per RFC 2047, and if so, must be decoded into Unicode Strings.
+ * The methods in this class help to do this. mail.mime.decodetext.strict
property controls
+ * decoding of MIME encoded words. The MIME spec requires that encoded
+ * words start at the beginning of a whitespace separated word. Some
+ * mailers incorrectly include encoded words in the middle of a word.
+ * If the mail.mime.decodetext.strict
System property is
+ * set to "false"
, an attempt will be made to decode these
+ * illegal encoded words. The default is true. mail.mime.encodeeol.strict
property controls the
+ * choice of Content-Transfer-Encoding for MIME parts that are not of
+ * type "text". Often such parts will contain textual data for which
+ * an encoding that allows normal end of line conventions is appropriate.
+ * In rare cases, such a part will appear to contain entirely textual
+ * data, but will require an encoding that preserves CR and LF characters
+ * without change. If the mail.mime.decodetext.strict
+ * System property is set to "true"
, such an encoding will
+ * be used when necessary. The default is false. mail.mime.charset
System property can
+ * be used to specify the default MIME charset to use for encoded words
+ * and text parts that don't otherwise specify a charset. Normally, the
+ * default MIME charset is derived from the default Java charset, as
+ * specified in the file.encoding
System property. Most
+ * applications will have no need to explicitly set the default MIME
+ * charset. In cases where the default MIME charset to be used for
+ * mail messages is different than the charset used for files stored on
+ * the system, this property should be set.
+ *
+ * @version 1.45, 03/03/10
+ * @author John Mani
+ * @author Bill Shannon
+ */
+
+public class MimeUtility {
+
+ // This class cannot be instantiated
+ private MimeUtility() { }
+
+ public static final int ALL = -1;
+
+ private static final int BUFFER_SIZE = 1024;
+ private static boolean decodeStrict = true;
+ private static boolean encodeEolStrict = false;
+ private static boolean foldEncodedWords = false;
+ private static boolean foldText = true;
+
+ static {
+ try {
+ String s = SAAJUtil.getSystemProperty("mail.mime.decodetext.strict");
+ // default to true
+ decodeStrict = s == null || !s.equalsIgnoreCase("false");
+ s = SAAJUtil.getSystemProperty("mail.mime.encodeeol.strict");
+ // default to false
+ encodeEolStrict = s != null && s.equalsIgnoreCase("true");
+ s = SAAJUtil.getSystemProperty("mail.mime.foldencodedwords");
+ // default to false
+ foldEncodedWords = s != null && s.equalsIgnoreCase("true");
+ s = SAAJUtil.getSystemProperty("mail.mime.foldtext");
+ // default to true
+ foldText = s == null || !s.equalsIgnoreCase("false");
+ } catch (SecurityException sex) {
+ // ignore it
+ }
+ }
+
+
+ /**
+ * Get the content-transfer-encoding that should be applied
+ * to the input stream of this datasource, to make it mailsafe.
+ *
+ *
+ *
+ * @param ds DataSource
+ * @return the encoding. This is either "7bit",
+ * "quoted-printable" or "base64"
+ */
+ public static String getEncoding(DataSource ds) {
+ ContentType cType = null;
+ InputStream is = null;
+ String encoding = null;
+
+ try {
+ cType = new ContentType(ds.getContentType());
+ is = ds.getInputStream();
+ } catch (Exception ex) {
+ return "base64"; // what else ?!
+ }
+
+ boolean isText = cType.match("text/*");
+ // if not text, stop processing when we see non-ASCII
+ int i = checkAscii(is, ALL, !isText);
+ switch (i) {
+ case ALL_ASCII:
+ encoding = "7bit"; // all ascii
+ break;
+ case MOSTLY_ASCII:
+ encoding = "quoted-printable"; // mostly ascii
+ break;
+ default:
+ encoding = "base64"; // mostly binary
+ break;
+ }
+
+ // Close the input stream
+ try {
+ is.close();
+ } catch (IOException ioex) { }
+
+ return encoding;
+ }
+
+ /**
+ * Same as getEncoding(DataSource)
except that instead
+ * of reading the data from an InputStream
it uses the
+ * writeTo
method to examine the data. This is more
+ * efficient in the common case of a DataHandler
+ * created with an object and a MIME type (for example, a
+ * "text/plain" String) because all the I/O is done in this
+ * thread. In the case requiring an InputStream
the
+ * DataHandler
uses a thread, a pair of pipe streams,
+ * and the writeTo
method to produce the data. filename
parameter is used with the "uuencode"
+ * encoding and is included in the encoded output.
+ *
+ * @param os output stream
+ * @param encoding the encoding of the stream.
+ * @param filename name for the file being encoded (only used
+ * with uuencode)
+ * @return output stream that applies the
+ * specified encoding.
+ * @since JavaMail 1.2
+ */
+ public static OutputStream encode(OutputStream os, String encoding,
+ String filename)
+ throws MessagingException {
+ if (encoding == null)
+ return os;
+ else if (encoding.equalsIgnoreCase("base64"))
+ return new BASE64EncoderStream(os);
+ else if (encoding.equalsIgnoreCase("quoted-printable"))
+ return new QPEncoderStream(os);
+ else if (encoding.equalsIgnoreCase("uuencode") ||
+ encoding.equalsIgnoreCase("x-uuencode") ||
+ encoding.equalsIgnoreCase("x-uue"))
+ return new UUEncoderStream(os, filename);
+ else if (encoding.equalsIgnoreCase("binary") ||
+ encoding.equalsIgnoreCase("7bit") ||
+ encoding.equalsIgnoreCase("8bit"))
+ return os;
+ else
+ throw new MessagingException("Unknown encoding: " +encoding);
+ }
+
+ /**
+ * Encode a RFC 822 "text" token into mail-safe form as per
+ * RFC 2047.
+ *
+ * MimeBodyPart part = ...
+ * String rawvalue = "FooBar Mailer, Japanese version 1.1"
+ * try {
+ * // If we know for sure that rawvalue contains only US-ASCII
+ * // characters, we can skip the encoding part
+ * part.setHeader("X-mailer", MimeUtility.encodeText(rawvalue));
+ * } catch (UnsupportedEncodingException e) {
+ * // encoding failure
+ * } catch (MessagingException me) {
+ * // setHeader() failure
+ * }
+ *
+ *
+ *
+ * MimeBodyPart part = ...
+ * String rawvalue = null;
+ * String value = null;
+ * try {
+ * if ((rawvalue = part.getHeader("X-mailer")[0]) != null)
+ * value = MimeUtility.decodeText(rawvalue);
+ * } catch (UnsupportedEncodingException e) {
+ * // Don't care
+ * value = rawvalue;
+ * } catch (MessagingException me) { }
+ *
+ * return value;
+ *
+ *
HeaderTokenizer
class defines two special
+ * sets of delimiters - MIME and RFC 822. used
indicates how many characters have been used in
+ * the current line; it is usually the length of the header name. mail.mime.charset
+ * is set, a system charset corresponding to this MIME charset will be
+ * returned. max
bytes are checked. If max
is
+ * set to ALL
, then all the bytes available in this
+ * input stream are checked. If breakOnNonAscii
is true
+ * the check terminates when the first non-US-ASCII character is
+ * found and MOSTLY_NONASCII is returned. Else, the check continues
+ * till max
bytes or till the end of stream.
+ *
+ * @param is the input stream
+ * @param max maximum bytes to check for. The special value
+ * ALL indicates that all the bytes in this input
+ * stream must be checked.
+ * @param breakOnNonAscii if true
, then terminate the
+ * the check when the first non-US-ASCII character
+ * is found.
+ * @return ALL_ASCII if all characters in the string
+ * belong to the US-ASCII charset. MOSTLY_ASCII
+ * if more than half of the available characters
+ * are US-ASCII characters. Else MOSTLY_NONASCII.
+ */
+ static int checkAscii(InputStream is, int max, boolean breakOnNonAscii) {
+ int ascii = 0, non_ascii = 0;
+ int len;
+ int block = 4096;
+ int linelen = 0;
+ boolean longLine = false, badEOL = false;
+ boolean checkEOL = encodeEolStrict && breakOnNonAscii;
+ byte buf[] = null;
+ if (max != 0) {
+ block = (max == ALL) ? 4096 : Math.min(max, 4096);
+ buf = new byte[block];
+ }
+ while (max != 0) {
+ try {
+ if ((len = is.read(buf, 0, block)) == -1)
+ break;
+ int lastb = 0;
+ for (int i = 0; i < len; i++) {
+ // The '&' operator automatically causes b[i] to
+ // be promoted to an int, and we mask out the higher
+ // bytes in the int so that the resulting value is
+ // not a negative integer.
+ int b = buf[i] & 0xff;
+ if (checkEOL &&
+ ((lastb == '\r' && b != '\n') ||
+ (lastb != '\r' && b == '\n')))
+ badEOL = true;
+ if (b == '\r' || b == '\n')
+ linelen = 0;
+ else {
+ linelen++;
+ if (linelen > 998) // 1000 - CRLF
+ longLine = true;
+ }
+ if (nonascii(b)) { // non-ascii
+ if (breakOnNonAscii) // we are done
+ return MOSTLY_NONASCII;
+ else
+ non_ascii++;
+ } else
+ ascii++;
+ lastb = b;
+ }
+ } catch (IOException ioex) {
+ break;
+ }
+ if (max != ALL)
+ max -= len;
+ }
+
+ if (max == 0 && breakOnNonAscii)
+ // We have been told to break on the first non-ascii character.
+ // We haven't got any non-ascii character yet, but then we
+ // have not checked all of the available bytes either. So we
+ // cannot say for sure that this input stream is ALL_ASCII,
+ // and hence we must play safe and return MOSTLY_NONASCII
+
+ return MOSTLY_NONASCII;
+
+ if (non_ascii == 0) { // no non-us-ascii characters so far
+ // If we're looking at non-text data, and we saw CR without LF
+ // or vice versa, consider this mostly non-ASCII so that it
+ // will be base64 encoded (since the quoted-printable encoder
+ // doesn't encode this case properly).
+ if (badEOL)
+ return MOSTLY_NONASCII;
+ // if we've seen a long line, we degrade to mostly ascii
+ else if (longLine)
+ return MOSTLY_ASCII;
+ else
+ return ALL_ASCII;
+ }
+ if (ascii > non_ascii) // mostly ascii
+ return MOSTLY_ASCII;
+ return MOSTLY_NONASCII;
+ }
+
+ static final boolean nonascii(int b) {
+ return b >= 0177 || (b < 040 && b != '\r' && b != '\n' && b != '\t');
+ }
+}
+
+/**
+ * An OutputStream that determines whether the data written to
+ * it is all ASCII, mostly ASCII, or mostly non-ASCII.
+ */
+class AsciiOutputStream extends OutputStream {
+ private boolean breakOnNonAscii;
+ private int ascii = 0, non_ascii = 0;
+ private int linelen = 0;
+ private boolean longLine = false;
+ private boolean badEOL = false;
+ private boolean checkEOL = false;
+ private int lastb = 0;
+ private int ret = 0;
+
+ public AsciiOutputStream(boolean breakOnNonAscii, boolean encodeEolStrict) {
+ this.breakOnNonAscii = breakOnNonAscii;
+ checkEOL = encodeEolStrict && breakOnNonAscii;
+ }
+
+ public void write(int b) throws IOException {
+ check(b);
+ }
+
+ public void write(byte b[]) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ public void write(byte b[], int off, int len) throws IOException {
+ len += off;
+ for (int i = off; i < len ; i++)
+ check(b[i]);
+ }
+
+ private final void check(int b) throws IOException {
+ b &= 0xff;
+ if (checkEOL &&
+ ((lastb == '\r' && b != '\n') || (lastb != '\r' && b == '\n')))
+ badEOL = true;
+ if (b == '\r' || b == '\n')
+ linelen = 0;
+ else {
+ linelen++;
+ if (linelen > 998) // 1000 - CRLF
+ longLine = true;
+ }
+ if (MimeUtility.nonascii(b)) { // non-ascii
+ non_ascii++;
+ if (breakOnNonAscii) { // we are done
+ ret = MimeUtility.MOSTLY_NONASCII;
+ throw new EOFException();
+ }
+ } else
+ ascii++;
+ lastb = b;
+ }
+
+ /**
+ * Return ASCII-ness of data stream.
+ */
+ public int getAscii() {
+ if (ret != 0)
+ return ret;
+ // If we're looking at non-text data, and we saw CR without LF
+ // or vice versa, consider this mostly non-ASCII so that it
+ // will be base64 encoded (since the quoted-printable encoder
+ // doesn't encode this case properly).
+ if (badEOL)
+ return MimeUtility.MOSTLY_NONASCII;
+ else if (non_ascii == 0) { // no non-us-ascii characters so far
+ // if we've seen a long line, we degrade to mostly ascii
+ if (longLine)
+ return MimeUtility.MOSTLY_ASCII;
+ else
+ return MimeUtility.ALL_ASCII;
+ }
+ if (ascii > non_ascii) // mostly ascii
+ return MimeUtility.MOSTLY_ASCII;
+ return MimeUtility.MOSTLY_NONASCII;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/ParameterList.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)ParameterList.java 1.10 03/02/12
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * This class holds MIME parameters (attribute-value pairs).
+ *
+ * @version 1.10, 03/02/12
+ * @author John Mani
+ */
+
+public final class ParameterList {
+
+ private final HashMap list;
+
+ /**
+ * No-arg Constructor.
+ */
+ public ParameterList() {
+ this.list = new HashMap();
+ }
+
+ private ParameterList(HashMap m) {
+ this.list = m;
+ }
+
+ /**
+ * Constructor that takes a parameter-list string. The String
+ * is parsed and the parameters are collected and stored internally.
+ * A ParseException is thrown if the parse fails.
+ * Note that an empty parameter-list string is valid and will be
+ * parsed into an empty ParameterList.
+ *
+ * @param s the parameter-list string.
+ * @exception ParseException if the parse fails.
+ */
+ public ParameterList(String s) throws ParseException {
+ HeaderTokenizer h = new HeaderTokenizer(s, HeaderTokenizer.MIME);
+ HeaderTokenizer.Token tk;
+ int type;
+ String name;
+
+ list = new HashMap();
+ while (true) {
+ tk = h.next();
+ type = tk.getType();
+
+ if (type == HeaderTokenizer.Token.EOF) // done
+ return;
+
+ if ((char)type == ';') {
+ // expect parameter name
+ tk = h.next();
+ // tolerate trailing semicolon, even though it violates the spec
+ if (tk.getType() == HeaderTokenizer.Token.EOF)
+ return;
+ // parameter name must be a MIME Atom
+ if (tk.getType() != HeaderTokenizer.Token.ATOM)
+ throw new ParseException();
+ name = tk.getValue().toLowerCase();
+
+ // expect '='
+ tk = h.next();
+ if ((char)tk.getType() != '=')
+ throw new ParseException();
+
+ // expect parameter value
+ tk = h.next();
+ type = tk.getType();
+ // parameter value must be a MIME Atom or Quoted String
+ if (type != HeaderTokenizer.Token.ATOM &&
+ type != HeaderTokenizer.Token.QUOTEDSTRING)
+ throw new ParseException();
+
+ list.put(name, tk.getValue());
+ } else
+ throw new ParseException();
+ }
+ }
+
+ /**
+ * Return the number of parameters in this list.
+ *
+ * @return number of parameters.
+ */
+ public int size() {
+ return list.size();
+ }
+
+ /**
+ * Returns the value of the specified parameter. Note that
+ * parameter names are case-insensitive.
+ *
+ * @param name parameter name.
+ * @return Value of the parameter. Returns
+ * null
if the parameter is not
+ * present.
+ */
+ public String get(String name) {
+ return (String)list.get(name.trim().toLowerCase());
+ }
+
+ /**
+ * Set a parameter. If this parameter already exists, it is
+ * replaced by this new value.
+ *
+ * @param name name of the parameter.
+ * @param value value of the parameter.
+ */
+ public void set(String name, String value) {
+ list.put(name.trim().toLowerCase(), value);
+ }
+
+ /**
+ * Removes the specified parameter from this ParameterList.
+ * This method does nothing if the parameter is not present.
+ *
+ * @param name name of the parameter.
+ */
+ public void remove(String name) {
+ list.remove(name.trim().toLowerCase());
+ }
+
+ /**
+ * Return an enumeration of the names of all parameters in this
+ * list.
+ *
+ * @return Enumeration of all parameter names in this list.
+ */
+ public Iterator getNames() {
+ return list.keySet().iterator();
+ }
+
+
+ /**
+ * Convert this ParameterList into a MIME String. If this is
+ * an empty list, an empty string is returned.
+ *
+ * @return String
+ */
+ public String toString() {
+ return toString(0);
+ }
+
+ /**
+ * Convert this ParameterList into a MIME String. If this is
+ * an empty list, an empty string is returned.
+ *
+ * The 'used' parameter specifies the number of character positions
+ * already taken up in the field into which the resulting parameter
+ * list is to be inserted. It's used to determine where to fold the
+ * resulting parameter list.
+ *
+ * @param used number of character positions already used, in
+ * the field into which the parameter list is to
+ * be inserted.
+ * @return String
+ */
+ public String toString(int used) {
+ StringBuffer sb = new StringBuffer();
+ Iterator itr = list.entrySet().iterator();
+
+ while (itr.hasNext()) {
+ Map.Entry e = (Map.Entry)itr.next();
+ String name = (String)e.getKey();
+ String value = quote((String)e.getValue());
+ sb.append("; ");
+ used += 2;
+ int len = name.length() + value.length() + 1;
+ if (used + len > 76) { // overflows ...
+ sb.append("\r\n\t"); // .. start new continuation line
+ used = 8; // account for the starting start
(inclusive)
+ * up to end
(exclusive). start
must be
+ * non-negative. If end
is -1, the new stream ends
+ * at the same place as this stream. The returned InputStream
+ * will also implement the SharedInputStream interface.
+ *
+ * @param start the starting position
+ * @param end the ending position + 1
+ * @return the new stream
+ */
+ public InputStream newStream(long start, long end);
+
+ /**
+ * Writes the specified region to another {@link OutputStream}.
+ */
+ public void writeTo(long start,long end, OutputStream out);
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/internet/UniqueValue.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)UniqueValue.java 1.6 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.internet;
+
+
+/**
+ * This is a utility class that generates unique values. The generated
+ * String contains only US-ASCII characters and hence is safe for use
+ * in RFC822 headers. hashCode()
,
+ * and the current time (in milliseconds).
+ */
+ public static String getUniqueBoundaryValue() {
+ StringBuffer s = new StringBuffer();
+
+ // Unique string is ----=_Part_start
till, but not including end
. start
+ * till, but not including end
. int
in the range 0
+ * to 255
. If no byte is available because the end of
+ * the stream has been reached, the value -1
is returned.
+ * This method blocks until input data is available, the end of the
+ * stream is detected, or an exception is thrown.
+ *
+ * @return next byte of data, or -1
if the end of the
+ * stream is reached.
+ * @exception IOException if an I/O error occurs.
+ * @see java.io.FilterInputStream#in
+ */
+ public int read() throws IOException {
+ if (index >= bufsize) {
+ decode(); // Fills up buffer
+ if (bufsize == 0) // buffer is empty
+ return -1;
+ index = 0; // reset index into buffer
+ }
+ return buffer[index++] & 0xff; // Zero off the MSB
+ }
+
+ /**
+ * Reads up to len
decoded bytes of data from this input stream
+ * into an array of bytes. This method blocks until some input is
+ * available.
+ * -1
if there is no more data because the end of
+ * the stream has been reached.
+ * @exception IOException if an I/O error occurs.
+ */
+ public int read(byte[] buf, int off, int len) throws IOException {
+ int i, c;
+ for (i = 0; i < len; i++) {
+ if ((c = read()) == -1) {
+ if (i == 0) // At end of stream, so we should
+ i = -1; // return -1 , NOT 0.
+ break;
+ }
+ buf[off+i] = (byte)c;
+ }
+
+ return i;
+ }
+
+ /**
+ * Tests if this input stream supports marks. Currently this class
+ * does not support marks
+ */
+ public boolean markSupported() {
+ return false; // Maybe later ..
+ }
+
+ /**
+ * Returns the number of bytes that can be read from this input
+ * stream without blocking. However, this figure is only
+ * a close approximation in case the original encoded stream
+ * contains embedded CRLFs; since the CRLFs are discarded, not decoded
+ */
+ public int available() throws IOException {
+ // This is only an estimate, since in.available()
+ // might include CRLFs too ..
+ return ((in.available() * 3)/4 + (bufsize-index));
+ }
+
+ /**
+ * This character array provides the character to value map
+ * based on RFC1521.
+ */
+ private final static char pem_array[] = {
+ 'A','B','C','D','E','F','G','H', // 0
+ 'I','J','K','L','M','N','O','P', // 1
+ 'Q','R','S','T','U','V','W','X', // 2
+ 'Y','Z','a','b','c','d','e','f', // 3
+ 'g','h','i','j','k','l','m','n', // 4
+ 'o','p','q','r','s','t','u','v', // 5
+ 'w','x','y','z','0','1','2','3', // 6
+ '4','5','6','7','8','9','+','/' // 7
+ };
+
+ private final static byte pem_convert_array[] = new byte[256];
+
+ static {
+ for (int i = 0; i < 255; i++)
+ pem_convert_array[i] = -1;
+ for(int i = 0; i < pem_array.length; i++)
+ pem_convert_array[pem_array[i]] = (byte) i;
+ }
+
+ /* The decoder algorithm */
+ private byte[] decode_buffer = new byte[4];
+ private void decode() throws IOException {
+ bufsize = 0;
+ /*
+ * We need 4 valid base64 characters before we start decoding.
+ * We skip anything that's not a valid base64 character (usually
+ * just CRLF).
+ */
+ int got = 0;
+ while (got < 4) {
+ int i = in.read();
+ if (i == -1) {
+ if (got == 0)
+ return; // EOF before any data is ok
+ throw new IOException("Error in encoded stream, got " + got);
+ }
+ if (i >= 0 && i < 256 && i == '=' || pem_convert_array[i] != -1)
+ decode_buffer[got++] = (byte)i;
+ }
+
+ byte a, b;
+ a = pem_convert_array[decode_buffer[0] & 0xff];
+ b = pem_convert_array[decode_buffer[1] & 0xff];
+ // The first decoded byte
+ buffer[bufsize++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
+
+ if (decode_buffer[2] == '=') // End of this BASE64 encoding
+ return;
+ a = b;
+ b = pem_convert_array[decode_buffer[2] & 0xff];
+ // The second decoded byte
+ buffer[bufsize++] = (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
+
+ if (decode_buffer[3] == '=') // End of this BASE64 encoding
+ return;
+ a = b;
+ b = pem_convert_array[decode_buffer[3] & 0xff];
+ // The third decoded byte
+ buffer[bufsize++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
+ }
+
+ /**
+ * Base64 decode a byte array. No line breaks are allowed.
+ * This method is suitable for short strings, such as those
+ * in the IMAP AUTHENTICATE protocol, but not to decode the
+ * entire content of a MIME part.
+ *
+ * NOTE: inbuf may only contain valid base64 characters.
+ * Whitespace is not ignored.
+ */
+ public static byte[] decode(byte[] inbuf) {
+ int size = (inbuf.length / 4) * 3;
+ if (size == 0)
+ return inbuf;
+
+ if (inbuf[inbuf.length - 1] == '=') {
+ size--;
+ if (inbuf[inbuf.length - 2] == '=')
+ size--;
+ }
+ byte[] outbuf = new byte[size];
+
+ int inpos = 0, outpos = 0;
+ size = inbuf.length;
+ while (size > 0) {
+ byte a, b;
+ a = pem_convert_array[inbuf[inpos++] & 0xff];
+ b = pem_convert_array[inbuf[inpos++] & 0xff];
+ // The first decoded byte
+ outbuf[outpos++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3));
+
+ if (inbuf[inpos] == '=') // End of this BASE64 encoding
+ return outbuf;
+ a = b;
+ b = pem_convert_array[inbuf[inpos++] & 0xff];
+ // The second decoded byte
+ outbuf[outpos++] = (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf));
+
+ if (inbuf[inpos] == '=') // End of this BASE64 encoding
+ return outbuf;
+ a = b;
+ b = pem_convert_array[inbuf[inpos++] & 0xff];
+ // The third decoded byte
+ outbuf[outpos++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f));
+ size -= 4;
+ }
+ return outbuf;
+ }
+
+ /*** begin TEST program ***
+ public static void main(String argv[]) throws Exception {
+ FileInputStream infile = new FileInputStream(argv[0]);
+ BASE64DecoderStream decoder = new BASE64DecoderStream(infile);
+ int c;
+
+ while ((c = decoder.read()) != -1)
+ System.out.print((char)c);
+ System.out.flush();
+ }
+ *** end TEST program ***/
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BASE64EncoderStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)BASE64EncoderStream.java 1.6 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.*;
+
+/**
+ * This class implements a BASE64 Encoder. It is implemented as
+ * a FilterOutputStream, so one can just wrap this class around
+ * any output stream and write bytes into this filter. The Encoding
+ * is done as the bytes are written out.
+ *
+ * @author John Mani
+ * @author Bill Shannon
+ */
+
+public class BASE64EncoderStream extends FilterOutputStream {
+ private byte[] buffer; // cache of bytes that are yet to be encoded
+ private int bufsize = 0; // size of the cache
+ private int count = 0; // number of bytes that have been output
+ private int bytesPerLine; // number of bytes per line
+
+ /**
+ * Create a BASE64 encoder that encodes the specified input stream
+ * @param out the output stream
+ * @param bytesPerLine number of bytes per line. The encoder inserts
+ * a CRLF sequence after the specified number of bytes
+ */
+ public BASE64EncoderStream(OutputStream out, int bytesPerLine) {
+ super(out);
+ buffer = new byte[3];
+ this.bytesPerLine = bytesPerLine;
+ }
+
+ /**
+ * Create a BASE64 encoder that encodes the specified input stream.
+ * Inserts the CRLF sequence after outputting 76 bytes.
+ * @param out the output stream
+ */
+ public BASE64EncoderStream(OutputStream out) {
+ this(out, 76);
+ }
+
+ /**
+ * Encodes len
bytes from the specified
+ * byte
array starting at offset off
to
+ * this output stream.
+ *
+ * @param b the data.
+ * @param off the start offset in the data.
+ * @param len the number of bytes to write.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(byte[] b, int off, int len) throws IOException {
+ for (int i = 0; i < len; i++)
+ write(b[off + i]);
+ }
+
+ /**
+ * Encodes b.length
bytes to this output stream.
+ * @param b the data to be written.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(byte[] b) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ /**
+ * Encodes the specified byte
to this output stream.
+ * @param c the byte
.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(int c) throws IOException {
+ buffer[bufsize++] = (byte)c;
+ if (bufsize == 3) { // Encoding unit = 3 bytes
+ encode();
+ bufsize = 0;
+ }
+ }
+
+ /**
+ * Flushes this output stream and forces any buffered output bytes
+ * to be encoded out to the stream.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void flush() throws IOException {
+ if (bufsize > 0) { // If there's unencoded characters in the buffer ..
+ encode(); // .. encode them
+ bufsize = 0;
+ }
+ out.flush();
+ }
+
+ /**
+ * Forces any buffered output bytes to be encoded out to the stream
+ * and closes this output stream
+ */
+ public void close() throws IOException {
+ flush();
+ out.close();
+ }
+
+ /** This array maps the characters to their 6 bit values */
+ private final static char pem_array[] = {
+ 'A','B','C','D','E','F','G','H', // 0
+ 'I','J','K','L','M','N','O','P', // 1
+ 'Q','R','S','T','U','V','W','X', // 2
+ 'Y','Z','a','b','c','d','e','f', // 3
+ 'g','h','i','j','k','l','m','n', // 4
+ 'o','p','q','r','s','t','u','v', // 5
+ 'w','x','y','z','0','1','2','3', // 6
+ '4','5','6','7','8','9','+','/' // 7
+ };
+
+ private void encode() throws IOException {
+ // If writing out this encoded unit will cause overflow,
+ // start a new line.
+ if (count + 4 > bytesPerLine) {
+ out.write('\r');
+ out.write('\n');
+ count = 0;
+ }
+
+ byte a, b, c;
+ if (bufsize == 1) {
+ a = buffer[0];
+ b = 0;
+ c = 0;
+ out.write(pem_array[(a >>> 2) & 0x3F]);
+ out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+ out.write('='); // pad character
+ out.write('='); // pad character
+ } else if (bufsize == 2) {
+ a = buffer[0];
+ b = buffer[1];
+ c = 0;
+ out.write(pem_array[(a >>> 2) & 0x3F]);
+ out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+ out.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
+ out.write('='); // pad character
+ } else {
+ a = buffer[0];
+ b = buffer[1];
+ c = buffer[2];
+ out.write(pem_array[(a >>> 2) & 0x3F]);
+ out.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]);
+ out.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]);
+ out.write(pem_array[c & 0x3F]);
+ }
+
+ // increment count
+ count += 4;
+ }
+
+ /**
+ * Base64 encode a byte array. No line breaks are inserted.
+ * This method is suitable for short strings, such as those
+ * in the IMAP AUTHENTICATE protocol, but not to encode the
+ * entire content of a MIME part.
+ */
+ public static byte[] encode(byte[] inbuf) {
+ if (inbuf.length == 0)
+ return inbuf;
+ byte[] outbuf = new byte[((inbuf.length + 2) / 3) * 4];
+ int inpos = 0, outpos = 0;
+ int size = inbuf.length;
+ while (size > 0) {
+ byte a, b, c;
+ if (size == 1) {
+ a = inbuf[inpos++];
+ b = 0;
+ c = 0;
+ outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
+ outbuf[outpos++] =
+ (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
+ outbuf[outpos++] = (byte)'='; // pad character
+ outbuf[outpos++] = (byte)'='; // pad character
+ } else if (size == 2) {
+ a = inbuf[inpos++];
+ b = inbuf[inpos++];
+ c = 0;
+ outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
+ outbuf[outpos++] =
+ (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
+ outbuf[outpos++] =
+ (byte)pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
+ outbuf[outpos++] = (byte)'='; // pad character
+ } else {
+ a = inbuf[inpos++];
+ b = inbuf[inpos++];
+ c = inbuf[inpos++];
+ outbuf[outpos++] = (byte)pem_array[(a >>> 2) & 0x3F];
+ outbuf[outpos++] =
+ (byte)pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)];
+ outbuf[outpos++] =
+ (byte)pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)];
+ outbuf[outpos++] = (byte)pem_array[c & 0x3F];
+ }
+ size -= 3;
+ }
+ return outbuf;
+ }
+
+ /*** begin TEST program
+ public static void main(String argv[]) throws Exception {
+ FileInputStream infile = new FileInputStream(argv[0]);
+ BASE64EncoderStream encoder = new BASE64EncoderStream(System.out);
+ int c;
+
+ while ((c = infile.read()) != -1)
+ encoder.write(c);
+ encoder.close();
+ }
+ *** end TEST program **/
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/BEncoderStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)BEncoderStream.java 1.3 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.OutputStream;
+
+/**
+ * This class implements a 'B' Encoder as defined by RFC2047 for
+ * encoding MIME headers. It subclasses the BASE64EncoderStream
+ * class.
+ *
+ * @author John Mani
+ */
+
+public class BEncoderStream extends BASE64EncoderStream {
+
+ /**
+ * Create a 'B' encoder that encodes the specified input stream.
+ * @param out the output stream
+ */
+ public BEncoderStream(OutputStream out) {
+ super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should
+ // suffice (!) to indicate that
+ // CRLFs should not be inserted
+ }
+
+ /**
+ * Returns the length of the encoded version of this byte array.
+ */
+ public static int encodedLength(byte[] b) {
+ return ((b.length + 2)/3) * 4;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/LineInputStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)LineInputStream.java 1.7 03/01/07
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.*;
+
+/**
+ * This class is to support reading CRLF terminated lines that
+ * contain only US-ASCII characters from an input stream. Provides
+ * functionality that is similar to the deprecated
+ * DataInputStream.readLine()
. Expected use is to read
+ * lines as String objects from a RFC822 stream.
+ *
+ * It is implemented as a FilterInputStream, so one can just wrap
+ * this class around any input stream and read bytes from this filter.
+ *
+ * @author John Mani
+ */
+
+public final class LineInputStream extends FilterInputStream {
+
+ private char[] lineBuffer = null; // reusable byte buffer
+
+ public LineInputStream(InputStream in) {
+ super(in);
+ }
+
+ /**
+ * Read a line containing only ASCII characters from the input
+ * stream. A line is terminated by a CR or NL or CR-NL sequence.
+ * A common error is a CR-CR-NL sequence, which will also terminate
+ * a line.
+ * The line terminator is not returned as part of the returned
+ * String. Returns null if no data is available. DataInputStream.readLine()
+ */
+ public String readLine() throws IOException {
+ InputStream in = this.in;
+ char[] buf = lineBuffer;
+
+ if (buf == null)
+ buf = lineBuffer = new char[128];
+
+ int c1;
+ int room = buf.length;
+ int offset = 0;
+
+ while ((c1 = in.read()) != -1) {
+ if (c1 == '\n') // Got NL, outa here.
+ break;
+ else if (c1 == '\r') {
+ // Got CR, is the next char NL ?
+ int c2 = in.read();
+ if (c2 == '\r') // discard extraneous CR
+ c2 = in.read();
+ if (c2 != '\n') {
+ // If not NL, push it back
+ if (!(in instanceof PushbackInputStream))
+ in = this.in = new PushbackInputStream(in);
+ ((PushbackInputStream)in).unread(c2);
+ }
+ break; // outa here.
+ }
+
+ // Not CR, NL or CR-NL ...
+ // .. Insert the byte into our byte buffer
+ if (--room < 0) { // No room, need to grow.
+ buf = new char[offset + 128];
+ room = buf.length - offset - 1;
+ System.arraycopy(lineBuffer, 0, buf, 0, offset);
+ lineBuffer = buf;
+ }
+ buf[offset++] = (char)c1;
+ }
+
+ if ((c1 == -1) && (offset == 0))
+ return null;
+
+ return String.copyValueOf(buf, 0, offset);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/OutputUtil.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)OutputUtil.java 1.6 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import com.sun.xml.internal.messaging.saaj.util.ByteOutputStream;
+
+import java.io.OutputStream;
+import java.io.IOException;
+
+/**
+ * This class is to support writing out Strings as a sequence of bytes
+ * terminated by a CRLF sequence. The String must contain only US-ASCII
+ * characters.0
+ * to 255
. If no byte is available because the end of
+ * the stream has been reached, the value -1
is returned.
+ * This method blocks until input data is available, the end of the
+ * stream is detected, or an exception is thrown.
+ *
+ * @return the next byte of data, or -1
if the end of the
+ * stream is reached.
+ * @exception IOException if an I/O error occurs.
+ */
+ public int read() throws IOException {
+ int c = in.read();
+
+ if (c == '_') // Return '_' as ' '
+ return ' ';
+ else if (c == '=') {
+ // QP Encoded atom. Get the next two bytes ..
+ ba[0] = (byte)in.read();
+ ba[1] = (byte)in.read();
+ // .. and decode them
+ try {
+ return ASCIIUtility.parseInt(ba, 0, 2, 16);
+ } catch (NumberFormatException nex) {
+ throw new IOException("Error in QP stream " + nex.getMessage());
+ }
+ } else
+ return c;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QEncoderStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)QEncoderStream.java 1.4 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * This class implements a Q Encoder as defined by RFC 2047 for
+ * encoding MIME headers. It subclasses the QPEncoderStream class.
+ *
+ * @author John Mani
+ */
+
+public class QEncoderStream extends QPEncoderStream {
+
+ private String specials;
+ private static String WORD_SPECIALS = "=_?\"#$%&'(),.:;<>@[\\]^`{|}~";
+ private static String TEXT_SPECIALS = "=_?";
+
+ /**
+ * Create a Q encoder that encodes the specified input stream
+ * @param out the output stream
+ * @param encodingWord true if we are Q-encoding a word within a
+ * phrase.
+ */
+ public QEncoderStream(OutputStream out, boolean encodingWord) {
+ super(out, Integer.MAX_VALUE); // MAX_VALUE is 2^31, should
+ // suffice (!) to indicate that
+ // CRLFs should not be inserted
+ // when encoding rfc822 headers
+
+ // a RFC822 "word" token has more restrictions than a
+ // RFC822 "text" token.
+ specials = encodingWord ? WORD_SPECIALS : TEXT_SPECIALS;
+ }
+
+ /**
+ * Encodes the specified byte
to this output stream.
+ * @param c the byte
.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(int c) throws IOException {
+ c = c & 0xff; // Turn off the MSB.
+ if (c == ' ')
+ output('_', false);
+ else if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
+ // Encoding required.
+ output(c, true);
+ else // No encoding required
+ output(c, false);
+ }
+
+ /**
+ * Returns the length of the encoded version of this byte array.
+ */
+ public static int encodedLength(byte[] b, boolean encodingWord) {
+ int len = 0;
+ String specials = encodingWord ? WORD_SPECIALS: TEXT_SPECIALS;
+ for (int i = 0; i < b.length; i++) {
+ int c = b[i] & 0xff; // Mask off MSB
+ if (c < 040 || c >= 0177 || specials.indexOf(c) >= 0)
+ // needs encoding
+ len += 3; // Q-encoding is 1 -> 3 conversion
+ else
+ len++;
+ }
+ return len;
+ }
+
+ /**** begin TEST program ***
+ public static void main(String argv[]) throws Exception {
+ FileInputStream infile = new FileInputStream(argv[0]);
+ QEncoderStream encoder = new QEncoderStream(System.out);
+ int c;
+
+ while ((c = infile.read()) != -1)
+ encoder.write(c);
+ encoder.close();
+ }
+ *** end TEST program ***/
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPDecoderStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)QPDecoderStream.java 1.9 02/04/02
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.*;
+
+/**
+ * This class implements a QP Decoder. It is implemented as
+ * a FilterInputStream, so one can just wrap this class around
+ * any input stream and read bytes from this filter. The decoding
+ * is done as the bytes are read out.
+ *
+ * @author John Mani
+ */
+
+public class QPDecoderStream extends FilterInputStream {
+ protected byte[] ba = new byte[2];
+ protected int spaces = 0;
+
+ /**
+ * Create a Quoted Printable decoder that decodes the specified
+ * input stream.
+ * @param in the input stream
+ */
+ public QPDecoderStream(InputStream in) {
+ super(new PushbackInputStream(in, 2)); // pushback of size=2
+ }
+
+ /**
+ * Read the next decoded byte from this input stream. The byte
+ * is returned as an int
in the range 0
+ * to 255
. If no byte is available because the end of
+ * the stream has been reached, the value -1
is returned.
+ * This method blocks until input data is available, the end of the
+ * stream is detected, or an exception is thrown.
+ *
+ * @return the next byte of data, or -1
if the end of the
+ * stream is reached.
+ * @exception IOException if an I/O error occurs.
+ */
+ public int read() throws IOException {
+ if (spaces > 0) {
+ // We have cached space characters, return one
+ spaces--;
+ return ' ';
+ }
+
+ int c = in.read();
+
+ if (c == ' ') {
+ // Got space, keep reading till we get a non-space char
+ while ((c = in.read()) == ' ')
+ spaces++;
+
+ if (c == '\r' || c == '\n' || c == -1)
+ // If the non-space char is CR/LF/EOF, the spaces we got
+ // so far is junk introduced during transport. Junk 'em.
+ spaces = 0;
+ else {
+ // The non-space char is NOT CR/LF, the spaces are valid.
+ ((PushbackInputStream)in).unread(c);
+ c = ' ';
+ }
+ return c; // return either len
decoded bytes of data from this input stream
+ * into an array of bytes. This method blocks until some input is
+ * available.
+ * -1
if there is no more data because the end of
+ * the stream has been reached.
+ * @exception IOException if an I/O error occurs.
+ */
+ public int read(byte[] buf, int off, int len) throws IOException {
+ int i, c;
+ for (i = 0; i < len; i++) {
+ if ((c = read()) == -1) {
+ if (i == 0) // At end of stream, so we should
+ i = -1; // return -1 , NOT 0.
+ break;
+ }
+ buf[off+i] = (byte)c;
+ }
+ return i;
+ }
+
+ /**
+ * Tests if this input stream supports marks. Currently this class
+ * does not support marks
+ */
+ public boolean markSupported() {
+ return false;
+ }
+
+ /**
+ * Returns the number of bytes that can be read from this input
+ * stream without blocking. The QP algorithm does not permit
+ * a priori knowledge of the number of bytes after decoding, so
+ * this method just invokes the available
method
+ * of the original input stream.
+ */
+ public int available() throws IOException {
+ // This is bogus ! We don't really know how much
+ // bytes are available *after* decoding
+ return in.available();
+ }
+
+ /**** begin TEST program
+ public static void main(String argv[]) throws Exception {
+ FileInputStream infile = new FileInputStream(argv[0]);
+ QPDecoderStream decoder = new QPDecoderStream(infile);
+ int c;
+
+ while ((c = decoder.read()) != -1)
+ System.out.print((char)c);
+ System.out.println();
+ }
+ *** end TEST program ****/
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/QPEncoderStream.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,199 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @(#)QPEncoderStream.java 1.6 02/03/27
+ */
+
+
+
+package com.sun.xml.internal.messaging.saaj.packaging.mime.util;
+
+import java.io.*;
+
+/**
+ * This class implements a Quoted Printable Encoder. It is implemented as
+ * a FilterOutputStream, so one can just wrap this class around
+ * any output stream and write bytes into this filter. The Encoding
+ * is done as the bytes are written out.
+ *
+ * @author John Mani
+ */
+
+public class QPEncoderStream extends FilterOutputStream {
+ private int count = 0; // number of bytes that have been output
+ private int bytesPerLine; // number of bytes per line
+ private boolean gotSpace = false;
+ private boolean gotCR = false;
+
+ /**
+ * Create a QP encoder that encodes the specified input stream
+ * @param out the output stream
+ * @param bytesPerLine the number of bytes per line. The encoder
+ * inserts a CRLF sequence after this many number
+ * of bytes.
+ */
+ public QPEncoderStream(OutputStream out, int bytesPerLine) {
+ super(out);
+ // Subtract 1 to account for the '=' in the soft-return
+ // at the end of a line
+ this.bytesPerLine = bytesPerLine - 1;
+ }
+
+ /**
+ * Create a QP encoder that encodes the specified input stream.
+ * Inserts the CRLF sequence after outputting 76 bytes.
+ * @param out the output stream
+ */
+ public QPEncoderStream(OutputStream out) {
+ this(out, 76);
+ }
+
+ /**
+ * Encodes len
bytes from the specified
+ * byte
array starting at offset off
to
+ * this output stream.
+ *
+ * @param b the data.
+ * @param off the start offset in the data.
+ * @param len the number of bytes to write.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(byte[] b, int off, int len) throws IOException {
+ for (int i = 0; i < len; i++)
+ write(b[off + i]);
+ }
+
+ /**
+ * Encodes b.length
bytes to this output stream.
+ * @param b the data to be written.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(byte[] b) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ /**
+ * Encodes the specified byte
to this output stream.
+ * @param c the byte
.
+ * @exception IOException if an I/O error occurs.
+ */
+ public void write(int c) throws IOException {
+ c = c & 0xff; // Turn off the MSB.
+ if (gotSpace) { // previous character was int
in the range 0
+ * to 255
. If no byte is available because the end of
+ * the stream has been reached, the value -1
is returned.
+ * This method blocks until input data is available, the end of the
+ * stream is detected, or an exception is thrown.
+ *
+ * @return next byte of data, or -1
if the end of
+ * stream is reached.
+ * @exception IOException if an I/O error occurs.
+ * @see java.io.FilterInputStream#in
+ */
+
+ public int read() throws IOException {
+ if (index >= bufsize) {
+ readPrefix();
+ if (!decode())
+ return -1;
+ index = 0; // reset index into buffer
+ }
+ return buffer[index++] & 0xff; // return lower byte
+ }
+
+ public int read(byte[] buf, int off, int len) throws IOException {
+ int i, c;
+ for (i = 0; i < len; i++) {
+ if ((c = read()) == -1) {
+ if (i == 0) // At end of stream, so we should
+ i = -1; // return -1, NOT 0.
+ break;
+ }
+ buf[off+i] = (byte)c;
+ }
+ return i;
+ }
+
+ public boolean markSupported() {
+ return false;
+ }
+
+ public int available() throws IOException {
+ // This is only an estimate, since in.available()
+ // might include CRLFs too ..
+ return ((in.available() * 3)/4 + (bufsize-index));
+ }
+
+ /**
+ * Get the "name" field from the prefix. This is meant to
+ * be the pathname of the decoded file
+ *
+ * @return name of decoded file
+ * @exception IOException if an I/O error occurs.
+ */
+ public String getName() throws IOException {
+ readPrefix();
+ return name;
+ }
+
+ /**
+ * Get the "mode" field from the prefix. This is the permission
+ * mode of the source file.
+ *
+ * @return permission mode of source file
+ * @exception IOException if an I/O error occurs.
+ */
+ public int getMode() throws IOException {
+ readPrefix();
+ return mode;
+ }
+
+ /**
+ * UUencoded streams start off with the line:
+ * "begin DataContentHandler
+ * @return The DataFlavors.
+ */
+ public DataFlavor[] getTransferDataFlavors() { // throws Exception;
+ DataFlavor flavors[] = new DataFlavor[1];
+ flavors[0] = new ActivationDataFlavor(
+ FastInfosetReflection.getFastInfosetSource_class(),
+ "application/fastinfoset", "Fast Infoset");
+ return flavors;
+ }
+
+ /**
+ * return the Transfer Data of type DataFlavor from InputStream
+ * @param df The DataFlavor.
+ * @param ins The InputStream corresponding to the data.
+ * @return The constructed Object.
+ */
+ public Object getTransferData(DataFlavor flavor, DataSource dataSource)
+ throws IOException
+ {
+ if (flavor.getMimeType().startsWith("application/fastinfoset")) {
+ try {
+ if (flavor.getRepresentationClass().getName().equals(STR_SRC)) {
+ return FastInfosetReflection.FastInfosetSource_new(
+ dataSource.getInputStream());
+ }
+ }
+ catch (Exception e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ return null;
+ }
+
+ public Object getContent(DataSource dataSource) throws IOException {
+ try {
+ return FastInfosetReflection.FastInfosetSource_new(
+ dataSource.getInputStream());
+ }
+ catch (Exception e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+
+ /**
+ * construct an object from a byte stream
+ * (similar semantically to previous method, we are deciding
+ * which one to support)
+ */
+ public void writeTo(Object obj, String mimeType, OutputStream os)
+ throws IOException
+ {
+ if (!mimeType.equals("application/fastinfoset")) {
+ throw new IOException("Invalid content type \"" + mimeType
+ + "\" for FastInfosetDCH");
+ }
+
+ try {
+ InputStream is = FastInfosetReflection.FastInfosetSource_getInputStream(
+ (Source) obj);
+
+ int n; byte[] buffer = new byte[4096];
+ while ((n = is.read(buffer)) != -1) {
+ os.write(buffer, 0, n);
+ }
+ }
+ catch (Exception ex) {
+ throw new IOException(
+ "Error copying FI source to output stream " + ex.getMessage());
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/GifDataContentHandler.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.awt.datatransfer.DataFlavor;
+import java.io.*;
+import java.awt.*;
+
+import javax.activation.*;
+
+/**
+ * DataContentHandler for image/gif.
+ *
+ * @author Ana Lindstrom-Tamer
+ */
+public class GifDataContentHandler extends Component implements DataContentHandler {
+ private static ActivationDataFlavor myDF =
+ new ActivationDataFlavor(
+ java.awt.Image.class,
+ "image/gif",
+ "GIF Image");
+
+ protected ActivationDataFlavor getDF() {
+ return myDF;
+ }
+
+ /**
+ * Return the DataFlavors for this DataContentHandler
.
+ *
+ * @return The DataFlavors
+ */
+ public DataFlavor[] getTransferDataFlavors() { // throws Exception;
+ return new DataFlavor[] { getDF()};
+ }
+
+ /**
+ * Return the Transfer Data of type DataFlavor from InputStream.
+ *
+ * @param df The DataFlavor
+ * @param ins The InputStream corresponding to the data
+ * @return String object
+ */
+ public Object getTransferData(DataFlavor df, DataSource ds)
+ throws IOException {
+ // use myDF.equals to be sure to get ActivationDataFlavor.equals,
+ // which properly ignores Content-Type parameters in comparison
+ if (getDF().equals(df))
+ return getContent(ds);
+ else
+ return null;
+ }
+
+ public Object getContent(DataSource ds) throws IOException {
+ InputStream is = ds.getInputStream();
+ int pos = 0;
+ int count;
+ byte buf[] = new byte[1024];
+
+ while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
+ pos += count;
+ if (pos >= buf.length) {
+ int size = buf.length;
+ if (size < 256*1024)
+ size += size;
+ else
+ size += 256*1024;
+ byte tbuf[] = new byte[size];
+ System.arraycopy(buf, 0, tbuf, 0, pos);
+ buf = tbuf;
+ }
+ }
+ Toolkit tk = Toolkit.getDefaultToolkit();
+ return tk.createImage(buf, 0, pos);
+ }
+
+ /**
+ * Write the object to the output stream, using the specified MIME type.
+ */
+ public void writeTo(Object obj, String type, OutputStream os)
+ throws IOException {
+ if (obj != null && !(obj instanceof Image))
+ throw new IOException("\"" + getDF().getMimeType() +
+ "\" DataContentHandler requires Image object, " +
+ "was given object of type " + obj.getClass().toString());
+
+ throw new IOException(getDF().getMimeType() + " encoding not supported");
+ }
+
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ImageDataContentHandler.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.awt.*;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.activation.*;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageWriter;
+import javax.imageio.stream.ImageOutputStream;
+
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+
+public class ImageDataContentHandler extends Component
+ implements DataContentHandler {
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
+
+ private DataFlavor[] flavor;
+
+ public ImageDataContentHandler() {
+ String[] mimeTypes = ImageIO.getReaderMIMETypes();
+ flavor = new DataFlavor[mimeTypes.length];
+ for(int i=0; i < mimeTypes.length; i++) {
+ flavor[i] = new ActivationDataFlavor(
+ java.awt.Image.class, mimeTypes[i], "Image");
+ }
+ }
+
+ /**
+ * Returns an array of DataFlavor objects indicating the flavors the
+ * data can be provided in. The array should be ordered according to
+ * preference for providing the data (from most richly descriptive to
+ * least descriptive).
+ *
+ * @return The DataFlavors.
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+ return (DataFlavor[]) Arrays.copyOf(flavor, flavor.length);
+ }
+
+ /**
+ * Returns an object which represents the data to be transferred.
+ * The class of the object returned is defined by the representation class
+ * of the flavor.
+ *
+ * @param df The DataFlavor representing the requested type.
+ * @param ds The DataSource representing the data to be converted.
+ * @return The constructed Object.
+ */
+ public Object getTransferData(DataFlavor df, DataSource ds)
+ throws IOException {
+ for (int i=0; i < flavor.length; i++) {
+ if (flavor[i].equals(df)) {
+ return getContent(ds);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return an object representing the data in its most preferred form.
+ * Generally this will be the form described by the first DataFlavor
+ * returned by the getTransferDataFlavors
method.
+ *
+ * @param ds The DataSource representing the data to be converted.
+ * @return The constructed Object.
+ */
+ public Object getContent(DataSource ds) throws IOException {
+ return ImageIO.read(new BufferedInputStream(ds.getInputStream()));
+ }
+
+ /**
+ * Convert the object to a byte stream of the specified MIME type
+ * and write it to the output stream.
+ *
+ * @param obj The object to be converted.
+ * @param mimeType The requested MIME type of the resulting byte stream.
+ * @param os The output stream into which to write the converted
+ * byte stream.
+ */
+
+ public void writeTo(Object obj, String type, OutputStream os)
+ throws IOException {
+
+ try {
+ BufferedImage bufImage = null;
+ if (obj instanceof BufferedImage) {
+ bufImage = (BufferedImage)obj;
+ } else if (obj instanceof Image) {
+ bufImage = render((Image)obj);
+ } else {
+ log.log(Level.SEVERE,
+ "SAAJ0520.soap.invalid.obj.type",
+ new String[] { obj.getClass().toString() });
+ throw new IOException(
+ "ImageDataContentHandler requires Image object, "
+ + "was given object of type "
+ + obj.getClass().toString());
+ }
+ ImageWriter writer = null;
+ Iterator i = ImageIO.getImageWritersByMIMEType(type);
+ if (i.hasNext()) {
+ writer = (ImageWriter)i.next();
+ }
+ if (writer != null) {
+ ImageOutputStream stream = null;
+ stream = ImageIO.createImageOutputStream(os);
+ writer.setOutput(stream);
+ writer.write(bufImage);
+ writer.dispose();
+ stream.close();
+ } else {
+ log.log(Level.SEVERE, "SAAJ0526.soap.unsupported.mime.type",
+ new String[] { type });
+ throw new IOException("Unsupported mime type:"+ type);
+ }
+ } catch (Exception e) {
+ log.severe("SAAJ0525.soap.cannot.encode.img");
+ throw new IOException("Unable to encode the image to a stream "
+ + e.getMessage());
+ }
+ }
+
+
+ private BufferedImage render(Image img) throws InterruptedException {
+
+ MediaTracker tracker = new MediaTracker(this);
+ tracker.addImage(img, 0);
+ tracker.waitForAll();
+ BufferedImage bufImage = new BufferedImage(img.getWidth(null),
+ img.getHeight(null), BufferedImage.TYPE_INT_RGB);
+ Graphics g = bufImage.createGraphics();
+ g.drawImage(img, 0, 0, null);
+ g.dispose();
+ return bufImage;
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/JpegDataContentHandler.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.awt.*;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.image.BufferedImage;
+import java.io.*;
+
+import javax.activation.*;
+
+//import com.sun.image.codec.jpeg.*;
+import javax.imageio.ImageIO;
+
+/**
+ * JAF data handler for Jpeg content
+ *
+ * @author Ana Lindstrom-Tamer
+ */
+
+public class JpegDataContentHandler
+ extends Component
+ implements DataContentHandler {
+ public static final String STR_SRC = "java.awt.Image";
+
+ /**
+ * return the DataFlavors for this DataContentHandler
+ * @return The DataFlavors.
+ */
+ public DataFlavor[] getTransferDataFlavors() { // throws Exception;
+ DataFlavor flavors[] = new DataFlavor[1];
+
+ try {
+ flavors[0] =
+ new ActivationDataFlavor(
+ Class.forName(STR_SRC),
+ "image/jpeg",
+ "JPEG");
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ return flavors;
+ }
+
+ /**
+ * return the Transfer Data of type DataFlavor from InputStream
+ * @param df The DataFlavor.
+ * @param ins The InputStream corresponding to the data.
+ * @return The constructed Object.
+ */
+ public Object getTransferData(DataFlavor df, DataSource ds) {
+
+ // this is sort of hacky, but will work for the
+ // sake of testing...
+ if (df.getMimeType().startsWith("image/jpeg")) {
+ if (df.getRepresentationClass().getName().equals(STR_SRC)) {
+ InputStream inputStream = null;
+ BufferedImage jpegLoadImage = null;
+
+ try {
+ inputStream = ds.getInputStream();
+ jpegLoadImage = ImageIO.read(inputStream);
+
+ } catch (Exception e) {
+ System.out.println(e);
+ }
+
+ return jpegLoadImage;
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public Object getContent(DataSource ds) { // throws Exception;
+ InputStream inputStream = null;
+ BufferedImage jpegLoadImage = null;
+
+ try {
+ inputStream = ds.getInputStream();
+ jpegLoadImage = ImageIO.read(inputStream);
+
+ } catch (Exception e) {
+ }
+
+ return (Image) jpegLoadImage;
+ }
+
+ /**
+ * construct an object from a byte stream
+ * (similar semantically to previous method, we are deciding
+ * which one to support)
+ */
+ public void writeTo(Object obj, String mimeType, OutputStream os)
+ throws IOException {
+ if (!mimeType.equals("image/jpeg"))
+ throw new IOException(
+ "Invalid content type \""
+ + mimeType
+ + "\" for ImageContentHandler");
+
+ if (obj == null) {
+ throw new IOException("Null object for ImageContentHandler");
+ }
+
+ try {
+ BufferedImage bufImage = null;
+ if (obj instanceof BufferedImage) {
+ bufImage = (BufferedImage) obj;
+
+ } else {
+ Image img = (Image) obj;
+ MediaTracker tracker = new MediaTracker(this);
+ tracker.addImage(img, 0);
+ tracker.waitForAll();
+ if (tracker.isErrorAny()) {
+ throw new IOException("Error while loading image");
+ }
+ bufImage =
+ new BufferedImage(
+ img.getWidth(null),
+ img.getHeight(null),
+ BufferedImage.TYPE_INT_RGB);
+
+ Graphics g = bufImage.createGraphics();
+ g.drawImage(img, 0, 0, null);
+ }
+ ImageIO.write(bufImage, "jpeg", os);
+
+ } catch (Exception ex) {
+ throw new IOException(
+ "Unable to run the JPEG Encoder on a stream "
+ + ex.getMessage());
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LazyEnvelope.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+public interface LazyEnvelope extends Envelope {
+ public XMLStreamReader getPayloadReader() throws SOAPException;
+ public boolean isLazy();
+ public void writeTo(XMLStreamWriter writer) throws XMLStreamException, SOAPException;
+
+ /**
+ * Retrieve payload qname without materializing its contents
+ * @return
+ * @throws SOAPException
+ */
+ public QName getPayloadQName() throws SOAPException;
+
+ /**
+ * Retrieve payload attribute value without materializing its contents
+ * @param localName
+ * @return
+ * @throws SOAPException
+ */
+ public String getPayloadAttributeValue(String localName) throws SOAPException;
+
+ /**
+ * Retrieve payload attribute value without materializing its contents
+ * @param qName
+ * @return
+ * @throws SOAPException
+ */
+ public String getPayloadAttributeValue(QName qName) throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: Data handler error: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: No data handler associated with this attachment
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Null dataHandler argument to setDataHandler
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Unable to externalize attachment
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: Unable to copy MIME header
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: Unable to copy MIME headers into attachment
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: Unable to register handlers in JAF command map
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Unable to create envelope from given source
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Unable to create envelope from given source
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Unable to create envelope: incorrect factory used during tree construction
+SAAJ0513.soap.unknown.ns=SAAJ0513: Unable to create envelope from given source because the namespace was not recognized
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Unable to create envelope from given source because the root element is not named Envelope
+SAAJ0515.source.reset.exception=SAAJ0515: Unable to reset the soap-part content source
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler requires Image object, but was given object of type {0}
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type set to {0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Invalid content-type {0} for ImageContentHandler
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Null object for ImageContentHandler
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: Unable to run the JPEG Encoder on a stream
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: Unable to encode image to a stream
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Unsupported mime type {0}
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Unrecognized Content-Type
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Unable to parse content type
+SAAJ0532.soap.no.Content-Type=SAAJ0532: Absent Content-Type
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got {0}, but expected {1}
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Unrecognized Content-Type
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Unable to internalize message
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type needs to be Multipart/Related and with type=text/xml or application/soap+xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: Unable to convert SOAP message into a Multipart object
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Unable to get header stream in saveChanges
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Error during saving a multipart message
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Could not complete operation. Fragment not bound to SOAP part
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Processing Instructions are not allowed in SOAP documents
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: Entity References are not allowed in SOAP documents
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: Source does not have a valid Reader or InputStream
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Error setting the source for SOAPPart
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Internal error: stream not of the right type
+SAAJ0547.soap.cannot.externalize=SAAJ0547: Error while trying to externalize
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: Unable to externalize header
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Bad Content-Type for SOAP Part {0}
+SAAJ0550.soap.null.headers=SAAJ0550: Cannot create message: Headers can't be null
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: Unsupported encoding {0}
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML declaration parsing failed
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode on SOAPPart not supported
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument on SOAPPart not supported
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig on SOAPPart not supported
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode on SOAPPart not supported
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI on SOAPPart not supported
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI on SOAPPart not supported
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking on SOAPPart not supported
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding on SOAPPart not supported
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding on SOAPPart not supported
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone on SOAPPart not supported
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone on SOAPPart not supported
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion on SOAPPart not supported
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion on SOAPPart not supported
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking on SOAPPart not supported
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: Null {0} argument to {1}
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: Protocol {0} does not support {1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: Unknown Protocol {0} specified for creating {1}
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: The parent element of a soap part is not defined
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Setting value of a soap part is not defined
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: No data handler/content associated with this attachment
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException while reading the raw attachment content
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException while trying to obtain the inputstream from datahandler for this attachment
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Exception while trying to retrieve content for this attachment
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Exception while trying to set the Raw content for this attachment
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Exception while trying to get the Raw content for this attachment
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Exception while trying to set the Decoded content for this attachment
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Exception while trying to get the Encoded content for this attachment
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Unable to locate attachment with cid {0}
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: Exception {0} when trying to set Property {1} on SOAP Message
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type set to {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: Daten-Handler-Fehler: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: Es ist kein Daten-Handler mit diesem Anhang verkn\u00FCpft
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Null-dataHandler-Argument f\u00FCr setDataHandler
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Anhang kann nicht externalisiert werden
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME-Header kann nicht kopiert werden
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME-Header k\u00F6nnen nicht in Anhang kopiert werden
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: Handler k\u00F6nnen in JAF-Befehlszuordnung nicht registriert werden
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Envelope kann nicht aus angegebener Quelle erstellt werden
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Envelope kann nicht aus angegebener Quelle erstellt werden
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Envelope kann nicht erstellt werden: falsche Factory bei der Erstellung der Baumstruktur verwendet
+SAAJ0513.soap.unknown.ns=SAAJ0513: Envelope kann nicht aus der angegebenen Quelle erstellt werden, weil der Namespace nicht erkannt wurde
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Envelope kann nicht aus der angegebenen Quelle erstellt werden, weil das Root-Element nicht den Namen "Envelope" hat
+SAAJ0515.source.reset.exception=SAAJ0515: soap-part-Contentquelle kann nicht zur\u00FCckgesetzt werden
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler erfordert Imageobjekt, Objekt vom Typ {0} wurde jedoch angegeben
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type auf {0} festgelegt
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Ung\u00FCltiger Content-Type {0} f\u00FCr ImageContentHandler
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Null-Objekt f\u00FCr ImageContentHandler
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: JPEG-Encoder kann nicht in einem Stream ausgef\u00FChrt werden
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: Image kann nicht in einem Stream codiert werden
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Nicht unterst\u00FCtzter MIME-Typ {0}
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Nicht erkannter Content-Type
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Content-Type kann nicht geparst werden
+SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type fehlt
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Nachricht kann nicht erstellt werden: Falscher Content-Type f\u00FCr SOAP-Version. {0} erhalten, jedoch {1} erwartet
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Nicht erkannter Content-Type
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Nachricht kann nicht \"internalisiert\" werden.
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type muss Multipart/Related mit type=text/xml oder application/soap+xml sein
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Ung\u00FCltiger Content-Type. K\u00F6nnte eine Fehlermeldung anstelle einer SOAP-Nachricht sein
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP-Nachricht kann nicht in ein Multipart-Objekt konvertiert werden
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Header Stream in saveChanges kann nicht abgerufen werden
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Fehler beim Speichern einer Multipart-Nachricht
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Vorgang konnte nicht abgeschlossen werden. Fragment nicht an SOAP Part gebunden
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Verarbeitungsanweisungen sind in SOAP-Dokumenten nicht zul\u00E4ssig
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: Entity-Referenzen sind in SOAP-Dokumenten nicht zul\u00E4ssig
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: Quelle hat keinen g\u00FCltigen Reader oder InputStream
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Fehler beim Festlegen der Quelle f\u00FCr SOAPPart
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Interner Fehler: Stream hat nicht den richtigen Typ
+SAAJ0547.soap.cannot.externalize=SAAJ0547: Fehler bei Externalisierungsversuch
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0504: Header kann nicht externalisiert werden
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Ung\u00FCltiger Content-Type f\u00FCr SOAPPart {0}
+SAAJ0550.soap.null.headers=SAAJ0550: Nachricht kann nicht erstellt werden: Header d\u00FCrfen nicht null sein
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: Nicht unterst\u00FCtzte Codierung {0}
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: Parsing von XML-Deklaration nicht erfolgreich
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode in SOAPPart nicht unterst\u00FCtzt
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument in SOAPPart nicht unterst\u00FCtzt
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig in SOAPPart nicht unterst\u00FCtzt
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode in SOAPPart nicht unterst\u00FCtzt
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI in SOAPPart nicht unterst\u00FCtzt
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI in SOAPPart nicht unterst\u00FCtzt
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking in SOAPPart nicht unterst\u00FCtzt
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding in SOAPPart nicht unterst\u00FCtzt
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding in SOAPPart nicht unterst\u00FCtzt
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone in SOAPPart nicht unterst\u00FCtzt
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone in SOAPPart nicht unterst\u00FCtzt
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion in SOAPPart nicht unterst\u00FCtzt
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion in SOAPPart nicht unterst\u00FCtzt
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking in SOAPPart nicht unterst\u00FCtzt
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: Null-{0}-Argument f\u00FCr {1}
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: Protokoll {0} unterst\u00FCtzt {1} nicht
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: Unbekanntes Protokoll {0} f\u00FCr Erstellung von {1} angegeben
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: Das \u00FCbergeordnete Element eines SOAPPart-Teils ist nicht definiert
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Die Festlegung des Wertes eines SOAPPart-Teils ist nicht definiert
+SAAJ0572.soap.no.content.for.attachment=SAAJ0502: Es ist kein Daten-Handler/Content mit diesem Anhang verkn\u00FCpft
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException beim Lesen des Raw-Anhangscontents
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException beim Versuch, den Input Stream aus Daten-Handler f\u00FCr diesen Anhang abzurufen
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Ausnahme beim Versuch, den Content f\u00FCr diesen Anhang abzurufen
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Ausnahme beim Versuch, den Raw-Content f\u00FCr diesen Anhang festzulegen
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Ausnahme beim Versuch, den Raw-Content f\u00FCr diesen Anhang abzurufen
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Ausnahme beim Versuch, den decodierten Content f\u00FCr diesen Anhang festzulegen
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Ausnahme beim Versuch, den decodierten Content f\u00FCr diesen Anhang abzurufen
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Anhang mit CID {0} kann nicht gefunden werden
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: Ausnahme {0} beim Versuch, Eigenschaft {1} in SOAP-Nachricht festzulegen
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type auf {0} festgelegt
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: Error de manejador de datos: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: no hay ning\u00FAn manejador de datos asociado a este anexo
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: argumento dataHandler nulo para setDataHandler
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: no se ha podido externalizar el anexo
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: no se ha podido copiar la cabecera MIME
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: no se han podido copiar las cabeceras MIME en el anexo
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: no se han podido registrar los manejadores en la asignaci\u00F3n de comandos JAF
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: no se ha podido crear el elemento Envelope desde el origen especificado
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: no se ha podido crear el elemento Envelope desde el origen especificado
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: No se ha podido crear el elemento Envelope: se ha utilizado una f\u00E1brica incorrecta durante la construcci\u00F3n del \u00E1rbol
+SAAJ0513.soap.unknown.ns=SAAJ0513: no se ha podido crear el elemento Envelope desde el origen especificado, porque no se ha reconocido el espacio de nombres
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: no se ha podido crear el elemento Envelope desde el origen especificado, porque el elemento ra\u00EDz no se denomina Envelope
+SAAJ0515.source.reset.exception=SAAJ0515: no se ha podido restablecer el origen del contenido de la parte soap
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler necesita un objeto de imagen, pero se ha proporcionado un objeto de tipo {0}
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type est\u00E1 definido en {0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Content-Type {0} no v\u00E1lido para ImageContentHandler
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: objeto nulo para ImageContentHandler
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: no se ha podido ejecutar el codificador JPEG en un flujo
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: no se ha podido codificar la imagen en un flujo
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: tipo MIME no soportado {0}
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type no reconocido
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: no se ha podido analizar el tipo de contenido
+SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type ausente
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: No se puede crear el mensaje: content-type incorrecto para la versi\u00F3n de SOAP. Se ha obtenido {0}, pero se esperaba {1}
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type no reconocido
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: no se ha podido internalizar el mensaje
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type tiene que ser Multipart/Related y con type=text/xml o application/soap+xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type no v\u00E1lido. Podr\u00EDa ser un mensaje de error en lugar de un mensaje SOAP
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: no se ha podido convertir un mensaje SOAP en un objeto de varias partes
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: no se ha podido obtener el flujo de cabeceras en saveChanges
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: error al guardar un mensaje de varias partes
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: no se ha podido completar la operaci\u00F3n. El fragmento no est\u00E1 enlazado a la parte SOAP
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: no se permiten instrucciones de procesamiento en los documentos SOAP
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: no se permiten referencias a entidades en los documentos SOAP
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: el origen no tiene un Reader o InputStream v\u00E1lido
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: error al definir el origen para SOAPPart
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Error interno: el flujo no es del tipo correcto
+SAAJ0547.soap.cannot.externalize=SAAJ0547: Error al intentar externalizar
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: no se ha podido externalizar la cabecera
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Content-Type err\u00F3neo para la parte SOAP {0}
+SAAJ0550.soap.null.headers=SAAJ0550: no se puede crear el mensaje. Las cabeceras no pueden ser nulas
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: codificaci\u00F3n no soportada {0}
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: fallo en el an\u00E1lisis de la declaraci\u00F3n XML
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode en SOAPPart no est\u00E1 soportado
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument en SOAPPart no est\u00E1 soportado
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig en SOAPPart no est\u00E1 soportado
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode en SOAPPart no est\u00E1 soportado
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI en SOAPPart no est\u00E1 soportado
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI en SOAPPart no est\u00E1 soportado
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking en SOAPPart no est\u00E1 soportado
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding en SOAPPart no est\u00E1 soportado
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding en SOAPPart no est\u00E1 soportado
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone en SOAPPart no est\u00E1 soportado
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone en SOAPPart no est\u00E1 soportado
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion en SOAPPart no est\u00E1 soportado
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion en SOAPPart no est\u00E1 soportado
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking en SOAPPart no est\u00E1 soportado
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: argumento {0} nulo para {1}
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: el protocolo {0} no soporta {1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: se ha especificado un protocolo {0} desconocido para crear {1}
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: no se ha definido el elemento principal de una parte soap
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: no se ha definido el valor de definici\u00F3n de una parte soap
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: no hay ning\u00FAn manejador/contenido asociado a este anexo
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: excepci\u00F3n de E/S al leer el contenido del anexo raw
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: excepci\u00F3n de E/S al intentar obtener el flujo de entrada desde el manejador de datos de este anexo
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: excepci\u00F3n al intentar recuperar el contenido de este anexo
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: excepci\u00F3n al intentar definir el contenido raw de este anexo
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: excepci\u00F3n al intentar obtener el contenido raw de este anexo
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: excepci\u00F3n al intentar definir el contenido descodificado de este anexo
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: excepci\u00F3n al intentar obtener el contenido codificado de este anexo
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: no se ha encontrado el anexo con el CID {0}
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: excepci\u00F3n {0} al intentar definir la propiedad {1} en el mensaje SOAP
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type definido en {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501 : erreur de gestionnaire de donn\u00E9es : {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502 : aucun gestionnaire de donn\u00E9es associ\u00E9 \u00E0 cette pi\u00E8ce jointe
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503 : argument dataHandler NULL pour setDataHandler
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504 : impossible d'externaliser la pi\u00E8ce jointe
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505 : impossible de copier l'en-t\u00EAte MIME
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506 : impossible de copier les en-t\u00EAtes MIME dans la pi\u00E8ce jointe
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050 : impossible d'inscrire les gestionnaires dans la mappe de commande JAF
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512 : impossible de cr\u00E9er une enveloppe : fabrique incorrecte utilis\u00E9e lors de la construction de l'arborescence
+SAAJ0513.soap.unknown.ns=SAAJ0513 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e car l'espace de noms n'a pas \u00E9t\u00E9 reconnu
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514 : impossible de cr\u00E9er une enveloppe \u00E0 partir de la source donn\u00E9e car l'\u00E9l\u00E9ment racine n'est pas nomm\u00E9 Envelope
+SAAJ0515.source.reset.exception=SAAJ0515 : impossible de red\u00E9finir la source de contenu soap-part
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520 : DataContentHandler exige un objet de type Image, mais a re\u00E7u un objet de type {0}
+SAAJ0521.soap.set.Content-Type=SAAJ0521 : Content-Type d\u00E9fini sur {0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522 : content-type {0} non valide pour ImageContentHandler
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523 : objet NULL pour ImageContentHandler
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524 : impossible d'ex\u00E9cuter l'encodeur JPEG sur un flux
+SAAJ0525.soap.cannot.encode.img=SAAJ0525 : impossible d'encoder l'image en un flux
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526 : type MIME {0} non pris en charge
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530 : Content-Type non reconnu
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531 : impossible d'analyser le type de contenu
+SAAJ0532.soap.no.Content-Type=SAAJ0532 : Content-Type absent
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533 : impossible de cr\u00E9er un message : content-type incorrect pour la version SOAP. {0} obtenu, mais {1} attendu
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534 : Content-Type non reconnu
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535 : impossible d'internaliser le message
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536 : Content-Type doit \u00EAtre Multipart/Related et avec le type = text/xml ou application/soap+xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537 : Content-Type non valide. Cela peut \u00EAtre un message d'erreur au lieu d'un message SOAP
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538 : impossible de convertir un message SOAP en objet Multipart
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539 : impossible d'obtenir un flux de donn\u00E9es d'en-t\u00EAte dans saveChanges
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540 : erreur lors de l'enregistrement d'un message Multipart
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541 : impossible de terminer l'op\u00E9ration. Fragment non li\u00E9 \u00E0 la partie SOAP
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542 : les instructions de traitement ne sont pas autoris\u00E9es dans les documents SOAP
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543 : les r\u00E9f\u00E9rences d'entit\u00E9 ne sont pas autoris\u00E9es dans les documents SOAP
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544 : la source n'a pas de processus de lecture ou d'InputStream valide
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545 : erreur lors de la d\u00E9finition de la source pour SOAPPart
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546 : erreur interne : le type du flux n'est pas correct
+SAAJ0547.soap.cannot.externalize=SAAJ0547 : erreur lors de la tentative d'externalisation
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548 : impossible d'externaliser l'en-t\u00EAte
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549 : Content-Type incorrect pour la partie SOAP {0}
+SAAJ0550.soap.null.headers=SAAJ0550 : impossible de cr\u00E9er le message : les en-t\u00EAtes ne peuvent pas \u00EAtre NULL
+SAAJ0551.soap.unsupported.encoding=SAAJ0551 : encodage {0} non pris en charge
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552 : \u00E9chec de l'analyse de la d\u00E9claration XML
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553 : renameNode sur SOAPPart non pris en charge
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554 : normalizeDocument sur SOAPPart non pris en charge
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555 : getDomConfig sur SOAPPart non pris en charge
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556 : adoptNode sur SOAPPart non pris en charge
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557 : setDocumentURI sur SOAPPart non pris en charge
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558 : getDocumentURI sur SOAPPart non pris en charge
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559 : setStrictErrorChecking sur SOAPPart non pris en charge
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560 : getInputEncoding sur SOAPPart non pris en charge
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561 : getXmlEncoding sur SOAPPart non pris en charge
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562 : getXmlStandalone sur SOAPPart non pris en charge
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563 : setXmlStandalone sur SOAPPart non pris en charge
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564 : getXmlVersion sur SOAPPart non pris en charge
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565 : setXmlVersion sur SOAPPart non pris en charge
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566 : getStrictErrorChecking sur SOAPPart non pris en charge
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567 : argument {0} NULL pour {1}
+SAAJ0568.soap.unsupported.protocol=SAAJ0568 : le protocole {0} ne prend pas en charge {1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569 : protocole {0} inconnu indiqu\u00E9 pour la cr\u00E9ation de {1}
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570 : l'\u00E9l\u00E9ment parent d'une partie SOAP n'est pas d\u00E9fini
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571 : la valeur de param\u00E8tre d'une partie SOAP n'est pas d\u00E9finie
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572 : aucun contenu/gestionnaire de donn\u00E9es associ\u00E9 \u00E0 cette pi\u00E8ce jointe
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573 : exception d'E/S lors de la lecture du contenu de la pi\u00E8ce jointe raw
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574 : exception d'E/S lors de la tentative d'obtention du flux d'entr\u00E9e \u00E0 partir du gestionnaire de donn\u00E9es pour cette pi\u00E8ce jointe
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575 : exception lors de la tentative d'extraction du contenu pour cette pi\u00E8ce jointe
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576 : exception lors de la tentative de d\u00E9finition du contenu Raw pour cette pi\u00E8ce jointe
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577 : exception lors de la tentative d'obtention du contenu Raw pour cette pi\u00E8ce jointe
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578 : exception lors de la tentative de d\u00E9finition du contenu Decoded pour cette pi\u00E8ce jointe
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579 : exception lors de la tentative d'obtention du contenu Encoded pour cette pi\u00E8ce jointe
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590 : impossible de localiser la pi\u00E8ce jointe avec le CID {0}
+SAAJ0591.soap.exception.in.set.property=SAAJ0591 : exception {0} lors de la tentative de d\u00E9finition de la propri\u00E9t\u00E9 {1} sur le message SOAP
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580 : Content-Type d\u00E9fini sur {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: Errore dell''handler dei dati: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: Nessun handler dei dati associato a questo allegato
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: Argomento dataHandler nullo per setDataHandler
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: Impossibile esternalizzare l'allegato
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: Impossibile copiare l'intestazione MIME
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: Impossibile copiare le intestazioni MIME nell'allegato
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: Impossibile registrare gli handler nella mappa dei comandi JAF
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: Impossibile creare l'envelope dall'origine specificata
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: Impossibile creare l'envelope dall'origine specificata
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Impossibile creare l'envelope: factory errato usato durante la costruzione della struttura
+SAAJ0513.soap.unknown.ns=SAAJ0513: Impossibile creare l'envelope dall'origine specificata poich\u00E9 lo spazio di nomi non \u00E8 stato riconosciuto
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: Impossibile creare l'envelope dall'origine specificata poich\u00E9 l'elemento radice non \u00E8 denominato Envelope
+SAAJ0515.source.reset.exception=SAAJ0515: Impossibile reimpostare l'origine del contenuto soap-part
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler richiede un oggetto di immagine, ma l''oggetto specificato \u00E8 di tipo {0}
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type impostato per {0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: Content-Type non valido {0} per ImageContentHandler
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: Oggetto nullo per ImageContentHandler
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: Impossibile eseguire il codificatore JPEG su un flusso
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: Impossibile codificare l'immagine in un flusso
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: Tipo MIME {0} non supportato
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type non riconosciuto
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: Impossibile analizzare il tipo di contenuto
+SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type assente
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: Impossibile creare il messaggio: Content-Type errato per la versione SOAP. Ricevuto {0}, ma previsto {1}
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type non riconosciuto
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: Impossibile rendere interno il messaggio
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type deve essere Multipart/Related e con type=text/xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type non valido. Potrebbe essere un messaggio di errore anzich\u00E9 un messaggio SOAP
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: Impossibile convertire il messaggio SOAP in un oggetto Multipart
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: Impossibile recuperare il flusso di intestazioni in saveChanges
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Errore durante il salvataggio di un messaggio multiparte
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: Impossibile completare l'operazione. Frammento non associato alla SOAP Part
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: Le istruzioni di elaborazione non sono consentite nei documenti SOAP
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: I riferimenti alle entit\u00E0 non sono consentiti nei documenti SOAP
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: L'origine non ha un lettore o un flusso di input valido
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: Errore di impostazione dell''origine per SOAPPart
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Errore interno: flusso di tipo errato
+SAAJ0547.soap.cannot.externalize=SAAJ0547: Errore durante il tentativo di esternalizzazione
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: Impossibile esternalizzare l'intestazione
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: Content-Type non valido per SOAP Part {0}
+SAAJ0550.soap.null.headers=SAAJ0550: Impossibile creare il messaggio: le intestazioni non possono essere nulle
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: Codifica {0} non supportata
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: Analisi della dichiarazione XML non riuscita
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode su SOAPPart non supportato
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument su SOAPPart non supportato
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig su SOAPPart non supportato
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode su SOAPPart non supportato
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI su SOAPPart non supportato
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI su SOAPPart non supportato
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking su SOAPPart non supportato
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding su SOAPPart non supportato
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding su SOAPPart non supportato
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone su SOAPPart non supportato
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone su SOAPPart non supportato
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion su SOAPPart non supportato
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion su SOAPPart non supportato
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking su SOAPPart non supportato
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: Argomento {0} nullo a {1}
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: Il protocollo {0} non supporta {1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: Protocollo sconosciuto {0} specificato per la creazione di {1}
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: L'elemento padre di una SOAP Part non \u00E8 definito
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: Il valore di impostazione di una SOAP Part non \u00E8 definito
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: Nessun handler dei dati/contenuto associato a questo allegato
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException durante la lettura del contenuto dell'allegato di tipo RAW
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException durante il tentativo di ottenere il flusso di input dall'handler dei dati per questo allegato
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: Eccezione durante il tentativo di recuperare il contenuto per questo allegato
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: Eccezione durante il tentativo di impostare il contenuto di tipo RAW per questo allegato
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: Eccezione durante il tentativo di recuperare il contenuto di tipo RAW per questo allegato
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: Eccezione durante il tentativo di impostare il contenuto decodificato per questo allegato
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: Eccezione durante il tentativo di recuperare il contenuto codificato per questo allegato
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: Impossibile trovare l''allegato con cid {0}
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: Eccezione {0} durante il tentativo di impostare Property {1} su SOAP Message
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type impostato per {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: \u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9\u30FB\u30A8\u30E9\u30FC: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u3053\u306E\u6DFB\u4ED8\u306B\u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler\u306B\u5BFE\u3059\u308BdataHandler\u5F15\u6570\u304Cnull\u3067\u3059
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u6DFB\u4ED8\u3092\u5916\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME\u30D8\u30C3\u30C0\u30FC\u3092\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME\u30D8\u30C3\u30C0\u30FC\u3092\u6DFB\u4ED8\u306B\u30B3\u30D4\u30FC\u3067\u304D\u307E\u305B\u3093
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: JAF\u30B3\u30DE\u30F3\u30C9\u30FB\u30DE\u30C3\u30D7\u306B\u30CF\u30F3\u30C9\u30E9\u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: \u30C4\u30EA\u30FC\u306E\u69CB\u7BC9\u4E2D\u306B\u7121\u52B9\u306A\u30D5\u30A1\u30AF\u30C8\u30EA\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F
+SAAJ0513.soap.unknown.ns=SAAJ0513: \u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u8A8D\u8B58\u3055\u308C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u30EB\u30FC\u30C8\u8981\u7D20\u306E\u540D\u524D\u304CEnvelope\u3067\u306F\u306A\u3044\u305F\u3081\u3001\u7279\u5B9A\u306E\u30BD\u30FC\u30B9\u304B\u3089\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+SAAJ0515.source.reset.exception=SAAJ0515: soap-part\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BD\u30FC\u30B9\u3092\u30EA\u30BB\u30C3\u30C8\u3067\u304D\u307E\u305B\u3093
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler\u306B\u306FImage\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001\u30BF\u30A4\u30D7{0}\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler\u306Econtent-type {0}\u304C\u7121\u52B9\u3067\u3059
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304Cnull\u3067\u3059
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u30B9\u30C8\u30EA\u30FC\u30E0\u3067JPEG\u30A8\u30F3\u30B3\u30FC\u30C0\u3092\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u30A4\u30E1\u30FC\u30B8\u3092\u30B9\u30C8\u30EA\u30FC\u30E0\u306B\u30A8\u30F3\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: MIME\u30BF\u30A4\u30D7{0}\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: Content-Type\u304C\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BF\u30A4\u30D7\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093
+SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type\u304C\u3042\u308A\u307E\u305B\u3093
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: SOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306Econtent-type\u304C\u7121\u52B9\u3067\u3059\u3002{0}\u304C\u53D6\u5F97\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3059
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: Content-Type\u304C\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u5185\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type\u306FMultipart/Related\u3067\u3042\u308A\u3001type=text/xml\u307E\u305F\u306Fapplication/soap+xml\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type\u304C\u7121\u52B9\u3067\u3059\u3002SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u304B\u308F\u308A\u306B\u30A8\u30E9\u30FC\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306A\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092Multipart\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306B\u5909\u63DB\u3067\u304D\u307E\u305B\u3093
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: saveChanges\u3067\u30D8\u30C3\u30C0\u30FC\u30FB\u30B9\u30C8\u30EA\u30FC\u30E0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: multipart\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u4FDD\u5B58\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u64CD\u4F5C\u3092\u5B8C\u4E86\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u304CSOAP\u30D1\u30FC\u30C8\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u51E6\u7406\u547D\u4EE4\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOAP\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u30BD\u30FC\u30B9\u306B\u6709\u52B9\u306AReader\u307E\u305F\u306FInputStream\u304C\u3042\u308A\u307E\u305B\u3093
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: SOAPPart\u306E\u30BD\u30FC\u30B9\u3092\u8A2D\u5B9A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5185\u90E8\u30A8\u30E9\u30FC: \u30B9\u30C8\u30EA\u30FC\u30E0\u306E\u30BF\u30A4\u30D7\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093
+SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5916\u90E8\u5316\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u30D8\u30C3\u30C0\u30FC\u3092\u5916\u90E8\u5316\u3067\u304D\u307E\u305B\u3093
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP\u30D1\u30FC\u30C8{0}\u306EContent-Type\u304C\u7121\u52B9\u3067\u3059
+SAAJ0550.soap.null.headers=SAAJ0550: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: \u30D8\u30C3\u30C0\u30FC\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML\u5BA3\u8A00\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: SOAPPart\u306ErenameNode\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: SOAPPart\u306EnormalizeDocument\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: SOAPPart\u306EgetDomConfig\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: SOAPPart\u306EadoptNode\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: SOAPPart\u306EsetDocumentURI\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: SOAPPart\u306EgetDocumentURI\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: SOAPPart\u306EsetStrictErrorChecking\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: SOAPPart\u306EgetInputEncoding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: SOAPPart\u306EgetXmlEncoding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: SOAPPart\u306EgetXmlStandalone\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: SOAPPart\u306EsetXmlStandalone\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: SOAPPart\u306EgetXmlVersion\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: SOAPPart\u306EsetXmlVersion\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: SOAPPart\u306EgetStrictErrorChecking\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: {1}\u306B\u5BFE\u3059\u308B{0}\u5F15\u6570\u304Cnull\u3067\u3059
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u30D7\u30ED\u30C8\u30B3\u30EB{0}\u306F{1}\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u305B\u3093
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: {1}\u306E\u4F5C\u6210\u306B\u5BFE\u3057\u3066\u4E0D\u660E\u306A\u30D7\u30ED\u30C8\u30B3\u30EB{0}\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: SOAP\u30D1\u30FC\u30C8\u306E\u89AA\u8981\u7D20\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: SOAP\u30D1\u30FC\u30C8\u306E\u8A2D\u5B9A\u5024\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u3053\u306E\u6DFB\u4ED8\u306B\u30C7\u30FC\u30BF\u30FB\u30CF\u30F3\u30C9\u30E9/\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: raw\u6DFB\u4ED8\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u8AAD\u53D6\u308A\u4E2D\u306BIOException\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u3053\u306E\u6DFB\u4ED8\u306Edatahandler\u304B\u3089inputstream\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306BIOException\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u3053\u306E\u6DFB\u4ED8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u3053\u306E\u6DFB\u4ED8\u306ERaw\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u3053\u306E\u6DFB\u4ED8\u306ERaw\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u3053\u306E\u6DFB\u4ED8\u306E\u30C7\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u3053\u306E\u6DFB\u4ED8\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u53D6\u5F97\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: cid {0}\u306E\u6DFB\u4ED8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u30D7\u30ED\u30D1\u30C6\u30A3{1}\u3092\u8A2D\u5B9A\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306B\u4F8B\u5916{0}\u304C\u767A\u751F\u3057\u307E\u3057\u305F
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: \uB370\uC774\uD130 \uCC98\uB9AC\uAE30 \uC624\uB958: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uACFC \uC5F0\uAD00\uB41C \uB370\uC774\uD130 \uCC98\uB9AC\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler\uC5D0 \uB300\uD55C dataHandler \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC678\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: MIME \uD5E4\uB354\uB97C \uBCF5\uC0AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: MIME \uD5E4\uB354\uB97C \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uBCF5\uC0AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: JAF \uBA85\uB839 \uB9F5\uC5D0\uC11C \uCC98\uB9AC\uAE30\uB97C \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: \uD2B8\uB9AC \uC0DD\uC131 \uC911 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uD329\uD1A0\uB9AC\uAC00 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0513.soap.unknown.ns=SAAJ0513: \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uC778\uC2DD\uD560 \uC218 \uC5C6\uC5B4 \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \uB8E8\uD2B8 \uC694\uC18C\uAC00 Envelope\uB85C \uBA85\uBA85\uB418\uC9C0 \uC54A\uC544 \uC81C\uACF5\uB41C \uC18C\uC2A4\uC5D0\uC11C Envelope\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0515.source.reset.exception=SAAJ0515: soap-part \uCF58\uD150\uCE20 \uC18C\uC2A4\uB97C \uC7AC\uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler\uC5D0\uB294 \uC774\uBBF8\uC9C0 \uAC1D\uCCB4\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC {0} \uC720\uD615\uC758 \uAC1D\uCCB4\uAC00 \uC81C\uACF5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler\uC5D0 \uB300\uD55C content-type {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler\uC5D0 \uB300\uD55C \uAC1D\uCCB4\uAC00 \uB110\uC785\uB2C8\uB2E4.
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \uC2A4\uD2B8\uB9BC\uC5D0\uC11C JPEG \uC778\uCF54\uB354\uB97C \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: \uC2A4\uD2B8\uB9BC\uC5D0 \uC774\uBBF8\uC9C0\uB97C \uC778\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 mime \uC720\uD615\uC785\uB2C8\uB2E4.
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \uCF58\uD150\uCE20 \uC720\uD615\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0532.soap.no.Content-Type=SAAJ0532: Content-Type\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: SOAP \uBC84\uC804\uC5D0 \uB300\uD55C content-type\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. {0}\uC744(\uB97C) \uAC00\uC838\uC654\uC9C0\uB9CC {1}\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4.
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \uBA54\uC2DC\uC9C0\uB97C \uB0B4\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type\uC740 Multipart/Related\uC5EC\uC57C \uD558\uBA70 \uC720\uD615\uC774 text/xml \uB610\uB294 application/soap+xml\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. SOAP \uBA54\uC2DC\uC9C0\uAC00 \uC544\uB2CC \uC624\uB958 \uBA54\uC2DC\uC9C0\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: SOAP \uBA54\uC2DC\uC9C0\uB97C Multipart \uAC1D\uCCB4\uB85C \uBCC0\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: saveChanges\uC5D0\uC11C \uD5E4\uB354 \uC2A4\uD2B8\uB9BC\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: Multipart \uBA54\uC2DC\uC9C0\uB97C \uC800\uC7A5\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \uC791\uC5C5\uC744 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uD3B8\uC774 SOAP \uBD80\uBD84\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: \uC9C0\uCE68 \uCC98\uB9AC\uB294 SOAP \uBB38\uC11C\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: \uC5D4\uD2F0\uD2F0 \uCC38\uC870\uB294 SOAP \uBB38\uC11C\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \uC18C\uC2A4\uC5D0 \uC801\uD569\uD55C \uC77D\uAE30 \uC7A5\uCE58 \uB610\uB294 InputStream\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: SOAPPart\uC5D0 \uB300\uD55C \uC18C\uC2A4\uB97C \uC124\uC815\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \uB0B4\uBD80 \uC624\uB958: \uC2A4\uD2B8\uB9BC\uC758 \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0547.soap.cannot.externalize=SAAJ0547: \uC678\uBD80\uD654\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \uD5E4\uB354\uB97C \uC678\uBD80\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \uBD80\uBD84 {0}\uC5D0 \uB300\uD55C Content-Type\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0550.soap.null.headers=SAAJ0550: \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: \uD5E4\uB354\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: {0}\uC740(\uB294) \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC778\uCF54\uB529\uC785\uB2C8\uB2E4.
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML \uC120\uC5B8\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: SOAPPart\uC758 renameNode\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: SOAPPart\uC758 normalizeDocument\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: SOAPPart\uC758 getDomConfig\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: SOAPPart\uC758 adoptNode\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: SOAPPart\uC758 setDocumentURI\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: SOAPPart\uC758 getDocumentURI\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: SOAPPart\uC758 setStrictErrorChecking\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: SOAPPart\uC758 getInputEncoding\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: SOAPPart\uC758 getXmlEncoding\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: SOAPPart\uC758 getXmlStandalone\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: SOAPPart\uC758 setXmlStandalone\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: SOAPPart\uC758 getXmlVersion\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: SOAPPart\uC758 setXmlVersion\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: SOAPPart\uC758 getStrictErrorChecking\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: {1}\uC5D0 \uB300\uD55C {0} \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4.
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: {0} \uD504\uB85C\uD1A0\uCF5C\uC740 {1}\uC744(\uB97C) \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: {1} \uC0DD\uC131\uC744 \uC704\uD574 \uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uD1A0\uCF5C {0}\uC774(\uAC00) \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: SOAP \uBD80\uBD84\uC758 \uC0C1\uC704 \uC694\uC18C\uAC00 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: SOAP \uBD80\uBD84\uC758 \uC124\uC815 \uAC12\uC774 \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uACFC \uC5F0\uAD00\uB41C \uB370\uC774\uD130 \uCC98\uB9AC\uAE30/\uCF58\uD150\uCE20\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \uC6D0\uC2DC \uCCA8\uBD80 \uD30C\uC77C \uCF58\uD150\uCE20\uB97C \uC77D\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD574 \uB370\uC774\uD130 \uCC98\uB9AC\uAE30\uC5D0\uC11C \uC785\uB825 \uC2A4\uD2B8\uB9BC\uC744 \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 IOException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20\uB97C \uAC80\uC0C9\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC6D0\uC2DC \uCF58\uD150\uCE20\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC6D0\uC2DC \uCF58\uD150\uCE20\uB97C \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uB514\uCF54\uB529\uB41C \uCF58\uD150\uCE20\uB97C \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \uC774 \uCCA8\uBD80 \uD30C\uC77C\uC5D0 \uB300\uD55C \uC778\uCF54\uB529\uB41C \uCF58\uD150\uCE20\uB97C \uAC00\uC838\uC624\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: CID\uAC00 {0}\uC778 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: SOAP \uBA54\uC2DC\uC9C0\uC5D0\uC11C {1} \uC18D\uC131\uC744 \uC124\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 {0} \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: erro do handler de dados: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: n\u00E3o h\u00E1 handler de dados associado a este anexo
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: argumento dataHandler nulo para setDataHandler
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: n\u00E3o \u00E9 poss\u00EDvel externalizar o anexo
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: n\u00E3o \u00E9 poss\u00EDvel copiar o cabe\u00E7alho MIME
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: n\u00E3o \u00E9 poss\u00EDvel copiar cabe\u00E7alhos MIME no anexo
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: n\u00E3o \u00E9 poss\u00EDvel registrar os handlers no mapa de comando JAF
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: n\u00E3o \u00E9 poss\u00EDvel criar o envelope: factory incorreta usada durante a constru\u00E7\u00E3o da \u00E1rvore
+SAAJ0513.soap.unknown.ns=SAAJ0513: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida porque o namespace n\u00E3o era reconhecido
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: n\u00E3o \u00E9 poss\u00EDvel criar o envelope da origem fornecida porque o elemento-raiz n\u00E3o \u00E9 um Envelope nomeado
+SAAJ0515.source.reset.exception=SAAJ0515: n\u00E3o \u00E9 poss\u00EDvel redefinir a origem de conte\u00FAdo da parte de soap
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler requer objeto da Imagem, mas foi fornecido o objeto do tipo {0}
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Tipo de Conte\u00FAdo definido como {0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: tipo de conte\u00FAdo {0} inv\u00E1lido para ImageContentHandler
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: objeto nulo para ImageContentHandler
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: n\u00E3o \u00E9 poss\u00EDvel executar o Codificador JPEG em um fluxo
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: n\u00E3o \u00E9 poss\u00EDvel codificar a imagem em um fluxo
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: tipo de mime {0} n\u00E3o suportado
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: tipo de Conte\u00FAdo N\u00E3o Reconhecido
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: n\u00E3o \u00E9 poss\u00EDvel fazer parse do tipo de conte\u00FAdo
+SAAJ0532.soap.no.Content-Type=SAAJ0532: tipo de Conte\u00FAdo Inexistente
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: n\u00E3o \u00E9 poss\u00EDvel criar a mensagem: tipo de conte\u00FAdo incorreto para a vers\u00E3o SOAP. Obteve {0}, mas esperava {1}
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: tipo de Conte\u00FAdo N\u00E3o Reconhecido
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: n\u00E3o \u00E9 poss\u00EDvel internalizar a mensagem
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: o Tipo de Conte\u00FAdo precisa ser de V\u00E1rias Partes/Relacionado com tipo=texto/xml ou aplica\u00E7\u00E3o/soap+xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537: tipo de Conte\u00FAdo Inv\u00E1lido. Pode ser uma mensagem de erro, em vez de uma mensagem SOAP
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: n\u00E3o \u00E9 poss\u00EDvel converter a mensagem SOAP em um objeto de V\u00E1rias partes
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: n\u00E3o \u00E9 poss\u00EDvel obter fluxo do cabe\u00E7alho em saveChanges
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: erro ao salvar uma mensagem de v\u00E1rias partes
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: n\u00E3o foi poss\u00EDvel concluir a opera\u00E7\u00E3o. Fragmento n\u00E3o vinculado \u00E0 parte de SOAP
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: as instru\u00E7\u00F5es de processamento n\u00E3o s\u00E3o permitidas nos documentos de SOAP
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: refer\u00EAncias da entidade n\u00E3o s\u00E3o permitidas nos documentos SOAP
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: a origem n\u00E3o tem um Reader ou InputStream v\u00E1lido
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: erro ao definir a origem de SOAPPart
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: Erro interno: o fluxo n\u00E3o \u00E9 do tipo correto
+SAAJ0547.soap.cannot.externalize=SAAJ0547: erro ao tentar externalizar
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: n\u00E3o \u00E9 poss\u00EDvel externalizar o cabe\u00E7alho
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: tipo de Conte\u00FAdo Inv\u00E1lido para a Parte {0} de SOAP
+SAAJ0550.soap.null.headers=SAAJ0550: n\u00E3o \u00E9 poss\u00EDvel criar a mensagem: os cabe\u00E7alhos n\u00E3o podem ser nulos
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: codifica\u00E7\u00E3o n\u00E3o suportada {0}
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: falha ao fazer parse da declara\u00E7\u00E3o XML
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: renameNode em SOAPPart n\u00E3o suportado
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: normalizeDocument em SOAPPart n\u00E3o suportado
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: getDomConfig em SOAPPart n\u00E3o suportado
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: adoptNode em SOAPPart n\u00E3o suportado
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: setDocumentURI em SOAPPart n\u00E3o suportado
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: getDocumentURI em SOAPPart n\u00E3o suportado
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: setStrictErrorChecking em SOAPPart n\u00E3o suportado
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: getInputEncoding em SOAPPart n\u00E3o suportado
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: getXmlEncoding em SOAPPart n\u00E3o suportado
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: getXmlStandalone em SOAPPart n\u00E3o suportado
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: setXmlStandalone em SOAPPart n\u00E3o suportado
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: getXmlVersion em SOAPPart n\u00E3o suportado
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: setXmlVersion em SOAPPart n\u00E3o suportado
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: getStrictErrorChecking em SOAPPart n\u00E3o suportado
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: argumento {0} nulo para {1}
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: o protocolo {0} n\u00E3o suporta {1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: protocolo {0} Desconhecido especificado para criar {1}
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: o elemento pai da parte de soap n\u00E3o foi definido
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: o valor de defini\u00E7\u00E3o de uma parte de soap n\u00E3o foi definido
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: n\u00E3o h\u00E1 handler/conte\u00FAdo de dados associado a este anexo
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: IOException ao ler o conte\u00FAdo do anexo bruto
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: IOException ao tentar obter o inputstream de datahandler deste anexo
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: exce\u00E7\u00E3o ao tentar recuperar o conte\u00FAdo deste anexo
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Bruto deste anexo
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Bruto deste anexo
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: exce\u00E7\u00E3o ao tentar definir o conte\u00FAdo Decodificado deste anexo
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: exce\u00E7\u00E3o ao tentar obter o conte\u00FAdo Codificado deste anexo
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: n\u00E3o \u00E9 poss\u00EDvel localizar o anexo como o cid {0}
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: exce\u00E7\u00E3o {0} ao tentar definir a Propriedade {1} na Mensagem SOAP
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Tipo de Conte\u00FAdo definido como {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: \u6570\u636E\u5904\u7406\u7A0B\u5E8F\u9519\u8BEF: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u6CA1\u6709\u4E0E\u6B64\u9644\u4EF6\u5173\u8054\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler \u7684 dataHandler \u53C2\u6570\u4E3A\u7A7A\u503C
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u65E0\u6CD5\u4F7F\u9644\u4EF6\u5916\u90E8\u5316
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: \u65E0\u6CD5\u590D\u5236 MIME \u6807\u5934
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: \u65E0\u6CD5\u5C06 MIME \u6807\u5934\u590D\u5236\u5230\u9644\u4EF6\u4E2D
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: \u65E0\u6CD5\u6CE8\u518C JAF \u547D\u4EE4\u6620\u5C04\u4E2D\u7684\u5904\u7406\u7A0B\u5E8F
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u65E0\u6CD5\u521B\u5EFA\u4FE1\u5C01: \u5728\u6811\u6784\u9020\u671F\u95F4\u4F7F\u7528\u7684\u5DE5\u5382\u4E0D\u6B63\u786E
+SAAJ0513.soap.unknown.ns=SAAJ0513: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01, \u56E0\u4E3A\u65E0\u6CD5\u8BC6\u522B\u540D\u79F0\u7A7A\u95F4
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u65E0\u6CD5\u4ECE\u7ED9\u5B9A\u6E90\u521B\u5EFA\u4FE1\u5C01, \u56E0\u4E3A\u6839\u5143\u7D20\u4E0D\u662F\u547D\u540D\u7684\u4FE1\u5C01
+SAAJ0515.source.reset.exception=SAAJ0515: \u65E0\u6CD5\u91CD\u7F6E soap-part \u5185\u5BB9\u6E90
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler \u9700\u8981 Image \u5BF9\u8C61, \u4F46\u5374\u5F97\u5230\u7C7B\u578B\u4E3A{0}\u7684\u5BF9\u8C61
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type \u8BBE\u7F6E\u4E3A{0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler \u7684 content-type {0}\u65E0\u6548
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler \u7684\u5BF9\u8C61\u4E3A\u7A7A\u503C
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u65E0\u6CD5\u5728\u6D41\u4E0A\u8FD0\u884C JPEG \u7F16\u7801\u5668
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u65E0\u6CD5\u5C06\u56FE\u50CF\u7F16\u7801\u4E3A\u6D41
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: \u4E0D\u652F\u6301\u7684 mime \u7C7B\u578B{0}
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u65E0\u6CD5\u89E3\u6790\u5185\u5BB9\u7C7B\u578B
+SAAJ0532.soap.no.Content-Type=SAAJ0532: \u7F3A\u5C11 Content-Type
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F: SOAP \u7248\u672C\u7684 content-type \u4E0D\u6B63\u786E\u3002\u5F97\u5230\u7684\u662F{0}, \u4F46\u5E94\u4E3A{1}
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u65E0\u6CD5\u4F7F\u6D88\u606F\u5185\u90E8\u5316
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type \u5FC5\u987B\u662F\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u5E76\u4E14\u5E26\u6709 type=text/xml \u6216 application/soap+xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537: Content-Type \u65E0\u6548\u3002\u53EF\u4EE5\u662F\u9519\u8BEF\u6D88\u606F, \u4F46\u4E0D\u80FD\u662F SOAP \u6D88\u606F
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: \u65E0\u6CD5\u5C06 SOAP \u6D88\u606F\u8F6C\u6362\u4E3A\u591A\u90E8\u5206\u5BF9\u8C61
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: \u65E0\u6CD5\u5728 saveChanges \u4E2D\u83B7\u53D6\u6807\u5934\u6D41
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: \u4FDD\u5B58\u591A\u90E8\u5206\u6D88\u606F\u671F\u95F4\u51FA\u9519
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u65E0\u6CD5\u5B8C\u6210\u64CD\u4F5C\u3002\u7247\u6BB5\u672A\u7ED1\u5B9A\u5230 SOAP \u90E8\u5206
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP \u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5904\u7406\u6307\u4EE4
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOAP \u6587\u6863\u4E2D\u4E0D\u5141\u8BB8\u5B9E\u4F53\u5F15\u7528
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u6E90\u6CA1\u6709\u6709\u6548\u7684\u8BFB\u8FDB\u7A0B\u6216 InputStream
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: \u4E3A SOAPPart \u8BBE\u7F6E\u6E90\u65F6\u51FA\u9519
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5185\u90E8\u9519\u8BEF: \u6D41\u7684\u7C7B\u578B\u4E0D\u6B63\u786E
+SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5C1D\u8BD5\u5916\u90E8\u5316\u65F6\u51FA\u9519
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u65E0\u6CD5\u4F7F\u6807\u5934\u5916\u90E8\u5316
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \u90E8\u5206{0}\u7684 Content-Type \u9519\u8BEF
+SAAJ0550.soap.null.headers=SAAJ0550: \u65E0\u6CD5\u521B\u5EFA\u6D88\u606F: \u6807\u5934\u4E0D\u80FD\u4E3A\u7A7A\u503C
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u4E0D\u652F\u6301\u7684\u7F16\u7801{0}
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: \u672A\u80FD\u89E3\u6790 XML \u58F0\u660E
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 renameNode
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 normalizeDocument
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getDomConfig
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 adoptNode
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setDocumentURI
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getDocumentURI
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setStrictErrorChecking
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getInputEncoding
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlEncoding
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlStandalone
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setXmlStandalone
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getXmlVersion
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 setXmlVersion
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: \u4E0D\u652F\u6301 SOAPPart \u4E0A\u7684 getStrictErrorChecking
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: {1}\u7684{0}\u53C2\u6570\u4E3A\u7A7A\u503C
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u534F\u8BAE{0}\u4E0D\u652F\u6301{1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: \u6307\u5B9A\u7528\u4E8E\u521B\u5EFA{1}\u7684\u534F\u8BAE{0}\u672A\u77E5
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: \u672A\u5B9A\u4E49 soap \u90E8\u5206\u7684\u7236\u5143\u7D20
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: \u672A\u5B9A\u4E49 soap \u90E8\u5206\u7684\u8BBE\u7F6E\u503C
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u6CA1\u6709\u4E0E\u6B64\u9644\u4EF6\u5173\u8054\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F/\u5185\u5BB9
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \u8BFB\u53D6\u539F\u59CB\u9644\u4EF6\u5185\u5BB9\u65F6\u51FA\u73B0 IOException
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u5C1D\u8BD5\u4ECE\u6B64\u9644\u4EF6\u7684\u6570\u636E\u5904\u7406\u7A0B\u5E8F\u83B7\u53D6\u8F93\u5165\u6D41\u65F6\u51FA\u73B0 IOException
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u5C1D\u8BD5\u68C0\u7D22\u6B64\u9644\u4EF6\u7684\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u5C1D\u8BD5\u8BBE\u7F6E\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u5C1D\u8BD5\u83B7\u53D6\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u5C1D\u8BD5\u8BBE\u7F6E\u6B64\u9644\u4EF6\u7684\u89E3\u7801\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u5C1D\u8BD5\u83B7\u53D6\u6B64\u9644\u4EF6\u7684\u7F16\u7801\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: \u65E0\u6CD5\u627E\u5230\u5177\u6709 cid {0} \u7684\u9644\u4EF6
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: \u5C1D\u8BD5\u8BBE\u7F6E SOAP \u6D88\u606F\u7684\u5C5E\u6027{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF{0}
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type \u8BBE\u7F6E\u4E3A{0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for soap pkg
+# Error messages
+SAAJ0501.soap.data.handler.err=SAAJ0501: \u8CC7\u6599\u8655\u7406\u7A0B\u5F0F\u932F\u8AA4: {0}
+SAAJ0502.soap.no.handler.for.attachment=SAAJ0502: \u6C92\u6709\u8207\u6B64\u9644\u4EF6\u76F8\u95DC\u806F\u7684\u8CC7\u6599\u8655\u7406\u7A0B\u5F0F
+SAAJ0503.soap.no.null.to.dataHandler=SAAJ0503: setDataHandler \u7684 dataHandler \u5F15\u6578\u70BA\u7A7A\u503C
+SAAJ0504.soap.cannot.externalize.attachment=SAAJ0504: \u7121\u6CD5\u5C07\u9644\u4EF6\u5916\u90E8\u5316
+SAAJ0505.soap.cannot.copy.mime.hdr=SAAJ0505: \u7121\u6CD5\u8907\u88FD MIME \u6A19\u982D
+SAAJ0506.soap.cannot.copy.mime.hdrs.into.attachment=SAAJ0506: \u7121\u6CD5\u5C07 MIME \u6A19\u982D\u8907\u88FD\u5230\u9644\u4EF6\u4E2D
+# Usage not found. TODO Remove
+#SAAJ0507.soap.cannot.create.handler=SAAJ0507: Unable to create DataHandler for {0}
+SAAJ0508.soap.cannot.register.handlers=SAAJ050: \u7121\u6CD5\u5728 JAF \u547D\u4EE4\u5C0D\u61C9\u4E2D\u8A3B\u518A\u8655\u7406\u7A0B\u5F0F
+
+SAAJ0510.soap.cannot.create.envelope=SAAJ0510: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F
+SAAJ0511.soap.cannot.create.envelope=SAAJ0511: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F
+SAAJ0512.soap.incorrect.factory.used=SAAJ0512: \u7121\u6CD5\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F: \u5EFA\u69CB\u6A39\u72C0\u7D50\u69CB\u6642\u4F7F\u7528\u4E86\u4E0D\u6B63\u78BA\u7684\u8655\u7406\u7AD9
+SAAJ0513.soap.unknown.ns=SAAJ0513: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F, \u56E0\u70BA\u7121\u6CD5\u8FA8\u8B58\u8A72\u547D\u540D\u7A7A\u9593
+SAAJ0514.soap.root.elem.not.named.envelope=SAAJ0514: \u7121\u6CD5\u5F9E\u6307\u5B9A\u7684\u4F86\u6E90\u5EFA\u7ACB\u9644\u52A0\u8A0A\u606F, \u56E0\u70BA\u6839\u5143\u7D20\u4E0D\u662F\u6307\u5B9A\u7684 Envelope
+SAAJ0515.source.reset.exception=SAAJ0515: \u7121\u6CD5\u91CD\u8A2D soap-part \u5167\u5BB9\u4F86\u6E90
+
+SAAJ0520.soap.invalid.obj.type=SAAJ0520: DataContentHandler \u9700\u8981 Image \u7269\u4EF6, \u4F46\u662F\u63D0\u4F9B\u7684\u662F {0} \u985E\u578B\u7684\u7269\u4EF6
+SAAJ0521.soap.set.Content-Type=SAAJ0521: Content-Type \u8A2D\u70BA {0}
+SAAJ0522.soap.invalid.type.for.img.handler=SAAJ0522: ImageContentHandler \u7684 content-type {0} \u7121\u6548
+SAAJ0523.soap.null.obj.for.img.handler=SAAJ0523: ImageContentHandler \u7684\u7269\u4EF6\u70BA\u7A7A\u503C
+SAAJ0524.soap.cannot.run.jpg.encoder=SAAJ0524: \u7121\u6CD5\u5728\u4E32\u6D41\u4E0A\u57F7\u884C JPEG \u7DE8\u78BC\u5668
+SAAJ0525.soap.cannot.encode.img=SAAJ0525: \u7121\u6CD5\u5C07\u5F71\u50CF\u7DE8\u78BC\u70BA\u4E32\u6D41
+SAAJ0526.soap.unsupported.mime.type=SAAJ0526: \u4E0D\u652F\u63F4\u7684 MIME \u985E\u578B {0}
+
+SAAJ0530.soap.unknown.Content-Type=SAAJ0530: \u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
+SAAJ0531.soap.cannot.parse.Content-Type=SAAJ0531: \u7121\u6CD5\u5256\u6790\u5167\u5BB9\u985E\u578B
+SAAJ0532.soap.no.Content-Type=SAAJ0532: \u7F3A\u5C11 Content-Type
+SAAJ0533.soap.incorrect.Content-Type=SAAJ0533: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F: SOAP \u7248\u672C\u7684 content-type \u4E0D\u6B63\u78BA. \u5F97\u5230 {0}, \u4F46\u61C9\u8A72\u662F {1}
+SAAJ0534.soap.unknown.Content-Type=SAAJ0534: \u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type
+SAAJ0535.soap.cannot.internalize.message=SAAJ0535: \u7121\u6CD5\u5C07\u8A0A\u606F\u5167\u90E8\u5316
+SAAJ0536.soap.content-type.mustbe.multipart=SAAJ0536: Content-Type \u5FC5\u9808\u662F Multipart/Related, \u4E14\u542B type=text/xml \u6216 application/soap+xml
+SAAJ0537.soap.invalid.content-type=SAAJ0537: \u7121\u6548\u7684 Content-Type. \u53EF\u80FD\u662F\u53D6\u4EE3 SOAP \u8A0A\u606F\u7684\u932F\u8AA4\u8A0A\u606F
+SAAJ0538.soap.cannot.convert.msg.to.multipart.obj=SAAJ0538: \u7121\u6CD5\u5C07 SOAP \u8A0A\u606F\u8F49\u63DB\u70BA Multipart \u7269\u4EF6
+SAAJ0539.soap.cannot.get.header.stream=SAAJ0539: \u7121\u6CD5\u81EA saveChanges \u53D6\u5F97\u6A19\u982D\u4E32\u6D41
+SAAJ0540.soap.err.saving.multipart.msg=SAAJ0540: \u5132\u5B58\u591A\u91CD\u90E8\u5206\u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4
+SAAJ0541.soap.fragment.not.bound.to.part=SAAJ0541: \u7121\u6CD5\u5B8C\u6210\u4F5C\u696D. \u7247\u6BB5\u672A\u9023\u7D50\u81F3 SOAP \u90E8\u5206
+SAAJ0542.soap.proc.instructions.not.allowed.in.docs=SAAJ0542: SOAP \u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u300C\u8655\u7406\u6307\u793A\u300D
+SAAJ0543.soap.entity.refs.not.allowed.in.docs=SAAJ0543: SOPA \u6587\u4EF6\u4E2D\u4E0D\u5141\u8A31\u300C\u500B\u9AD4\u53C3\u7167\u300D
+SAAJ0544.soap.no.valid.reader.for.src=SAAJ0544: \u4F86\u6E90\u6C92\u6709\u6709\u6548\u7684 Reader \u6216 InputStream
+SAAJ0545.soap.cannot.set.src.for.part=SAAJ0545: \u8A2D\u5B9A SOAPPart \u7684\u4F86\u6E90\u6642\u767C\u751F\u932F\u8AA4
+SAAJ0546.soap.stream.incorrect.type=SAAJ0546: \u5167\u90E8\u932F\u8AA4: \u4E32\u6D41\u4E0D\u662F\u6B63\u78BA\u7684\u985E\u578B
+SAAJ0547.soap.cannot.externalize=SAAJ0547: \u5617\u8A66\u5916\u90E8\u5316\u6642\u767C\u751F\u932F\u8AA4
+SAAJ0548.soap.cannot.externalize.hdr=SAAJ0548: \u7121\u6CD5\u5C07\u6A19\u982D\u5916\u90E8\u5316
+SAAJ0549.soap.part.invalid.Content-Type=SAAJ0549: SOAP \u90E8\u5206 {0} \u7684 Content-Type \u932F\u8AA4
+SAAJ0550.soap.null.headers=SAAJ0550: \u7121\u6CD5\u5EFA\u7ACB\u8A0A\u606F: \u6A19\u982D\u4E0D\u5F97\u662F\u7A7A\u503C
+SAAJ0551.soap.unsupported.encoding=SAAJ0551: \u4E0D\u652F\u63F4\u7684\u7DE8\u78BC {0}
+SAAJ0552.soap.xml.decl.parsing.failed=SAAJ0552: XML \u5BA3\u544A\u5256\u6790\u5931\u6557
+SAAJ0553.soappart.renamenode.not.supported=SAAJ0553: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 renameNode
+SAAJ0554.soappart.normalizeDocument.not.supported=SAAJ0554: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 normalizeDocument
+SAAJ0555.soappart.getDomConfig.not.supported=SAAJ0555: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getDomConfig
+SAAJ0556.soappart.adoptNode.not.supported=SAAJ0556: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 adoptNode
+SAAJ0557.soappart.setDocumentURI.not.supported=SAAJ0557: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setDocumentURI
+SAAJ0558.soappart.getDocumentURI.not.supported=SAAJ0558: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getDocumentURI
+SAAJ0559.soappart.setStrictErrorChecking.not.supported=SAAJ0559: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setStrictErrorChecking
+SAAJ0560.soappart.getInputEncoding.not.supported=SAAJ0560: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getInputEncoding
+SAAJ0561.soappart.getXmlEncoding.not.supported=SAAJ0561: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlEncoding
+SAAJ0562.soappart.getXmlStandalone.not.supported=SAAJ0562: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlStandalone
+SAAJ0563.soappart.setXmlStandalone.not.supported=SAAJ0563: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setXmlStandalone
+SAAJ0564.soappart.getXmlVersion.not.supported=SAAJ0564: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getXmlVersion
+SAAJ0565.soappart.setXmlVersion.not.supported=SAAJ0565: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 setXmlVersion
+SAAJ0566.soappart.getStrictErrorChecking.not.supported=SAAJ0566: \u4E0D\u652F\u63F4 SOAPPart \u4E0A\u7684 getStrictErrorChecking
+# {0} - "tagName"/"name"/"qname"/"localName", {1} - "SOAPFactory.createElement"
+SAAJ0567.soap.null.input=SAAJ0567: {1} \u7684 {0} \u5F15\u6578\u662F\u7A7A\u503C
+SAAJ0568.soap.unsupported.protocol=SAAJ0568: \u5354\u5B9A {0} \u4E0D\u652F\u63F4 {1}
+# {0} - protocol name, {1} - "SOAPFactory"/"MessageFactory"
+SAAJ0569.soap.unknown.protocol=SAAJ0569: \u5EFA\u7ACB {1} \u6642\u6307\u5B9A\u4E86\u4E0D\u660E\u7684\u5354\u5B9A {0}
+SAAJ0570.soappart.parent.element.not.defined=SAAJ0570: \u672A\u5B9A\u7FA9 SOAP \u90E8\u5206\u7684\u7236\u9805\u5143\u7D20
+SAAJ0571.soappart.setValue.not.defined=SAAJ0571: \u672A\u5B9A\u7FA9 SOAP \u90E8\u5206\u7684\u8A2D\u5B9A\u503C
+SAAJ0572.soap.no.content.for.attachment=SAAJ0572: \u6C92\u6709\u8207\u6B64\u9644\u4EF6\u76F8\u95DC\u806F\u7684\u8CC7\u6599\u8655\u7406\u7A0B\u5F0F/\u5167\u5BB9
+SAAJ0573.soap.attachment.getrawbytes.ioexception=SAAJ0573: \u8B80\u53D6\u539F\u59CB\u9644\u4EF6\u5167\u5BB9\u6642\u767C\u751F IOException
+SAAJ0574.soap.attachment.datahandler.ioexception=SAAJ0574: \u5617\u8A66\u5F9E\u6B64\u9644\u4EF6\u7684 datahandler \u53D6\u5F97 inputstream \u6642\u767C\u751F IOException
+SAAJ0575.soap.attachment.getcontent.exception=SAAJ0575: \u5617\u8A66\u64F7\u53D6\u6B64\u9644\u4EF6\u7684\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
+SAAJ0576.soap.attachment.setrawcontent.exception=SAAJ0576: \u5617\u8A66\u8A2D\u5B9A\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
+SAAJ0577.soap.attachment.getrawcontent.exception=SAAJ0577: \u5617\u8A66\u53D6\u5F97\u6B64\u9644\u4EF6\u7684\u539F\u59CB\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
+SAAJ0578.soap.attachment.setbase64content.exception=SAAJ0578: \u5617\u8A66\u8A2D\u5B9A\u6B64\u9644\u4EF6\u7684\u89E3\u78BC\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
+SAAJ0579.soap.attachment.getbase64content.exception=SAAJ0579: \u5617\u8A66\u53D6\u5F97\u6B64\u9644\u4EF6\u7684\u89E3\u78BC\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1
+SAAJ0590.soap.unable.to.locate.attachment=SAAJ0590: \u627E\u4E0D\u5230 cid \u70BA {0} \u7684\u9644\u4EF6
+SAAJ0591.soap.exception.in.set.property=SAAJ0591: \u5617\u8A66\u5728 SOAP \u8A0A\u606F\u4E0A\u8A2D\u5B9A\u7279\u6027 {1} \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1 {0}
+
+# Info messages
+SAAJ0580.soap.set.Content-Type=SAAJ0580: Content-Type \u8A2D\u70BA {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageFactoryImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.io.*;
+import java.util.logging.Logger;
+
+import javax.xml.soap.*;
+import javax.xml.stream.XMLStreamReader;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ParseException;
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl;
+import com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl;
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+import com.sun.xml.internal.messaging.saaj.util.TeeInputStream;
+
+/**
+ * A factory for creating SOAP messages.
+ *
+ * Converted to a placeholder for common functionality between SOAP
+ * implementations.
+ *
+ * @author Phil Goodwin (phil.goodwin@sun.com)
+ */
+public class MessageFactoryImpl extends MessageFactory {
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
+
+ protected OutputStream listener;
+
+ protected boolean lazyAttachments = false;
+
+ public OutputStream listen(OutputStream newListener) {
+ OutputStream oldListener = listener;
+ listener = newListener;
+ return oldListener;
+ }
+
+ public SOAPMessage createMessage() throws SOAPException {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPMessage createMessage(String protocol) throws SOAPException {
+ if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol))
+ return new com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl();
+ else
+ return new com.sun.xml.internal.messaging.saaj.soap.ver1_2.Message1_2Impl();
+ }
+
+ public SOAPMessage createMessage(boolean isFastInfoset,
+ boolean acceptFastInfoset) throws SOAPException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public SOAPMessage createMessage(MimeHeaders headers, XMLStreamReader reader) throws SOAPException, IOException {
+ String contentTypeString = MessageImpl.getContentType(headers);
+
+ if (listener != null) {
+ throw new SOAPException("Listener OutputStream is not supported with XMLStreamReader");
+ }
+
+ try {
+ ContentType contentType = new ContentType(contentTypeString);
+ int stat = MessageImpl.identifyContentType(contentType);
+
+ if (MessageImpl.isSoap1_1Content(stat)) {
+ return new Message1_1Impl(headers,contentType,stat,reader);
+ } else if (MessageImpl.isSoap1_2Content(stat)) {
+ return new Message1_2Impl(headers,contentType,stat,reader);
+ } else {
+ log.severe("SAAJ0530.soap.unknown.Content-Type");
+ throw new SOAPExceptionImpl("Unrecognized Content-Type");
+ }
+ } catch (ParseException e) {
+ log.severe("SAAJ0531.soap.cannot.parse.Content-Type");
+ throw new SOAPExceptionImpl(
+ "Unable to parse content type: " + e.getMessage());
+ }
+ }
+ public SOAPMessage createMessage(MimeHeaders headers, InputStream in)
+ throws SOAPException, IOException {
+ String contentTypeString = MessageImpl.getContentType(headers);
+
+ if (listener != null) {
+ in = new TeeInputStream(in, listener);
+ }
+
+ try {
+ ContentType contentType = new ContentType(contentTypeString);
+ int stat = MessageImpl.identifyContentType(contentType);
+
+ if (MessageImpl.isSoap1_1Content(stat)) {
+ return new Message1_1Impl(headers,contentType,stat,in);
+ } else if (MessageImpl.isSoap1_2Content(stat)) {
+ return new Message1_2Impl(headers,contentType,stat,in);
+ } else {
+ log.severe("SAAJ0530.soap.unknown.Content-Type");
+ throw new SOAPExceptionImpl("Unrecognized Content-Type");
+ }
+ } catch (ParseException e) {
+ log.severe("SAAJ0531.soap.cannot.parse.Content-Type");
+ throw new SOAPExceptionImpl(
+ "Unable to parse content type: " + e.getMessage());
+ }
+ }
+
+ protected static final String getContentType(MimeHeaders headers) {
+ String[] values = headers.getHeader("Content-Type");
+ if (values == null)
+ return null;
+ else
+ return values[0];
+ }
+
+ public void setLazyAttachmentOptimization(boolean flag) {
+ lazyAttachments = flag;
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/MessageImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,1486 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.activation.DataHandler;
+import javax.activation.DataSource;
+import javax.xml.soap.*;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Source;
+import javax.xml.transform.stax.StAXSource;
+import javax.xml.transform.stream.StreamSource;
+
+import com.sun.xml.internal.messaging.saaj.packaging.mime.Header;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.*;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.util.*;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
+import com.sun.xml.internal.messaging.saaj.util.*;
+import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart;
+
+/**
+ * The message implementation for SOAP messages with
+ * attachments. Messages for specific profiles will likely extend this
+ * MessageImpl class and add more value for that particular profile.
+ *
+ * @author Anil Vijendran (akv@eng.sun.com)
+ * @author Rajiv Mordani (rajiv.mordani@sun.com)
+ * @author Manveen Kaur (manveen.kaur@sun.com)
+ */
+
+public abstract class MessageImpl
+ extends SOAPMessage
+ implements SOAPConstants {
+
+
+ public static final String CONTENT_ID = "Content-ID";
+ public static final String CONTENT_LOCATION = "Content-Location";
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.SOAP_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.LocalStrings");
+
+ protected static final int PLAIN_XML_FLAG = 1; // 00001
+ protected static final int MIME_MULTIPART_FLAG = 2; // 00010
+ protected static final int SOAP1_1_FLAG = 4; // 00100
+ protected static final int SOAP1_2_FLAG = 8; // 01000
+ //protected static final int MIME_MULTIPART_XOP_FLAG = 14; // 01110
+ protected static final int MIME_MULTIPART_XOP_SOAP1_1_FLAG = 6; // 00110
+ protected static final int MIME_MULTIPART_XOP_SOAP1_2_FLAG = 10; // 01010
+ protected static final int XOP_FLAG = 13; // 01101
+ protected static final int FI_ENCODED_FLAG = 16; // 10000
+
+ protected MimeHeaders headers;
+ protected ContentType contentType;
+ protected SOAPPartImpl soapPartImpl;
+ protected FinalArrayList attachments;
+ protected boolean saved = false;
+ protected byte[] messageBytes;
+ protected int messageByteCount;
+ protected HashMap properties = new HashMap();
+
+ // used for lazy attachment initialization
+ protected MimeMultipart multiPart = null;
+ protected boolean attachmentsInitialized = false;
+
+ /**
+ * True if this part is encoded using Fast Infoset.
+ * MIME -> application/fastinfoset
+ */
+ protected boolean isFastInfoset = false;
+
+ /**
+ * True if the Accept header of this message includes
+ * application/fastinfoset
+ */
+ protected boolean acceptFastInfoset = false;
+
+ protected MimeMultipart mmp = null;
+
+ // if attachments are present, don't read the entire message in byte stream in saveTo()
+ private boolean optimizeAttachmentProcessing = true;
+
+ private InputStream inputStreamAfterSaveChanges = null;
+
+ public static final String LAZY_SOAP_BODY_PARSING = "saaj.lazy.soap.body";
+
+ // switch back to old MimeMultipart incase of problem
+ private static boolean switchOffBM = false;
+ private static boolean switchOffLazyAttachment = false;
+ private static boolean useMimePull = false;
+
+ static {
+ String s = SAAJUtil.getSystemProperty("saaj.mime.optimization");
+ if ((s != null) && s.equals("false")) {
+ switchOffBM = true;
+ }
+ s = SAAJUtil.getSystemProperty("saaj.lazy.mime.optimization");
+ if ((s != null) && s.equals("false")) {
+ switchOffLazyAttachment = true;
+ }
+ useMimePull = SAAJUtil.getSystemBoolean("saaj.use.mimepull");
+
+ }
+
+ //property to indicate optimized serialization for lazy attachments
+ private boolean lazyAttachments = false;
+
+ // most of the times, Content-Types are already all lower cased.
+ // String.toLowerCase() works faster in this case, so even if you
+ // are only doing one comparison, it pays off to use String.toLowerCase()
+ // than String.equalsIgnoreCase(). When you do more than one comparison,
+ // the benefits of String.toLowerCase() dominates.
+ //
+ //
+ // for FI,
+ // use application/fastinfoset for SOAP 1.1
+ // use application/soap+fastinfoset for SOAP 1.2
+ // to speed up comparisons, test methods always use lower cases.
+
+ /**
+ * @param primary
+ * must be all lower case
+ * @param sub
+ * must be all lower case
+ */
+ private static boolean isSoap1_1Type(String primary, String sub) {
+ return primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml")
+ || primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml-soap")
+ || primary.equals("application")
+ && sub.equals("fastinfoset");
+ }
+
+ /**
+ * @param type
+ * must be all lower case
+ */
+ private static boolean isEqualToSoap1_1Type(String type) {
+ return type.startsWith("text/xml") ||
+ type.startsWith("application/fastinfoset");
+ }
+
+ /**
+ * @param primary
+ * must be all lower case
+ * @param sub
+ * must be all lower case
+ */
+ private static boolean isSoap1_2Type(String primary, String sub) {
+ return primary.equals("application")
+ && (sub.equals("soap+xml")
+ || sub.equals("soap+fastinfoset"));
+ }
+
+ /**
+ * @param type
+ * must be all lower case
+ */
+ private static boolean isEqualToSoap1_2Type(String type) {
+ return type.startsWith("application/soap+xml") ||
+ type.startsWith("application/soap+fastinfoset");
+ }
+
+ /**
+ * Construct a new message. This will be invoked before message
+ * sends.
+ */
+ protected MessageImpl() {
+ this(false, false);
+ attachmentsInitialized = true;
+ }
+
+ /**
+ * Construct a new message. This will be invoked before message
+ * sends.
+ */
+ protected MessageImpl(boolean isFastInfoset, boolean acceptFastInfoset) {
+ this.isFastInfoset = isFastInfoset;
+ this.acceptFastInfoset = acceptFastInfoset;
+
+ headers = new MimeHeaders();
+ headers.setHeader("Accept", getExpectedAcceptHeader());
+ contentType = new ContentType();
+ }
+
+ /**
+ * Shallow copy.
+ */
+ protected MessageImpl(SOAPMessage msg) {
+ if (!(msg instanceof MessageImpl)) {
+ // don't know how to handle this.
+ }
+ MessageImpl src = (MessageImpl) msg;
+ this.headers = src.headers;
+ this.soapPartImpl = src.soapPartImpl;
+ this.attachments = src.attachments;
+ this.saved = src.saved;
+ this.messageBytes = src.messageBytes;
+ this.messageByteCount = src.messageByteCount;
+ this.properties = src.properties;
+ this.contentType = src.contentType;
+ }
+
+ /**
+ * @param stat
+ * the mask value obtained from {@link #identifyContentType(ContentType)}
+ */
+ protected static boolean isSoap1_1Content(int stat) {
+ return (stat & SOAP1_1_FLAG) != 0;
+ }
+
+ /**
+ * @param stat
+ * the mask value obtained from {@link #identifyContentType(ContentType)}
+ */
+ protected static boolean isSoap1_2Content(int stat) {
+ return (stat & SOAP1_2_FLAG) != 0;
+ }
+
+ private static boolean isMimeMultipartXOPSoap1_2Package(ContentType contentType) {
+ String type = contentType.getParameter("type");
+ if (type == null) {
+ return false;
+ }
+ type = type.toLowerCase();
+ if (!type.startsWith("application/xop+xml")) {
+ return false;
+ }
+ String startinfo = contentType.getParameter("start-info");
+ if (startinfo == null) {
+ return false;
+ }
+ startinfo = startinfo.toLowerCase();
+ return isEqualToSoap1_2Type(startinfo);
+ }
+
+
+ //private static boolean isMimeMultipartXOPPackage(ContentType contentType) {
+ private static boolean isMimeMultipartXOPSoap1_1Package(ContentType contentType) {
+ String type = contentType.getParameter("type");
+ if(type==null)
+ return false;
+
+ type = type.toLowerCase();
+ if(!type.startsWith("application/xop+xml"))
+ return false;
+
+ String startinfo = contentType.getParameter("start-info");
+ if(startinfo == null)
+ return false;
+ startinfo = startinfo.toLowerCase();
+ return isEqualToSoap1_1Type(startinfo);
+ }
+
+ private static boolean isSOAPBodyXOPPackage(ContentType contentType){
+ String primary = contentType.getPrimaryType();
+ String sub = contentType.getSubType();
+
+ if (primary.equalsIgnoreCase("application")) {
+ if (sub.equalsIgnoreCase("xop+xml")) {
+ String type = getTypeParameter(contentType);
+ return isEqualToSoap1_2Type(type) || isEqualToSoap1_1Type(type);
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Construct a message from an input stream. When messages are
+ * received, there's two parts -- the transport headers and the
+ * message content in a transport specific stream.
+ */
+ protected MessageImpl(MimeHeaders headers, final InputStream in)
+ throws SOAPExceptionImpl {
+ contentType = parseContentType(headers);
+ init(headers,identifyContentType(contentType),contentType,in);
+ }
+
+ private static ContentType parseContentType(MimeHeaders headers) throws SOAPExceptionImpl {
+ final String ct;
+ if (headers != null)
+ ct = getContentType(headers);
+ else {
+ log.severe("SAAJ0550.soap.null.headers");
+ throw new SOAPExceptionImpl("Cannot create message: " +
+ "Headers can't be null");
+ }
+
+ if (ct == null) {
+ log.severe("SAAJ0532.soap.no.Content-Type");
+ throw new SOAPExceptionImpl("Absent Content-Type");
+ }
+ try {
+ return new ContentType(ct);
+ } catch (Throwable ex) {
+ log.severe("SAAJ0535.soap.cannot.internalize.message");
+ throw new SOAPExceptionImpl("Unable to internalize message", ex);
+ }
+ }
+
+ /**
+ * Construct a message from an input stream. When messages are
+ * received, there's two parts -- the transport headers and the
+ * message content in a transport specific stream.
+ *
+ * @param contentType
+ * The parsed content type header from the headers variable.
+ * This is redundant parameter, but it avoids reparsing this header again.
+ * @param stat
+ * The result of {@link #identifyContentType(ContentType)} over
+ * the contentType parameter. This redundant parameter, but it avoids
+ * recomputing this information again.
+ */
+ protected MessageImpl(MimeHeaders headers, final ContentType contentType, int stat, final InputStream in) throws SOAPExceptionImpl {
+ init(headers, stat, contentType, in);
+
+ }
+
+ public MessageImpl(MimeHeaders headers, ContentType ct, int stat,
+ XMLStreamReader reader) throws SOAPExceptionImpl {
+ init(headers, stat, ct, reader);
+ }
+
+ private void init(MimeHeaders headers, int stat, final ContentType contentType, final Object input) throws SOAPExceptionImpl {
+ this.headers = headers;
+
+ try {
+
+ // Set isFastInfoset/acceptFastInfoset flag based on MIME type
+ if ((stat & FI_ENCODED_FLAG) > 0) {
+ isFastInfoset = acceptFastInfoset = true;
+ }
+
+ // If necessary, inspect Accept header to set acceptFastInfoset
+ if (!isFastInfoset) {
+ String[] values = headers.getHeader("Accept");
+ if (values != null) {
+ for (int i = 0; i < values.length; i++) {
+ StringTokenizer st = new StringTokenizer(values[i], ",");
+ while (st.hasMoreTokens()) {
+ final String token = st.nextToken().trim();
+ if (token.equalsIgnoreCase("application/fastinfoset") ||
+ token.equalsIgnoreCase("application/soap+fastinfoset")) {
+ acceptFastInfoset = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (!isCorrectSoapVersion(stat)) {
+ log.log(
+ Level.SEVERE,
+ "SAAJ0533.soap.incorrect.Content-Type",
+ new String[] {
+ contentType.toString(),
+ getExpectedContentType()});
+ throw new SOAPVersionMismatchException(
+ "Cannot create message: incorrect content-type for SOAP version. Got: "
+ + contentType
+ + " Expected: "
+ + getExpectedContentType());
+ }
+ InputStream in = null;
+ XMLStreamReader rdr = null;
+ if (input instanceof InputStream) {
+ in = (InputStream) input;
+ } else {
+ //is a StAX reader
+ rdr = (XMLStreamReader) input;
+ }
+ if ((stat & PLAIN_XML_FLAG) != 0) {
+ if (in != null) {
+ if (isFastInfoset) {
+ getSOAPPart().setContent(
+ FastInfosetReflection.FastInfosetSource_new(in));
+ } else {
+ initCharsetProperty(contentType);
+ getSOAPPart().setContent(new StreamSource(in));
+ }
+ } else {
+ //is a StAX reader
+ if (isFastInfoset) {
+ //need to get FI stax reader
+ } else {
+ initCharsetProperty(contentType);
+ getSOAPPart().setContent(new StAXSource(rdr));
+ }
+ }
+ }
+ else if ((stat & MIME_MULTIPART_FLAG) != 0 && in == null) {
+ //only parse multipart in the inputstream case
+ //in stax reader case, we would be given the attachments separately
+ getSOAPPart().setContent(new StAXSource(rdr));
+ } else if ((stat & MIME_MULTIPART_FLAG) != 0) {
+ final InputStream finalIn = in;
+ DataSource ds = new DataSource() {
+ public InputStream getInputStream() {
+ return finalIn;
+ }
+
+ public OutputStream getOutputStream() {
+ return null;
+ }
+
+ public String getContentType() {
+ return contentType.toString();
+ }
+
+ public String getName() {
+ return "";
+ }
+ };
+
+ multiPart = null;
+ if (useMimePull) {
+ multiPart = new MimePullMultipart(ds,contentType);
+ } else if (switchOffBM) {
+ multiPart = new MimeMultipart(ds,contentType);
+ } else {
+ multiPart = new BMMimeMultipart(ds,contentType);
+ }
+
+ String startParam = contentType.getParameter("start");
+ MimeBodyPart soapMessagePart = null;
+ InputStream soapPartInputStream = null;
+ String contentID = null;
+ String contentIDNoAngle = null;
+ if (switchOffBM || switchOffLazyAttachment) {
+ if(startParam == null) {
+ soapMessagePart = multiPart.getBodyPart(0);
+ for (int i = 1; i < multiPart.getCount(); i++) {
+ initializeAttachment(multiPart, i);
+ }
+ } else {
+ soapMessagePart = multiPart.getBodyPart(startParam);
+ for (int i = 0; i < multiPart.getCount(); i++) {
+ contentID = multiPart.getBodyPart(i).getContentID();
+ // Old versions of AXIS2 put angle brackets around the content
+ // id but not the start param
+ contentIDNoAngle = (contentID != null) ?
+ contentID.replaceFirst("^<", "").replaceFirst(">$", "") : null;
+ if(!startParam.equals(contentID) && !startParam.equals(contentIDNoAngle))
+ initializeAttachment(multiPart, i);
+ }
+ }
+ } else {
+ if (useMimePull) {
+ MimePullMultipart mpMultipart = (MimePullMultipart)multiPart;
+ MIMEPart sp = mpMultipart.readAndReturnSOAPPart();
+ soapMessagePart = new MimeBodyPart(sp);
+ soapPartInputStream = sp.readOnce();
+ } else {
+ BMMimeMultipart bmMultipart =
+ (BMMimeMultipart) multiPart;
+ InputStream stream = bmMultipart.initStream();
+
+ SharedInputStream sin = null;
+ if (stream instanceof SharedInputStream) {
+ sin = (SharedInputStream) stream;
+ }
+
+ String boundary = "--" +
+ contentType.getParameter("boundary");
+ byte[] bndbytes = ASCIIUtility.getBytes(boundary);
+ if (startParam == null) {
+ soapMessagePart =
+ bmMultipart.getNextPart(stream, bndbytes, sin);
+ bmMultipart.removeBodyPart(soapMessagePart);
+ } else {
+ MimeBodyPart bp = null;
+ try {
+ while (!startParam.equals(contentID) && !startParam.equals(contentIDNoAngle)) {
+ bp = bmMultipart.getNextPart(
+ stream, bndbytes, sin);
+ contentID = bp.getContentID();
+ // Old versions of AXIS2 put angle brackets around the content
+ // id but not the start param
+ contentIDNoAngle = (contentID != null) ?
+ contentID.replaceFirst("^<", "").replaceFirst(">$", "") : null;
+ }
+ soapMessagePart = bp;
+ bmMultipart.removeBodyPart(bp);
+ } catch (Exception e) {
+ throw new SOAPExceptionImpl(e);
+ }
+ }
+ }
+ }
+
+ // findbugs correctly points out that we'd NPE instantiating
+ // the ContentType (just below here) if soapMessagePart were
+ // null. Hence are better off throwing a controlled exception
+ // at this point if it is null.
+ if (soapMessagePart == null) {
+ log.severe("SAAJ0510.soap.cannot.create.envelope");
+ throw new SOAPExceptionImpl(
+ "Unable to create envelope from given source: SOAP part not found");
+ }
+
+ if (soapPartInputStream == null) {
+ soapPartInputStream = soapMessagePart.getInputStream();
+ }
+
+ ContentType soapPartCType = new ContentType(
+ soapMessagePart.getContentType());
+ initCharsetProperty(soapPartCType);
+ String baseType = soapPartCType.getBaseType().toLowerCase();
+ if(!(isEqualToSoap1_1Type(baseType)
+ || isEqualToSoap1_2Type(baseType)
+ || isSOAPBodyXOPPackage(soapPartCType))) {
+ log.log(Level.SEVERE,
+ "SAAJ0549.soap.part.invalid.Content-Type",
+ new Object[] {baseType});
+ throw new SOAPExceptionImpl(
+ "Bad Content-Type for SOAP Part : " +
+ baseType);
+ }
+
+ SOAPPart soapPart = getSOAPPart();
+ setMimeHeaders(soapPart, soapMessagePart);
+ soapPart.setContent(isFastInfoset ?
+ (Source) FastInfosetReflection.FastInfosetSource_new(
+ soapPartInputStream) :
+ (Source) new StreamSource(soapPartInputStream));
+ } else {
+ log.severe("SAAJ0534.soap.unknown.Content-Type");
+ throw new SOAPExceptionImpl("Unrecognized Content-Type");
+ }
+ } catch (Throwable ex) {
+ log.severe("SAAJ0535.soap.cannot.internalize.message");
+ throw new SOAPExceptionImpl("Unable to internalize message", ex);
+ }
+ needsSave();
+ }
+
+ public boolean isFastInfoset() {
+ return isFastInfoset;
+ }
+
+ public boolean acceptFastInfoset() {
+ return acceptFastInfoset;
+ }
+
+ public void setIsFastInfoset(boolean value) {
+ if (value != isFastInfoset) {
+ isFastInfoset = value;
+ if (isFastInfoset) {
+ acceptFastInfoset = true;
+ }
+ saved = false; // ensure transcoding if necessary
+ }
+ }
+
+ public boolean isLazySoapBodyParsing() {
+ Object lazyParsingProp = getProperty(LAZY_SOAP_BODY_PARSING);
+ if (lazyParsingProp == null) return false;
+ if (lazyParsingProp instanceof Boolean) {
+ return ((Boolean) lazyParsingProp).booleanValue();
+ } else {
+ return Boolean.valueOf(lazyParsingProp.toString());
+ }
+ }
+ public Object getProperty(String property) {
+ return (String) properties.get(property);
+ }
+
+ public void setProperty(String property, Object value) {
+ verify(property, value);
+ properties.put(property, value);
+ }
+
+ private void verify(String property, Object value) {
+ if (property.equalsIgnoreCase(SOAPMessage.WRITE_XML_DECLARATION)) {
+ if (!("true".equals(value) || "false".equals(value)))
+ throw new RuntimeException(
+ property + " must have value false or true");
+
+ try {
+ EnvelopeImpl env = (EnvelopeImpl) getSOAPPart().getEnvelope();
+ if ("true".equalsIgnoreCase((String)value)) {
+ env.setOmitXmlDecl("no");
+ } else if ("false".equalsIgnoreCase((String)value)) {
+ env.setOmitXmlDecl("yes");
+ }
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "SAAJ0591.soap.exception.in.set.property",
+ new Object[] {e.getMessage(), "javax.xml.soap.write-xml-declaration"});
+ throw new RuntimeException(e);
+ }
+ return;
+ }
+
+ if (property.equalsIgnoreCase(SOAPMessage.CHARACTER_SET_ENCODING)) {
+ try {
+ ((EnvelopeImpl) getSOAPPart().getEnvelope()).setCharsetEncoding((String)value);
+ } catch (Exception e) {
+ log.log(Level.SEVERE, "SAAJ0591.soap.exception.in.set.property",
+ new Object[] {e.getMessage(), "javax.xml.soap.character-set-encoding"});
+ throw new RuntimeException(e);
+ }
+ }
+ }
+
+ protected abstract boolean isCorrectSoapVersion(int contentTypeId);
+
+ protected abstract String getExpectedContentType();
+ protected abstract String getExpectedAcceptHeader();
+
+ /**
+ * Sniffs the Content-Type header so that we can determine how to process.
+ *
+ * SOAPExceptionImpl
object with no
+ * reason or embedded Throwable
object.
+ */
+ public SOAPVersionMismatchException() {
+ super();
+ }
+
+ /**
+ * Constructs a SOAPExceptionImpl
object with the given
+ * String
as the reason for the exception being thrown.
+ *
+ * @param reason a description of what caused the exception
+ */
+ public SOAPVersionMismatchException(String reason) {
+ super(reason);
+ }
+
+ /**
+ * Constructs a SOAPExceptionImpl
object with the given
+ * String
as the reason for the exception being thrown
+ * and the given Throwable
object as an embedded
+ * exception.
+ *
+ * @param reason a description of what caused the exception
+ * @param cause a Throwable
object that is to
+ * be embedded in this SOAPExceptionImpl
object
+ */
+ public SOAPVersionMismatchException(String reason, Throwable cause) {
+ super(reason, cause);
+ }
+
+ /**
+ * Constructs a SOAPExceptionImpl
object initialized
+ * with the given Throwable
object.
+ */
+ public SOAPVersionMismatchException(Throwable cause) {
+ super(cause);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxBridge.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import com.sun.xml.internal.messaging.saaj.util.stax.SaajStaxWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
+
+
+/**
+ * StaxBridge builds Envelope using a XMLStreamReaderToXMLStreamWriter
+ *
+ * @author shih-chang.chen@oracle.com
+ */
+public abstract class StaxBridge {
+ protected SaajStaxWriter saajWriter;
+ protected XMLStreamReaderToXMLStreamWriter readerToWriter;
+ protected XMLStreamReaderToXMLStreamWriter.Breakpoint breakpoint;
+
+
+ public StaxBridge(SOAPPartImpl soapPart) throws SOAPException {
+ readerToWriter = new XMLStreamReaderToXMLStreamWriter();
+ saajWriter = new SaajStaxWriter(soapPart.message, soapPart.getSOAPNamespace());
+ }
+
+ public void bridgeEnvelopeAndHeaders() throws XMLStreamException {
+ readerToWriter.bridge(breakpoint);
+ }
+
+ public void bridgePayload() throws XMLStreamException {
+ readerToWriter.bridge(breakpoint);
+ }
+
+ abstract public XMLStreamReader getPayloadReader();
+
+ abstract public QName getPayloadQName();
+
+ abstract public String getPayloadAttributeValue(String attName) ;
+
+ abstract public String getPayloadAttributeValue(QName attName) ;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxLazySourceBridge.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.sun.xml.internal.messaging.saaj.LazyEnvelopeSource;
+import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
+
+
+/**
+ * StaxBridge builds Envelope from LazyEnvelopeSource
+ *
+ * @author shih-chang.chen@oracle.com
+ */
+public class StaxLazySourceBridge extends StaxBridge {
+ private LazyEnvelopeSource lazySource;
+
+ public StaxLazySourceBridge(LazyEnvelopeSource src, SOAPPartImpl soapPart) throws SOAPException {
+ super(soapPart);
+ lazySource = src;
+ final String soapEnvNS = soapPart.getSOAPNamespace();
+ try {
+ breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(src.readToBodyStarTag(), saajWriter) {
+ public boolean proceedAfterStartElement() {
+ if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
+ return false;
+ } else
+ return true;
+ }
+ };
+ } catch (XMLStreamException e) {
+ throw new SOAPException(e);
+ }
+ }
+
+ @Override
+ public XMLStreamReader getPayloadReader() {
+ return lazySource.readPayload();
+// throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public QName getPayloadQName() {
+ return lazySource.getPayloadQName();
+ }
+
+ @Override
+ public String getPayloadAttributeValue(String attName) {
+ if (lazySource.isPayloadStreamReader()) {
+ XMLStreamReader reader = lazySource.readPayload();
+ if (reader.getEventType() == reader.START_ELEMENT) {
+ return reader.getAttributeValue(null, attName);
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public String getPayloadAttributeValue(QName attName) {
+ if (lazySource.isPayloadStreamReader()) {
+ XMLStreamReader reader = lazySource.readPayload();
+ if (reader.getEventType() == reader.START_ELEMENT) {
+ return reader.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart());
+ }
+ }
+ return null;
+ }
+
+ public void bridgePayload() throws XMLStreamException {
+ //Assuming out is at Body
+ writePayloadTo(saajWriter);
+ }
+
+ public void writePayloadTo(XMLStreamWriter writer) throws XMLStreamException {
+ lazySource.writePayloadTo(writer);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StaxReaderBridge.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.stream.XMLStreamReader;
+
+import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
+
+/**
+ * StaxBridge builds Envelope using a XMLStreamReaderToXMLStreamWriter
+ *
+ * @author shih-chang.chen@oracle.com
+ */
+public class StaxReaderBridge extends StaxBridge {
+ private XMLStreamReader in;
+
+ public StaxReaderBridge(XMLStreamReader reader, SOAPPartImpl soapPart) throws SOAPException {
+ super(soapPart);
+ in = reader;
+ final String soapEnvNS = soapPart.getSOAPNamespace();
+ breakpoint = new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, saajWriter) {
+ boolean seenBody = false;
+ boolean stopedAtBody = false;
+ public boolean proceedBeforeStartElement() {
+ if (stopedAtBody) return true;
+ if (seenBody) {
+ stopedAtBody = true;
+ return false;
+ }
+ if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
+ seenBody = true;
+ }
+ return true;
+ }
+ };
+ }
+
+ public XMLStreamReader getPayloadReader() {
+ return in;
+ }
+
+ public QName getPayloadQName() {
+ return (in.getEventType() == in.START_ELEMENT) ? in.getName() : null;
+ }
+
+ public String getPayloadAttributeValue(String attName) {
+ return (in.getEventType() == in.START_ELEMENT) ? in.getAttributeValue(null, attName) : null;
+ }
+
+ public String getPayloadAttributeValue(QName attName) {
+ return (in.getEventType() == in.START_ELEMENT) ? in.getAttributeValue(attName.getNamespaceURI(), attName.getLocalPart()) : null;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/StringDataContentHandler.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.awt.datatransfer.DataFlavor;
+import java.io.*;
+
+import javax.activation.*;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.MimeUtility;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.util.ASCIIUtility;
+import com.sun.xml.internal.messaging.saaj.packaging.mime.internet.ContentType;
+
+/**
+ * JAF data content handler for text/plain --> String
+ *
+ */
+public class StringDataContentHandler implements DataContentHandler {
+ private static ActivationDataFlavor myDF = new ActivationDataFlavor(
+ java.lang.String.class,
+ "text/plain",
+ "Text String");
+
+ protected ActivationDataFlavor getDF() {
+ return myDF;
+ }
+
+ /**
+ * Return the DataFlavors for this DataContentHandler
.
+ *
+ * @return The DataFlavors
+ */
+ public DataFlavor[] getTransferDataFlavors() {
+ return new DataFlavor[] { getDF() };
+ }
+
+ /**
+ * Return the Transfer Data of type DataFlavor from InputStream.
+ *
+ * @param df The DataFlavor
+ * @param ds The DataSource corresponding to the data
+ * @return String object
+ */
+ public Object getTransferData(DataFlavor df, DataSource ds)
+ throws IOException {
+ // use myDF.equals to be sure to get ActivationDataFlavor.equals,
+ // which properly ignores Content-Type parameters in comparison
+ if (getDF().equals(df))
+ return getContent(ds);
+ else
+ return null;
+ }
+
+ public Object getContent(DataSource ds) throws IOException {
+ String enc = null;
+ InputStreamReader is = null;
+
+ try {
+ enc = getCharset(ds.getContentType());
+ is = new InputStreamReader(ds.getInputStream(), enc);
+ } catch (IllegalArgumentException iex) {
+ /*
+ * An unknown charset of the form ISO-XXX-XXX will cause
+ * the JDK to throw an IllegalArgumentException. The
+ * JDK will attempt to create a classname using this string,
+ * but valid classnames must not contain the character '-',
+ * and this results in an IllegalArgumentException, rather than
+ * the expected UnsupportedEncodingException. Yikes.
+ */
+ throw new UnsupportedEncodingException(enc);
+ }
+
+ try {
+ int pos = 0;
+ int count;
+ char buf[] = new char[1024];
+
+ while ((count = is.read(buf, pos, buf.length - pos)) != -1) {
+ pos += count;
+ if (pos >= buf.length) {
+ int size = buf.length;
+ if (size < 256*1024)
+ size += size;
+ else
+ size += 256*1024;
+ char tbuf[] = new char[size];
+ System.arraycopy(buf, 0, tbuf, 0, pos);
+ buf = tbuf;
+ }
+ }
+ return new String(buf, 0, pos);
+ } finally {
+ try {
+ is.close();
+ } catch (IOException ex) { }
+ }
+ }
+
+ /**
+ * Write the object to the output stream, using the specified MIME type.
+ */
+ public void writeTo(Object obj, String type, OutputStream os)
+ throws IOException {
+ if (!(obj instanceof String))
+ throw new IOException("\"" + getDF().getMimeType() +
+ "\" DataContentHandler requires String object, " +
+ "was given object of type " + obj.getClass().toString());
+
+ String enc = null;
+ OutputStreamWriter osw = null;
+
+ try {
+ enc = getCharset(type);
+ osw = new OutputStreamWriter(os, enc);
+ } catch (IllegalArgumentException iex) {
+ /*
+ * An unknown charset of the form ISO-XXX-XXX will cause
+ * the JDK to throw an IllegalArgumentException. The
+ * JDK will attempt to create a classname using this string,
+ * but valid classnames must not contain the character '-',
+ * and this results in an IllegalArgumentException, rather than
+ * the expected UnsupportedEncodingException. Yikes.
+ */
+ throw new UnsupportedEncodingException(enc);
+ }
+
+ String s = (String)obj;
+ osw.write(s, 0, s.length());
+ osw.flush();
+ }
+
+ private String getCharset(String type) {
+ try {
+ ContentType ct = new ContentType(type);
+ String charset = ct.getParameter("charset");
+ if (charset == null)
+ // If the charset parameter is absent, use US-ASCII.
+ charset = "us-ascii";
+ return MimeUtility.javaCharset(charset);
+ } catch (Exception ex) {
+ return null;
+ }
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/XmlDataContentHandler.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap;
+
+import java.awt.datatransfer.DataFlavor;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.activation.*;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
+
+/**
+ * JAF data handler for XML content
+ *
+ * @author Anil Vijendran
+ */
+public class XmlDataContentHandler implements DataContentHandler {
+ public static final String STR_SRC = "javax.xml.transform.stream.StreamSource";
+ private static Class streamSourceClass = null;
+
+ public XmlDataContentHandler() throws ClassNotFoundException {
+ if (streamSourceClass == null) {
+ streamSourceClass = Class.forName(STR_SRC);
+ }
+ }
+
+ /**
+ * return the DataFlavors for this DataContentHandler
+ * @return The DataFlavors.
+ */
+ public DataFlavor[] getTransferDataFlavors() { // throws Exception;
+ DataFlavor flavors[] = new DataFlavor[2];
+
+ flavors[0] =
+ new ActivationDataFlavor(streamSourceClass, "text/xml", "XML");
+ flavors[1] =
+ new ActivationDataFlavor(streamSourceClass, "application/xml", "XML");
+
+ return flavors;
+ }
+
+ /**
+ * return the Transfer Data of type DataFlavor from InputStream
+ * @param df The DataFlavor.
+ * @param ins The InputStream corresponding to the data.
+ * @return The constructed Object.
+ */
+ public Object getTransferData(DataFlavor flavor, DataSource dataSource)
+ throws IOException {
+ if (flavor.getMimeType().startsWith("text/xml") ||
+ flavor.getMimeType().startsWith("application/xml")) {
+ if (flavor.getRepresentationClass().getName().equals(STR_SRC)) {
+ return new StreamSource(dataSource.getInputStream());
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public Object getContent(DataSource dataSource) throws IOException {
+ return new StreamSource(dataSource.getInputStream());
+ }
+
+ /**
+ * construct an object from a byte stream
+ * (similar semantically to previous method, we are deciding
+ * which one to support)
+ */
+ public void writeTo(Object obj, String mimeType, OutputStream os)
+ throws IOException {
+ if (!mimeType.startsWith("text/xml") && !mimeType.startsWith("application/xml"))
+ throw new IOException(
+ "Invalid content type \"" + mimeType + "\" for XmlDCH");
+
+
+ try {
+ Transformer transformer = EfficientStreamingTransformer.newTransformer();
+ StreamResult result = new StreamResult(os);
+ if (obj instanceof DataSource) {
+ // Streaming transform applies only to javax.xml.transform.StreamSource
+ transformer.transform((Source) getContent((DataSource)obj), result);
+ } else {
+ Source src=null;
+ if (obj instanceof String) {
+ src= new StreamSource(new java.io.StringReader((String) obj));
+ } else {
+ src=(Source) obj;
+ }
+ transformer.transform(src, result);
+ }
+ } catch (Exception ex) {
+ throw new IOException(
+ "Unable to run the JAXP transformer on a stream "
+ + ex.getMessage());
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPFactoryDynamicImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.dynamic;
+
+import javax.xml.soap.Detail;
+import javax.xml.soap.SOAPException;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPFactoryImpl;
+
+public class SOAPFactoryDynamicImpl extends SOAPFactoryImpl {
+ protected SOAPDocumentImpl createDocument() {
+ return null;
+ }
+
+ public Detail createDetail() throws SOAPException {
+ throw new UnsupportedOperationException(
+ "createDetail() not supported for Dynamic Protocol");
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/dynamic/SOAPMessageFactoryDynamicImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.dynamic;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.soap.*;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.MessageFactoryImpl;
+
+public class SOAPMessageFactoryDynamicImpl extends MessageFactoryImpl {
+ public SOAPMessage createMessage() throws SOAPException {
+ throw new UnsupportedOperationException(
+ "createMessage() not supported for Dynamic Protocol");
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyElementImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+
+/**
+ * All elements of the SOAP-ENV:BODY.
+ *
+ * @author Anil Vijendran (akv@eng.sun.com)
+ */
+public abstract class BodyElementImpl
+ extends ElementImpl
+ implements SOAPBodyElement {
+
+ public BodyElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
+ super(ownerDoc, qname);
+ }
+
+ public BodyElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
+ super(ownerDoc, qname);
+ }
+
+ public void setParentElement(SOAPElement element) throws SOAPException {
+ if (! (element instanceof SOAPBody)) {
+ log.severe("SAAJ0101.impl.parent.of.body.elem.mustbe.body");
+ throw new SOAPException("Parent of a SOAPBodyElement has to be a SOAPBody");
+ }
+ super.setParentElement(element);
+ }
+
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/BodyImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,467 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.*;
+import org.w3c.dom.Node;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.StaxBridge;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+/**
+ * The implementation of SOAP-ENV:BODY or the SOAPBody abstraction.
+ *
+ * @author Anil Vijendran (anil@sun.com)
+ */
+public abstract class BodyImpl extends ElementImpl implements SOAPBody {
+ private SOAPFault fault;
+// private XMLStreamReaderToXMLStreamWriter staxBridge;
+ private StaxBridge staxBridge;
+ private boolean payloadStreamRead = false;
+
+ protected BodyImpl(SOAPDocumentImpl ownerDoc, NameImpl bodyName) {
+ super(ownerDoc, bodyName);
+ }
+
+ protected abstract NameImpl getFaultName(String name);
+ protected abstract boolean isFault(SOAPElement child);
+ protected abstract SOAPBodyElement createBodyElement(Name name);
+ protected abstract SOAPBodyElement createBodyElement(QName name);
+ protected abstract SOAPFault createFaultElement();
+ protected abstract QName getDefaultFaultCode();
+
+ public SOAPFault addFault() throws SOAPException {
+ if (hasFault()) {
+ log.severe("SAAJ0110.impl.fault.already.exists");
+ throw new SOAPExceptionImpl("Error: Fault already exists");
+ }
+
+ fault = createFaultElement();
+
+ addNode(fault);
+
+ fault.setFaultCode(getDefaultFaultCode());
+ fault.setFaultString("Fault string, and possibly fault code, not set");
+
+ return fault;
+ }
+
+ public SOAPFault addFault(
+ Name faultCode,
+ String faultString,
+ Locale locale)
+ throws SOAPException {
+
+ SOAPFault fault = addFault();
+ fault.setFaultCode(faultCode);
+ fault.setFaultString(faultString, locale);
+ return fault;
+ }
+
+ public SOAPFault addFault(
+ QName faultCode,
+ String faultString,
+ Locale locale)
+ throws SOAPException {
+
+ SOAPFault fault = addFault();
+ fault.setFaultCode(faultCode);
+ fault.setFaultString(faultString, locale);
+ return fault;
+ }
+
+ public SOAPFault addFault(Name faultCode, String faultString)
+ throws SOAPException {
+
+ SOAPFault fault = addFault();
+ fault.setFaultCode(faultCode);
+ fault.setFaultString(faultString);
+ return fault;
+ }
+
+ public SOAPFault addFault(QName faultCode, String faultString)
+ throws SOAPException {
+
+ SOAPFault fault = addFault();
+ fault.setFaultCode(faultCode);
+ fault.setFaultString(faultString);
+ return fault;
+ }
+
+ void initializeFault() {
+ FaultImpl flt = (FaultImpl) findFault();
+ fault = flt;
+ }
+
+ protected SOAPElement findFault() {
+ Iterator eachChild = getChildElementNodes();
+ while (eachChild.hasNext()) {
+ SOAPElement child = (SOAPElement) eachChild.next();
+ if (isFault(child)) {
+ return child;
+ }
+ }
+
+ return null;
+ }
+
+ public boolean hasFault() {
+ QName payloadQName = getPayloadQName();
+ return getFaultQName().equals(payloadQName);
+ }
+
+ private Object getFaultQName() {
+ return new QName(getNamespaceURI(), "Fault");
+ }
+
+ public SOAPFault getFault() {
+ if (hasFault()) {
+ if (fault == null) {
+ //initialize fault member
+ fault = (SOAPFault) getFirstChildElement();
+ }
+ return fault;
+ }
+ return null;
+ }
+
+ public SOAPBodyElement addBodyElement(Name name) throws SOAPException {
+ SOAPBodyElement newBodyElement =
+ (SOAPBodyElement) ElementFactory.createNamedElement(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ name.getLocalName(),
+ name.getPrefix(),
+ name.getURI());
+ if (newBodyElement == null) {
+ newBodyElement = createBodyElement(name);
+ }
+ addNode(newBodyElement);
+ return newBodyElement;
+ }
+
+ public SOAPBodyElement addBodyElement(QName qname) throws SOAPException {
+ SOAPBodyElement newBodyElement =
+ (SOAPBodyElement) ElementFactory.createNamedElement(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ qname.getLocalPart(),
+ qname.getPrefix(),
+ qname.getNamespaceURI());
+ if (newBodyElement == null) {
+ newBodyElement = createBodyElement(qname);
+ }
+ addNode(newBodyElement);
+ return newBodyElement;
+ }
+
+ public void setParentElement(SOAPElement element) throws SOAPException {
+
+ if (!(element instanceof SOAPEnvelope)) {
+ log.severe("SAAJ0111.impl.body.parent.must.be.envelope");
+ throw new SOAPException("Parent of SOAPBody has to be a SOAPEnvelope");
+ }
+ super.setParentElement(element);
+ }
+
+ protected SOAPElement addElement(Name name) throws SOAPException {
+ return addBodyElement(name);
+ }
+
+ protected SOAPElement addElement(QName name) throws SOAPException {
+ return addBodyElement(name);
+ }
+
+ // public Node insertBefore(Node newElement, Node ref) throws DOMException {
+ // if (!(newElement instanceof SOAPBodyElement) && (newElement instanceof SOAPElement)) {
+ // newElement = new ElementWrapper((ElementImpl) newElement);
+ // }
+ // return super.insertBefore(newElement, ref);
+ // }
+ //
+ // public Node replaceChild(Node newElement, Node ref) throws DOMException {
+ // if (!(newElement instanceof SOAPBodyElement) && (newElement instanceof SOAPElement)) {
+ // newElement = new ElementWrapper((ElementImpl) newElement);
+ // }
+ // return super.replaceChild(newElement, ref);
+ // }
+
+ public SOAPBodyElement addDocument(Document document)
+ throws SOAPException {
+ /*
+
+ Element rootNode =
+ document.getDocumentElement();
+ // Causes all deferred nodes to be inflated
+ rootNode.normalize();
+ adoptElement(rootNode);
+ SOAPBodyElement bodyElement = (SOAPBodyElement) convertToSoapElement(rootNode);
+ addNode(bodyElement);
+ return bodyElement;
+ */
+ ///*
+ SOAPBodyElement newBodyElement = null;
+ DocumentFragment docFrag = document.createDocumentFragment();
+ Element rootElement = document.getDocumentElement();
+ if(rootElement != null) {
+ docFrag.appendChild(rootElement);
+
+ Document ownerDoc = getOwnerDocument();
+ // This copies the whole tree which could be very big so it's slow.
+ // However, it does have the advantage of actually working.
+ org.w3c.dom.Node replacingNode = ownerDoc.importNode(docFrag, true);
+ // Adding replacingNode at the last of the children list of body
+ addNode(replacingNode);
+ Iterator i =
+ getChildElements(NameImpl.copyElementName(rootElement));
+ // Return the child element with the required name which is at the
+ // end of the list
+ while(i.hasNext())
+ newBodyElement = (SOAPBodyElement) i.next();
+ }
+ return newBodyElement;
+ //*/
+ }
+
+ protected SOAPElement convertToSoapElement(Element element) {
+ if ((element instanceof SOAPBodyElement) &&
+ //this check is required because ElementImpl currently
+ // implements SOAPBodyElement
+ !(element.getClass().equals(ElementImpl.class))) {
+ return (SOAPElement) element;
+ } else {
+ return replaceElementWithSOAPElement(
+ element,
+ (ElementImpl) createBodyElement(NameImpl
+ .copyElementName(element)));
+ }
+ }
+
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+ log.log(Level.SEVERE,
+ "SAAJ0146.impl.invalid.name.change.requested",
+ new Object[] {elementQName.getLocalPart(),
+ newName.getLocalPart()});
+ throw new SOAPException("Cannot change name for "
+ + elementQName.getLocalPart() + " to "
+ + newName.getLocalPart());
+ }
+
+ public Document extractContentAsDocument() throws SOAPException {
+
+ Iterator eachChild = getChildElements();
+ javax.xml.soap.Node firstBodyElement = null;
+
+ while (eachChild.hasNext() &&
+ !(firstBodyElement instanceof SOAPElement))
+ firstBodyElement = (javax.xml.soap.Node) eachChild.next();
+
+ boolean exactlyOneChildElement = true;
+ if (firstBodyElement == null)
+ exactlyOneChildElement = false;
+ else {
+ for (org.w3c.dom.Node node = firstBodyElement.getNextSibling();
+ node != null;
+ node = node.getNextSibling()) {
+
+ if (node instanceof Element) {
+ exactlyOneChildElement = false;
+ break;
+ }
+ }
+ }
+
+ if(!exactlyOneChildElement) {
+ log.log(Level.SEVERE,
+ "SAAJ0250.impl.body.should.have.exactly.one.child");
+ throw new SOAPException("Cannot extract Document from body");
+ }
+
+ Document document = null;
+ try {
+ DocumentBuilderFactory factory =
+ new com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ document = builder.newDocument();
+
+ Element rootElement = (Element) document.importNode(
+ firstBodyElement,
+ true);
+
+ document.appendChild(rootElement);
+
+ } catch(Exception e) {
+ log.log(Level.SEVERE,
+ "SAAJ0251.impl.cannot.extract.document.from.body");
+ throw new SOAPExceptionImpl(
+ "Unable to extract Document from body", e);
+ }
+
+ firstBodyElement.detachNode();
+
+ return document;
+ }
+
+ private void materializePayloadWrapException() {
+ try {
+ materializePayload();
+ } catch (SOAPException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ private void materializePayload() throws SOAPException {
+ if (staxBridge != null) {
+ if (payloadStreamRead) {
+ //the payload has already been read via stream reader and the
+ //stream has been exhausted already. Throw an
+ //exception since we are now trying to materialize as DOM and
+ //there is no stream left to read
+ throw new SOAPException("SOAPBody payload stream has been fully read - cannot materialize as DOM!");
+ }
+ try {
+ staxBridge.bridgePayload();
+ staxBridge = null;
+ payloadStreamRead = true;
+ } catch (XMLStreamException e) {
+ throw new SOAPException(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean hasChildNodes() {
+ boolean hasChildren = super.hasChildNodes();
+ //to answer this question we need to know _whether_ we have at least one child
+ //So no need to materialize body if we already know we have a header child
+ if (!hasChildren) {
+ materializePayloadWrapException();
+ }
+ return super.hasChildNodes();
+ }
+
+ @Override
+ public NodeList getChildNodes() {
+ materializePayloadWrapException();
+ return super.getChildNodes();
+ }
+
+ @Override
+ public Node getFirstChild() {
+ Node child = super.getFirstChild();
+ if (child == null) {
+ materializePayloadWrapException();
+ }
+ return super.getFirstChild();
+ }
+
+ public Node getFirstChildNoMaterialize() {
+ return super.getFirstChild();
+ }
+
+ @Override
+ public Node getLastChild() {
+ materializePayloadWrapException();
+ return super.getLastChild();
+ }
+
+ XMLStreamReader getPayloadReader() {
+ return staxBridge.getPayloadReader();
+ }
+
+ void setStaxBridge(StaxBridge bridge) {
+ this.staxBridge = bridge;
+ }
+
+ StaxBridge getStaxBridge() {
+ return staxBridge;
+ }
+
+ void setPayloadStreamRead() {
+ this.payloadStreamRead = true;
+ }
+
+ QName getPayloadQName() {
+ if (staxBridge != null) {
+ return staxBridge.getPayloadQName();
+ } else {
+ //not lazy - Just get first child element and return its name
+ Element elem = getFirstChildElement();
+ if (elem != null) {
+ String ns = elem.getNamespaceURI();
+ String pref = elem.getPrefix();
+ String local = elem.getLocalName();
+ if (pref != null) return new QName(ns, local, pref);
+ if (ns != null) return new QName(ns, local);
+ return new QName(local);
+ }
+ }
+ return null;
+ }
+
+ String getPayloadAttributeValue(String attName) {
+ if (staxBridge != null) {
+ return staxBridge.getPayloadAttributeValue(attName);
+ } else {
+ //not lazy -Just get first child element and return its attribute
+ Element elem = getFirstChildElement();
+ if (elem != null) {
+ return elem.getAttribute(localName);
+ }
+ }
+ return null;
+ }
+
+ String getPayloadAttributeValue(QName attNAme) {
+ if (staxBridge != null) {
+ return staxBridge.getPayloadAttributeValue(attNAme);
+ } else {
+ //not lazy -Just get first child element and return its attribute
+ Element elem = getFirstChildElement();
+ if (elem != null) {
+ return elem.getAttributeNS(attNAme.getNamespaceURI(), attNAme.getLocalPart());
+ }
+ }
+ return null;
+ }
+
+ public boolean isLazy() {
+ return (staxBridge != null && !payloadStreamRead);
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/CDATAImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.logging.Logger;
+
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+
+public class CDATAImpl
+ extends com.sun.org.apache.xerces.internal.dom.CDATASectionImpl
+ implements javax.xml.soap.Text {
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
+
+ static final String cdataUC = " 0) {
+ setAttributeNS(XMLNS_URI, "xmlns:" + prefix, uri);
+ } else {
+ setAttributeNS(XMLNS_URI, "xmlns", uri);
+ }
+ //Fix for CR:6474641
+ //tryToFindEncodingStyleAttributeName();
+ return this;
+ }
+
+ public String getAttributeValue(Name name) {
+ return getAttributeValueFrom(this, name);
+ }
+
+ public String getAttributeValue(QName qname) {
+ return getAttributeValueFrom(
+ this,
+ qname.getNamespaceURI(),
+ qname.getLocalPart(),
+ qname.getPrefix(),
+ getQualifiedName(qname));
+ }
+
+ public Iterator getAllAttributes() {
+ Iterator i = getAllAttributesFrom(this);
+ ArrayList list = new ArrayList();
+ while (i.hasNext()) {
+ Name name = (Name) i.next();
+ if (!"xmlns".equalsIgnoreCase(name.getPrefix()))
+ list.add(name);
+ }
+ return list.iterator();
+ }
+
+ public Iterator getAllAttributesAsQNames() {
+ Iterator i = getAllAttributesFrom(this);
+ ArrayList list = new ArrayList();
+ while (i.hasNext()) {
+ Name name = (Name) i.next();
+ if (!"xmlns".equalsIgnoreCase(name.getPrefix())) {
+ list.add(NameImpl.convertToQName(name));
+ }
+ }
+ return list.iterator();
+ }
+
+
+ public Iterator getNamespacePrefixes() {
+ return doGetNamespacePrefixes(false);
+ }
+
+ public Iterator getVisibleNamespacePrefixes() {
+ return doGetNamespacePrefixes(true);
+ }
+
+ protected Iterator doGetNamespacePrefixes(final boolean deep) {
+ return new Iterator() {
+ String next = null;
+ String last = null;
+ NamespaceContextIterator eachNamespace =
+ getNamespaceContextNodes(deep);
+
+ void findNext() {
+ while (next == null && eachNamespace.hasNext()) {
+ String attributeKey =
+ eachNamespace.nextNamespaceAttr().getNodeName();
+ if (attributeKey.startsWith("xmlns:")) {
+ next = attributeKey.substring("xmlns:".length());
+ }
+ }
+ }
+
+ public boolean hasNext() {
+ findNext();
+ return next != null;
+ }
+
+ public Object next() {
+ findNext();
+ if (next == null) {
+ throw new NoSuchElementException();
+ }
+
+ last = next;
+ next = null;
+ return last;
+ }
+
+ public void remove() {
+ if (last == null) {
+ throw new IllegalStateException();
+ }
+ eachNamespace.remove();
+ next = null;
+ last = null;
+ }
+ };
+ }
+
+ public Name getElementName() {
+ return NameImpl.convertToName(elementQName);
+ }
+
+ public QName getElementQName() {
+ return elementQName;
+ }
+
+ public boolean removeAttribute(Name name) {
+ return removeAttribute(name.getURI(), name.getLocalName());
+ }
+
+ public boolean removeAttribute(QName name) {
+ return removeAttribute(name.getNamespaceURI(), name.getLocalPart());
+ }
+
+ private boolean removeAttribute(String uri, String localName) {
+ String nonzeroLengthUri =
+ (uri == null || uri.length() == 0) ? null : uri;
+ org.w3c.dom.Attr attribute =
+ getAttributeNodeNS(nonzeroLengthUri, localName);
+ if (attribute == null) {
+ return false;
+ }
+ removeAttributeNode(attribute);
+ return true;
+ }
+
+ public boolean removeNamespaceDeclaration(String prefix) {
+ org.w3c.dom.Attr declaration = getNamespaceAttr(prefix);
+ if (declaration == null) {
+ return false;
+ }
+ try {
+ removeAttributeNode(declaration);
+ } catch (DOMException de) {
+ // ignore
+ }
+ return true;
+ }
+
+ public Iterator getChildElements() {
+ return getChildElementsFrom(this);
+ }
+
+ protected SOAPElement convertToSoapElement(Element element) {
+ if (element instanceof SOAPElement) {
+ return (SOAPElement) element;
+ } else {
+ return replaceElementWithSOAPElement(
+ element,
+ (ElementImpl) createElement(NameImpl.copyElementName(element)));
+ }
+ }
+
+ protected static SOAPElement replaceElementWithSOAPElement(
+ Element element,
+ ElementImpl copy) {
+
+ Iterator eachAttribute = getAllAttributesFrom(element);
+ while (eachAttribute.hasNext()) {
+ Name name = (Name) eachAttribute.next();
+ copy.addAttributeBare(name, getAttributeValueFrom(element, name));
+ }
+
+ Iterator eachChild = getChildElementsFrom(element);
+ while (eachChild.hasNext()) {
+ Node nextChild = (Node) eachChild.next();
+ copy.insertBefore(nextChild, null);
+ }
+
+ Node parent = element.getParentNode();
+ if (parent != null) {
+ parent.replaceChild(copy, element);
+ } // XXX else throw an exception?
+
+ return copy;
+ }
+
+ protected Iterator getChildElementNodes() {
+ return new Iterator() {
+ Iterator eachNode = getChildElements();
+ Node next = null;
+ Node last = null;
+
+ public boolean hasNext() {
+ if (next == null) {
+ while (eachNode.hasNext()) {
+ Node node = (Node) eachNode.next();
+ if (node instanceof SOAPElement) {
+ next = node;
+ break;
+ }
+ }
+ }
+ return next != null;
+ }
+
+ public Object next() {
+ if (hasNext()) {
+ last = next;
+ next = null;
+ return last;
+ }
+ throw new NoSuchElementException();
+ }
+
+ public void remove() {
+ if (last == null) {
+ throw new IllegalStateException();
+ }
+ Node target = last;
+ last = null;
+ removeChild(target);
+ }
+ };
+ }
+
+ public Iterator getChildElements(final Name name) {
+ return getChildElements(name.getURI(), name.getLocalName());
+ }
+
+ public Iterator getChildElements(final QName qname) {
+ return getChildElements(qname.getNamespaceURI(), qname.getLocalPart());
+ }
+
+ private Iterator getChildElements(final String nameUri, final String nameLocal) {
+ return new Iterator() {
+ Iterator eachElement = getChildElementNodes();
+ Node next = null;
+ Node last = null;
+
+ public boolean hasNext() {
+ if (next == null) {
+ while (eachElement.hasNext()) {
+ Node element = (Node) eachElement.next();
+ String elementUri = element.getNamespaceURI();
+ elementUri = elementUri == null ? "" : elementUri;
+ String elementName = element.getLocalName();
+ if (elementUri.equals(nameUri)
+ && elementName.equals(nameLocal)) {
+ next = element;
+ break;
+ }
+ }
+ }
+ return next != null;
+ }
+
+ public Object next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+ last = next;
+ next = null;
+ return last;
+ }
+
+ public void remove() {
+ if (last == null) {
+ throw new IllegalStateException();
+ }
+ Node target = last;
+ last = null;
+ removeChild(target);
+ }
+ };
+ }
+
+ public void removeContents() {
+ Node currentChild = getFirstChild();
+
+ while (currentChild != null) {
+ Node temp = currentChild.getNextSibling();
+ if (currentChild instanceof javax.xml.soap.Node) {
+ ((javax.xml.soap.Node) currentChild).detachNode();
+ } else {
+ Node parent = currentChild.getParentNode();
+ if (parent != null) {
+ parent.removeChild(currentChild);
+ }
+
+ }
+ currentChild = temp;
+ }
+ }
+
+ public void setEncodingStyle(String encodingStyle) throws SOAPException {
+ if (!"".equals(encodingStyle)) {
+ try {
+ new URI(encodingStyle);
+ } catch (URISyntaxException m) {
+ log.log(
+ Level.SEVERE,
+ "SAAJ0105.impl.encoding.style.mustbe.valid.URI",
+ new String[] { encodingStyle });
+ throw new IllegalArgumentException(
+ "Encoding style (" + encodingStyle + ") should be a valid URI");
+ }
+ }
+ encodingStyleAttribute.setValue(encodingStyle);
+ tryToFindEncodingStyleAttributeName();
+ }
+
+ public String getEncodingStyle() {
+ String encodingStyle = encodingStyleAttribute.getValue();
+ if (encodingStyle != null)
+ return encodingStyle;
+ String soapNamespace = getSOAPNamespace();
+ if (soapNamespace != null) {
+ Attr attr = getAttributeNodeNS(soapNamespace, "encodingStyle");
+ if (attr != null) {
+ encodingStyle = attr.getValue();
+ try {
+ setEncodingStyle(encodingStyle);
+ } catch (SOAPException se) {
+ // has to be ignored
+ }
+ return encodingStyle;
+ }
+ }
+ return null;
+ }
+
+ // Node methods
+ public String getValue() {
+ javax.xml.soap.Node valueNode = getValueNode();
+ return valueNode == null ? null : valueNode.getValue();
+ }
+
+ public void setValue(String value) {
+ Node valueNode = getValueNodeStrict();
+ if (valueNode != null) {
+ valueNode.setNodeValue(value);
+ } else {
+ try {
+ addTextNode(value);
+ } catch (SOAPException e) {
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+ }
+
+ protected Node getValueNodeStrict() {
+ Node node = getFirstChild();
+ if (node != null) {
+ if (node.getNextSibling() == null
+ && node.getNodeType() == org.w3c.dom.Node.TEXT_NODE) {
+ return node;
+ } else {
+ log.severe("SAAJ0107.impl.elem.child.not.single.text");
+ throw new IllegalStateException();
+ }
+ }
+
+ return null;
+ }
+
+ protected javax.xml.soap.Node getValueNode() {
+ Iterator i = getChildElements();
+ while (i.hasNext()) {
+ javax.xml.soap.Node n = (javax.xml.soap.Node) i.next();
+ if (n.getNodeType() == org.w3c.dom.Node.TEXT_NODE ||
+ n.getNodeType() == org.w3c.dom.Node.CDATA_SECTION_NODE) {
+ // TODO: Hack to fix text node split into multiple lines.
+ normalize();
+ // Should remove the normalization step when this gets fixed in
+ // DOM/Xerces.
+ return (javax.xml.soap.Node) n;
+ }
+ }
+ return null;
+ }
+
+ public void setParentElement(SOAPElement element) throws SOAPException {
+ if (element == null) {
+ log.severe("SAAJ0106.impl.no.null.to.parent.elem");
+ throw new SOAPException("Cannot pass NULL to setParentElement");
+ }
+ element.addChildElement(this);
+ findEncodingStyleAttributeName();
+ }
+
+ protected void findEncodingStyleAttributeName() throws SOAPException {
+ String soapNamespace = getSOAPNamespace();
+ if (soapNamespace != null) {
+ String soapNamespacePrefix = getNamespacePrefix(soapNamespace);
+ if (soapNamespacePrefix != null) {
+ setEncodingStyleNamespace(soapNamespace, soapNamespacePrefix);
+ }
+ }
+ }
+
+ protected void setEncodingStyleNamespace(
+ String soapNamespace,
+ String soapNamespacePrefix)
+ throws SOAPException {
+ Name encodingStyleAttributeName =
+ NameImpl.create(
+ "encodingStyle",
+ soapNamespacePrefix,
+ soapNamespace);
+ encodingStyleAttribute.setName(encodingStyleAttributeName);
+ }
+
+ public SOAPElement getParentElement() {
+ Node parentNode = getParentNode();
+ if (parentNode instanceof SOAPDocument) {
+ return null;
+ }
+ return (SOAPElement) parentNode;
+ }
+
+ protected String getSOAPNamespace() {
+ String soapNamespace = null;
+
+ SOAPElement antecedent = this;
+ while (antecedent != null) {
+ Name antecedentName = antecedent.getElementName();
+ String antecedentNamespace = antecedentName.getURI();
+
+ if (NameImpl.SOAP11_NAMESPACE.equals(antecedentNamespace)
+ || NameImpl.SOAP12_NAMESPACE.equals(antecedentNamespace)) {
+
+ soapNamespace = antecedentNamespace;
+ break;
+ }
+
+ antecedent = antecedent.getParentElement();
+ }
+
+ return soapNamespace;
+ }
+
+ public void detachNode() {
+ Node parent = getParentNode();
+ if (parent != null) {
+ parent.removeChild(this);
+ }
+ encodingStyleAttribute.clearNameAndValue();
+ // Fix for CR: 6474641
+ //tryToFindEncodingStyleAttributeName();
+ }
+
+ public void tryToFindEncodingStyleAttributeName() {
+ try {
+ findEncodingStyleAttributeName();
+ } catch (SOAPException e) { /*okay to fail*/
+ }
+ }
+
+ public void recycleNode() {
+ detachNode();
+ // TBD
+ // - add this to the factory so subsequent
+ // creations can reuse this object.
+ }
+
+ class AttributeManager {
+ Name attributeName = null;
+ String attributeValue = null;
+
+ public void setName(Name newName) throws SOAPException {
+ clearAttribute();
+ attributeName = newName;
+ reconcileAttribute();
+ }
+ public void clearName() {
+ clearAttribute();
+ attributeName = null;
+ }
+ public void setValue(String value) throws SOAPException {
+ attributeValue = value;
+ reconcileAttribute();
+ }
+ public Name getName() {
+ return attributeName;
+ }
+ public String getValue() {
+ return attributeValue;
+ }
+
+ /** Note: to be used only in detachNode method */
+ public void clearNameAndValue() {
+ attributeName = null;
+ attributeValue = null;
+ }
+
+ private void reconcileAttribute() throws SOAPException {
+ if (attributeName != null) {
+ removeAttribute(attributeName);
+ if (attributeValue != null) {
+ addAttribute(attributeName, attributeValue);
+ }
+ }
+ }
+ private void clearAttribute() {
+ if (attributeName != null) {
+ removeAttribute(attributeName);
+ }
+ }
+ }
+
+ protected static org.w3c.dom.Attr getNamespaceAttrFrom(
+ Element element,
+ String prefix) {
+ NamespaceContextIterator eachNamespace =
+ new NamespaceContextIterator(element);
+ while (eachNamespace.hasNext()) {
+ org.w3c.dom.Attr namespaceDecl = eachNamespace.nextNamespaceAttr();
+ String declaredPrefix =
+ NameImpl.getLocalNameFromTagName(namespaceDecl.getNodeName());
+ if (declaredPrefix.equals(prefix)) {
+ return namespaceDecl;
+ }
+ }
+ return null;
+ }
+
+ protected static Iterator getAllAttributesFrom(final Element element) {
+ final NamedNodeMap attributes = element.getAttributes();
+
+ return new Iterator() {
+ int attributesLength = attributes.getLength();
+ int attributeIndex = 0;
+ String currentName;
+
+ public boolean hasNext() {
+ return attributeIndex < attributesLength;
+ }
+
+ public Object next() {
+ if (!hasNext()) {
+ throw new NoSuchElementException();
+ }
+ Node current = attributes.item(attributeIndex++);
+ currentName = current.getNodeName();
+
+ String prefix = NameImpl.getPrefixFromTagName(currentName);
+ if (prefix.length() == 0) {
+ return NameImpl.createFromUnqualifiedName(currentName);
+ } else {
+ Name attributeName =
+ NameImpl.createFromQualifiedName(
+ currentName,
+ current.getNamespaceURI());
+ return attributeName;
+ }
+ }
+
+ public void remove() {
+ if (currentName == null) {
+ throw new IllegalStateException();
+ }
+ attributes.removeNamedItem(currentName);
+ }
+ };
+ }
+
+ protected static String getAttributeValueFrom(Element element, Name name) {
+ return getAttributeValueFrom(
+ element,
+ name.getURI(),
+ name.getLocalName(),
+ name.getPrefix(),
+ name.getQualifiedName());
+ }
+
+ private static String getAttributeValueFrom(
+ Element element,
+ String uri,
+ String localName,
+ String prefix,
+ String qualifiedName) {
+
+ String nonzeroLengthUri =
+ (uri == null || uri.length() == 0) ? null : uri;
+
+ boolean mustUseGetAttributeNodeNS = (nonzeroLengthUri != null);
+
+ if (mustUseGetAttributeNodeNS) {
+
+ if (!element.hasAttributeNS(uri, localName)) {
+ return null;
+ }
+
+ String attrValue =
+ element.getAttributeNS(nonzeroLengthUri, localName);
+
+ return attrValue;
+ }
+
+ Attr attribute = null;
+ attribute = element.getAttributeNode(qualifiedName);
+
+ return attribute == null ? null : attribute.getValue();
+ }
+
+ protected static Iterator getChildElementsFrom(final Element element) {
+ return new Iterator() {
+ Node next = element.getFirstChild();
+ Node nextNext = null;
+ Node last = null;
+
+ public boolean hasNext() {
+ if (next != null) {
+ return true;
+ }
+ if (next == null && nextNext != null) {
+ next = nextNext;
+ }
+
+ return next != null;
+ }
+
+ public Object next() {
+ if (hasNext()) {
+ last = next;
+ next = null;
+
+ if ((element instanceof ElementImpl)
+ && (last instanceof Element)) {
+ last =
+ ((ElementImpl) element).convertToSoapElement(
+ (Element) last);
+ }
+
+ nextNext = last.getNextSibling();
+ return last;
+ }
+ throw new NoSuchElementException();
+ }
+
+ public void remove() {
+ if (last == null) {
+ throw new IllegalStateException();
+ }
+ Node target = last;
+ last = null;
+ element.removeChild(target);
+ }
+ };
+ }
+
+ public static String getQualifiedName(QName name) {
+ String prefix = name.getPrefix();
+ String localName = name.getLocalPart();
+ String qualifiedName = null;
+
+ if (prefix != null && prefix.length() > 0) {
+ qualifiedName = prefix + ":" + localName;
+ } else {
+ qualifiedName = localName;
+ }
+ return qualifiedName;
+ }
+
+ public static String getLocalPart(String qualifiedName) {
+ if (qualifiedName == null) {
+ // Log
+ throw new IllegalArgumentException("Cannot get local name for a \"null\" qualified name");
+ }
+
+ int index = qualifiedName.indexOf(':');
+ if (index < 0)
+ return qualifiedName;
+ else
+ return qualifiedName.substring(index + 1);
+ }
+
+ public static String getPrefix(String qualifiedName) {
+ if (qualifiedName == null) {
+ // Log
+ throw new IllegalArgumentException("Cannot get prefix for a \"null\" qualified name");
+ }
+
+ int index = qualifiedName.indexOf(':');
+ if (index < 0)
+ return "";
+ else
+ return qualifiedName.substring(0, index);
+ }
+
+ protected boolean isNamespaceQualified(Name name) {
+ return !"".equals(name.getURI());
+ }
+
+ protected boolean isNamespaceQualified(QName name) {
+ return !"".equals(name.getNamespaceURI());
+ }
+
+ protected SOAPElement circumventBug5034339(SOAPElement element) {
+
+ Name elementName = element.getElementName();
+ if (!isNamespaceQualified(elementName)) {
+ String prefix = elementName.getPrefix();
+ String defaultNamespace = getNamespaceURI(prefix);
+ if (defaultNamespace != null) {
+ Name newElementName =
+ NameImpl.create(
+ elementName.getLocalName(),
+ elementName.getPrefix(),
+ defaultNamespace);
+ SOAPElement newElement = createElement(newElementName);
+ replaceChild(newElement, element);
+ return newElement;
+ }
+ }
+ return element;
+ }
+
+ //TODO: This is a temporary SAAJ workaround for optimizing XWS
+ // should be removed once the corresponding JAXP bug is fixed
+ // It appears the bug will be fixed in JAXP 1.4 (not by Appserver 9 timeframe)
+ public void setAttributeNS(
+ String namespaceURI,String qualifiedName, String value) {
+ int index = qualifiedName.indexOf(':');
+ String localName;
+ if (index < 0)
+ localName = qualifiedName;
+ else
+ localName = qualifiedName.substring(index + 1);
+
+ // Workaround for bug 6467808 - This needs to be fixed in JAXP
+
+ // Rolling back this fix, this is a wrong fix, infact its causing other regressions in JAXWS tck and
+ // other tests, because of this change the namespace declarations on soapenv:Fault element are never
+ // picked up. The fix for bug 6467808 should be in JAXP.
+// if(elementQName.getLocalPart().equals("Fault") &&
+// (SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE.equals(value) ||
+// SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE.equals(value)))
+// return;
+
+ super.setAttributeNS(namespaceURI,qualifiedName,value);
+ //String tmpLocalName = this.getLocalName();
+ String tmpURI = this.getNamespaceURI();
+ boolean isIDNS = false;
+ if( tmpURI != null && (tmpURI.equals(DSIG_NS) || tmpURI.equals(XENC_NS))){
+ isIDNS = true;
+ }
+ //No need to check for Signature/encryption element
+ //just check for namespace.
+ if(localName.equals("Id")){
+ if(namespaceURI == null || namespaceURI.equals("")){
+ setIdAttribute(localName,true);
+ }else if(isIDNS || WSU_NS.equals(namespaceURI)){
+ setIdAttributeNS(namespaceURI,localName,true);
+ }
+ }
+
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/EnvelopeImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,438 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.LazyEnvelope;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.StaxBridge;
+import com.sun.xml.internal.messaging.saaj.soap.StaxLazySourceBridge;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+import com.sun.xml.internal.messaging.saaj.util.FastInfosetReflection;
+import com.sun.xml.internal.messaging.saaj.util.stax.LazyEnvelopeStaxReader;
+import com.sun.xml.internal.messaging.saaj.util.transform.EfficientStreamingTransformer;
+
+import com.sun.xml.internal.org.jvnet.staxex.util.DOMStreamReader;
+import com.sun.xml.internal.org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter;
+
+/**
+ * Our implementation of the SOAP envelope.
+ *
+ * @author Anil Vijendran (anil@sun.com)
+ */
+public abstract class EnvelopeImpl extends ElementImpl implements LazyEnvelope {
+ protected HeaderImpl header;
+ protected BodyImpl body;
+ String omitXmlDecl = "yes";
+ String charset = "utf-8";
+ String xmlDecl = null;
+
+ protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, Name name) {
+ super(ownerDoc, name);
+ }
+
+ protected EnvelopeImpl(SOAPDocumentImpl ownerDoc, QName name) {
+ super(ownerDoc, name);
+ }
+
+ protected EnvelopeImpl(
+ SOAPDocumentImpl ownerDoc,
+ NameImpl name,
+ boolean createHeader,
+ boolean createBody)
+ throws SOAPException {
+ this(ownerDoc, name);
+
+ ensureNamespaceIsDeclared(
+ getElementQName().getPrefix(), getElementQName().getNamespaceURI());
+
+ // XXX
+ if (createHeader)
+ addHeader();
+
+ if (createBody)
+ addBody();
+ }
+
+ protected abstract NameImpl getHeaderName(String prefix);
+ protected abstract NameImpl getBodyName(String prefix);
+
+ public SOAPHeader addHeader() throws SOAPException {
+ return addHeader(null);
+ }
+
+ public SOAPHeader addHeader(String prefix) throws SOAPException {
+
+ if (prefix == null || prefix.equals("")) {
+ prefix = getPrefix();
+ }
+
+ NameImpl headerName = getHeaderName(prefix);
+ NameImpl bodyName = getBodyName(prefix);
+
+ HeaderImpl header = null;
+ SOAPElement firstChild = (SOAPElement) getFirstChildElement();
+
+ if (firstChild != null) {
+ if (firstChild.getElementName().equals(headerName)) {
+ log.severe("SAAJ0120.impl.header.already.exists");
+ throw new SOAPExceptionImpl("Can't add a header when one is already present.");
+ } else if (!firstChild.getElementName().equals(bodyName)) {
+ log.severe("SAAJ0121.impl.invalid.first.child.of.envelope");
+ throw new SOAPExceptionImpl("First child of Envelope must be either a Header or Body");
+ }
+ }
+
+ header = (HeaderImpl) createElement(headerName);
+ insertBefore(header, firstChild);
+ header.ensureNamespaceIsDeclared(headerName.getPrefix(), headerName.getURI());
+
+ return header;
+ }
+
+ protected void lookForHeader() throws SOAPException {
+ NameImpl headerName = getHeaderName(null);
+
+ HeaderImpl hdr = (HeaderImpl) findChild(headerName);
+ header = hdr;
+ }
+
+ public SOAPHeader getHeader() throws SOAPException {
+ lookForHeader();
+ return header;
+ }
+
+ protected void lookForBody() throws SOAPException {
+ NameImpl bodyName = getBodyName(null);
+
+ BodyImpl bodyChildElement = (BodyImpl) findChild(bodyName);
+ body = bodyChildElement;
+ }
+
+ public SOAPBody addBody() throws SOAPException {
+ return addBody(null);
+ }
+
+ public SOAPBody addBody(String prefix) throws SOAPException {
+ lookForBody();
+
+ if (prefix == null || prefix.equals("")) {
+ prefix = getPrefix();
+ }
+
+ if (body == null) {
+ NameImpl bodyName = getBodyName(prefix);
+ body = (BodyImpl) createElement(bodyName);
+ insertBefore(body, null);
+ body.ensureNamespaceIsDeclared(bodyName.getPrefix(), bodyName.getURI());
+ } else {
+ log.severe("SAAJ0122.impl.body.already.exists");
+ throw new SOAPExceptionImpl("Can't add a body when one is already present.");
+ }
+
+ return body;
+ }
+
+ protected SOAPElement addElement(Name name) throws SOAPException {
+ if (getBodyName(null).equals(name)) {
+ return addBody(name.getPrefix());
+ }
+ if (getHeaderName(null).equals(name)) {
+ return addHeader(name.getPrefix());
+ }
+
+ return super.addElement(name);
+ }
+
+ protected SOAPElement addElement(QName name) throws SOAPException {
+ if (getBodyName(null).equals(NameImpl.convertToName(name))) {
+ return addBody(name.getPrefix());
+ }
+ if (getHeaderName(null).equals(NameImpl.convertToName(name))) {
+ return addHeader(name.getPrefix());
+ }
+
+ return super.addElement(name);
+ }
+
+ public SOAPBody getBody() throws SOAPException {
+ lookForBody();
+ return body;
+ }
+
+ public Source getContent() {
+ return new DOMSource(getOwnerDocument());
+ }
+
+ public Name createName(String localName, String prefix, String uri)
+ throws SOAPException {
+
+ // validating parameters before passing them on
+ // to make sure that the namespace specification rules are followed
+
+ // reserved xmlns prefix cannot be used.
+ if ("xmlns".equals(prefix)) {
+ log.severe("SAAJ0123.impl.no.reserved.xmlns");
+ throw new SOAPExceptionImpl("Cannot declare reserved xmlns prefix");
+ }
+ // Qualified name cannot be xmlns.
+ if ((prefix == null) && ("xmlns".equals(localName))) {
+ log.severe("SAAJ0124.impl.qualified.name.cannot.be.xmlns");
+ throw new SOAPExceptionImpl("Qualified name cannot be xmlns");
+ }
+
+ return NameImpl.create(localName, prefix, uri);
+ }
+
+ public Name createName(String localName, String prefix)
+ throws SOAPException {
+ String namespace = getNamespaceURI(prefix);
+ if (namespace == null) {
+ log.log(
+ Level.SEVERE,
+ "SAAJ0126.impl.cannot.locate.ns",
+ new String[] { prefix });
+ throw new SOAPExceptionImpl(
+ "Unable to locate namespace for prefix " + prefix);
+ }
+ return NameImpl.create(localName, prefix, namespace);
+ }
+
+ public Name createName(String localName) throws SOAPException {
+ return NameImpl.createFromUnqualifiedName(localName);
+ }
+
+ public void setOmitXmlDecl(String value) {
+ this.omitXmlDecl = value;
+ }
+
+ public void setXmlDecl(String value) {
+ this.xmlDecl = value;
+ }
+
+ private String getOmitXmlDecl() {
+ return this.omitXmlDecl;
+ }
+
+ public void setCharsetEncoding(String value) {
+ charset = value;
+ }
+
+ public void output(OutputStream out) throws IOException {
+ try {
+// materializeBody();
+ Transformer transformer =
+ EfficientStreamingTransformer.newTransformer();
+
+ transformer.setOutputProperty(
+ OutputKeys.OMIT_XML_DECLARATION, "yes");
+ /*omitXmlDecl);*/
+ // no equivalent for "setExpandEmptyElements"
+ transformer.setOutputProperty(
+ OutputKeys.ENCODING,
+ charset);
+
+ if (omitXmlDecl.equals("no") && xmlDecl == null) {
+ xmlDecl = "";
+ }
+
+ StreamResult result = new StreamResult(out);
+ if (xmlDecl != null) {
+ OutputStreamWriter writer = new OutputStreamWriter(out, charset);
+ writer.write(xmlDecl);
+ writer.flush();
+ result = new StreamResult(writer);
+ }
+
+ if (log.isLoggable(Level.FINE)) {
+ log.log(Level.FINE, "SAAJ0190.impl.set.xml.declaration",
+ new String[] { omitXmlDecl });
+ log.log(Level.FINE, "SAAJ0191.impl.set.encoding",
+ new String[] { charset });
+ }
+
+ //StreamResult result = new StreamResult(out);
+ transformer.transform(getContent(), result);
+ } catch (Exception ex) {
+ throw new IOException(ex.getMessage());
+ }
+ }
+
+ /**
+ * Serialize to FI if boolean parameter set.
+ */
+ public void output(OutputStream out, boolean isFastInfoset)
+ throws IOException
+ {
+ if (!isFastInfoset) {
+ output(out);
+ }
+ else {
+ try {
+ // Run transform and generate FI output from content
+ Source source = getContent();
+ Transformer transformer = EfficientStreamingTransformer.newTransformer();
+ transformer.transform(getContent(),
+ FastInfosetReflection.FastInfosetResult_new(out));
+ }
+ catch (Exception ex) {
+ throw new IOException(ex.getMessage());
+ }
+ }
+ }
+
+ // public void prettyPrint(OutputStream out) throws IOException {
+ // if (getDocument() == null)
+ // initDocument();
+ //
+ // OutputFormat format = OutputFormat.createPrettyPrint();
+ //
+ // format.setIndentSize(2);
+ // format.setNewlines(true);
+ // format.setTrimText(true);
+ // format.setPadText(true);
+ // format.setExpandEmptyElements(false);
+ //
+ // XMLWriter writer = new XMLWriter(out, format);
+ // writer.write(getDocument());
+ // }
+ //
+ // public void prettyPrint(Writer out) throws IOException {
+ // if (getDocument() == null)
+ // initDocument();
+ //
+ // OutputFormat format = OutputFormat.createPrettyPrint();
+ //
+ // format.setIndentSize(2);
+ // format.setNewlines(true);
+ // format.setTrimText(true);
+ // format.setPadText(true);
+ // format.setExpandEmptyElements(false);
+ //
+ // XMLWriter writer = new XMLWriter(out, format);
+ // writer.write(getDocument());
+ // }
+
+
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+ log.log(Level.SEVERE,
+ "SAAJ0146.impl.invalid.name.change.requested",
+ new Object[] {elementQName.getLocalPart(),
+ newName.getLocalPart()});
+ throw new SOAPException("Cannot change name for "
+ + elementQName.getLocalPart() + " to "
+ + newName.getLocalPart());
+ }
+
+ @Override
+ public void setStaxBridge(StaxBridge bridge) throws SOAPException {
+ //set it on the body
+ ((BodyImpl) getBody()).setStaxBridge(bridge);
+ }
+
+ @Override
+ public StaxBridge getStaxBridge() throws SOAPException {
+ return ((BodyImpl) getBody()).getStaxBridge();
+ }
+
+ @Override
+ public XMLStreamReader getPayloadReader() throws SOAPException {
+ return ((BodyImpl) getBody()).getPayloadReader();
+ }
+
+ @Override
+ public void writeTo(final XMLStreamWriter writer) throws XMLStreamException, SOAPException {
+ StaxBridge readBridge = this.getStaxBridge();
+ if (readBridge != null && readBridge instanceof StaxLazySourceBridge) {
+// StaxSoapWriteBridge writingBridge = new StaxSoapWriteBridge(this);
+// writingBridge.write(writer);
+ final String soapEnvNS = this.getNamespaceURI();
+ final DOMStreamReader reader = new DOMStreamReader(this);
+ XMLStreamReaderToXMLStreamWriter writingBridge = new XMLStreamReaderToXMLStreamWriter();
+ writingBridge.bridge( new XMLStreamReaderToXMLStreamWriter.Breakpoint(reader, writer) {
+ public boolean proceedAfterStartElement() {
+ if ("Body".equals(reader.getLocalName()) && soapEnvNS.equals(reader.getNamespaceURI()) ){
+ return false;
+ } else
+ return true;
+ }
+ });//bridgeToBodyStartTag
+ ((StaxLazySourceBridge)readBridge).writePayloadTo(writer);
+ writer.writeEndElement();//body
+ writer.writeEndElement();//env
+ writer.writeEndDocument();
+ writer.flush();
+ } else {
+ LazyEnvelopeStaxReader lazyEnvReader = new LazyEnvelopeStaxReader(this);
+ XMLStreamReaderToXMLStreamWriter writingBridge = new XMLStreamReaderToXMLStreamWriter();
+ writingBridge.bridge(lazyEnvReader, writer);
+// writingBridge.bridge(new XMLStreamReaderToXMLStreamWriter.Breakpoint(lazyEnvReader, writer));
+ }
+ //Assume the staxBridge is exhausted now since we would have read the body reader
+ ((BodyImpl) getBody()).setPayloadStreamRead();
+ }
+
+ @Override
+ public QName getPayloadQName() throws SOAPException {
+ return ((BodyImpl) getBody()).getPayloadQName();
+ }
+
+ @Override
+ public String getPayloadAttributeValue(String localName) throws SOAPException {
+ return ((BodyImpl) getBody()).getPayloadAttributeValue(localName);
+ }
+
+ @Override
+ public String getPayloadAttributeValue(QName qName) throws SOAPException {
+ return ((BodyImpl) getBody()).getPayloadAttributeValue(qName);
+ }
+
+ @Override
+ public boolean isLazy() {
+ try {
+ return ((BodyImpl) getBody()).isLazy();
+ } catch (SOAPException e) {
+ return false;
+ }
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultElementImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPFaultElement;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public abstract class FaultElementImpl
+ extends ElementImpl
+ implements SOAPFaultElement {
+
+ protected FaultElementImpl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
+ super(ownerDoc, qname);
+ }
+
+ protected FaultElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
+ super(ownerDoc, qname);
+ }
+
+ protected abstract boolean isStandardFaultElement();
+
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+ log.log(Level.SEVERE,
+ "SAAJ0146.impl.invalid.name.change.requested",
+ new Object[] {elementQName.getLocalPart(),
+ newName.getLocalPart()});
+ throw new SOAPException("Cannot change name for "
+ + elementQName.getLocalPart() + " to "
+ + newName.getLocalPart());
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/FaultImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.Locale;
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import org.w3c.dom.Element;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public abstract class FaultImpl extends ElementImpl implements SOAPFault {
+
+ /* This can also represent a fault reason element */
+ protected SOAPFaultElement faultStringElement;
+
+ /* This can also represent a fault role element */
+ protected SOAPFaultElement faultActorElement;
+
+ protected SOAPFaultElement faultCodeElement;
+
+ protected Detail detail;
+
+ protected FaultImpl(SOAPDocumentImpl ownerDoc, NameImpl name) {
+ super(ownerDoc, name);
+ }
+
+
+ protected abstract NameImpl getDetailName();
+ protected abstract NameImpl getFaultCodeName();
+ protected abstract NameImpl getFaultStringName();
+ protected abstract NameImpl getFaultActorName();
+ protected abstract DetailImpl createDetail();
+ protected abstract FaultElementImpl createSOAPFaultElement(String localName);
+ protected abstract FaultElementImpl createSOAPFaultElement(QName qname);
+ protected abstract FaultElementImpl createSOAPFaultElement(Name qname);
+ protected abstract void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException;
+ protected abstract void finallySetFaultCode(String faultcode) throws SOAPException;
+ protected abstract boolean isStandardFaultElement(String localName);
+ protected abstract QName getDefaultFaultCode();
+
+
+ protected void findFaultCodeElement() {
+ this.faultCodeElement =
+ (SOAPFaultElement) findAndConvertChildElement(getFaultCodeName());
+ }
+
+ protected void findFaultActorElement() {
+ this.faultActorElement =
+ (SOAPFaultElement) findAndConvertChildElement(getFaultActorName());
+ }
+
+ protected void findFaultStringElement() {
+ this.faultStringElement =
+ (SOAPFaultElement) findAndConvertChildElement(getFaultStringName());
+ }
+
+ public void setFaultCode(String faultCode) throws SOAPException {
+ setFaultCode(
+ NameImpl.getLocalNameFromTagName(faultCode),
+ NameImpl.getPrefixFromTagName(faultCode),
+ null);
+ }
+
+ public void setFaultCode(String faultCode, String prefix, String uri)
+ throws SOAPException {
+
+ if (prefix == null || "".equals(prefix)) {
+ if (uri != null && !"".equals(uri)) {
+ prefix = getNamespacePrefix(uri);
+ if (prefix == null || "".equals(prefix)) {
+ prefix = "ns0";
+ }
+ }
+ }
+ if (this.faultCodeElement == null)
+ findFaultCodeElement();
+
+ if (this.faultCodeElement == null)
+ this.faultCodeElement = addFaultCodeElement();
+ else
+ this.faultCodeElement.removeContents();
+
+ if (uri == null || "".equals(uri)) {
+ uri = this.faultCodeElement.getNamespaceURI(prefix);
+ }
+ if (uri == null || "".equals(uri)) {
+ if (prefix != null && !"".equals(prefix)) {
+ //cannot allow an empty URI for a non-Empty prefix
+ log.log(Level.SEVERE, "SAAJ0140.impl.no.ns.URI", new Object[]{prefix + ":" + faultCode});
+ throw new SOAPExceptionImpl("Empty/Null NamespaceURI specified for faultCode \"" + prefix + ":" + faultCode + "\"");
+ } else {
+ uri = "";
+ }
+ }
+ checkIfStandardFaultCode(faultCode, uri);
+ ((FaultElementImpl) this.faultCodeElement).ensureNamespaceIsDeclared(prefix, uri);
+
+ if (prefix == null || "".equals(prefix)) {
+ finallySetFaultCode(faultCode);
+ } else {
+ finallySetFaultCode(prefix + ":" + faultCode);
+ }
+ }
+
+ public void setFaultCode(Name faultCodeQName) throws SOAPException {
+ setFaultCode(
+ faultCodeQName.getLocalName(),
+ faultCodeQName.getPrefix(),
+ faultCodeQName.getURI());
+ }
+
+ public void setFaultCode(QName faultCodeQName) throws SOAPException {
+ setFaultCode(
+ faultCodeQName.getLocalPart(),
+ faultCodeQName.getPrefix(),
+ faultCodeQName.getNamespaceURI());
+ }
+
+ protected static QName convertCodeToQName(
+ String code,
+ SOAPElement codeContainingElement) {
+
+ int prefixIndex = code.indexOf(':');
+ if (prefixIndex == -1) {
+ return new QName(code);
+ }
+
+ String prefix = code.substring(0, prefixIndex);
+ String nsName =((ElementImpl) codeContainingElement).lookupNamespaceURI(prefix);
+ //((ElementImpl) codeContainingElement).getNamespaceURI(prefix);
+ return new QName(nsName, getLocalPart(code), prefix);
+ }
+
+ protected void initializeDetail() {
+ NameImpl detailName = getDetailName();
+ detail = (Detail) findAndConvertChildElement(detailName);
+ }
+
+ public Detail getDetail() {
+ if (detail == null)
+ initializeDetail();
+ if ((detail != null) && (detail.getParentNode() == null)) {
+ // a detach node was called on it
+ detail = null;
+ }
+ return detail;
+ }
+
+ public Detail addDetail() throws SOAPException {
+ if (detail == null)
+ initializeDetail();
+ if (detail == null) {
+ detail = createDetail();
+ addNode(detail);
+ return detail;
+ } else {
+ // Log
+ throw new SOAPExceptionImpl("Error: Detail already exists");
+ }
+ }
+
+ public boolean hasDetail() {
+ return (getDetail() != null);
+ }
+
+ public abstract void setFaultActor(String faultActor) throws SOAPException;
+
+ public String getFaultActor() {
+ if (this.faultActorElement == null)
+ findFaultActorElement();
+ if (this.faultActorElement != null) {
+ return this.faultActorElement.getValue();
+ }
+ return null;
+ }
+
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+
+ log.log(
+ Level.SEVERE,
+ "SAAJ0146.impl.invalid.name.change.requested",
+ new Object[] {elementQName.getLocalPart(), newName.getLocalPart()});
+ throw new SOAPException(
+ "Cannot change name for " + elementQName.getLocalPart() + " to " + newName.getLocalPart());
+ }
+
+ protected SOAPElement convertToSoapElement(Element element) {
+ if (element instanceof SOAPFaultElement) {
+ return (SOAPElement) element;
+ } else if (element instanceof SOAPElement) {
+ SOAPElement soapElement = (SOAPElement) element;
+ if (getDetailName().equals(soapElement.getElementName())) {
+ return replaceElementWithSOAPElement(element, createDetail());
+ } else {
+ String localName =
+ soapElement.getElementName().getLocalName();
+ if (isStandardFaultElement(localName))
+ return replaceElementWithSOAPElement(
+ element,
+ createSOAPFaultElement(soapElement.getElementQName()));
+ return soapElement;
+ }
+ } else {
+ Name elementName = NameImpl.copyElementName(element);
+ ElementImpl newElement;
+ if (getDetailName().equals(elementName)) {
+ newElement = (ElementImpl) createDetail();
+ } else {
+ String localName = elementName.getLocalName();
+ if (isStandardFaultElement(localName))
+ newElement =
+ (ElementImpl) createSOAPFaultElement(elementName);
+ else
+ newElement = (ElementImpl) createElement(elementName);
+ }
+ return replaceElementWithSOAPElement(element, newElement);
+ }
+ }
+
+ protected SOAPFaultElement addFaultCodeElement() throws SOAPException {
+ if (this.faultCodeElement == null)
+ findFaultCodeElement();
+ if (this.faultCodeElement == null) {
+ this.faultCodeElement =
+ addSOAPFaultElement(getFaultCodeName().getLocalName());
+ return this.faultCodeElement;
+ } else {
+ throw new SOAPExceptionImpl("Error: Faultcode already exists");
+ }
+ }
+
+ private SOAPFaultElement addFaultStringElement() throws SOAPException {
+ if (this.faultStringElement == null)
+ findFaultStringElement();
+ if (this.faultStringElement == null) {
+ this.faultStringElement =
+ addSOAPFaultElement(getFaultStringName().getLocalName());
+ return this.faultStringElement;
+ } else {
+ // Log
+ throw new SOAPExceptionImpl("Error: Faultstring already exists");
+ }
+ }
+
+ private SOAPFaultElement addFaultActorElement() throws SOAPException {
+ if (this.faultActorElement == null)
+ findFaultActorElement();
+ if (this.faultActorElement == null) {
+ this.faultActorElement =
+ addSOAPFaultElement(getFaultActorName().getLocalName());
+ return this.faultActorElement;
+ } else {
+ // Log
+ throw new SOAPExceptionImpl("Error: Faultactor already exists");
+ }
+ }
+
+ protected SOAPElement addElement(Name name) throws SOAPException {
+ if (getDetailName().equals(name)) {
+ return addDetail();
+ } else if(getFaultCodeName().equals(name)) {
+ return addFaultCodeElement();
+ } else if(getFaultStringName().equals(name)) {
+ return addFaultStringElement();
+ } else if(getFaultActorName().equals(name)) {
+ return addFaultActorElement();
+ }
+ return super.addElement(name);
+ }
+
+ protected SOAPElement addElement(QName name) throws SOAPException {
+ return addElement(NameImpl.convertToName(name));
+ }
+
+ protected FaultElementImpl addSOAPFaultElement(String localName)
+ throws SOAPException {
+
+ FaultElementImpl faultElem = createSOAPFaultElement(localName);
+ addNode(faultElem);
+ return faultElem;
+ }
+
+ /**
+ * Convert an xml:lang attribute value into a Locale object
+ */
+ protected static Locale xmlLangToLocale(String xmlLang) {
+ if (xmlLang == null) {
+ return null;
+ }
+
+ // Spec uses hyphen as separator
+ int index = xmlLang.indexOf("-");
+
+ // Accept underscore as separator as well
+ if (index == -1) {
+ index = xmlLang.indexOf("_");
+ }
+
+ if (index == -1) {
+ // No separator so assume only a language component
+ return new Locale(xmlLang, "");
+ }
+
+ String language = xmlLang.substring(0, index);
+ String country = xmlLang.substring(index + 1);
+ return new Locale(language, country);
+ }
+
+ protected static String localeToXmlLang(Locale locale) {
+ String xmlLang = locale.getLanguage();
+ String country = locale.getCountry();
+ if (!"".equals(country)) {
+ xmlLang += "-" + country;
+ }
+ return xmlLang;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderElementImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public abstract class HeaderElementImpl
+ extends ElementImpl
+ implements SOAPHeaderElement {
+
+ protected static Name RELAY_ATTRIBUTE_LOCAL_NAME =
+ NameImpl.createFromTagName("relay");
+ protected static Name MUST_UNDERSTAND_ATTRIBUTE_LOCAL_NAME =
+ NameImpl.createFromTagName("mustUnderstand");
+
+ public HeaderElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
+ super(ownerDoc, qname);
+ }
+ public HeaderElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
+ super(ownerDoc, qname);
+ }
+
+ protected abstract NameImpl getActorAttributeName();
+ protected abstract NameImpl getRoleAttributeName();
+ protected abstract NameImpl getMustunderstandAttributeName();
+ protected abstract boolean getMustunderstandAttributeValue(String str);
+ protected abstract String getMustunderstandLiteralValue(boolean mu);
+ protected abstract NameImpl getRelayAttributeName();
+ protected abstract boolean getRelayAttributeValue(String str);
+ protected abstract String getRelayLiteralValue(boolean mu);
+ protected abstract String getActorOrRole();
+
+
+ public void setParentElement(SOAPElement element) throws SOAPException {
+ if (!(element instanceof SOAPHeader)) {
+ log.severe("SAAJ0130.impl.header.elem.parent.mustbe.header");
+ throw new SOAPException("Parent of a SOAPHeaderElement has to be a SOAPHeader");
+ }
+
+ super.setParentElement(element);
+ }
+
+ public void setActor(String actorUri) {
+ try {
+ removeAttribute(getActorAttributeName());
+ addAttribute((Name) getActorAttributeName(), actorUri);
+ } catch (SOAPException ex) {
+ }
+ }
+
+ //SOAP 1.2 supports Role
+ public void setRole(String roleUri) throws SOAPException {
+ // runtime exception thrown if called for SOAP 1.1
+ removeAttribute(getRoleAttributeName());
+ addAttribute((Name) getRoleAttributeName(), roleUri);
+ }
+
+
+ Name actorAttNameWithoutNS = NameImpl.createFromTagName("actor");
+
+ public String getActor() {
+ String actor = getAttributeValue(getActorAttributeName());
+ return actor;
+ }
+
+ Name roleAttNameWithoutNS = NameImpl.createFromTagName("role");
+
+ public String getRole() {
+ // runtime exception thrown for 1.1
+ String role = getAttributeValue(getRoleAttributeName());
+ return role;
+ }
+
+ public void setMustUnderstand(boolean mustUnderstand) {
+ try {
+ removeAttribute(getMustunderstandAttributeName());
+ addAttribute(
+ (Name) getMustunderstandAttributeName(),
+ getMustunderstandLiteralValue(mustUnderstand));
+ } catch (SOAPException ex) {
+ }
+ }
+
+ public boolean getMustUnderstand() {
+ String mu = getAttributeValue(getMustunderstandAttributeName());
+
+ if (mu != null)
+ return getMustunderstandAttributeValue(mu);
+
+ return false;
+ }
+
+ public void setRelay(boolean relay) throws SOAPException {
+ // runtime exception thrown for 1.1
+ removeAttribute(getRelayAttributeName());
+ addAttribute(
+ (Name) getRelayAttributeName(),
+ getRelayLiteralValue(relay));
+ }
+
+ public boolean getRelay() {
+ String mu = getAttributeValue(getRelayAttributeName());
+ if (mu != null)
+ return getRelayAttributeValue(mu);
+
+ return false;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/HeaderImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,306 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.*;
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public abstract class HeaderImpl extends ElementImpl implements SOAPHeader {
+ protected static final boolean MUST_UNDERSTAND_ONLY = false;
+
+ protected HeaderImpl(SOAPDocumentImpl ownerDoc, NameImpl name) {
+ super(ownerDoc, name);
+ }
+
+ protected abstract SOAPHeaderElement createHeaderElement(Name name)
+ throws SOAPException;
+ protected abstract SOAPHeaderElement createHeaderElement(QName name)
+ throws SOAPException;
+ protected abstract NameImpl getNotUnderstoodName();
+ protected abstract NameImpl getUpgradeName();
+ protected abstract NameImpl getSupportedEnvelopeName();
+
+ public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException {
+ SOAPElement newHeaderElement =
+ ElementFactory.createNamedElement(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ name.getLocalName(),
+ name.getPrefix(),
+ name.getURI());
+ if (newHeaderElement == null
+ || !(newHeaderElement instanceof SOAPHeaderElement)) {
+ newHeaderElement = createHeaderElement(name);
+ }
+
+ // header elements must be namespace qualified
+ // check that URI is not empty, ensuring that the element is NS qualified.
+ String uri = newHeaderElement.getElementQName().getNamespaceURI();
+ if ((uri == null) || ("").equals(uri)) {
+ log.severe("SAAJ0131.impl.header.elems.ns.qualified");
+ throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
+ }
+ addNode(newHeaderElement);
+ return (SOAPHeaderElement) newHeaderElement;
+ }
+
+ public SOAPHeaderElement addHeaderElement(QName name) throws SOAPException {
+ SOAPElement newHeaderElement =
+ ElementFactory.createNamedElement(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ name.getLocalPart(),
+ name.getPrefix(),
+ name.getNamespaceURI());
+ if (newHeaderElement == null
+ || !(newHeaderElement instanceof SOAPHeaderElement)) {
+ newHeaderElement = createHeaderElement(name);
+ }
+
+ // header elements must be namespace qualified
+ // check that URI is not empty, ensuring that the element is NS qualified.
+ String uri = newHeaderElement.getElementQName().getNamespaceURI();
+ if ((uri == null) || ("").equals(uri)) {
+ log.severe("SAAJ0131.impl.header.elems.ns.qualified");
+ throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
+ }
+ addNode(newHeaderElement);
+ return (SOAPHeaderElement) newHeaderElement;
+ }
+
+ protected SOAPElement addElement(Name name) throws SOAPException {
+ return addHeaderElement(name);
+ }
+
+ protected SOAPElement addElement(QName name) throws SOAPException {
+ return addHeaderElement(name);
+ }
+
+ public Iterator examineHeaderElements(String actor) {
+ return getHeaderElementsForActor(actor, false, false);
+ }
+
+ public Iterator extractHeaderElements(String actor) {
+ return getHeaderElementsForActor(actor, true, false);
+ }
+
+ protected Iterator getHeaderElementsForActor(
+ String actor,
+ boolean detach,
+ boolean mustUnderstand) {
+ if (actor == null || actor.equals("")) {
+ log.severe("SAAJ0132.impl.invalid.value.for.actor.or.role");
+ throw new IllegalArgumentException("Invalid value for actor or role");
+ }
+ return getHeaderElements(actor, detach, mustUnderstand);
+ }
+
+ protected Iterator getHeaderElements(
+ String actor,
+ boolean detach,
+ boolean mustUnderstand) {
+ List elementList = new ArrayList();
+
+ Iterator eachChild = getChildElements();
+
+ Object currentChild = iterate(eachChild);
+ while (currentChild != null) {
+ if (!(currentChild instanceof SOAPHeaderElement)) {
+ currentChild = iterate(eachChild);
+ } else {
+ HeaderElementImpl currentElement =
+ (HeaderElementImpl) currentChild;
+ currentChild = iterate(eachChild);
+
+ boolean isMustUnderstandMatching =
+ (!mustUnderstand || currentElement.getMustUnderstand());
+ boolean doAdd = false;
+ if (actor == null && isMustUnderstandMatching) {
+ doAdd = true;
+ } else {
+ String currentActor = currentElement.getActorOrRole();
+ if (currentActor == null) {
+ currentActor = "";
+ }
+
+ if (currentActor.equalsIgnoreCase(actor)
+ && isMustUnderstandMatching) {
+ doAdd = true;
+ }
+ }
+
+ if (doAdd) {
+ elementList.add(currentElement);
+ if (detach) {
+ currentElement.detachNode();
+ }
+ }
+ }
+ }
+
+ return elementList.listIterator();
+ }
+
+ private Object iterate(Iterator each) {
+ return each.hasNext() ? each.next() : null;
+ }
+
+ public void setParentElement(SOAPElement element) throws SOAPException {
+ if (!(element instanceof SOAPEnvelope)) {
+ log.severe("SAAJ0133.impl.header.parent.mustbe.envelope");
+ throw new SOAPException("Parent of SOAPHeader has to be a SOAPEnvelope");
+ }
+ super.setParentElement(element);
+ }
+
+ // overriding ElementImpl's method to ensure that HeaderElements are
+ // namespace qualified. Holds for both SOAP versions.
+ // TODO - This check needs to be made for other addChildElement() methods
+ // as well.
+ public SOAPElement addChildElement(String localName) throws SOAPException {
+
+ SOAPElement element = super.addChildElement(localName);
+ // check that URI is not empty, ensuring that the element is NS qualified.
+ String uri = element.getElementName().getURI();
+ if ((uri == null) || ("").equals(uri)) {
+ log.severe("SAAJ0134.impl.header.elems.ns.qualified");
+ throw new SOAPExceptionImpl("HeaderElements must be namespace qualified");
+ }
+ return element;
+ }
+
+ public Iterator examineAllHeaderElements() {
+ return getHeaderElements(null, false, MUST_UNDERSTAND_ONLY);
+ }
+
+ public Iterator examineMustUnderstandHeaderElements(String actor) {
+ return getHeaderElements(actor, false, true);
+
+ }
+
+ public Iterator extractAllHeaderElements() {
+ return getHeaderElements(null, true, false);
+ }
+
+ public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSoapUris)
+ throws SOAPException {
+ if (supportedSoapUris == null) {
+ log.severe("SAAJ0411.ver1_2.no.null.supportedURIs");
+ throw new SOAPException("Argument cannot be null; iterator of supportedURIs cannot be null");
+ }
+ if (!supportedSoapUris.hasNext()) {
+ log.severe("SAAJ0412.ver1_2.no.empty.list.of.supportedURIs");
+ throw new SOAPException("List of supported URIs cannot be empty");
+ }
+ Name upgradeName = getUpgradeName();
+ SOAPHeaderElement upgradeHeaderElement =
+ (SOAPHeaderElement) addChildElement(upgradeName);
+ Name supportedEnvelopeName = getSupportedEnvelopeName();
+ int i = 0;
+ while (supportedSoapUris.hasNext()) {
+ SOAPElement subElement =
+ upgradeHeaderElement.addChildElement(supportedEnvelopeName);
+ String ns = "ns" + Integer.toString(i);
+ subElement.addAttribute(
+ NameImpl.createFromUnqualifiedName("qname"),
+ ns + ":Envelope");
+ subElement.addNamespaceDeclaration(
+ ns,
+ (String) supportedSoapUris.next());
+ i ++;
+ }
+ return upgradeHeaderElement;
+ }
+
+ public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
+ throws SOAPException {
+ return addUpgradeHeaderElement(new String[] {supportedSoapUri});
+ }
+
+ public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
+ throws SOAPException {
+
+ if (supportedSoapUris == null) {
+ log.severe("SAAJ0411.ver1_2.no.null.supportedURIs");
+ throw new SOAPException("Argument cannot be null; array of supportedURIs cannot be null");
+ }
+ if (supportedSoapUris.length == 0) {
+ log.severe("SAAJ0412.ver1_2.no.empty.list.of.supportedURIs");
+ throw new SOAPException("List of supported URIs cannot be empty");
+ }
+ Name upgradeName = getUpgradeName();
+ SOAPHeaderElement upgradeHeaderElement =
+ (SOAPHeaderElement) addChildElement(upgradeName);
+ Name supportedEnvelopeName = getSupportedEnvelopeName();
+ for (int i = 0; i < supportedSoapUris.length; i ++) {
+ SOAPElement subElement =
+ upgradeHeaderElement.addChildElement(supportedEnvelopeName);
+ String ns = "ns" + Integer.toString(i);
+ subElement.addAttribute(
+ NameImpl.createFromUnqualifiedName("qname"),
+ ns + ":Envelope");
+ subElement.addNamespaceDeclaration(ns, supportedSoapUris[i]);
+ }
+ return upgradeHeaderElement;
+ }
+
+ protected SOAPElement convertToSoapElement(Element element) {
+ if (element instanceof SOAPHeaderElement) {
+ return (SOAPElement) element;
+ } else {
+ SOAPHeaderElement headerElement;
+ try {
+ headerElement =
+ createHeaderElement(NameImpl.copyElementName(element));
+ } catch (SOAPException e) {
+ throw new ClassCastException("Could not convert Element to SOAPHeaderElement: " + e.getMessage());
+ }
+ return replaceElementWithSOAPElement(
+ element,
+ (ElementImpl) headerElement);
+ }
+ }
+
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+ log.log(Level.SEVERE,
+ "SAAJ0146.impl.invalid.name.change.requested",
+ new Object[] {elementQName.getLocalPart(),
+ newName.getLocalPart()});
+ throw new SOAPException("Cannot change name for "
+ + elementQName.getLocalPart() + " to "
+ + newName.getLocalPart());
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: Parent of a SOAPBodyElement has to be a SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Unable to locate namespace for prefix {0}
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Cannot add fragments which contain elements which are in the SOAP namespace
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Encoding style {0} should be a valid URI
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: Cannot pass NULL to setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Cannot setValue on an Element that does not have an only child of type Text
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: Error: Fault already exists
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: Parent of SOAPBody has to be a SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: Cannot pass NULL to setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Cannot split text from a Comment Node
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Cannot replace whole text from a Comment Node
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: Can't add a header when one is already present
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: First child of Envelope must be either a Header or Body
+SAAJ0122.impl.body.already.exists=SAAJ0122: Can't add a body when one is already present
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Cannot declare reserved xmlns prefix
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Qualified name cannot be xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Unable to locate namespace for prefix {0}
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Cannot pass NULL to setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: Parent of a SOAPHeaderElement has to be a SOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements must be namespace qualified
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Invalid value for actor or role
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: Parent of SOAPHeader has to be a SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements must be namespace qualified
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: Empty/Null NamespaceURI specified for faultCode {0}
+SAAJ0141.impl.detail.exists=SAAJ0141: Detail already exists
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text not supported by this SOAP version, try SOAP 1.2 or later
+SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node not supported by this SOAP version, try SOAP 1.2 or later
+SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role not supported by this SOAP version, try SOAP 1.2 or later
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Cannot pass NULL to setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Cannot change name of element {0} to {1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Cannot change the URI for prefix {0} from {1} to {2} in setElementQName
+SAAJ0148.impl.invalid.prefix.for.uri=Non-empty namespace URI: {0} for an empty prefix in SetElementQName
+SAAJ0149.impl.null.prefix=SAAJ0149: prefix cannot be "null" when creating a QName
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Cannot extract Document from body
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Unable to extract Document from body
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: Added attribute {0}
+SAAJ0151.impl.no.children=SAAJ0151: Cannot find node containing value: there are no children
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Cannot find node containing value: first child is not a Text node
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Cannot find node containing value: There is more than one child node
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: A SOAPFault element can only be added as a child of SOAPBody
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: A Detail element can only be added as a child of a SOAPFault
+SAAJ0156.impl.adding.fault.error=SAAJ0156: Cannot add SOAPFault, a SOAPFault should be the only child of a SOAPBody
+SAAJ0157.impl.detail.exists.error=SAAJ0157: Cannot add Detail, Detail already exists
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAP Version mismatch encountered when trying to add SOAPFault to SOAPBody
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: SOAP Version mismatch encountered when trying to add Detail to SOAPFault
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omit XML declaration set to {0}
+SAAJ0191.impl.set.encoding=SAAJ0191: Encoding is set to {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: \u00DCbergeordnetes Element von SOAPBodyElement muss ein SOAPBody sein
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Namespace f\u00FCr Pr\u00E4fix {0} kann nicht gefunden werden
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Es k\u00F6nnen keine Fragmente hinzugef\u00FCgt werden, die Elemente enthalten, die im SOAP-Namespace enthalten sind
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Codierungsstil {0} muss ein g\u00FCltiger URI sein
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: NULL kann nicht an setParentElement \u00FCbergeben werden
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: setValue ist bei einem Element nicht m\u00F6glich, das nicht ein einziges untergeordnetes Element vom Typ Text hat
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: Fehler: Fault ist bereits vorhanden
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: \u00DCbergeordnetes Element von SOAPBody muss SOAPEnvelope sein
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: NULL kann nicht an setParentElement \u00FCbergeben werden
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Text aus einem Kommentarknoten kann nicht geteilt werden
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Gesamter Text aus einem Kommentarknoten kann nicht ersetzt werden
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: Es kann kein Header hinzugef\u00FCgt werden, wenn bereits ein Header vorhanden ist
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Erstes untergeordnetes Element von Envelope muss "Header" oder "Body" sein
+SAAJ0122.impl.body.already.exists=SAAJ0122: Es kann kein Nachrichtentext hinzugef\u00FCgt werden, wenn bereits ein Nachrichtentext vorhanden ist
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Reserviertes xmlns-Pr\u00E4fix kann nicht deklariert werden
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Vollst\u00E4ndiger Name darf nicht xmlns sein
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Namespace f\u00FCr Pr\u00E4fix {0} kann nicht gefunden werden
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: NULL kann nicht an setParentElement \u00FCbergeben werden
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: \u00DCbergeordnetes Element von SOAPHeaderElement muss ein SOAPHeader sein
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements muss mit Namespace angegeben werden
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Ung\u00FCltiger Wert f\u00FCr Actor oder Rolle
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: \u00DCbergeordnetes Element von SOAPHeader muss SOAPEnvelope sein
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements muss mit Namespace angegeben werden
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: Leerer/Null-NamespaceURI f\u00FCr faultCode {0} angegeben
+SAAJ0141.impl.detail.exists=SAAJ0141: Detail ist bereits vorhanden
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Ursache/Text wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
+SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Knoten wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
+SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Rolle wird von dieser SOAP-Version nicht unterst\u00FCtzt, versuchen Sie SOAP 1.2 oder h\u00F6her
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: NULL kann nicht an setParentElement \u00FCbergeben werden
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Name des Elements {0} kann nicht in {1} ge\u00E4ndert werden
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Der URI f\u00FCr Pr\u00E4fix {0} kann nicht von {1} in {2} in setElementQName ge\u00E4ndert werden
+SAAJ0148.impl.invalid.prefix.for.uri=Nicht-leerer Namespace-URI: {0} f\u00FCr ein leeres Pr\u00E4fix in SetElementQName
+SAAJ0149.impl.null.prefix=SAAJ0149: Pr\u00E4fix darf bei der Erstellung eines QName nicht "null" sein
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Dokument kann nicht aus Nachrichtentext extrahiert werden
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Dokument kann nicht aus Nachrichtentext extrahiert werden
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: Attribut {0} hinzugef\u00FCgt
+SAAJ0151.impl.no.children=SAAJ0151: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: es sind keine untergeordneten Elemente vorhanden
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: erstes untergeordnetes Element ist kein Textknoten
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Knoten, der Wert enth\u00E4lt, kann nicht gefunden werden: Es ist mehr als ein untergeordneter Knoten vorhanden
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: Ein SOAPFault-Element kann nur als untergeordnetes Element von SOAPBody hinzugef\u00FCgt werden
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Ein "Detail"-Element kann nur als untergeordnetes Element von SOAPFault hinzugef\u00FCgt werden
+SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault kann nicht hinzugef\u00FCgt werden, SOAPFault muss das einzige untergeordnete Element von SOAPBody sein
+SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail kann nicht hinzugef\u00FCgt werden, Detail ist bereits vorhanden
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: Nicht \u00FCbereinstimmende SOAP-Version beim Versuch aufgetreten, SOAPFault zu SOAPBody hinzuzuf\u00FCgen
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Nicht \u00FCbereinstimmende SOAP-Version beim Versuch aufgetreten, Detail zu SOAPBody hinzuzuf\u00FCgen
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: Deklaration "Omit XML" auf {0} gesetzt
+SAAJ0191.impl.set.encoding=SAAJ0191: Codierung ist auf {0} gesetzt
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: el principal de un SOAPBodyElement tiene que ser un SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: no se ha encontrado el espacio de nombres para el prefijo {0}
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: no se pueden agregar fragmentos que contengan elementos que se encuentren en el espacio de nombres de SOAP
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: el estilo de codificaci\u00F3n {0} debe ser un URI v\u00E1lido
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: no se puede transferir NULL a setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: no se puede definir un valor en un elemento que no tenga un \u00FAnico secundario de tipo Text
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: Error: ya existe el fallo
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: el principal de SOAPBody tiene que ser SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: no se puede transferir NULL a setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: no se puede dividir el texto de un nodo de comentarios
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: no se puede sustituir el texto completo de un nodo de comentarios
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: no se puede agregar una cabecera si ya hay una
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: el primer secundario de Envelope debe ser Header o Body
+SAAJ0122.impl.body.already.exists=SAAJ0120: no se puede agregar un cuerpo si ya hay uno
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: no se puede declarar el prefijo xmlns reservado
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: el nombre cualificado no puede ser xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: no se ha encontrado el espacio de nombres para el prefijo {0}
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: no se puede transferir NULL a setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: el principal de SOAPHeaderElement tiene que ser SOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements debe estar cualificado por espacio de nombres
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: valor no v\u00E1lido para actor o rol
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: el principal de SOAPHeader tiene que ser SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements debe estar cualificado por espacio de nombres
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: se ha especificado un URI de espacio de nombres vac\u00EDo o nulo para el c\u00F3digo de fallo {0}
+SAAJ0141.impl.detail.exists=SAAJ0141: ya existe el detalle
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: el fallo/motivo/texto no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
+SAAJ0143.impl.node.not.supported=SAAJ0143: El fallo/nodo no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
+SAAJ0144.impl.role.not.supported=SAAJ0143: el fallo/rol no est\u00E1 soportado en esta versi\u00F3n de SOAP. Pruebe SOAP 1.2 o posterior
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: no se puede transferir NULL a setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: no se puede cambiar el nombre del elemento {0} por {1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: no se puede cambiar el URI del prefijo {0} de {1} a {2} en setElementQName
+SAAJ0148.impl.invalid.prefix.for.uri=URI de espacio de nombres no vac\u00EDo: {0} para un prefijo vac\u00EDo en SetElementQName
+SAAJ0149.impl.null.prefix=SAAJ0149: el prefijo no puede ser "null" al crear un QName
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: no se puede extraer el documento del cuerpo
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: no se ha podido extraer el documento del cuerpo
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: se ha agregado el atributo {0}
+SAAJ0151.impl.no.children=SAAJ0151: no se ha encontrado el nodo que contiene el valor: no hay secundarios
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: no se ha encontrado el nodo que contiene el valor: el primer secundario no es un nodo de texto
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: no se ha encontrado el nodo que contiene el valor: hay m\u00E1s de un nodo secundario
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: un elemento SOAPFault s\u00F3lo se puede agregar como secundario de SOAPBody
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: un elemento Detail s\u00F3lo se puede agregar como secundario de SOAPFault
+SAAJ0156.impl.adding.fault.error=SAAJ0156: no se puede agregar SOAPFault; SOAPFault debe ser el \u00FAnico secundario de SOAPBody
+SAAJ0157.impl.detail.exists.error=SAAJ0157: no se puede agregar el detalle. El detalle ya existe
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: se ha encontrado un error de coincidencia de la versi\u00F3n de SOAP al intentar agregar SOAPFault a SOAPBody
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: se ha encontrado un error de coincidencia de la versi\u00F3n de SOAP al intentar agregar Detail a SOAPFault
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: omita la declaraci\u00F3n XML definida en {0}
+SAAJ0191.impl.set.encoding=SAAJ0191: la codificaci\u00F3n se ha definido en {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101 : le parent d'un \u00E9l\u00E9ment SOAPBodyElement doit \u00EAtre un \u00E9l\u00E9ment SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102 : impossible de localiser l''espace de noms pour le pr\u00E9fixe {0}
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103 : impossible d'ajouter les fragments qui contiennent les \u00E9l\u00E9ments figurant dans l'espace de noms SOAP
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105 : le style d''encodage {0} doit \u00EAtre un URI valide
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106 : impossible de transmettre la valeur NULL \u00E0 setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107 : impossible de d\u00E9finir la valeur sur un \u00E9l\u00E9ment qui ne comporte aucun enfant unique de type Text
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110 : erreur : l'erreur existe d\u00E9j\u00E0
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111 : le parent de SOAPBody doit \u00EAtre un \u00E9l\u00E9ment SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112 : impossible de transmettre la valeur NULL \u00E0 setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113 : impossible de s\u00E9parer le texte d'un noeud de commentaire
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114 : impossible de remplacer l'ensemble du texte \u00E0 partir d'un noeud de commentaire
+
+SAAJ0120.impl.header.already.exists=SAAJ0120 : impossible d'ajouter un en-t\u00EAte lorsqu'il en existe d\u00E9j\u00E0 un
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121 : le premier enfant de Envelope doit \u00EAtre un \u00E9l\u00E9ment Header ou Body
+SAAJ0122.impl.body.already.exists=SAAJ0122 : impossible d'ajouter un corps lorsqu'il en existe d\u00E9j\u00E0 un
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123 : impossible de d\u00E9clarer le pr\u00E9fixe xmlns r\u00E9serv\u00E9
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124 : le nom qualifi\u00E9 ne peut pas \u00EAtre xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126 : impossible de localiser l''espace de noms pour le pr\u00E9fixe {0}
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127 : impossible de transmettre la valeur NULL \u00E0 setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130 : le parent d'un \u00E9l\u00E9ment SOAPHeaderElement doit \u00EAtre un \u00E9l\u00E9ment SOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131 : les \u00E9l\u00E9ments Header doivent \u00EAtre des espaces de noms qualifi\u00E9s
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132 : valeur non valide pour l'acteur ou le r\u00F4le
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133 : le parent de SOAPHeader doit \u00EAtre un \u00E9l\u00E9ment SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134 : les \u00E9l\u00E9ments Header doivent \u00EAtre des espaces de noms qualifi\u00E9s
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140 : NamespaceURI vide/NULL indiqu\u00E9 pour faultCode {0}
+SAAJ0141.impl.detail.exists=SAAJ0141 : l'\u00E9l\u00E9ment Detail existe d\u00E9j\u00E0
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Reason/Text non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
+SAAJ0143.impl.node.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Node non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
+SAAJ0144.impl.role.not.supported=SAAJ0142 : \u00E9l\u00E9ments Fault/Role non pris en charge par cette version SOAP, essayez SOAP 1.2 ou sup\u00E9rieur
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145 : impossible de transmettre la valeur NULL \u00E0 setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146 : impossible de modifier le nom de l''\u00E9l\u00E9ment {0} en {1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147 : impossible de modifier l''URI pour le pr\u00E9fixe {0} de {1} en {2} dans setElementQName
+SAAJ0148.impl.invalid.prefix.for.uri=URI d''espace de noms non vide : {0} pour un pr\u00E9fixe vide dans SetElementQName
+SAAJ0149.impl.null.prefix=SAAJ0149 : le pr\u00E9fixe ne peut pas \u00EAtre "NULL" lors de la cr\u00E9ation d'un QName
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250 : impossible d'extraire le document du corps
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251 : impossible d'extraire le document du corps
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150 : attribut {0} ajout\u00E9
+SAAJ0151.impl.no.children=SAAJ0151 : noeud contenant la valeur introuvable : il n'existe aucun enfant
+SAAJ0152.impl.first.child.not.text.node=SAAJ0151 : noeud contenant la valeur introuvable : le premier enfant n'est pas un noeud Text
+SAAJ0153.impl.multiple.children.same.value=SAAJ0151 : noeud contenant la valeur introuvable : il existe plusieurs noeuds enfant
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154 : un \u00E9l\u00E9ment SOAPFault peut \u00EAtre ajout\u00E9 uniquement en tant qu'enfant de SOAPBody
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155 : un \u00E9l\u00E9ment Detail peut \u00EAtre ajout\u00E9 uniquement en tant qu'enfant d'un \u00E9l\u00E9ment SOAPFault
+SAAJ0156.impl.adding.fault.error=SAAJ0156 : impossible d'ajouter SOAPFault ; un \u00E9l\u00E9ment SOAPFault doit \u00EAtre le seul enfant d'un \u00E9l\u00E9ment SOAPBody
+SAAJ0157.impl.detail.exists.error=SAAJ0157 : impossible d'ajouter l'\u00E9l\u00E9ment Detail, il existe d\u00E9j\u00E0
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158 : non-concordance de versions SOAP d\u00E9tect\u00E9e lors de la tentative d'ajout de SOAPFault \u00E0 SOAPBody
+SAAJ0159.impl.version.mismatch.detail=SAAJ0158 : non-concordance de versions SOAP d\u00E9tect\u00E9e lors de la tentative d'ajout de Detail \u00E0 SOAPFault
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190 : omettre la d\u00E9claration XML d\u00E9finie sur {0}
+SAAJ0191.impl.set.encoding=SAAJ0191 : l''encodage est d\u00E9fini sur {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: L'elemento padre di un SOAPBodyElement deve essere un SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: Impossibile trovare lo spazio di nomi per il prefisso {0}
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: Impossibile aggiungere frammenti che contengono elementi presenti nello spazio di nomi SOAP
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: Lo stile di codifica {0} deve essere un URI valido
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: Impossibile passare NULL a setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Impossibile usare setValue su un elemento che non ha solo un elemento figlio di tipo Text
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: Errore: Fault esiste gi\u00E0
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: L'elemento padre di SOAPBody deve essere un SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: Impossibile passare NULL a setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: Impossibile dividere il testo di un Comment Node
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: Impossibile sostituire tutto il testo di un Comment Node
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: Impossibile aggiungere un'intestazione quando ne \u00E8 gi\u00E0 presente una
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Il primo elemento figlio di Envelope deve essere Header o Body
+SAAJ0122.impl.body.already.exists=SAAJ0122: Impossibile aggiungere un corpo quando ne \u00E8 gi\u00E0 presente uno
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: Impossibile dichiarare riservato il prefisso xmlns
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: Il nome qualificato non pu\u00F2 essere xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: Impossibile trovare lo spazio di nomi per il prefisso {0}
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: Impossibile passare NULL a setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: L'elemento padre di un SOAPHeaderElement deve essere un SSOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements deve essere qualificato per lo spazio di nomi
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: Valore non valido per l'attore o il ruolo
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: L'elemento padre di SOAPHeader deve essere un SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements deve essere qualificato per lo spazio di nomi
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: URI dello spazio di nomi vuoto/nullo specificato per faultCode {0}
+SAAJ0141.impl.detail.exists=SAAJ0141: Detail esiste gi\u00E0
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: Fault/Reason/Text non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
+SAAJ0143.impl.node.not.supported=SAAJ0143: Fault/Node non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
+SAAJ0144.impl.role.not.supported=SAAJ0144: Fault/Role non supportato da questa versione SOAP. Tentare la versione SOAP 1.2 o successiva
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: Impossibile passare NULL a setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: Impossibile modificare il nome dell''elemento {0} in {1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: Impossibile modificare l''URI per il prefisso {0} da {1} a {2} in setElementQName
+SAAJ0148.impl.invalid.prefix.for.uri=URI dello spazio di nomi non vuoto: {0} per un prefisso vuoto in SetElementQName
+SAAJ0149.impl.null.prefix=SAAJ0149: Il prefisso non pu\u00F2 essere "null" durante la creazione di un QName
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: Impossibile estrarre Document dal corpo
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: Impossibile estrarre Document dal corpo
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: Attributo {0} aggiunto
+SAAJ0151.impl.no.children=SAAJ0151: Impossibile trovare il nodo contenente il valore: non sono presenti elementi figlio
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: Impossibile trovare il nodo contenente il valore: il primo elemento figlio non \u00E8 un nodo testo
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: Impossibile trovare il nodo contenente il valore: sono presenti pi\u00F9 nodi figlio
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: Un elemento SOAPFault pu\u00F2 essere aggiunto solo come elemento figlio di SOAPBody
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Un elemento Detail pu\u00F2 essere aggiunto solo come elemento figlio di un SOAPFault
+SAAJ0156.impl.adding.fault.error=SAAJ0156: Impossibile aggiungere SOAPFault. SOAPFault deve essere l'unico elemento figlio di SOAPBody
+SAAJ0157.impl.detail.exists.error=SAAJ0157: Impossibile aggiungere Detail. Detail esiste gi\u00E0.
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: Mancata corrispondenza della versione SOAP rilevata durante il tentativo di aggiungere SOAPFault a SOAPBody
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Mancata corrispondenza della versione SOAP rilevata durante il tentativo di aggiungere il dettaglio a SOAPFault
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omettere la dichiarazione XML impostata su {0}
+SAAJ0191.impl.set.encoding=SAAJ0191: La codifica \u00E8 impostata su {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement\u306E\u89AA\u306FSOAPBody\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u63A5\u982D\u8F9E{0}\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: SOAP\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u5B58\u5728\u3059\u308B\u8981\u7D20\u3092\u542B\u3080\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u30FB\u30B9\u30BF\u30A4\u30EB{0}\u306F\u6709\u52B9\u306AURI\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u30BF\u30A4\u30D7\u304C\u30C6\u30AD\u30B9\u30C8\u306E\u552F\u4E00\u306E\u5B50\u304C\u306A\u3044\u8981\u7D20\u306B\u5024\u3092\u8A2D\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: \u30A8\u30E9\u30FC: \u30D5\u30A9\u30EB\u30C8\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody\u306E\u89AA\u306FSOAPEnvelope\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u30B3\u30E1\u30F3\u30C8\u30FB\u30CE\u30FC\u30C9\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u3092\u5206\u5272\u3067\u304D\u307E\u305B\u3093
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u30B3\u30E1\u30F3\u30C8\u30FB\u30CE\u30FC\u30C9\u304B\u3089\u30C6\u30AD\u30B9\u30C8\u5168\u4F53\u3092\u7F6E\u63DB\u3067\u304D\u307E\u305B\u3093
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: \u30D8\u30C3\u30C0\u30FC\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\u306E\u6700\u521D\u306E\u5B50\u306FHeader\u307E\u305F\u306FBody\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0122.impl.body.already.exists=SAAJ0122: \u672C\u6587\u304C\u3059\u3067\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u4E88\u7D04\u6E08\u306Exmlns\u63A5\u982D\u8F9E\u3092\u5BA3\u8A00\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u4FEE\u98FE\u540D\u3092xmlns\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u63A5\u982D\u8F9E{0}\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement\u306E\u89AA\u306FSOAPHeader\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \u30A2\u30AF\u30BF\u30FC\u307E\u305F\u306F\u30ED\u30FC\u30EB\u306E\u5024\u304C\u7121\u52B9\u3067\u3059
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader\u306E\u89AA\u306FSOAPEnvelope\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements\u306F\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u4FEE\u98FE\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: faultCode {0}\u306B\u6307\u5B9A\u3055\u308C\u305FNamespaceURI\u304C\u7A7A/Null\u3067\u3059
+SAAJ0141.impl.detail.exists=SAAJ0141: Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u7406\u7531/\u30C6\u30AD\u30B9\u30C8\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
+SAAJ0143.impl.node.not.supported=SAAJ0143: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u30CE\u30FC\u30C9\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
+SAAJ0144.impl.role.not.supported=SAAJ0144: \u3053\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u306F\u30D5\u30A9\u30EB\u30C8/\u30ED\u30FC\u30EB\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002SOAP 1.2\u4EE5\u4E0A\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: NULL\u3092setParentElement\u306B\u6E21\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u8981\u7D20{0}\u306E\u540D\u524D\u3092{1}\u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: setElementQName\u306E\u63A5\u982D\u8F9E{0}\u306EURI\u3092{1}\u304B\u3089{2}\u306B\u5909\u66F4\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName\u306E\u7A7A\u306E\u63A5\u982D\u8F9E\u306B\u7A7A\u767D\u4EE5\u5916\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI: {0}\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
+SAAJ0149.impl.null.prefix=SAAJ0149: QName\u3092\u4F5C\u6210\u3059\u308B\u5834\u5408\u3001\u63A5\u982D\u8F9E\u3092\u300Cnull\u300D\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u672C\u6587\u304B\u3089\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u672C\u6587\u304B\u3089\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u62BD\u51FA\u3067\u304D\u307E\u305B\u3093
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: \u5C5E\u6027{0}\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
+SAAJ0151.impl.no.children=SAAJ0151: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u5B50\u304C\u3042\u308A\u307E\u305B\u3093
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u6700\u521D\u306E\u5B50\u304C\u30C6\u30AD\u30B9\u30C8\u30FB\u30CE\u30FC\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u5024\u3092\u542B\u3080\u30CE\u30FC\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \u8907\u6570\u306E\u5B50\u30CE\u30FC\u30C9\u304C\u3042\u308A\u307E\u3059
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault\u8981\u7D20\u306FSOAPBody\u306E\u5B50\u3068\u3057\u3066\u306E\u307F\u8FFD\u52A0\u3067\u304D\u307E\u3059
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail\u8981\u7D20\u306FSOAPFault\u306E\u5B50\u3068\u3057\u3066\u306E\u307F\u8FFD\u52A0\u3067\u304D\u307E\u3059
+SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002SOAPFault\u306FSOAPBody\u306E\u552F\u4E00\u306E\u5B50\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002Detail\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAPFault\u3092SOAPBody\u306B\u8FFD\u52A0\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E0D\u4E00\u81F4\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: Detail\u3092SOAPFault\u306B\u8FFD\u52A0\u3057\u3088\u3046\u3068\u3057\u305F\u3068\u304D\u306BSOAP\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E0D\u4E00\u81F4\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: Omit XML\u5BA3\u8A00\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
+SAAJ0191.impl.set.encoding=SAAJ0191: \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u304C{0}\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement\uC758 \uC0C1\uC704\uB294 SOAPBody\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: SOAP \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC788\uB294 \uC694\uC18C\uAC00 \uD3EC\uD568\uB41C \uB2E8\uD3B8\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \uC778\uCF54\uB529 \uC2A4\uD0C0\uC77C {0}\uC740(\uB294) \uC801\uD569\uD55C URI\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: Text \uC720\uD615\uC758 \uC720\uC77C\uD55C \uD558\uC704\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC740 \uC694\uC18C\uC5D0 \uB300\uD574 \uAC12\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: \uC624\uB958: Fault\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4.
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody\uC758 \uC0C1\uC704\uB294 SOAPEnvelope\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \uC8FC\uC11D \uB178\uB4DC\uC5D0\uC11C \uD14D\uC2A4\uD2B8\uB97C \uBD84\uD560\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \uC8FC\uC11D \uB178\uB4DC\uC758 \uC804\uCCB4 \uD14D\uC2A4\uD2B8\uB97C \uBC14\uAFC0 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: Header\uAC00 \uC874\uC7AC\uD558\uB294 \uACBD\uC6B0 Header\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\uC758 \uCCAB\uBC88\uC9F8 \uD558\uC704\uB294 Header \uB610\uB294 Body\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0122.impl.body.already.exists=SAAJ0122: Body\uAC00 \uC874\uC7AC\uD558\uB294 \uACBD\uC6B0 Body\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \uC608\uC57D\uB41C xmlns \uC811\uB450\uC5B4\uB97C \uC120\uC5B8\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \uC815\uADDC\uD654\uB41C \uC774\uB984\uC740 xmlns\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement\uC758 \uC0C1\uC704\uB294 SOAPHeader\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \uC791\uC5C5\uC790 \uB610\uB294 \uB864\uC5D0 \uB300\uD55C \uAC12\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader\uC758 \uC0C1\uC704\uB294 SOAPEnvelope\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements\uB294 \uC815\uADDC\uD654\uB41C \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: faultCode {0}\uC5D0 \uB300\uD574 \uBE48/\uB110 NamespaceURI\uAC00 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0141.impl.detail.exists=SAAJ0141: Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Reason/Text\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
+SAAJ0143.impl.node.not.supported=SAAJ0143: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Node\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
+SAAJ0144.impl.role.not.supported=SAAJ0144: \uC774 SOAP \uBC84\uC804\uC5D0\uC11C\uB294 Fault/Role\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. SOAP 1.2 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC744 \uC0AC\uC6A9\uD574 \uBCF4\uC2ED\uC2DC\uC624.
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: setParentElement\uC5D0 NULL\uC744 \uC804\uB2EC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: {0} \uC694\uC18C\uC758 \uC774\uB984\uC744 {1}(\uC73C)\uB85C \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: setElementQName\uC5D0\uC11C {0} \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C URI\uB97C {1}\uC5D0\uC11C {2}(\uC73C)\uB85C \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName\uC5D0 \uBE48 \uC811\uB450\uC5B4\uC5D0 \uB300\uD574 \uBE44\uC5B4 \uC788\uC9C0 \uC54A\uC740 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI {0}\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4.
+SAAJ0149.impl.null.prefix=SAAJ0149: QName\uC744 \uC0DD\uC131\uD558\uB294 \uACBD\uC6B0 \uC811\uB450\uC5B4\uB294 "null"\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \uBCF8\uBB38\uC5D0\uC11C \uBB38\uC11C\uB97C \uCD94\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \uBCF8\uBB38\uC5D0\uC11C \uBB38\uC11C\uB97C \uCD94\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0151.impl.no.children=SAAJ0151: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uD558\uC704 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uCCAB\uBC88\uC9F8 \uD558\uC704\uAC00 \uD14D\uC2A4\uD2B8 \uB178\uB4DC\uAC00 \uC544\uB2D9\uB2C8\uB2E4.
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \uAC12\uC774 \uD3EC\uD568\uB41C \uB178\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \uD558\uC704 \uB178\uB4DC\uAC00 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4.
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \uC694\uC18C\uB294 SOAPBody\uC758 \uD558\uC704\uB85C\uB9CC \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail \uC694\uC18C\uB294 SOAPFault\uC758 \uD558\uC704\uB85C\uB9CC \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
+SAAJ0156.impl.adding.fault.error=SAAJ0156: SOAPFault\uB97C \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. SOAPFault\uB294 SOAPBody\uC758 \uC720\uC77C\uD55C \uD558\uC704\uC5EC\uC57C \uD569\uB2C8\uB2E4.
+SAAJ0157.impl.detail.exists.error=SAAJ0157: Detail\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Detail\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: SOAPBody\uC5D0 SOAPFault\uB97C \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SOAP \uBC84\uC804 \uBD88\uC77C\uCE58\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: SOAPFault\uC5D0 Detail\uC744 \uCD94\uAC00\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 SOAP \uBC84\uC804 \uBD88\uC77C\uCE58\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: XML \uC120\uC5B8 \uC0DD\uB7B5\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
+SAAJ0191.impl.set.encoding=SAAJ0191: \uC778\uCF54\uB529\uC774 {0}(\uC73C)\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: o pai de um SOAPBodyElement deve ser um SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: n\u00E3o \u00E9 poss\u00EDvel localizar o namespace do prefixo {0}
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: n\u00E3o \u00E9 poss\u00EDvel adicionar fragmentos que cont\u00EAm elementos que est\u00E3o no namespace de SOAP
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: estilo {0} de codifica\u00E7\u00E3o deve ser um URI v\u00E1lido
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: n\u00E3o \u00E9 poss\u00EDvel setValue em um Elemento que n\u00E3o tem um s\u00F3 filho do tipo Texto
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: erro: j\u00E1 existe falha
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: o pai de SOAPBody deve ser um SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: n\u00E3o \u00E9 poss\u00EDvel dividir o texto de um N\u00F3 do Coment\u00E1rio
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: n\u00E3o \u00E9 poss\u00EDvel substituir todo o texto de um N\u00F3 de Coment\u00E1rio
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: n\u00E3o \u00E9 poss\u00EDvel adicionar um cabe\u00E7alho quando h\u00E1 houver um
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: o primeiro filho do Envelope deve ser um Cabe\u00E7alho ou um Corpo
+SAAJ0122.impl.body.already.exists=SAAJ0122: n\u00E3o \u00E9 poss\u00EDvel adicionar um corpo quando j\u00E1 houver um
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: n\u00E3o \u00E9 poss\u00EDvel declarar o prefixo xmlns reservado
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: o nome qualificado n\u00E3o pode ser xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: n\u00E3o \u00E9 poss\u00EDvel localizar namespace para o prefixo {0}
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: o pai de um SOAPHeaderElement deve ser um SOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements deve ser um namespace qualificado
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: valor inv\u00E1lido para ator ou atribui\u00E7\u00E3o
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: o pai de um SOAPHeader deve ser um SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements deve ser um namespace qualificado
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: NamespaceURI Vazio/Nulo especificado para faultCode {0}
+SAAJ0141.impl.detail.exists=SAAJ0141: o detalhe j\u00E1 existe
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: falha/motivo/texto n\u00E3o suportado por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
+SAAJ0143.impl.node.not.supported=SAAJ0143: falha/n\u00F3 n\u00E3o suportados por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
+SAAJ0144.impl.role.not.supported=SAAJ0144: falha/atribui\u00E7\u00E3o n\u00E3o suportada por esta vers\u00E3o de SOAP, tente SOAP 1.2 ou posterior
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: n\u00E3o \u00E9 poss\u00EDvel informar NULL como setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: n\u00E3o \u00E9 poss\u00EDvel alterar o nome do elemento {0} para {1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: n\u00E3o \u00E9 poss\u00EDvel alterar o URI do prefixo {0} de {1} para {2} no setElementQName
+SAAJ0148.impl.invalid.prefix.for.uri=URI de namespace n\u00E3o vazio: {0} para um prefixo vazio no SetElementQName
+SAAJ0149.impl.null.prefix=SAAJ0149: o prefixo n\u00E3o pode ser "nulo" ao criar um QName
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: n\u00E3o \u00E9 poss\u00EDvel extrair o Documento do corpo
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: n\u00E3o \u00E9 poss\u00EDvel extrair o documento do corpo
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: atributo {0} adicionado
+SAAJ0151.impl.no.children=SAAJ0151: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: n\u00E3o h\u00E1 filhos
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: o primeiro filho n\u00E3o \u00E9 um n\u00F3 de Texto
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: n\u00E3o \u00E9 poss\u00EDvel localizar o n\u00F3 que cont\u00E9m o valor: h\u00E1 mais de um n\u00F3 filho
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: um elemento de SOAPFault s\u00F3 pode ser adicionado como filho de SOAPBody
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: um elemento de Detalhe s\u00F3 pode ser adicionado como um filho de um SOAPFault
+SAAJ0156.impl.adding.fault.error=SAAJ0156: n\u00E3o \u00E9 poss\u00EDvel adicionar SOAPFault, um SOAPFault deve ser filho s\u00F3 de um SOAPBody
+SAAJ0157.impl.detail.exists.error=SAAJ0157: n\u00E3o \u00E9 poss\u00EDvel adicionar Detalhe, o Detalhe j\u00E1 existe
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: incompatibilidade da vers\u00E3o SOAP encontrada ao tentar adicionar SOAPFault ao SOAPBody
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: incompatibilidade da vers\u00E3o SOAP encontrada ao tentar adicionar Detalhes \u00E0 SOAPFault
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: omitir conjunto de declara\u00E7\u00F5es de XML para {0}
+SAAJ0191.impl.set.encoding=SAAJ0191: codifica\u00E7\u00E3o definida como {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u627E\u4E0D\u5230\u524D\u7F00{0}\u7684\u540D\u79F0\u7A7A\u95F4
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: \u65E0\u6CD5\u6DFB\u52A0\u5305\u542B\u4F4D\u4E8E SOAP \u540D\u79F0\u7A7A\u95F4\u4E2D\u7684\u5143\u7D20\u7684\u7247\u6BB5
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u7F16\u7801\u6837\u5F0F{0}\u5E94\u8BE5\u662F\u6709\u6548\u7684 URI
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u5BF9\u4E8E\u5E76\u975E\u53EA\u5177\u6709\u6587\u672C\u7C7B\u578B\u5B50\u7EA7\u7684\u5143\u7D20, \u4E0D\u80FD\u6267\u884C setValue
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: \u9519\u8BEF: \u6545\u969C\u5DF2\u5B58\u5728
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u65E0\u6CD5\u62C6\u5206\u6765\u81EA\u6CE8\u91CA\u8282\u70B9\u7684\u6587\u672C
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u65E0\u6CD5\u66FF\u6362\u6765\u81EA\u6CE8\u91CA\u8282\u70B9\u7684\u5168\u90E8\u6587\u672C
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: \u5F53\u6807\u5934\u5DF2\u5B58\u5728\u65F6, \u65E0\u6CD5\u6DFB\u52A0\u6807\u5934
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: \u4FE1\u5C01\u7684\u7B2C\u4E00\u4E2A\u5B50\u7EA7\u5FC5\u987B\u662F\u6807\u5934\u6216\u6B63\u6587
+SAAJ0122.impl.body.already.exists=SAAJ0122: \u5F53\u6B63\u6587\u5DF2\u5B58\u5728\u65F6, \u65E0\u6CD5\u6DFB\u52A0\u6B63\u6587
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u65E0\u6CD5\u58F0\u660E\u4FDD\u7559\u7684 xmlns \u524D\u7F00
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u9650\u5B9A\u540D\u4E0D\u80FD\u662F xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u627E\u4E0D\u5230\u524D\u7F00{0}\u7684\u540D\u79F0\u7A7A\u95F4
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: \u64CD\u4F5C\u8005\u6216\u89D2\u8272\u7684\u503C\u65E0\u6548
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader \u7684\u7236\u7EA7\u5FC5\u987B\u662F SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements \u5FC5\u987B\u9650\u5B9A\u540D\u79F0\u7A7A\u95F4
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: \u4E3A faultCode {0} \u6307\u5B9A\u7684 NamespaceURI \u5FC5\u987B\u4E3A\u7A7A/\u7A7A\u503C
+SAAJ0141.impl.detail.exists=SAAJ0141: \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u539F\u56E0/\u6587\u672C, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
+SAAJ0143.impl.node.not.supported=SAAJ0143: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u8282\u70B9, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
+SAAJ0144.impl.role.not.supported=SAAJ0144: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u6301\u6545\u969C/\u89D2\u8272, \u8BF7\u5C1D\u8BD5 SOAP 1.2 \u6216\u66F4\u9AD8\u7248\u672C
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: \u4E0D\u80FD\u5C06\u7A7A\u503C\u4F20\u9012\u7ED9 setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u65E0\u6CD5\u5C06\u5143\u7D20{0}\u7684\u540D\u79F0\u66F4\u6539\u4E3A{1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: \u65E0\u6CD5\u5C06 setElementQName \u4E2D\u524D\u7F00{0}\u7684 URI \u4ECE {1} \u66F4\u6539\u4E3A {2}
+SAAJ0148.impl.invalid.prefix.for.uri=\u975E\u7A7A\u540D\u79F0\u7A7A\u95F4 URI: {0} \u7528\u4E8E SetElementQName \u4E2D\u7684\u7A7A\u524D\u7F00
+SAAJ0149.impl.null.prefix=SAAJ0149: \u521B\u5EFA QName \u65F6, \u524D\u7F00\u4E0D\u80FD\u4E3A "\u7A7A\u503C"
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u65E0\u6CD5\u4ECE\u6B63\u6587\u4E2D\u63D0\u53D6\u6587\u6863
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u65E0\u6CD5\u4ECE\u6B63\u6587\u4E2D\u63D0\u53D6\u6587\u6863
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: \u5DF2\u6DFB\u52A0\u5C5E\u6027{0}
+SAAJ0151.impl.no.children=SAAJ0151: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u6CA1\u6709\u4EFB\u4F55\u5B50\u7EA7
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u7B2C\u4E00\u4E2A\u5B50\u7EA7\u4E0D\u662F\u6587\u672C\u8282\u70B9
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u8282\u70B9: \u5B58\u5728\u591A\u4E2A\u5B50\u8282\u70B9
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \u5143\u7D20\u53EA\u80FD\u4F5C\u4E3A SOAPBody \u7684\u5B50\u7EA7\u6DFB\u52A0
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: \u8BE6\u7EC6\u4FE1\u606F\u5143\u7D20\u53EA\u80FD\u4F5C\u4E3A SOAPFault \u7684\u5B50\u7EA7\u6DFB\u52A0
+SAAJ0156.impl.adding.fault.error=SAAJ0156: \u65E0\u6CD5\u6DFB\u52A0 SOAPFault, SOAPFault \u53EA\u5E94\u8BE5\u662F SOAPBody \u7684\u5B50\u7EA7
+SAAJ0157.impl.detail.exists.error=SAAJ0157: \u65E0\u6CD5\u6DFB\u52A0\u8BE6\u7EC6\u4FE1\u606F, \u8BE6\u7EC6\u4FE1\u606F\u5DF2\u5B58\u5728
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: \u5C1D\u8BD5\u5C06 SOAPFault \u6DFB\u52A0\u5230 SOAPBody \u65F6\u9047\u5230 SOAP \u7248\u672C\u4E0D\u5339\u914D\u60C5\u51B5
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: \u5C1D\u8BD5\u5C06\u8BE6\u7EC6\u4FE1\u606F\u6DFB\u52A0\u5230 SOAPFault \u65F6\u9047\u5230 SOAP \u7248\u672C\u4E0D\u5339\u914D\u60C5\u51B5
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: \u9057\u6F0F XML \u58F0\u660E\u8BBE\u7F6E\u4E3A{0}
+SAAJ0191.impl.set.encoding=SAAJ0191: \u7F16\u7801\u8BBE\u7F6E\u4E3A{0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for impl
+# Error messages
+SAAJ0101.impl.parent.of.body.elem.mustbe.body=SAAJ0101: SOAPBodyElement \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPBody
+SAAJ0102.impl.cannot.locate.ns=SAAJ0102: \u627E\u4E0D\u5230\u524D\u7F6E\u78BC {0} \u7684\u547D\u540D\u7A7A\u9593
+SAAJ0103.impl.cannot.add.fragements=SAAJ0103: \u7121\u6CD5\u65B0\u589E\u5305\u542B SOAP \u547D\u540D\u7A7A\u9593\u4E2D\u4E4B\u5143\u7D20\u7684\u7247\u6BB5
+SAAJ0105.impl.encoding.style.mustbe.valid.URI=SAAJ0105: \u7DE8\u78BC\u6A23\u5F0F {0} \u61C9\u662F\u6709\u6548\u7684 URI
+SAAJ0106.impl.no.null.to.parent.elem=SAAJ0106: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
+SAAJ0107.impl.elem.child.not.single.text=SAAJ0107: \u7121\u6CD5\u5728\u4E0D\u542B\u552F\u4E00 Text \u985E\u578B\u5B50\u9805\u7684\u300C\u5143\u7D20\u300D\u4E0A\u4F7F\u7528 setValue
+
+SAAJ0110.impl.fault.already.exists=SAAJ0110: \u932F\u8AA4: Fault \u5DF2\u7D93\u5B58\u5728
+SAAJ0111.impl.body.parent.must.be.envelope=SAAJ0111: SOAPBody \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPEnvelope
+
+SAAJ0112.impl.no.null.to.parent.elem=SAAJ0112: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
+SAAJ0113.impl.cannot.split.text.from.comment=SAAJ0113: \u4E0D\u80FD\u5F9E\u300CComment \u7BC0\u9EDE\u300D\u5206\u5272\u6587\u5B57
+SAAJ0114.impl.cannot.replace.wholetext.from.comment=SAAJ0114: \u4E0D\u80FD\u5F9E\u300CComment \u7BC0\u9EDE\u300D\u53D6\u4EE3\u6574\u500B\u6587\u5B57
+
+SAAJ0120.impl.header.already.exists=SAAJ0120: \u6A19\u982D\u5DF2\u7D93\u5B58\u5728\u6642\u4E0D\u80FD\u65B0\u589E\u6A19\u982D
+SAAJ0121.impl.invalid.first.child.of.envelope=SAAJ0121: Envelope\u7684\u7B2C\u4E00\u500B\u5B50\u9805\u5FC5\u9808\u662F Header \u6216 Body
+SAAJ0122.impl.body.already.exists=SAAJ0122: \u4E3B\u9AD4\u5DF2\u7D93\u5B58\u5728\u6642\u4E0D\u80FD\u65B0\u589E\u4E3B\u9AD4
+SAAJ0123.impl.no.reserved.xmlns=SAAJ0123: \u4E0D\u80FD\u5BA3\u544A\u4FDD\u7559\u7684 xmlns \u524D\u7F6E\u78BC
+SAAJ0124.impl.qualified.name.cannot.be.xmlns=SAAJ0124: \u5B8C\u6574\u540D\u7A31\u4E0D\u80FD\u662F xmlns
+#SAAJ0125.impl.URI.cannot.be.null=SAAJ0125: URI cannot be null
+SAAJ0126.impl.cannot.locate.ns=SAAJ0126: \u627E\u4E0D\u5230\u524D\u7F6E\u78BC {0} \u7684\u547D\u540D\u7A7A\u9593
+SAAJ0127.impl.no.null.for.parent.elem=SAAJ0127: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
+
+SAAJ0130.impl.header.elem.parent.mustbe.header=SAAJ0130: SOAPHeaderElement \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPHeader
+SAAJ0131.impl.header.elems.ns.qualified=SAAJ0131: HeaderElements \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
+SAAJ0132.impl.invalid.value.for.actor.or.role=SAAJ0132: actor \u6216 role \u7684\u503C\u7121\u6548
+SAAJ0133.impl.header.parent.mustbe.envelope=SAAJ0133: SOAPHeader \u7684\u7236\u9805\u5FC5\u9808\u662F SOAPEnvelope
+SAAJ0134.impl.header.elems.ns.qualified=SAAJ0134: HeaderElements \u5FC5\u9808\u662F\u9650\u5B9A\u7684\u547D\u540D\u7A7A\u9593
+
+SAAJ0140.impl.no.ns.URI=SAAJ0140: \u70BA faultCode {0} \u6307\u5B9A\u7684\u662F\u7A7A\u7684/\u7A7A\u503C NamespaceURI
+SAAJ0141.impl.detail.exists=SAAJ0141: Detail \u5DF2\u7D93\u5B58\u5728
+SAAJ0142.impl.reason.or.text.not.supported=SAAJ0142: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Reason/Text, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
+SAAJ0143.impl.node.not.supported=SAAJ0143: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Node, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
+SAAJ0144.impl.role.not.supported=SAAJ0144: \u6B64 SOAP \u7248\u672C\u4E0D\u652F\u63F4 Fault/Role, \u8ACB\u5617\u8A66 SOAP 1.2 \u6216\u66F4\u65B0\u7248\u672C
+SAAJ0145.impl.no.null.to.parent.elem=SAAJ0145: \u4E0D\u80FD\u50B3\u9001 NULL \u81F3 setParentElement
+SAAJ0146.impl.invalid.name.change.requested=SAAJ0146: \u4E0D\u80FD\u5C07\u5143\u7D20 {0} \u7684\u540D\u7A31\u8B8A\u66F4\u70BA {1}
+SAAJ0147.impl.invalid.uri.change.requested=SAAJ0147: \u4E0D\u80FD\u5C07 setElementQName \u4E2D\u524D\u7F6E\u78BC {0} \u7684 URI \u5F9E {1} \u8B8A\u66F4\u70BA {2}
+SAAJ0148.impl.invalid.prefix.for.uri=SetElementQName \u4E2D\u7684\u7A7A\u524D\u7F6E\u78BC\u6709\u975E\u7A7A\u767D\u7684\u547D\u540D\u7A7A\u9593 URI: {0}
+SAAJ0149.impl.null.prefix=SAAJ0149: \u5EFA\u7ACB QName \u6642, \u524D\u7F6E\u78BC\u4E0D\u80FD\u662F "null"
+
+SAAJ0250.impl.body.should.have.exactly.one.child=SAAJ0250: \u4E0D\u80FD\u5F9E\u4E3B\u9AD4\u64F7\u53D6 Document
+SAAJ0251.impl.cannot.extract.document.from.body=SAAJ0251: \u7121\u6CD5\u5F9E\u4E3B\u9AD4\u64F7\u53D6 Document
+
+# Debug messages
+SAAJ0150.impl.added.attr=SAAJ0150: \u5DF2\u65B0\u589E\u5C6C\u6027 {0}
+SAAJ0151.impl.no.children=SAAJ0151: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u6C92\u6709\u5B50\u9805
+SAAJ0152.impl.first.child.not.text.node=SAAJ0152: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u7B2C\u4E00\u500B\u5B50\u9805\u4E0D\u662F Text \u7BC0\u9EDE
+SAAJ0153.impl.multiple.children.same.value=SAAJ0153: \u627E\u4E0D\u5230\u5305\u542B\u503C\u7684\u7BC0\u9EDE: \u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u5B50\u7BC0\u9EDE
+SAAJ0154.impl.adding.fault.to.nonbody=SAAJ0154: SOAPFault \u5143\u7D20\u53EA\u80FD\u65B0\u589E\u6210\u70BA SOAPBody \u7684\u5B50\u9805
+SAAJ0155.impl.adding.detail.nonfault=SAAJ0155: Detail \u5143\u7D20\u53EA\u80FD\u65B0\u589E\u6210\u70BA SOAPFault \u7684\u5B50\u9805
+SAAJ0156.impl.adding.fault.error=SAAJ0156: \u7121\u6CD5\u65B0\u589E SOAPFault, SOAPFault \u61C9\u70BA SOAPBody \u7684\u552F\u4E00\u5B50\u9805
+SAAJ0157.impl.detail.exists.error=SAAJ0157: \u7121\u6CD5\u65B0\u589E Detail, Detail \u5DF2\u7D93\u5B58\u5728
+SAAJ0158.impl.version.mismatch.fault=SAAJ0158: \u5617\u8A66\u65B0\u589E SOAPFault \u81F3 SOAPBody \u6642, \u767C\u751F SOAP \u7248\u672C\u4E0D\u7B26
+SAAJ0159.impl.version.mismatch.detail=SAAJ0159: \u5617\u8A66\u65B0\u589E Detail \u81F3 SOAPFault \u6642, \u767C\u751F SOAP \u7248\u672C\u4E0D\u7B26
+
+# Info messages
+SAAJ0190.impl.set.xml.declaration=SAAJ0190: \u7701\u7565\u8A2D\u70BA {0} \u7684 XML \u5BA3\u544A
+SAAJ0191.impl.set.encoding=SAAJ0191: \u7DE8\u78BC\u5DF2\u8A2D\u70BA {0}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPCommentImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.ResourceBundle;
+import java.util.logging.Logger;
+
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Text;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+
+public class SOAPCommentImpl
+ extends com.sun.org.apache.xerces.internal.dom.CommentImpl
+ implements javax.xml.soap.Text, org.w3c.dom.Comment {
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
+ protected static ResourceBundle rb =
+ log.getResourceBundle();
+
+ public SOAPCommentImpl(SOAPDocumentImpl ownerDoc, String text) {
+ super(ownerDoc, text);
+ }
+
+ public String getValue() {
+ String nodeValue = getNodeValue();
+ return (nodeValue.equals("") ? null : nodeValue);
+ }
+
+ public void setValue(String text) {
+ setNodeValue(text);
+ }
+
+
+ public void setParentElement(SOAPElement element) throws SOAPException {
+ if (element == null) {
+ log.severe("SAAJ0112.impl.no.null.to.parent.elem");
+ throw new SOAPException("Cannot pass NULL to setParentElement");
+ }
+ ((ElementImpl) element).addNode(this);
+ }
+
+ public SOAPElement getParentElement() {
+ return (SOAPElement) getParentNode();
+ }
+
+ public void detachNode() {
+ org.w3c.dom.Node parent = getParentNode();
+ if (parent != null) {
+ parent.removeChild(this);
+ }
+ }
+
+ public void recycleNode() {
+ detachNode();
+ // TBD
+ // - add this to the factory so subsequent
+ // creations can reuse this object.
+ }
+
+ public boolean isComment() {
+ return true;
+ }
+
+ public Text splitText(int offset) throws DOMException {
+ log.severe("SAAJ0113.impl.cannot.split.text.from.comment");
+ throw new UnsupportedOperationException("Cannot split text from a Comment Node.");
+ }
+
+ public Text replaceWholeText(String content) throws DOMException {
+ log.severe("SAAJ0114.impl.cannot.replace.wholetext.from.comment");
+ throw new UnsupportedOperationException("Cannot replace Whole Text from a Comment Node.");
+ }
+
+ public String getWholeText() {
+ //TODO: maybe we have to implement this in future.
+ throw new UnsupportedOperationException("Not Supported");
+ }
+
+ public boolean isElementContentWhitespace() {
+ //TODO: maybe we have to implement this in future.
+ throw new UnsupportedOperationException("Not Supported");
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/SOAPTextImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+import java.util.logging.Logger;
+
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+
+public class SOAPTextImpl
+ extends com.sun.org.apache.xerces.internal.dom.TextImpl
+ implements javax.xml.soap.Text, org.w3c.dom.Text {
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.SOAP_IMPL_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.impl.LocalStrings");
+
+ public SOAPTextImpl(SOAPDocumentImpl ownerDoc, String text) {
+ super(ownerDoc, text);
+ }
+
+ public String getValue() {
+ String nodeValue = getNodeValue();
+ return (nodeValue.equals("") ? null : nodeValue);
+ }
+
+ public void setValue(String text) {
+ setNodeValue(text);
+ }
+
+ public void setParentElement(SOAPElement parent) throws SOAPException {
+ if (parent == null) {
+ log.severe("SAAJ0126.impl.cannot.locate.ns");
+ throw new SOAPException("Cannot pass NULL to setParentElement");
+ }
+ ((ElementImpl) parent).addNode(this);
+ }
+
+ public SOAPElement getParentElement() {
+ return (SOAPElement) getParentNode();
+ }
+
+
+ public void detachNode() {
+ org.w3c.dom.Node parent = getParentNode();
+ if (parent != null) {
+ parent.removeChild(this);
+ }
+ }
+
+ public void recycleNode() {
+ detachNode();
+ // TBD
+ // - add this to the factory so subsequent
+ // creations can reuse this object.
+ }
+
+ public boolean isComment() {
+ String txt = getNodeValue();
+ if (txt == null) {
+ return false;
+ }
+ return txt.startsWith("");
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/impl/TreeException.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.impl;
+
+public class TreeException extends RuntimeException {
+ public TreeException(String reason) {
+ super(reason);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Cannot create a name from a null tag
+SAAJ0202.name.invalid.arg.format=SAAJ0202: Argument "{0}" must be of the form: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Name kann nicht aus einem Null-Tag erstellt werden
+SAAJ0202.name.invalid.arg.format=SAAJ0202: Argument "{0}" muss folgende Form aufweisen: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: no se puede crear un nombre desde una etiqueta nula
+SAAJ0202.name.invalid.arg.format=SAAJ0202: El argumento "{0}" debe tener el formato: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201 : impossible de cr\u00E9er un nom \u00E0 partir d'une balise NULL
+SAAJ0202.name.invalid.arg.format=SAAJ0202 : l''argument "{0}" doit avoir le format suivant : prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: Impossibile creare un nome da una tag nulla
+SAAJ0202.name.invalid.arg.format=SAAJ0202: L''argomento "{0}" deve avere il formato: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: null\u306E\u30BF\u30B0\u304B\u3089\u540D\u524D\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+SAAJ0202.name.invalid.arg.format=SAAJ0202: \u5F15\u6570"{0}"\u306Fprefix:localName\u306E\u5F62\u5F0F\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \uB110 \uD0DC\uADF8\uC5D0\uC11C \uC774\uB984\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
+SAAJ0202.name.invalid.arg.format=SAAJ0202: "{0}" \uC778\uC218\uB294 prefix:localName \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: n\u00E3o \u00E9 poss\u00EDvel criar um nome a partir de uma tag nula
+SAAJ0202.name.invalid.arg.format=SAAJ0202: o argumento "{0}" deve estar no formato: prefix.localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \u65E0\u6CD5\u4ECE\u7A7A\u503C\u6807\u8BB0\u521B\u5EFA\u540D\u79F0
+SAAJ0202.name.invalid.arg.format=SAAJ0202: \u53C2\u6570 "{0}" \u5FC5\u987B\u91C7\u7528\u4EE5\u4E0B\u5F62\u5F0F: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# SAAJ ResourceBundle properties file
+# Contains Log messages for name pkg
+# Error messages
+SAAJ0201.name.not.created.from.null.tag=SAAJ0201: \u7121\u6CD5\u5F9E\u7A7A\u503C\u6A19\u8A18\u5EFA\u7ACB\u540D\u7A31
+SAAJ0202.name.invalid.arg.format=SAAJ0202: \u5F15\u6578 "{0}" \u7684\u683C\u5F0F\u5FC5\u9808\u662F: prefix:localName
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/name/NameImpl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,561 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.soap.name;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPConstants;
+
+//import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
+import org.w3c.dom.Element;
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+
+public class NameImpl implements Name {
+ public static final String XML_NAMESPACE_PREFIX = "xml";
+ public static final String XML_SCHEMA_NAMESPACE_PREFIX = "xs";
+ public static final String SOAP_ENVELOPE_PREFIX = "SOAP-ENV";
+
+ public static final String XML_NAMESPACE =
+ "http://www.w3.org/XML/1998/namespace";
+ public static final String SOAP11_NAMESPACE =
+ SOAPConstants.URI_NS_SOAP_ENVELOPE;
+ public static final String SOAP12_NAMESPACE =
+ SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE;
+ public static final String XML_SCHEMA_NAMESPACE =
+ "http://www.w3.org/2001/XMLSchema";
+
+ protected String uri = "";
+ protected String localName = "";
+ protected String prefix = "";
+ private String qualifiedName = null;
+
+ protected static final Logger log =
+ Logger.getLogger(LogDomainConstants.NAMING_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.name.LocalStrings");
+
+ /**
+ * XML Information Set REC
+ * all namespace attributes (including those named xmlns,
+ * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/
+ */
+ public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern();
+
+ protected NameImpl(String name) {
+ this.localName = name == null ? "" : name;
+ }
+
+ protected NameImpl(String name, String prefix, String uri) {
+ this.uri = uri == null ? "" : uri;
+ this.localName = name == null ? "" : name;
+ this.prefix = prefix == null ? "" : prefix;
+
+ if (this.prefix.equals("xmlns") && this.uri.equals("")) {
+ this.uri = XMLNS_URI;
+ }
+ if (this.uri.equals(XMLNS_URI) && this.prefix.equals("")) {
+ this.prefix = "xmlns";
+ }
+ }
+
+ public static Name convertToName(QName qname) {
+ return new NameImpl(qname.getLocalPart(),
+ qname.getPrefix(),
+ qname.getNamespaceURI());
+ }
+
+ public static QName convertToQName(Name name) {
+ return new QName(name.getURI(),
+ name.getLocalName(),
+ name.getPrefix());
+ }
+
+ public static NameImpl createFromUnqualifiedName(String name) {
+ return new NameImpl(name);
+ }
+
+ public static Name createFromTagName(String tagName) {
+ return createFromTagAndUri(tagName, "");
+ }
+
+ public static Name createFromQualifiedName(
+ String qualifiedName,
+ String uri) {
+ return createFromTagAndUri(qualifiedName, uri);
+ }
+
+ protected static Name createFromTagAndUri(String tagName, String uri) {
+ if (tagName == null) {
+ log.severe("SAAJ0201.name.not.created.from.null.tag");
+ throw new IllegalArgumentException("Cannot create a name from a null tag.");
+ }
+ int index = tagName.indexOf(':');
+ if (index < 0) {
+ return new NameImpl(tagName, "", uri);
+ } else {
+ return new NameImpl(
+ tagName.substring(index + 1),
+ tagName.substring(0, index),
+ uri);
+ }
+ }
+
+ protected static int getPrefixSeparatorIndex(String qualifiedName) {
+ int index = qualifiedName.indexOf(':');
+ if (index < 0) {
+ log.log(
+ Level.SEVERE,
+ "SAAJ0202.name.invalid.arg.format",
+ new String[] { qualifiedName });
+ throw new IllegalArgumentException(
+ "Argument \""
+ + qualifiedName
+ + "\" must be of the form: \"prefix:localName\"");
+ }
+ return index;
+ }
+
+ public static String getPrefixFromQualifiedName(String qualifiedName) {
+ return qualifiedName.substring(
+ 0,
+ getPrefixSeparatorIndex(qualifiedName));
+ }
+
+ public static String getLocalNameFromQualifiedName(String qualifiedName) {
+ return qualifiedName.substring(
+ getPrefixSeparatorIndex(qualifiedName) + 1);
+ }
+
+ public static String getPrefixFromTagName(String tagName) {
+ if (isQualified(tagName)) {
+ return getPrefixFromQualifiedName(tagName);
+ }
+ return "";
+ }
+
+ public static String getLocalNameFromTagName(String tagName) {
+ if (isQualified(tagName)) {
+ return getLocalNameFromQualifiedName(tagName);
+ }
+ return tagName;
+ }
+
+ public static boolean isQualified(String tagName) {
+ return tagName.indexOf(':') >= 0;
+ }
+
+ public static NameImpl create(String name, String prefix, String uri) {
+ if (prefix == null)
+ prefix = "";
+ if (uri == null)
+ uri = "";
+ if (name == null)
+ name = "";
+
+ if (!uri.equals("") && !name.equals("")) {
+ if (uri.equals(NameImpl.SOAP11_NAMESPACE)) {
+ if (name.equalsIgnoreCase("Envelope"))
+ return createEnvelope1_1Name(prefix);
+ else if (name.equalsIgnoreCase("Header"))
+ return createHeader1_1Name(prefix);
+ else if (name.equalsIgnoreCase("Body"))
+ return createBody1_1Name(prefix);
+ else if (name.equalsIgnoreCase("Fault"))
+ return createFault1_1Name(prefix);
+ else
+ return new SOAP1_1Name(name, prefix);
+ } else if (uri.equals(SOAP12_NAMESPACE)) {
+ if (name.equalsIgnoreCase("Envelope"))
+ return createEnvelope1_2Name(prefix);
+ else if (name.equalsIgnoreCase("Header"))
+ return createHeader1_2Name(prefix);
+ else if (name.equalsIgnoreCase("Body"))
+ return createBody1_2Name(prefix);
+ else if (
+ name.equals("Fault")
+ || name.equals("Reason")
+ || name.equals("Detail"))
+ return createFault1_2Name(name, prefix);
+ else if (name.equals("Code") || name.equals("Subcode"))
+ return createCodeSubcode1_2Name(prefix, name);
+ else
+ return new SOAP1_2Name(name, prefix);
+ }
+
+ }
+ return new NameImpl(name, prefix, uri);
+ }
+
+ public static String createQName(String prefix, String localName) {
+ if (prefix == null || prefix.equals("")) {
+ return localName;
+ }
+ return prefix + ":" + localName;
+ }
+
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Name)) {
+ return false;
+ }
+
+ Name otherName = (Name) obj;
+
+ if (!uri.equals(otherName.getURI())) {
+ return false;
+ }
+
+ if (!localName.equals(otherName.getLocalName())) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode() {
+ return localName.hashCode();
+ }
+
+ /**
+ * Get the local name part of this XML Name.
+ *
+ * @return a string for the local name.
+ */
+ public String getLocalName() {
+ return localName;
+ }
+
+ /* getQualifiedName is inherited from QName */
+
+ /**
+ * Returns the prefix associated with the namespace of the name.
+ *
+ * @return the prefix as a string.
+ */
+ public String getPrefix() {
+ return prefix;
+ }
+
+ /**
+ * Returns the URI associated of the namespace.
+ *
+ * @return the uri as a string.
+ */
+ public String getURI() {
+ return uri;
+ }
+
+ /**
+ * Returns a String version of the name suitable for use in an XML document.
+ */
+ public String getQualifiedName() {
+ if (qualifiedName == null) {
+ if (prefix != null && prefix.length() > 0) {
+ qualifiedName = prefix + ":" + localName;
+ } else {
+ qualifiedName = localName;
+ }
+ }
+ return qualifiedName;
+ }
+
+ /**
+ * Create a name object for a SOAP1.1 Envelope.
+ */
+ public static NameImpl createEnvelope1_1Name(String prefix) {
+ return new Envelope1_1Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 Envelope.
+ */
+ public static NameImpl createEnvelope1_2Name(String prefix) {
+ return new Envelope1_2Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.1 Header.
+ */
+ public static NameImpl createHeader1_1Name(String prefix) {
+ return new Header1_1Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 Header.
+ */
+ public static NameImpl createHeader1_2Name(String prefix) {
+ return new Header1_2Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.1 Body.
+ */
+ public static NameImpl createBody1_1Name(String prefix) {
+ return new Body1_1Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 Body.
+ */
+ public static NameImpl createBody1_2Name(String prefix) {
+ return new Body1_2Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.1 Fault.
+ */
+ public static NameImpl createFault1_1Name(String prefix) {
+ return new Fault1_1Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 NotUnderstood element.
+ */
+ public static NameImpl createNotUnderstood1_2Name(String prefix) {
+ return new NotUnderstood1_2Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 Upgrade element.
+ */
+ public static NameImpl createUpgrade1_2Name(String prefix) {
+ return new Upgrade1_2Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 SupportedEnvelope Upgrade element.
+ */
+ public static NameImpl createSupportedEnvelope1_2Name(String prefix) {
+ return new SupportedEnvelope1_2Name(prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2
+ * Fault, Reason or Detail.
+ *
+ * @param localName Local Name of element
+ */
+ public static NameImpl createFault1_2Name(
+ String localName,
+ String prefix) {
+ return new Fault1_2Name(localName, prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.2 Fault/Code or Subcode.
+ *
+ * @param localName Either "Code" or "Subcode"
+ */
+ public static NameImpl createCodeSubcode1_2Name(
+ String prefix,
+ String localName) {
+ return new CodeSubcode1_2Name(localName, prefix);
+ }
+
+ /**
+ * Create a name object for a SOAP1.1 Fault Detail.
+ */
+ public static NameImpl createDetail1_1Name() {
+ return new Detail1_1Name();
+ }
+
+ public static NameImpl createDetail1_1Name(String prefix) {
+ return new Detail1_1Name(prefix);
+ }
+
+ public static NameImpl createFaultElement1_1Name(String localName) {
+ return new FaultElement1_1Name(localName);
+ }
+
+ public static NameImpl createFaultElement1_1Name(String localName,
+ String prefix) {
+ return new FaultElement1_1Name(localName, prefix);
+ }
+
+ public static NameImpl createSOAP11Name(String string) {
+ return new SOAP1_1Name(string, null);
+ }
+ public static NameImpl createSOAP12Name(String string) {
+ return new SOAP1_2Name(string, null);
+ }
+
+ public static NameImpl createSOAP12Name(String localName, String prefix) {
+ return new SOAP1_2Name(localName, prefix);
+ }
+
+ public static NameImpl createXmlName(String localName) {
+ return new NameImpl(localName, XML_NAMESPACE_PREFIX, XML_NAMESPACE);
+ }
+
+ public static Name copyElementName(Element element) {
+ String localName = element.getLocalName();
+ String prefix = element.getPrefix();
+ String uri = element.getNamespaceURI();
+ return create(localName, prefix, uri);
+ }
+
+
+static class SOAP1_1Name extends NameImpl {
+ SOAP1_1Name(String name, String prefix) {
+ super(
+ name,
+ (prefix == null || prefix.equals(""))
+ ? NameImpl.SOAP_ENVELOPE_PREFIX
+ : prefix,
+ NameImpl.SOAP11_NAMESPACE);
+ }
+}
+
+static class Envelope1_1Name extends SOAP1_1Name {
+ Envelope1_1Name(String prefix) {
+ super("Envelope", prefix);
+ }
+}
+
+static class Header1_1Name extends SOAP1_1Name {
+ Header1_1Name(String prefix) {
+ super("Header", prefix);
+ }
+}
+
+static class Body1_1Name extends SOAP1_1Name {
+ Body1_1Name(String prefix) {
+ super("Body", prefix);
+ }
+}
+
+static class Fault1_1Name extends NameImpl {
+ Fault1_1Name(String prefix) {
+ super(
+ "Fault",
+ (prefix == null || prefix.equals(""))
+ ? SOAP_ENVELOPE_PREFIX
+ : prefix,
+ SOAP11_NAMESPACE);
+ }
+}
+
+static class Detail1_1Name extends NameImpl {
+ Detail1_1Name() {
+ super("detail");
+ }
+
+ Detail1_1Name(String prefix) {
+ super("detail", prefix, "");
+ }
+}
+
+static class FaultElement1_1Name extends NameImpl {
+ FaultElement1_1Name(String localName) {
+ super(localName);
+ }
+
+ FaultElement1_1Name(String localName, String prefix) {
+ super(localName, prefix, "");
+ }
+}
+
+static class SOAP1_2Name extends NameImpl {
+ SOAP1_2Name(String name, String prefix) {
+ super(
+ name,
+ (prefix == null || prefix.equals(""))
+ ? SOAPConstants.SOAP_ENV_PREFIX
+ : prefix,
+ SOAP12_NAMESPACE);
+ }
+}
+
+static class Envelope1_2Name extends SOAP1_2Name {
+ Envelope1_2Name(String prefix) {
+ super("Envelope", prefix);
+ }
+}
+
+static class Header1_2Name extends SOAP1_2Name {
+ Header1_2Name(String prefix) {
+ super("Header", prefix);
+ }
+}
+
+static class Body1_2Name extends SOAP1_2Name {
+ Body1_2Name(String prefix) {
+ super("Body", prefix);
+ }
+}
+
+static class Fault1_2Name extends NameImpl {
+ Fault1_2Name(String name, String prefix) {
+ super(
+ (name == null || name.equals("")) ? "Fault" : name,
+ (prefix == null || prefix.equals(""))
+ ? SOAPConstants.SOAP_ENV_PREFIX
+ : prefix,
+ SOAP12_NAMESPACE);
+ }
+}
+
+static class NotUnderstood1_2Name extends NameImpl {
+ NotUnderstood1_2Name(String prefix) {
+ super(
+ "NotUnderstood",
+ (prefix == null || prefix.equals(""))
+ ? SOAPConstants.SOAP_ENV_PREFIX
+ : prefix,
+ SOAP12_NAMESPACE);
+ }
+}
+
+static class Upgrade1_2Name extends NameImpl {
+ Upgrade1_2Name(String prefix) {
+ super(
+ "Upgrade",
+ (prefix == null || prefix.equals(""))
+ ? SOAPConstants.SOAP_ENV_PREFIX
+ : prefix,
+ SOAP12_NAMESPACE);
+ }
+}
+
+static class SupportedEnvelope1_2Name extends NameImpl {
+ SupportedEnvelope1_2Name(String prefix) {
+ super(
+ "SupportedEnvelope",
+ (prefix == null || prefix.equals(""))
+ ? SOAPConstants.SOAP_ENV_PREFIX
+ : prefix,
+ SOAP12_NAMESPACE);
+ }
+}
+
+static class CodeSubcode1_2Name extends SOAP1_2Name {
+ CodeSubcode1_2Name(String prefix, String localName) {
+ super(prefix, localName);
+ }
+}
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Body1_1Impl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
+
+import java.util.Locale;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.*;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public class Body1_1Impl extends BodyImpl {
+ public Body1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
+ super(ownerDocument, NameImpl.createBody1_1Name(prefix));
+ }
+
+ public SOAPFault addSOAP12Fault(QName faultCode, String faultReason, Locale locale) {
+ // log message here
+ throw new UnsupportedOperationException("Not supported in SOAP 1.1");
+ }
+
+ protected NameImpl getFaultName(String name) {
+ // Ignore name
+ return NameImpl.createFault1_1Name(null);
+ }
+
+ protected SOAPBodyElement createBodyElement(Name name) {
+ return new BodyElement1_1Impl(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ name);
+ }
+
+ protected SOAPBodyElement createBodyElement(QName name) {
+ return new BodyElement1_1Impl(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ name);
+ }
+
+ protected QName getDefaultFaultCode() {
+ return new QName(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE, "Server");
+ }
+
+ protected boolean isFault(SOAPElement child) {
+ // SOAP 1.1 faults always use the default name
+ return child.getElementName().equals(getFaultName(null));
+ }
+
+ protected SOAPFault createFaultElement() {
+ return new Fault1_1Impl(
+ ((SOAPDocument) getOwnerDocument()).getDocument(), getPrefix());
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/BodyElement1_1Impl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.BodyElementImpl;
+
+public class BodyElement1_1Impl extends BodyElementImpl {
+
+ public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
+ super(ownerDoc, qname);
+ }
+ public BodyElement1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
+ super(ownerDoc, qname);
+ }
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+ BodyElementImpl copy =
+ new BodyElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
+ return replaceElementWithSOAPElement(this,copy);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Detail1_1Impl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.DetailEntry;
+import javax.xml.soap.Name;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.DetailImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public class Detail1_1Impl extends DetailImpl {
+
+ public Detail1_1Impl(SOAPDocumentImpl ownerDoc, String prefix) {
+ super(ownerDoc, NameImpl.createDetail1_1Name(prefix));
+ }
+ public Detail1_1Impl(SOAPDocumentImpl ownerDoc) {
+ super(ownerDoc, NameImpl.createDetail1_1Name());
+ }
+ protected DetailEntry createDetailEntry(Name name) {
+ return new DetailEntry1_1Impl(
+ (SOAPDocumentImpl) getOwnerDocument(),
+ name);
+ }
+ protected DetailEntry createDetailEntry(QName name) {
+ return new DetailEntry1_1Impl(
+ (SOAPDocumentImpl) getOwnerDocument(),
+ name);
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/DetailEntry1_1Impl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Name;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPException;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.DetailEntryImpl;
+
+public class DetailEntry1_1Impl extends DetailEntryImpl {
+
+ public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, Name qname) {
+ super(ownerDoc, qname);
+ }
+ public DetailEntry1_1Impl(SOAPDocumentImpl ownerDoc, QName qname) {
+ super(ownerDoc, qname);
+ }
+ public SOAPElement setElementQName(QName newName) throws SOAPException {
+ DetailEntryImpl copy =
+ new DetailEntry1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
+ return replaceElementWithSOAPElement(this,copy);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Envelope1_1Impl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
+
+import javax.xml.soap.SOAPException;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.EnvelopeImpl;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+
+public class Envelope1_1Impl extends EnvelopeImpl {
+
+ public Envelope1_1Impl(SOAPDocumentImpl ownerDoc, String prefix){
+ super(ownerDoc, NameImpl.createEnvelope1_1Name(prefix));
+ }
+ Envelope1_1Impl(
+ SOAPDocumentImpl ownerDoc,
+ String prefix,
+ boolean createHeader,
+ boolean createBody)
+ throws SOAPException {
+ super(
+ ownerDoc,
+ NameImpl.createEnvelope1_1Name(prefix),
+ createHeader,
+ createBody);
+ }
+ protected NameImpl getBodyName(String prefix) {
+ return NameImpl.createBody1_1Name(prefix);
+ }
+
+ protected NameImpl getHeaderName(String prefix) {
+ return NameImpl.createHeader1_1Name(prefix);
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/Fault1_1Impl.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,387 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+*
+* @author SAAJ RI Development Team
+*/
+package com.sun.xml.internal.messaging.saaj.soap.ver1_1;
+
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPElement;
+import javax.xml.soap.SOAPFaultElement;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPConstants;
+import javax.xml.soap.Name;
+import javax.xml.soap.Name;
+
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocument;
+import com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl;
+import com.sun.xml.internal.messaging.saaj.soap.impl.*;
+import com.sun.xml.internal.messaging.saaj.soap.name.NameImpl;
+import com.sun.xml.internal.messaging.saaj.util.LogDomainConstants;
+import com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl;
+
+
+public class Fault1_1Impl extends FaultImpl {
+
+ protected static final Logger log =
+ Logger.getLogger(
+ LogDomainConstants.SOAP_VER1_1_DOMAIN,
+ "com.sun.xml.internal.messaging.saaj.soap.ver1_1.LocalStrings");
+
+ public Fault1_1Impl(SOAPDocumentImpl ownerDocument, String prefix) {
+ super(ownerDocument, NameImpl.createFault1_1Name(prefix));
+ }
+
+ protected NameImpl getDetailName() {
+ return NameImpl.createDetail1_1Name();
+ }
+
+ protected NameImpl getFaultCodeName() {
+ return NameImpl.createFromUnqualifiedName("faultcode");
+ }
+
+ protected NameImpl getFaultStringName() {
+ return NameImpl.createFromUnqualifiedName("faultstring");
+ }
+
+ protected NameImpl getFaultActorName() {
+ return NameImpl.createFromUnqualifiedName("faultactor");
+ }
+
+ protected DetailImpl createDetail() {
+ return new Detail1_1Impl(
+ ((SOAPDocument) getOwnerDocument()).getDocument());
+ }
+
+ protected FaultElementImpl createSOAPFaultElement(String localName) {
+ return new FaultElement1_1Impl(
+ ((SOAPDocument) getOwnerDocument()).getDocument(),
+ localName);
+ }
+
+ protected void checkIfStandardFaultCode(String faultCode, String uri)
+ throws SOAPException {
+ // SOAP 1.1 doesn't seem to mandate using faultcode from a particular
+ // set of values.
+ // Also need to be backward compatible.
+ }
+
+ protected void finallySetFaultCode(String faultcode) throws SOAPException {
+ this.faultCodeElement.addTextNode(faultcode);
+ }
+
+ public String getFaultCode() {
+ if (this.faultCodeElement == null)
+ findFaultCodeElement();
+ return this.faultCodeElement.getValue();
+ }
+
+ public Name getFaultCodeAsName() {
+
+ String faultcodeString = getFaultCode();
+ if (faultcodeString == null) {
+ return null;
+ }
+ int prefixIndex = faultcodeString.indexOf(':');
+ if (prefixIndex == -1) {
+ // Not a valid SOAP message, but we return the unqualified name
+ // anyway since some apps do not strictly conform to SOAP
+ // specs. A message that does not contain a
+ *
FastInfosetSource.serialize(Document)
method via reflection.
+ */
+ static Method fiDOMDocumentSerializer_serialize;
+
+ /**
+ * FI FastInfosetSource.setOutputStream(OutputStream)
method via reflection.
+ */
+ static Method fiDOMDocumentSerializer_setOutputStream;
+
+ /**
+ * FI FastInfosetSource constructor using reflection.
+ */
+ static Class fiFastInfosetSource_class;
+
+ /**
+ * FI FastInfosetSource constructor using reflection.
+ */
+ static Constructor fiFastInfosetSource_new;
+
+ /**
+ * FI FastInfosetSource.getInputStream()
method via reflection.
+ */
+ static Method fiFastInfosetSource_getInputStream;
+
+ /**
+ * FI FastInfosetSource.setInputSTream()
method via reflection.
+ */
+ static Method fiFastInfosetSource_setInputStream;
+
+ /**
+ * FI FastInfosetResult constructor using reflection.
+ */
+ static Constructor fiFastInfosetResult_new;
+
+ /**
+ * FI FastInfosetResult.getOutputSTream()
method via reflection.
+ */
+ static Method fiFastInfosetResult_getOutputStream;
+
+ static {
+ try {
+ Class clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentParser");
+ fiDOMDocumentParser_new = clazz.getConstructor((Class[]) null);
+ fiDOMDocumentParser_parse = clazz.getMethod("parse",
+ new Class[] { org.w3c.dom.Document.class, java.io.InputStream.class });
+
+ clazz = Class.forName("com.sun.xml.internal.fastinfoset.dom.DOMDocumentSerializer");
+ fiDOMDocumentSerializer_new = clazz.getConstructor((Class[])null);
+ fiDOMDocumentSerializer_serialize = clazz.getMethod("serialize",
+ new Class[] { org.w3c.dom.Node.class });
+ fiDOMDocumentSerializer_setOutputStream = clazz.getMethod("setOutputStream",
+ new Class[] { java.io.OutputStream.class });
+
+ fiFastInfosetSource_class = clazz = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
+ fiFastInfosetSource_new = clazz.getConstructor(
+ new Class[] { java.io.InputStream.class });
+ fiFastInfosetSource_getInputStream = clazz.getMethod("getInputStream", (Class[]) null);
+ fiFastInfosetSource_setInputStream = clazz.getMethod("setInputStream",
+ new Class[] { java.io.InputStream.class });
+
+ clazz = Class.forName("com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult");
+ fiFastInfosetResult_new = clazz.getConstructor(
+ new Class[] { java.io.OutputStream.class });
+ fiFastInfosetResult_getOutputStream = clazz.getMethod("getOutputStream", (Class[]) null);
+ }
+ catch (Exception e) {
+ // falls through
+ }
+ }
+
+ // -- DOMDocumentParser ----------------------------------------------
+
+ public static Object DOMDocumentParser_new() throws Exception {
+ if (fiDOMDocumentParser_new == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ return fiDOMDocumentParser_new.newInstance((Object[])null);
+ }
+
+ public static void DOMDocumentParser_parse(Object parser,
+ Document d, InputStream s) throws Exception
+ {
+ if (fiDOMDocumentParser_parse == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ fiDOMDocumentParser_parse.invoke(parser, new Object[] { d, s });
+ }
+
+ // -- DOMDocumentSerializer-------------------------------------------
+
+ public static Object DOMDocumentSerializer_new() throws Exception {
+ if (fiDOMDocumentSerializer_new == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ return fiDOMDocumentSerializer_new.newInstance((Object[])null);
+ }
+
+ public static void DOMDocumentSerializer_serialize(Object serializer, Node node)
+ throws Exception
+ {
+ if (fiDOMDocumentSerializer_serialize == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ fiDOMDocumentSerializer_serialize.invoke(serializer, new Object[] { node });
+ }
+
+ public static void DOMDocumentSerializer_setOutputStream(Object serializer,
+ OutputStream os) throws Exception
+ {
+ if (fiDOMDocumentSerializer_setOutputStream == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ fiDOMDocumentSerializer_setOutputStream.invoke(serializer, new Object[] { os });
+ }
+
+ // -- FastInfosetSource ----------------------------------------------
+
+ public static boolean isFastInfosetSource(Source source) {
+ return source.getClass().getName().equals(
+ "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetSource");
+ }
+
+ public static Class getFastInfosetSource_class() {
+ if (fiFastInfosetSource_class == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+
+ return fiFastInfosetSource_class;
+ }
+ public static Source FastInfosetSource_new(InputStream is)
+ throws Exception
+ {
+ if (fiFastInfosetSource_new == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ return (Source) fiFastInfosetSource_new.newInstance(new Object[] { is });
+ }
+
+ public static InputStream FastInfosetSource_getInputStream(Source source)
+ throws Exception
+ {
+ if (fiFastInfosetSource_getInputStream == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ return (InputStream) fiFastInfosetSource_getInputStream.invoke(source, (Object[])null);
+ }
+
+ public static void FastInfosetSource_setInputStream(Source source,
+ InputStream is) throws Exception
+ {
+ if (fiFastInfosetSource_setInputStream == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ fiFastInfosetSource_setInputStream.invoke(source, new Object[] { is });
+ }
+
+ // -- FastInfosetResult ----------------------------------------------
+
+ public static boolean isFastInfosetResult(Result result) {
+ return result.getClass().getName().equals(
+ "com.sun.xml.internal.org.jvnet.fastinfoset.FastInfosetResult");
+ }
+
+ public static Result FastInfosetResult_new(OutputStream os)
+ throws Exception
+ {
+ if (fiFastInfosetResult_new == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ return (Result) fiFastInfosetResult_new.newInstance(new Object[] { os });
+ }
+
+ public static OutputStream FastInfosetResult_getOutputStream(Result result)
+ throws Exception
+ {
+ if (fiFastInfosetResult_getOutputStream == null) {
+ throw new RuntimeException("Unable to locate Fast Infoset implementation");
+ }
+ return (OutputStream) fiFastInfosetResult_getOutputStream.invoke(result, (Object[])null);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/FinalArrayList.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * {@link ArrayList} with a final marker to help JIT.
+ * @author Kohsuke Kawaguchi
+ */
+public final class FinalArrayList extends ArrayList {
+ public FinalArrayList(int initialCapacity) {
+ super(initialCapacity);
+ }
+
+ public FinalArrayList() {
+ }
+
+ public FinalArrayList(Collection collection) {
+ super(collection);
+ }
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JAXMStreamSource.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.util;
+
+import java.io.*;
+
+import javax.xml.transform.stream.StreamSource;
+
+
+/**
+ *
+ * @author Anil Vijendran
+ */
+public class JAXMStreamSource extends StreamSource {
+ InputStream in;
+ Reader reader;
+ private static final boolean lazyContentLength;
+ static {
+ lazyContentLength = SAAJUtil.getSystemBoolean("saaj.lazy.contentlength");
+ }
+ public JAXMStreamSource(InputStream is) throws IOException {
+ if (lazyContentLength) {
+ in = is;
+ } else if (is instanceof ByteInputStream) {
+ this.in = (ByteInputStream) is;
+ } else {
+ ByteOutputStream bout = null;
+ try {
+ bout = new ByteOutputStream();
+ bout.write(is);
+ this.in = bout.newInputStream();
+ } finally {
+ if (bout != null)
+ bout.close();
+ }
+ }
+ }
+
+ public JAXMStreamSource(Reader rdr) throws IOException {
+
+ if (lazyContentLength) {
+ this.reader = rdr;
+ return;
+ }
+ CharWriter cout = new CharWriter();
+ char[] temp = new char[1024];
+ int len;
+
+ while (-1 != (len = rdr.read(temp)))
+ cout.write(temp, 0, len);
+
+ this.reader = new CharReader(cout.getChars(), cout.getCount());
+ }
+
+ public InputStream getInputStream() {
+ return in;
+ }
+
+ public Reader getReader() {
+ return reader;
+ }
+
+ public void reset() throws IOException {
+ if (in != null)
+ in.reset();
+ if (reader != null)
+ reader.reset();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/util/JaxmURI.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,1380 @@
+/*
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.messaging.saaj.util;
+
+// Imported from: org.apache.xerces.util
+// Needed to work around differences in JDK1.2 and 1.3 and deal with userInfo
+
+import java.io.IOException;
+import java.io.Serializable;
+
+
+/**********************************************************************
+* A class to represent a Uniform Resource Identifier (URI). This class
+* is designed to handle the parsing of URIs and provide access to
+* the various components (scheme, host, port, userinfo, path, query
+* string and fragment) that may constitute a URI.
+* MalformedURIException
with no specified
+ * detail message.
+ ******************************************************************/
+ public MalformedURIException() {
+ super();
+ }
+
+ /*****************************************************************
+ * Constructs a MalformedURIException
with the
+ * specified detail message.
+ *
+ * @param p_msg the detail message.
+ ******************************************************************/
+ public MalformedURIException(String p_msg) {
+ super(p_msg);
+ }
+ }
+
+ /** reserved characters */
+ private static final String RESERVED_CHARACTERS = ";/?:@&=+$,";
+
+ /** URI punctuation mark characters - these, combined with
+ alphanumerics, constitute the "unreserved" characters */
+ private static final String MARK_CHARACTERS = "-_.!~*'() ";
+
+ /** scheme can be composed of alphanumerics and these characters */
+ private static final String SCHEME_CHARACTERS = "+-.";
+
+ /** userinfo can be composed of unreserved, escaped and these
+ characters */
+ private static final String USERINFO_CHARACTERS = ";:&=+$,";
+
+ /** Stores the scheme (usually the protocol) for this URI. */
+ private String m_scheme = null;
+
+ /** If specified, stores the userinfo for this URI; otherwise null */
+ private String m_userinfo = null;
+
+ /** If specified, stores the host for this URI; otherwise null */
+ private String m_host = null;
+
+ /** If specified, stores the port for this URI; otherwise -1 */
+ private int m_port = -1;
+
+ /** If specified, stores the path for this URI; otherwise null */
+ private String m_path = null;
+
+ /** If specified, stores the query string for this URI; otherwise
+ null. */
+ private String m_queryString = null;
+
+ /** If specified, stores the fragment for this URI; otherwise null */
+ private String m_fragment = null;
+
+ private static boolean DEBUG = false;
+
+ /**
+ * Construct a new and uninitialized URI.
+ */
+ public JaxmURI() {
+ }
+
+ /**
+ * Construct a new URI from another URI. All fields for this URI are
+ * set equal to the fields of the URI passed in.
+ *
+ * @param p_other the URI to copy (cannot be null)
+ */
+ public JaxmURI(JaxmURI p_other) {
+ initialize(p_other);
+ }
+
+ /**
+ * Construct a new URI from a URI specification string. If the
+ * specification follows the "generic URI" syntax, (two slashes
+ * following the first colon), the specification will be parsed
+ * accordingly - setting the scheme, userinfo, host,port, path, query
+ * string and fragment fields as necessary. If the specification does
+ * not follow the "generic URI" syntax, the specification is parsed
+ * into a scheme and scheme-specific part (stored as the path) only.
+ *
+ * @param p_uriSpec the URI specification string (cannot be null or
+ * empty)
+ *
+ * @exception MalformedURIException if p_uriSpec violates any syntax
+ * rules
+ */
+ public JaxmURI(String p_uriSpec) throws MalformedURIException {
+ this((JaxmURI)null, p_uriSpec);
+ }
+
+ /**
+ * Construct a new URI from a base URI and a URI specification string.
+ * The URI specification string may be a relative URI.
+ *
+ * @param p_base the base URI (cannot be null if p_uriSpec is null or
+ * empty)
+ * @param p_uriSpec the URI specification string (cannot be null or
+ * empty if p_base is null)
+ *
+ * @exception MalformedURIException if p_uriSpec violates any syntax
+ * rules
+ */
+ public JaxmURI(JaxmURI p_base, String p_uriSpec) throws MalformedURIException {
+ initialize(p_base, p_uriSpec);
+ }
+
+ /**
+ * Construct a new URI that does not follow the generic URI syntax.
+ * Only the scheme and scheme-specific part (stored as the path) are
+ * initialized.
+ *
+ * @param p_scheme the URI scheme (cannot be null or empty)
+ * @param p_schemeSpecificPart the scheme-specific part (cannot be
+ * null or empty)
+ *
+ * @exception MalformedURIException if p_scheme violates any
+ * syntax rules
+ */
+ public JaxmURI(String p_scheme, String p_schemeSpecificPart)
+ throws MalformedURIException {
+ if (p_scheme == null || p_scheme.trim().length() == 0) {
+ throw new MalformedURIException(
+ "Cannot construct URI with null/empty scheme!");
+ }
+ if (p_schemeSpecificPart == null ||
+ p_schemeSpecificPart.trim().length() == 0) {
+ throw new MalformedURIException(
+ "Cannot construct URI with null/empty scheme-specific part!");
+ }
+ setScheme(p_scheme);
+ setPath(p_schemeSpecificPart);
+ }
+
+ /**
+ * Construct a new URI that follows the generic URI syntax from its
+ * component parts. Each component is validated for syntax and some
+ * basic semantic checks are performed as well. See the individual
+ * setter methods for specifics.
+ *
+ * @param p_scheme the URI scheme (cannot be null or empty)
+ * @param p_host the hostname or IPv4 address for the URI
+ * @param p_path the URI path - if the path contains '?' or '#',
+ * then the query string and/or fragment will be
+ * set from the path; however, if the query and
+ * fragment are specified both in the path and as
+ * separate parameters, an exception is thrown
+ * @param p_queryString the URI query string (cannot be specified
+ * if path is null)
+ * @param p_fragment the URI fragment (cannot be specified if path
+ * is null)
+ *
+ * @exception MalformedURIException if any of the parameters violates
+ * syntax rules or semantic rules
+ */
+ public JaxmURI(String p_scheme, String p_host, String p_path,
+ String p_queryString, String p_fragment)
+ throws MalformedURIException {
+ this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment);
+ }
+
+ /**
+ * Construct a new URI that follows the generic URI syntax from its
+ * component parts. Each component is validated for syntax and some
+ * basic semantic checks are performed as well. See the individual
+ * setter methods for specifics.
+ *
+ * @param p_scheme the URI scheme (cannot be null or empty)
+ * @param p_userinfo the URI userinfo (cannot be specified if host
+ * is null)
+ * @param p_host the hostname or IPv4 address for the URI
+ * @param p_port the URI port (may be -1 for "unspecified"; cannot
+ * be specified if host is null)
+ * @param p_path the URI path - if the path contains '?' or '#',
+ * then the query string and/or fragment will be
+ * set from the path; however, if the query and
+ * fragment are specified both in the path and as
+ * separate parameters, an exception is thrown
+ * @param p_queryString the URI query string (cannot be specified
+ * if path is null)
+ * @param p_fragment the URI fragment (cannot be specified if path
+ * is null)
+ *
+ * @exception MalformedURIException if any of the parameters violates
+ * syntax rules or semantic rules
+ */
+ public JaxmURI(String p_scheme, String p_userinfo,
+ String p_host, int p_port, String p_path,
+ String p_queryString, String p_fragment)
+ throws MalformedURIException {
+ if (p_scheme == null || p_scheme.trim().length() == 0) {
+ throw new MalformedURIException("Scheme is required!");
+ }
+
+ if (p_host == null) {
+ if (p_userinfo != null) {
+ throw new MalformedURIException(
+ "Userinfo may not be specified if host is not specified!");
+ }
+ if (p_port != -1) {
+ throw new MalformedURIException(
+ "Port may not be specified if host is not specified!");
+ }
+ }
+
+ if (p_path != null) {
+ if (p_path.indexOf('?') != -1 && p_queryString != null) {
+ throw new MalformedURIException(
+ "Query string cannot be specified in path and query string!");
+ }
+
+ if (p_path.indexOf('#') != -1 && p_fragment != null) {
+ throw new MalformedURIException(
+ "Fragment cannot be specified in both the path and fragment!");
+ }
+ }
+
+ setScheme(p_scheme);
+ setHost(p_host);
+ setPort(p_port);
+ setUserinfo(p_userinfo);
+ setPath(p_path);
+ setQueryString(p_queryString);
+ setFragment(p_fragment);
+ }
+
+ /**
+ * Initialize all fields of this URI from another URI.
+ *
+ * @param p_other the URI to copy (cannot be null)
+ */
+ private void initialize(JaxmURI p_other) {
+ m_scheme = p_other.getScheme();
+ m_userinfo = p_other.getUserinfo();
+ m_host = p_other.getHost();
+ m_port = p_other.getPort();
+ m_path = p_other.getPath();
+ m_queryString = p_other.getQueryString();
+ m_fragment = p_other.getFragment();
+ }
+
+ /**
+ * Initializes this URI from a base URI and a URI specification string.
+ * See RFC 2396 Section 4 and Appendix B for specifications on parsing
+ * the URI and Section 5 for specifications on resolving relative URIs
+ * and relative paths.
+ *
+ * @param p_base the base URI (may be null if p_uriSpec is an absolute
+ * URI)
+ * @param p_uriSpec the URI spec string which may be an absolute or
+ * relative URI (can only be null/empty if p_base
+ * is not null)
+ *
+ * @exception MalformedURIException if p_base is null and p_uriSpec
+ * is not an absolute URI or if
+ * p_uriSpec violates syntax rules
+ */
+ private void initialize(JaxmURI p_base, String p_uriSpec)
+ throws MalformedURIException {
+ if (p_base == null &&
+ (p_uriSpec == null || p_uriSpec.trim().length() == 0)) {
+ throw new MalformedURIException(
+ "Cannot initialize URI with empty parameters.");
+ }
+
+ // just make a copy of the base if spec is empty
+ if (p_uriSpec == null || p_uriSpec.trim().length() == 0) {
+ initialize(p_base);
+ return;
+ }
+
+ String uriSpec = p_uriSpec.trim();
+ int uriSpecLen = uriSpec.length();
+ int index = 0;
+
+ // Check for scheme, which must be before `/'. Also handle names with
+ // DOS drive letters ('D:'), so 1-character schemes are not allowed.
+ int colonIdx = uriSpec.indexOf(':');
+ int slashIdx = uriSpec.indexOf('/');
+ if ((colonIdx < 2) || (colonIdx > slashIdx && slashIdx != -1)) {
+ int fragmentIdx = uriSpec.indexOf('#');
+ // A standalone base is a valid URI according to spec
+ if (p_base == null && fragmentIdx != 0 ) {
+ throw new MalformedURIException("No scheme found in URI.");
+ }
+ }
+ else {
+ initializeScheme(uriSpec);
+ index = m_scheme.length()+1;
+ }
+
+ // two slashes means generic URI syntax, so we get the authority
+ if (((index+1) < uriSpecLen) &&
+ (uriSpec.substring(index).startsWith("//"))) {
+ index += 2;
+ int startPos = index;
+
+ // get authority - everything up to path, query or fragment
+ char testChar = '\0';
+ while (index < uriSpecLen) {
+ testChar = uriSpec.charAt(index);
+ if (testChar == '/' || testChar == '?' || testChar == '#') {
+ break;
+ }
+ index++;
+ }
+
+ // if we found authority, parse it out, otherwise we set the
+ // host to empty string
+ if (index > startPos) {
+ initializeAuthority(uriSpec.substring(startPos, index));
+ }
+ else {
+ m_host = "";
+ }
+ }
+
+ initializePath(uriSpec.substring(index));
+
+ // Resolve relative URI to base URI - see RFC 2396 Section 5.2
+ // In some cases, it might make more sense to throw an exception
+ // (when scheme is specified is the string spec and the base URI
+ // is also specified, for example), but we're just following the
+ // RFC specifications
+ if (p_base != null) {
+
+ // check to see if this is the current doc - RFC 2396 5.2 #2
+ // note that this is slightly different from the RFC spec in that
+ // we don't include the check for query string being null
+ // - this handles cases where the urispec is just a query
+ // string or a fragment (e.g. "?y" or "#s") -
+ // see SOAPMessage
object. A SOAPMessage
+ * object may contain zero, one, or many AttachmentPart
objects.
+ * Each AttachmentPart
object consists of two parts,
+ * application-specific content and associated MIME headers. The
+ * MIME headers consists of name/value pairs that can be used to
+ * identify and describe the content.
+ * AttachmentPart
object must conform to certain standards.
+ *
+ *
+ *
+ *
+ * Content-Type
+ * This header identifies the type of data in the content of an
+ * AttachmentPart
object and MUST conform to [RFC2045].
+ * The following is an example of a Content-Type header:
+ *
+ * Content-Type: application/xml
+ *
+ * The following line of code, in which ap
is an
+ * AttachmentPart
object, sets the header shown in
+ * the previous example.
+ *
+ * ap.setMimeHeader("Content-Type", "application/xml");
+ *
+ *
+ * AttachmentPart
object. The content may be anything from a
+ * simple plain text object to a complex XML document or image file.
+ *
+ * AttachmentPart
object is created with the method
+ * SOAPMessage.createAttachmentPart
. After setting its MIME headers,
+ * the AttachmentPart
object is added to the message
+ * that created it with the method SOAPMessage.addAttachmentPart
.
+ *
+ * m
is a
+ * SOAPMessage
object and contentStringl
is a
+ * String
, creates an instance of AttachmentPart
,
+ * sets the AttachmentPart
object with some content and
+ * header information, and adds the AttachmentPart
object to
+ * the SOAPMessage
object.
+ *
+ * AttachmentPart ap1 = m.createAttachmentPart();
+ * ap1.setContent(contentString1, "text/plain");
+ * m.addAttachmentPart(ap1);
+ *
+ *
+ *
+ * AttachmentPart
instance to the same message. jpegData
+ * is a binary byte buffer representing the jpeg file.
+ *
+ * AttachmentPart ap2 = m.createAttachmentPart();
+ * byte[] jpegData = ...;
+ * ap2.setContent(new ByteArrayInputStream(jpegData), "image/jpeg");
+ * m.addAttachmentPart(ap2);
+ *
+ * getContent
method retrieves the contents and header from
+ * an AttachmentPart
object. Depending on the
+ * DataContentHandler
objects present, the returned
+ * Object
can either be a typed Java object corresponding
+ * to the MIME type or an InputStream
object that contains the
+ * content as bytes.
+ *
+ * String content1 = ap1.getContent();
+ * java.io.InputStream content2 = ap2.getContent();
+ *
+ *
+ * The method clearContent
removes all the content from an
+ * AttachmentPart
object but does not affect its header information.
+ *
+ * ap1.clearContent();
+ *
+ *
+ * @since 1.6
+ */
+
+public abstract class AttachmentPart {
+ /**
+ * Returns the number of bytes in this AttachmentPart
+ * object.
+ *
+ * @return the size of this AttachmentPart
object in bytes
+ * or -1 if the size cannot be determined
+ * @exception SOAPException if the content of this attachment is
+ * corrupted of if there was an exception while trying
+ * to determine the size.
+ */
+ public abstract int getSize() throws SOAPException;
+
+ /**
+ * Clears out the content of this AttachmentPart
object.
+ * The MIME header portion is left untouched.
+ */
+ public abstract void clearContent();
+
+ /**
+ * Gets the content of this AttachmentPart
object as a Java
+ * object. The type of the returned Java object depends on (1) the
+ * DataContentHandler
object that is used to interpret the bytes
+ * and (2) the Content-Type
given in the header.
+ * DataContentHandler
object does the conversions to and
+ * from the Java types corresponding to the MIME types.
+ * For other MIME types,the DataContentHandler
object
+ * can return an InputStream
object that contains the content data
+ * as raw bytes.
+ * java.lang.String
object corresponding to any content
+ * stream with a Content-Type
value of
+ * text/plain
, a
+ * javax.xml.transform.stream.StreamSource
object corresponding to a
+ * content stream with a Content-Type
value of
+ * text/xml
, a java.awt.Image
object
+ * corresponding to a content stream with a
+ * Content-Type
value of image/gif
or
+ * image/jpeg
. For those content types that an
+ * installed DataContentHandler
object does not understand, the
+ * DataContentHandler
object is required to return a
+ * java.io.InputStream
object with the raw bytes.
+ *
+ * @return a Java object with the content of this AttachmentPart
+ * object
+ *
+ * @exception SOAPException if there is no content set into this
+ * AttachmentPart
object or if there was a data
+ * transformation error
+ */
+ public abstract Object getContent() throws SOAPException;
+
+ /**
+ * Gets the content of this AttachmentPart
object as an
+ * InputStream as if a call had been made to getContent
and no
+ * DataContentHandler
had been registered for the
+ * content-type
of this AttachmentPart
.
+ *InputStream
from which the raw data contained by
+ * the AttachmentPart
can be accessed.
+ *
+ * @throws SOAPException if there is no content set into this
+ * AttachmentPart
object or if there was a data
+ * transformation error.
+ *
+ * @since 1.6, SAAJ 1.3
+ * @see #getRawContentBytes
+ */
+ public abstract InputStream getRawContent() throws SOAPException;
+
+ /**
+ * Gets the content of this AttachmentPart
object as a
+ * byte[] array as if a call had been made to getContent
and no
+ * DataContentHandler
had been registered for the
+ * content-type
of this AttachmentPart
.
+ *
+ * @return a byte[]
array containing the raw data of the
+ * AttachmentPart
.
+ *
+ * @throws SOAPException if there is no content set into this
+ * AttachmentPart
object or if there was a data
+ * transformation error.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract byte[] getRawContentBytes() throws SOAPException;
+
+ /**
+ * Returns an InputStream
which can be used to obtain the
+ * content of AttachmentPart
as Base64 encoded
+ * character data, this method would base64 encode the raw bytes
+ * of the attachment and return.
+ *
+ * @return an InputStream
from which the Base64 encoded
+ * AttachmentPart
can be read.
+ *
+ * @throws SOAPException if there is no content set into this
+ * AttachmentPart
object or if there was a data
+ * transformation error.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract InputStream getBase64Content() throws SOAPException;
+
+ /**
+ * Sets the content of this attachment part to that of the given
+ * Object
and sets the value of the Content-Type
+ * header to the given type. The type of the
+ * Object
should correspond to the value given for the
+ * Content-Type
. This depends on the particular
+ * set of DataContentHandler
objects in use.
+ *
+ *
+ * @param object the Java object that makes up the content for
+ * this attachment part
+ * @param contentType the MIME string that specifies the type of
+ * the content
+ *
+ * @exception IllegalArgumentException may be thrown if the contentType
+ * does not match the type of the content object, or if there
+ * was no DataContentHandler
object for this
+ * content object
+ *
+ * @see #getContent
+ */
+ public abstract void setContent(Object object, String contentType);
+
+ /**
+ * Sets the content of this attachment part to that contained by the
+ * InputStream
content
and sets the value of the
+ * Content-Type
header to the value contained in
+ * contentType
.
+ * Content-Type
+ * header
+ *
+ * @exception SOAPException if an there is an error in setting the content
+ * @exception NullPointerException if content
is null
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract void setRawContent(InputStream content, String contentType) throws SOAPException;
+
+ /**
+ * Sets the content of this attachment part to that contained by the
+ * byte[]
array content
and sets the value of the
+ * Content-Type
header to the value contained in
+ * contentType
.
+ *
+ * @param content the raw data to add to the attachment part
+ * @param contentType the value to set into the Content-Type
+ * header
+ * @param offset the offset in the byte array of the content
+ * @param len the number of bytes that form the content
+ *
+ * @exception SOAPException if an there is an error in setting the content
+ * or content is null
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract void setRawContentBytes(
+ byte[] content, int offset, int len, String contentType)
+ throws SOAPException;
+
+
+ /**
+ * Sets the content of this attachment part from the Base64 source
+ * InputStream
and sets the value of the
+ * Content-Type
header to the value contained in
+ * contentType
, This method would first decode the base64
+ * input and write the resulting raw bytes to the attachment.
+ * Content-Type
+ * header
+ *
+ * @exception SOAPException if an there is an error in setting the content
+ * @exception NullPointerException if content
is null
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract void setBase64Content(
+ InputStream content, String contentType) throws SOAPException;
+
+
+ /**
+ * Gets the DataHandler
object for this AttachmentPart
+ * object.
+ *
+ * @return the DataHandler
object associated with this
+ * AttachmentPart
object
+ *
+ * @exception SOAPException if there is no data in
+ * this AttachmentPart
object
+ */
+ public abstract DataHandler getDataHandler()
+ throws SOAPException;
+
+ /**
+ * Sets the given DataHandler
object as the data handler
+ * for this AttachmentPart
object. Typically, on an incoming
+ * message, the data handler is automatically set. When
+ * a message is being created and populated with content, the
+ * setDataHandler
method can be used to get data from
+ * various data sources into the message.
+ *
+ * @param dataHandler the DataHandler
object to be set
+ *
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified DataHandler
object
+ */
+ public abstract void setDataHandler(DataHandler dataHandler);
+
+
+ /**
+ * Gets the value of the MIME header whose name is "Content-ID".
+ *
+ * @return a String
giving the value of the
+ * "Content-ID" header or null
if there
+ * is none
+ * @see #setContentId
+ */
+ public String getContentId() {
+ String[] values = getMimeHeader("Content-ID");
+ if (values != null && values.length > 0)
+ return values[0];
+ return null;
+ }
+
+ /**
+ * Gets the value of the MIME header whose name is "Content-Location".
+ *
+ * @return a String
giving the value of the
+ * "Content-Location" header or null
if there
+ * is none
+ */
+ public String getContentLocation() {
+ String[] values = getMimeHeader("Content-Location");
+ if (values != null && values.length > 0)
+ return values[0];
+ return null;
+ }
+
+ /**
+ * Gets the value of the MIME header whose name is "Content-Type".
+ *
+ * @return a String
giving the value of the
+ * "Content-Type" header or null
if there
+ * is none
+ */
+ public String getContentType() {
+ String[] values = getMimeHeader("Content-Type");
+ if (values != null && values.length > 0)
+ return values[0];
+ return null;
+ }
+
+ /**
+ * Sets the MIME header whose name is "Content-ID" with the given value.
+ *
+ * @param contentId a String
giving the value of the
+ * "Content-ID" header
+ *
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified contentId
value
+ * @see #getContentId
+ */
+ public void setContentId(String contentId)
+ {
+ setMimeHeader("Content-ID", contentId);
+ }
+
+
+ /**
+ * Sets the MIME header whose name is "Content-Location" with the given value.
+ *
+ *
+ * @param contentLocation a String
giving the value of the
+ * "Content-Location" header
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified content location
+ */
+ public void setContentLocation(String contentLocation)
+ {
+ setMimeHeader("Content-Location", contentLocation);
+ }
+
+ /**
+ * Sets the MIME header whose name is "Content-Type" with the given value.
+ *
+ * @param contentType a String
giving the value of the
+ * "Content-Type" header
+ *
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified content type
+ */
+ public void setContentType(String contentType)
+ {
+ setMimeHeader("Content-Type", contentType);
+ }
+
+ /**
+ * Removes all MIME headers that match the given name.
+ *
+ * @param header the string name of the MIME header/s to
+ * be removed
+ */
+ public abstract void removeMimeHeader(String header);
+
+ /**
+ * Removes all the MIME header entries.
+ */
+ public abstract void removeAllMimeHeaders();
+
+
+ /**
+ * Gets all the values of the header identified by the given
+ * String
.
+ *
+ * @param name the name of the header; example: "Content-Type"
+ * @return a String
array giving the value for the
+ * specified header
+ * @see #setMimeHeader
+ */
+ public abstract String[] getMimeHeader(String name);
+
+
+ /**
+ * Changes the first header entry that matches the given name
+ * to the given value, adding a new header if no existing header
+ * matches. This method also removes all matching headers but the first. String
giving the name of the header
+ * for which to search
+ * @param value a String
giving the value to be set for
+ * the header whose name matches the given name
+ *
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified mime header name or value
+ */
+ public abstract void setMimeHeader(String name, String value);
+
+
+ /**
+ * Adds a MIME header with the specified name and value to this
+ * AttachmentPart
object.
+ * String
giving the name of the header
+ * to be added
+ * @param value a String
giving the value of the header
+ * to be added
+ *
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified mime header name or value
+ */
+ public abstract void addMimeHeader(String name, String value);
+
+ /**
+ * Retrieves all the headers for this AttachmentPart
object
+ * as an iterator over the MimeHeader
objects.
+ *
+ * @return an Iterator
object with all of the Mime
+ * headers for this AttachmentPart
object
+ */
+ public abstract Iterator getAllMimeHeaders();
+
+ /**
+ * Retrieves all MimeHeader
objects that match a name in
+ * the given array.
+ *
+ * @param names a String
array with the name(s) of the
+ * MIME headers to be returned
+ * @return all of the MIME headers that match one of the names in the
+ * given array as an Iterator
object
+ */
+ public abstract Iterator getMatchingMimeHeaders(String[] names);
+
+ /**
+ * Retrieves all MimeHeader
objects whose name does
+ * not match a name in the given array.
+ *
+ * @param names a String
array with the name(s) of the
+ * MIME headers not to be returned
+ * @return all of the MIME headers in this AttachmentPart
object
+ * except those that match one of the names in the
+ * given array. The nonmatching MIME headers are returned as an
+ * Iterator
object.
+ */
+ public abstract Iterator getNonMatchingMimeHeaders(String[] names);
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Detail.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+/**
+ * A container for DetailEntry
objects. DetailEntry
+ * objects give detailed error information that is application-specific and
+ * related to the SOAPBody
object that contains it.
+ *Detail
object, which is part of a SOAPFault
+ * object, can be retrieved using the method SOAPFault.getDetail
.
+ * The Detail
interface provides two methods. One creates a new
+ * DetailEntry
object and also automatically adds it to
+ * the Detail
object. The second method gets a list of the
+ * DetailEntry
objects contained in a Detail
+ * object.
+ * SOAPFault
+ * object, gets its Detail
object (d), adds a new
+ * DetailEntry
object to d, and then gets a list of all the
+ * DetailEntry
objects in d. The code also creates a
+ * Name
object to pass to the method addDetailEntry
.
+ * The variable se, used to create the Name
object,
+ * is a SOAPEnvelope
object.
+ *
+ * Detail d = sf.getDetail();
+ * Name name = se.createName("GetLastTradePrice", "WOMBAT",
+ * "http://www.wombat.org/trader");
+ * d.addDetailEntry(name);
+ * Iterator it = d.getDetailEntries();
+ *
+ *
+ * @since 1.6
+ */
+public interface Detail extends SOAPFaultElement {
+
+ /**
+ * Creates a new DetailEntry
object with the given
+ * name and adds it to this Detail
object.
+ *
+ * @param name a Name
object identifying the
+ * new DetailEntry
object
+ *
+ * @exception SOAPException thrown when there is a problem in adding a
+ * DetailEntry object to this Detail object.
+ *
+ * @see Detail#addDetailEntry(QName qname)
+ */
+ public DetailEntry addDetailEntry(Name name) throws SOAPException;
+
+ /**
+ * Creates a new DetailEntry
object with the given
+ * QName and adds it to this Detail
object. This method
+ * is the preferred over the one using Name.
+ *
+ * @param qname a QName
object identifying the
+ * new DetailEntry
object
+ *
+ * @exception SOAPException thrown when there is a problem in adding a
+ * DetailEntry object to this Detail object.
+ *
+ * @see Detail#addDetailEntry(Name name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public DetailEntry addDetailEntry(QName qname) throws SOAPException;
+
+ /**
+ * Gets an Iterator over all of the DetailEntry
s in this Detail
object.
+ *
+ * @return an Iterator
object over the DetailEntry
+ * objects in this Detail
object
+ */
+ public Iterator getDetailEntries();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/DetailEntry.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/DetailEntry.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * The content for a Detail
object, giving details for
+ * a SOAPFault
object. A DetailEntry
object,
+ * which carries information about errors related to the SOAPBody
+ * object that contains it, is application-specific.
+ *
+ * @since 1.6
+ */
+public interface DetailEntry extends SOAPElement {
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/FactoryFinder.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.io.*;
+import java.util.Properties;
+
+
+class FactoryFinder {
+
+ /**
+ * Creates an instance of the specified class using the specified
+ * ClassLoader
object.
+ *
+ * @exception SOAPException if the given class could not be found
+ * or could not be instantiated
+ */
+ private static Object newInstance(String className,
+ ClassLoader classLoader)
+ throws SOAPException
+ {
+ try {
+ Class spiClass = safeLoadClass(className, classLoader);
+ return spiClass.newInstance();
+
+ } catch (ClassNotFoundException x) {
+ throw new SOAPException("Provider " + className + " not found", x);
+ } catch (Exception x) {
+ throw new SOAPException("Provider " + className + " could not be instantiated: " + x, x);
+ }
+ }
+
+ /**
+ * Finds the implementation Class
object for the given
+ * factory name, or null if that fails.
+ * Class
object of the specified message factory;
+ * or null
+ *
+ * @param factoryId the name of the factory to find, which is
+ * a system property
+ * @exception SOAPException if there is a SOAP error
+ */
+ static Object find(String factoryId)
+ throws SOAPException
+ {
+ return find(factoryId, null, false);
+ }
+
+ /**
+ * Finds the implementation Class
object for the given
+ * factory name, or if that fails, finds the Class
object
+ * for the given fallback class name. The arguments supplied must be
+ * used in order. If using the first argument is successful, the second
+ * one will not be used.
+ * Class
object of the specified message factory;
+ * may be null
+ *
+ * @param factoryId the name of the factory to find, which is
+ * a system property
+ * @param fallbackClassName the implementation class name, which is
+ * to be used only if nothing else
+ * is found; null
to indicate that
+ * there is no fallback class name
+ * @exception SOAPException if there is a SOAP error
+ */
+ static Object find(String factoryId, String fallbackClassName)
+ throws SOAPException
+ {
+ return find(factoryId, fallbackClassName, true);
+ }
+
+ /**
+ * Finds the implementation Class
object for the given
+ * factory name, or if that fails, finds the Class
object
+ * for the given default class name, but only if tryFallback
+ * is true
. The arguments supplied must be used in order
+ * If using the first argument is successful, the second one will not
+ * be used. Note the default class name may be needed even if fallback
+ * is not to be attempted, so certain error conditions can be handled.
+ * Class
object of the specified message factory;
+ * may not be null
+ *
+ * @param factoryId the name of the factory to find, which is
+ * a system property
+ * @param defaultClassName the implementation class name, which is
+ * to be used only if nothing else
+ * is found; null
to indicate
+ * that there is no default class name
+ * @param tryFallback whether to try the default class as a
+ * fallback
+ * @exception SOAPException if there is a SOAP error
+ */
+ static Object find(String factoryId, String defaultClassName,
+ boolean tryFallback) throws SOAPException {
+ ClassLoader classLoader;
+ try {
+ classLoader = Thread.currentThread().getContextClassLoader();
+ } catch (Exception x) {
+ throw new SOAPException(x.toString(), x);
+ }
+
+ // Use the system property first
+ try {
+ String systemProp =
+ System.getProperty( factoryId );
+ if( systemProp!=null) {
+ return newInstance(systemProp, classLoader);
+ }
+ } catch (SecurityException se) {
+ }
+
+ // try to read from $java.home/lib/jaxm.properties
+ try {
+ String javah=System.getProperty( "java.home" );
+ String configFile = javah + File.separator +
+ "lib" + File.separator + "jaxm.properties";
+ File f=new File( configFile );
+ if( f.exists()) {
+ Properties props=new Properties();
+ props.load( new FileInputStream(f));
+ String factoryClassName = props.getProperty(factoryId);
+ return newInstance(factoryClassName, classLoader);
+ }
+ } catch(Exception ex ) {
+ }
+
+ String serviceId = "META-INF/services/" + factoryId;
+ // try to find services in CLASSPATH
+ try {
+ InputStream is=null;
+ if (classLoader == null) {
+ is=ClassLoader.getSystemResourceAsStream(serviceId);
+ } else {
+ is=classLoader.getResourceAsStream(serviceId);
+ }
+
+ if( is!=null ) {
+ BufferedReader rd =
+ new BufferedReader(new InputStreamReader(is, "UTF-8"));
+
+ String factoryClassName = rd.readLine();
+ rd.close();
+
+ if (factoryClassName != null &&
+ ! "".equals(factoryClassName)) {
+ return newInstance(factoryClassName, classLoader);
+ }
+ }
+ } catch( Exception ex ) {
+ }
+
+ // If not found and fallback should not be tried, return a null result.
+ if (!tryFallback)
+ return null;
+
+ // We didn't find the class through the usual means so try the default
+ // (built in) factory if specified.
+ if (defaultClassName == null) {
+ throw new SOAPException(
+ "Provider for " + factoryId + " cannot be found", null);
+ }
+ return newInstance(defaultClassName, classLoader);
+ }
+
+ /**
+ * Loads the class, provided that the calling thread has an access to the
+ * class being loaded. If this is the specified default factory class and it
+ * is restricted by package.access we get a SecurityException and can do a
+ * Class.forName() on it so it will be loaded by the bootstrap class loader.
+ */
+ private static Class safeLoadClass(String className,
+ ClassLoader classLoader)
+ throws ClassNotFoundException {
+ try {
+ // make sure that the current thread has an access to the package of the given name.
+ SecurityManager s = System.getSecurityManager();
+ if (s != null) {
+ int i = className.lastIndexOf('.');
+ if (i != -1) {
+ s.checkPackageAccess(className.substring(0, i));
+ }
+ }
+
+ if (classLoader == null)
+ return Class.forName(className);
+ else
+ return classLoader.loadClass(className);
+ } catch (SecurityException se) {
+ // (only) default implementation can be loaded
+ // using bootstrap class loader:
+ if (isDefaultImplementation(className))
+ return Class.forName(className);
+
+ throw se;
+ }
+ }
+
+ private static boolean isDefaultImplementation(String className) {
+ return MessageFactory.DEFAULT_MESSAGE_FACTORY.equals(className) ||
+ SOAPFactory.DEFAULT_SOAP_FACTORY.equals(className) ||
+ SOAPConnectionFactory.DEFAULT_SOAP_CONNECTION_FACTORY.equals(className) ||
+ SAAJMetaFactory.DEFAULT_META_FACTORY_CLASS.equals(className);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MessageFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MessageFactory.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * A factory for creating SOAPMessage
objects.
+ * MessageFactory
object
+ * using the method newInstance
, as shown in the following
+ * lines of code.
+ *
+ * MessageFactory mf = MessageFactory.newInstance();
+ * MessageFactory mf12 = MessageFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
+ *
+ * MessageFactory
objects, regardless of how they are
+ * created, will produce SOAPMessage
objects that
+ * have the following elements by default:
+ *
+ *
+ * In some cases, specialized MessageFactory objects may be obtained that produce messages
+ * prepopulated with additional entries in the SOAPPart
object
+ * SOAPEnvelope
object
+ * SOAPBody
object
+ * SOAPHeader
object
+ * SOAPHeader
object and the
+ * SOAPBody
object.
+ * The content of a new SOAPMessage
object depends on which of the two
+ * MessageFactory
methods is used to create it.
+ *
+ *
+ *
+ * @since 1.6
+ */
+public abstract class MessageFactory {
+
+ static final String DEFAULT_MESSAGE_FACTORY
+ = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl";
+
+ static private final String MESSAGE_FACTORY_PROPERTY
+ = "javax.xml.soap.MessageFactory";
+
+ /**
+ * Creates a new createMessage()
+ * This is the method clients would normally use to create a request message.
+ * createMessage(MimeHeaders, java.io.InputStream)
-- message has
+ * content from the InputStream
object and headers from the
+ * MimeHeaders
object
+ * This method can be used internally by a service implementation to
+ * create a message that is a response to a request.
+ * MessageFactory
object that is an instance
+ * of the default implementation (SOAP 1.1),
+ *
+ * This method uses the following ordered lookup procedure to determine the MessageFactory implementation class to load:
+ *
+ *
+
+ *
+ * @return a new instance of a MessageFactory
+ *
+ * @exception SOAPException if there was an error in creating the
+ * default implementation of the
+ * MessageFactory
.
+ * @see SAAJMetaFactory
+ */
+
+ public static MessageFactory newInstance() throws SOAPException {
+
+
+ try {
+ MessageFactory factory = (MessageFactory) FactoryFinder.find(
+ MESSAGE_FACTORY_PROPERTY,
+ DEFAULT_MESSAGE_FACTORY,
+ false);
+
+ if (factory != null) {
+ return factory;
+ }
+ return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
+
+ } catch (Exception ex) {
+ throw new SOAPException(
+ "Unable to create message factory for SOAP: "
+ +ex.getMessage());
+ }
+
+ }
+
+ /**
+ * Creates a new MessageFactory
object that is an instance
+ * of the specified implementation. May be a dynamic message factory,
+ * a SOAP 1.1 message factory, or a SOAP 1.2 message factory. A dynamic
+ * message factory creates messages based on the MIME headers specified
+ * as arguments to the createMessage
method.
+ *
+ * This method uses the SAAJMetaFactory to locate the implementation class
+ * and create the MessageFactory instance.
+ *
+ * @return a new instance of a MessageFactory
+ *
+ * @param protocol a string constant representing the class of the
+ * specified message factory implementation. May be
+ * either DYNAMIC_SOAP_PROTOCOL
,
+ * DEFAULT_SOAP_PROTOCOL
(which is the same
+ * as) SOAP_1_1_PROTOCOL
, or
+ * SOAP_1_2_PROTOCOL
.
+ *
+ * @exception SOAPException if there was an error in creating the
+ * specified implementation of MessageFactory
.
+ * @see SAAJMetaFactory
+ * @since 1.6, SAAJ 1.3
+ */
+ public static MessageFactory newInstance(String protocol) throws SOAPException {
+ return SAAJMetaFactory.getInstance().newMessageFactory(protocol);
+ }
+
+ /**
+ * Creates a new SOAPMessage
object with the default
+ * SOAPPart
, SOAPEnvelope
, SOAPBody
,
+ * and SOAPHeader
objects. Profile-specific message factories
+ * can choose to prepopulate the SOAPMessage
object with
+ * profile-specific headers.
+ * SOAPPart
object, and
+ * the message can be sent "as is" when a message containing only a SOAP part
+ * is sufficient. Otherwise, the SOAPMessage
object needs
+ * to create one or more AttachmentPart
objects and
+ * add them to itself. Any content that is not in XML format must be
+ * in an AttachmentPart
object.
+ *
+ * @return a new SOAPMessage
object
+ * @exception SOAPException if a SOAP error occurs
+ * @exception UnsupportedOperationException if the protocol of this
+ * MessageFactory
instance is DYNAMIC_SOAP_PROTOCOL
+ */
+ public abstract SOAPMessage createMessage()
+ throws SOAPException;
+
+ /**
+ * Internalizes the contents of the given InputStream
object into a
+ * new SOAPMessage
object and returns the SOAPMessage
+ * object.
+ *
+ * @param in the InputStream
object that contains the data
+ * for a message
+ * @param headers the transport-specific headers passed to the
+ * message in a transport-independent fashion for creation of the
+ * message
+ * @return a new SOAPMessage
object containing the data from
+ * the given InputStream
object
+ *
+ * @exception IOException if there is a problem in reading data from
+ * the input stream
+ *
+ * @exception SOAPException may be thrown if the message is invalid
+ *
+ * @exception IllegalArgumentException if the MessageFactory
+ * requires one or more MIME headers to be present in the
+ * headers
parameter and they are missing.
+ * MessageFactory
implementations for
+ * SOAP_1_1_PROTOCOL
or
+ * SOAP_1_2_PROTOCOL
must not throw
+ * IllegalArgumentException
for this reason.
+ */
+ public abstract SOAPMessage createMessage(MimeHeaders headers,
+ InputStream in)
+ throws IOException, SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeader.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeader.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+
+/**
+ * An object that stores a MIME header name and its value. One or more
+ * MimeHeader
objects may be contained in a MimeHeaders
+ * object.
+ *
+ * @see MimeHeaders
+ * @since 1.6
+ */
+public class MimeHeader {
+
+ private String name;
+ private String value;
+
+ /**
+ * Constructs a MimeHeader
object initialized with the given
+ * name and value.
+ *
+ * @param name a String
giving the name of the header
+ * @param value a String
giving the value of the header
+ */
+ public MimeHeader(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ /**
+ * Returns the name of this MimeHeader
object.
+ *
+ * @return the name of the header as a String
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the value of this MimeHeader
object.
+ *
+ * @return the value of the header as a String
+ */
+ public String getValue() {
+ return value;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/MimeHeaders.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+/**
+ * A container for MimeHeader
objects, which represent
+ * the MIME headers present in a MIME part of a message.
+ *
+ * AttachmentPart
and other MIME dependent parts of the SAAJ
+ * API.
+ * @see SOAPMessage#getAttachments
+ * @see AttachmentPart
+ * @since 1.6
+ */
+public class MimeHeaders {
+ private Vector headers;
+
+ /**
+ * Constructs a default MimeHeaders
object initialized with
+ * an empty Vector
object.
+ */
+ public MimeHeaders() {
+ headers = new Vector();
+ }
+
+ /**
+ * Returns all of the values for the specified header as an array of
+ * String
objects.
+ *
+ * @param name the name of the header for which values will be returned
+ * @return a String
array with all of the values for the
+ * specified header
+ * @see #setHeader
+ */
+ public String[] getHeader(String name) {
+ Vector values = new Vector();
+
+ for(int i = 0; i < headers.size(); i++) {
+ MimeHeader hdr = (MimeHeader) headers.elementAt(i);
+ if (hdr.getName().equalsIgnoreCase(name)
+ && hdr.getValue() != null)
+ values.addElement(hdr.getValue());
+ }
+
+ if (values.size() == 0)
+ return null;
+
+ String r[] = new String[values.size()];
+ values.copyInto(r);
+ return r;
+ }
+
+ /**
+ * Replaces the current value of the first header entry whose name matches
+ * the given name with the given value, adding a new header if no existing header
+ * name matches. This method also removes all matching headers after the first one.
+ * String
with the name of the header for
+ * which to search
+ * @param value a String
with the value that will replace the
+ * current value of the specified header
+ *
+ * @exception IllegalArgumentException if there was a problem in the
+ * mime header name or the value being set
+ * @see #getHeader
+ */
+ public void setHeader(String name, String value)
+ {
+ boolean found = false;
+
+ if ((name == null) || name.equals(""))
+ throw new IllegalArgumentException("Illegal MimeHeader name");
+
+ for(int i = 0; i < headers.size(); i++) {
+ MimeHeader hdr = (MimeHeader) headers.elementAt(i);
+ if (hdr.getName().equalsIgnoreCase(name)) {
+ if (!found) {
+ headers.setElementAt(new MimeHeader(hdr.getName(),
+ value), i);
+ found = true;
+ }
+ else
+ headers.removeElementAt(i--);
+ }
+ }
+
+ if (!found)
+ addHeader(name, value);
+ }
+
+ /**
+ * Adds a MimeHeader
object with the specified name and value
+ * to this MimeHeaders
object's list of headers.
+ * String
with the name of the header to
+ * be added
+ * @param value a String
with the value of the header to
+ * be added
+ *
+ * @exception IllegalArgumentException if there was a problem in the
+ * mime header name or value being added
+ */
+ public void addHeader(String name, String value)
+ {
+ if ((name == null) || name.equals(""))
+ throw new IllegalArgumentException("Illegal MimeHeader name");
+
+ int pos = headers.size();
+
+ for(int i = pos - 1 ; i >= 0; i--) {
+ MimeHeader hdr = (MimeHeader) headers.elementAt(i);
+ if (hdr.getName().equalsIgnoreCase(name)) {
+ headers.insertElementAt(new MimeHeader(name, value),
+ i+1);
+ return;
+ }
+ }
+ headers.addElement(new MimeHeader(name, value));
+ }
+
+ /**
+ * Remove all MimeHeader
objects whose name matches the
+ * given name.
+ *
+ * @param name a String
with the name of the header for
+ * which to search
+ */
+ public void removeHeader(String name) {
+ for(int i = 0; i < headers.size(); i++) {
+ MimeHeader hdr = (MimeHeader) headers.elementAt(i);
+ if (hdr.getName().equalsIgnoreCase(name))
+ headers.removeElementAt(i--);
+ }
+ }
+
+ /**
+ * Removes all the header entries from this MimeHeaders
object.
+ */
+ public void removeAllHeaders() {
+ headers.removeAllElements();
+ }
+
+
+ /**
+ * Returns all the MimeHeader
s in this MimeHeaders
object.
+ *
+ * @return an Iterator
object over this MimeHeaders
+ * object's list of MimeHeader
objects
+ */
+ public Iterator getAllHeaders() {
+ return headers.iterator();
+ }
+
+ class MatchingIterator implements Iterator {
+ private boolean match;
+ private Iterator iterator;
+ private String[] names;
+ private Object nextHeader;
+
+ MatchingIterator(String[] names, boolean match) {
+ this.match = match;
+ this.names = names;
+ this.iterator = headers.iterator();
+ }
+
+ private Object nextMatch() {
+ next:
+ while (iterator.hasNext()) {
+ MimeHeader hdr = (MimeHeader) iterator.next();
+
+ if (names == null)
+ return match ? null : hdr;
+
+ for(int i = 0; i < names.length; i++)
+ if (hdr.getName().equalsIgnoreCase(names[i]))
+ if (match)
+ return hdr;
+ else
+ continue next;
+ if (!match)
+ return hdr;
+ }
+ return null;
+ }
+
+
+ public boolean hasNext() {
+ if (nextHeader == null)
+ nextHeader = nextMatch();
+ return nextHeader != null;
+ }
+
+ public Object next() {
+ // hasNext should've prefetched the header for us,
+ // return it.
+ if (nextHeader != null) {
+ Object ret = nextHeader;
+ nextHeader = null;
+ return ret;
+ }
+ if (hasNext())
+ return nextHeader;
+ return null;
+ }
+
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+
+ /**
+ * Returns all the MimeHeader
objects whose name matches
+ * a name in the given array of names.
+ *
+ * @param names an array of String
objects with the names
+ * for which to search
+ * @return an Iterator
object over the MimeHeader
+ * objects whose name matches one of the names in the given list
+ */
+ public Iterator getMatchingHeaders(String[] names) {
+ return new MatchingIterator(names, true);
+ }
+
+ /**
+ * Returns all of the MimeHeader
objects whose name does not
+ * match a name in the given array of names.
+ *
+ * @param names an array of String
objects with the names
+ * for which to search
+ * @return an Iterator
object over the MimeHeader
+ * objects whose name does not match one of the names in the given list
+ */
+ public Iterator getNonMatchingHeaders(String[] names) {
+ return new MatchingIterator(names, false);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Name.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Name.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * A representation of an XML name. This interface provides methods for
+ * getting the local and namespace-qualified names and also for getting the
+ * prefix associated with the namespace for the name. It is also possible
+ * to get the URI of the namespace.
+ *
+ * <wombat:GetLastTradePrice xmlns:wombat="http://www.wombat.org/trader">
+ *
+ * ("xmlns" stands for "XML namespace".)
+ * The following
+ * shows what the methods in the Name
interface will return.
+ *
+ *
+ * getQualifiedName
will return "prefix:LocalName" =
+ * "WOMBAT:GetLastTradePrice"
+ * getURI
will return "http://www.wombat.org/trader"
+ * getLocalName
will return "GetLastTracePrice"
+ * getPrefix
will return "WOMBAT"
+ * Name
objects are created using the method
+ * SOAPEnvelope.createName
, which has two versions.
+ * One method creates Name
objects with
+ * a local name, a namespace prefix, and a namespace URI.
+ * and the second creates Name
objects with just a local name.
+ * The following line of
+ * code, in which se is a SOAPEnvelope
object, creates a new
+ * Name
object with all three.
+ *
+ * Name name = se.createName("GetLastTradePrice", "WOMBAT",
+ * "http://www.wombat.org/trader");
+ *
+ * The following line of code gives an example of how a Name
object
+ * can be used. The variable element is a SOAPElement
object.
+ * This code creates a new SOAPElement
object with the given name and
+ * adds it to element.
+ *
+ * element.addChildElement(name);
+ *
+ * Name
interface may be deprecated in a future release of SAAJ
+ * in favor of javax.xml.namespace.QName
+ * @see SOAPEnvelope#createName(String, String, String) SOAPEnvelope.createName
+ * @see SOAPFactory#createName(String, String, String) SOAPFactory.createName
+ * @since 1.6
+ */
+public interface Name {
+ /**
+ * Gets the local name part of the XML name that this
Name
+ * object represents.
+ *
+ * @return a string giving the local name
+ */
+ String getLocalName();
+
+ /**
+ * Gets the namespace-qualified name of the XML name that this
+ * Name
object represents.
+ *
+ * @return the namespace-qualified name as a string
+ */
+ String getQualifiedName();
+
+ /**
+ * Returns the prefix that was specified when this Name
object
+ * was initialized. This prefix is associated with the namespace for the XML
+ * name that this Name
object represents.
+ *
+ * @return the prefix as a string
+ */
+ String getPrefix();
+
+ /**
+ * Returns the URI of the namespace for the XML
+ * name that this Name
object represents.
+ *
+ * @return the URI as a string
+ */
+ String getURI();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Node.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * A representation of a node (element) in an XML document.
+ * This interface extnends the standard DOM Node interface with methods for
+ * getting and setting the value of a node, for
+ * getting and setting the parent of a node, and for removing a node.
+ *
+ * @since 1.6
+ */
+public interface Node extends org.w3c.dom.Node {
+ /**
+ * Returns the value of this node if this is a Text
node or the
+ * value of the immediate child of this node otherwise.
+ * If there is an immediate child of this Node
that it is a
+ * Text
node then it's value will be returned. If there is
+ * more than one Text
node then the value of the first
+ * Text
Node will be returned.
+ * Otherwise null
is returned.
+ *
+ * @return a String
with the text of this node if this is a
+ * Text
node or the text contained by the first
+ * immediate child of this Node
object that is a
+ * Text
object if such a child exists;
+ * null
otherwise.
+ */
+ public String getValue();
+
+ /**
+ * If this is a Text node then this method will set its value,
+ * otherwise it sets the value of the immediate (Text) child of this node.
+ * The value of the immediate child of this node can be set only if, there is
+ * one child node and that node is a Text
node, or if
+ * there are no children in which case a child Text
node will be
+ * created.
+ *
+ * @exception IllegalStateException if the node is not a Text
+ * node and either has more than one child node or has a child
+ * node that is not a Text
node.
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public void setValue(String value);
+
+ /**
+ * Sets the parent of this Node
object to the given
+ * SOAPElement
object.
+ *
+ * @param parent the SOAPElement
object to be set as
+ * the parent of this Node
object
+ *
+ * @exception SOAPException if there is a problem in setting the
+ * parent to the given element
+ * @see #getParentElement
+ */
+ public void setParentElement(SOAPElement parent) throws SOAPException;
+
+ /**
+ * Returns the parent element of this Node
object.
+ * This method can throw an UnsupportedOperationException
+ * if the tree is not kept in memory.
+ *
+ * @return the SOAPElement
object that is the parent of
+ * this Node
object or null
if this
+ * Node
object is root
+ *
+ * @exception UnsupportedOperationException if the whole tree is not
+ * kept in memory
+ * @see #setParentElement
+ */
+ public SOAPElement getParentElement();
+
+ /**
+ * Removes this Node
object from the tree.
+ */
+ public void detachNode();
+
+ /**
+ * Notifies the implementation that this Node
+ * object is no longer being used by the application and that the
+ * implementation is free to reuse this object for nodes that may
+ * be created later.
+ * recycleNode
implies that the method
+ * detachNode
has been called previously.
+ */
+ public void recycleNode();
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJMetaFactory.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+* The access point for the implementation classes of the factories defined in the
+* SAAJ API. All of the newInstance
methods defined on factories in
+* SAAJ 1.3 defer to instances of this class to do the actual object creation.
+* The implementations of newInstance()
methods (in SOAPFactory and MessageFactory)
+* that existed in SAAJ 1.2 have been updated to also delegate to the SAAJMetaFactory when the SAAJ 1.2
+* defined lookup fails to locate the Factory implementation class name.
+*
+* SAAJMetaFactory
object.
+ * The SAAJMetaFactory is an SPI, it pulls the creation of the other factories together into a
+ * single place. Changing out the SAAJMetaFactory has the effect of changing out the entire SAAJ
+ * implementation. Service providers provide the name of their SAAJMetaFactory
+ * implementation.
+ *
+ * This method uses the following ordered lookup procedure to determine the SAAJMetaFactory implementation class to load:
+ *
+ *
+ *
+ * @return a concrete SAAJMetaFactory
object
+ * @exception SOAPException if there is an error in creating the SAAJMetaFactory
+ */
+ static SAAJMetaFactory getInstance() throws SOAPException {
+ try {
+ SAAJMetaFactory instance =
+ (SAAJMetaFactory) FactoryFinder.find(
+ META_FACTORY_CLASS_PROPERTY,
+ DEFAULT_META_FACTORY_CLASS);
+ return instance;
+ } catch (Exception e) {
+ throw new SOAPException(
+ "Unable to create SAAJ meta-factory" + e.getMessage());
+ }
+ }
+
+ protected SAAJMetaFactory() { }
+
+ /**
+ * Creates a MessageFactory
object for
+ * the given String
protocol.
+ *
+ * @param protocol a String
indicating the protocol
+ * @exception SOAPException if there is an error in creating the
+ * MessageFactory
+ * @see SOAPConstants#SOAP_1_1_PROTOCOL
+ * @see SOAPConstants#SOAP_1_2_PROTOCOL
+ * @see SOAPConstants#DYNAMIC_SOAP_PROTOCOL
+ */
+ protected abstract MessageFactory newMessageFactory(String protocol)
+ throws SOAPException;
+
+ /**
+ * Creates a SOAPFactory
object for
+ * the given String
protocol.
+ *
+ * @param protocol a String
indicating the protocol
+ * @exception SOAPException if there is an error in creating the
+ * SOAPFactory
+ * @see SOAPConstants#SOAP_1_1_PROTOCOL
+ * @see SOAPConstants#SOAP_1_2_PROTOCOL
+ * @see SOAPConstants#DYNAMIC_SOAP_PROTOCOL
+ */
+ protected abstract SOAPFactory newSOAPFactory(String protocol)
+ throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJResult.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SAAJResult.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import javax.xml.transform.dom.DOMResult;
+
+/**
+ * Acts as a holder for the results of a JAXP transformation or a JAXB
+ * marshalling, in the form of a SAAJ tree. These results should be accessed
+ * by using the {@link #getResult()} method. The {@link DOMResult#getNode()}
+ * method should be avoided in almost all cases.
+ *
+ * @author XWS-Security Development Team
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+public class SAAJResult extends DOMResult {
+
+ /**
+ * Creates a SAAJResult
that will present results in the form
+ * of a SAAJ tree that supports the default (SOAP 1.1) protocol.
+ * SAAJResult
is meant for use in situations where the
+ * results will be used as a parameter to a method that takes a parameter
+ * whose type, such as SOAPElement
, is drawn from the SAAJ
+ * API. When used in a transformation, the results are populated into the
+ * SOAPPart
of a SOAPMessage
that is created internally.
+ * The SOAPPart
returned by {@link DOMResult#getNode()}
+ * is not guaranteed to be well-formed.
+ *
+ * @throws SOAPException if there is a problem creating a SOAPMessage
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SAAJResult() throws SOAPException {
+ this(MessageFactory.newInstance().createMessage());
+ }
+
+ /**
+ * Creates a SAAJResult
that will present results in the form
+ * of a SAAJ tree that supports the specified protocol. The
+ * DYNAMIC_SOAP_PROTOCOL
is ambiguous in this context and will
+ * cause this constructor to throw an UnsupportedOperationException
.
+ * SAAJResult
is meant for use in situations where the
+ * results will be used as a parameter to a method that takes a parameter
+ * whose type, such as SOAPElement
, is drawn from the SAAJ
+ * API. When used in a transformation the results are populated into the
+ * SOAPPart
of a SOAPMessage
that is created
+ * internally. The SOAPPart
returned by {@link DOMResult#getNode()}
+ * is not guaranteed to be well-formed.
+ *
+ * @param protocol - the name of the SOAP protocol that the resulting SAAJ
+ * tree should support
+ *
+ * @throws SOAPException if a SOAPMessage
supporting the
+ * specified protocol cannot be created
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SAAJResult(String protocol) throws SOAPException {
+ this(MessageFactory.newInstance(protocol).createMessage());
+ }
+
+ /**
+ * Creates a SAAJResult
that will write the results into the
+ * SOAPPart
of the supplied SOAPMessage
.
+ * In the normal case these results will be written using DOM APIs and,
+ * as a result, the finished SOAPPart
will not be guaranteed
+ * to be well-formed unless the data used to create it is also well formed.
+ * When used in a transformation the validity of the SOAPMessage
+ * after the transformation can be guaranteed only by means outside SAAJ
+ * specification.
+ *
+ * @param message - the message whose SOAPPart
will be
+ * populated as a result of some transformation or
+ * marshalling operation
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SAAJResult(SOAPMessage message) {
+ super(message.getSOAPPart());
+ }
+
+ /**
+ * Creates a SAAJResult
that will write the results as a
+ * child node of the SOAPElement
specified. In the normal
+ * case these results will be written using DOM APIs and as a result may
+ * invalidate the structure of the SAAJ tree. This kind of
+ * SAAJResult
should only be used when the validity of the
+ * incoming data can be guaranteed by means outside of the SAAJ
+ * specification.
+ *
+ * @param rootNode - the root to which the results will be appended
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SAAJResult(SOAPElement rootNode) {
+ super(rootNode);
+ }
+
+
+ /**
+ * @return the resulting Tree that was created under the specified root Node.
+ * @since 1.6, SAAJ 1.3
+ */
+ public javax.xml.soap.Node getResult() {
+ return (javax.xml.soap.Node)super.getNode().getFirstChild();
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBody.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Locale;
+
+import org.w3c.dom.Document;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An object that represents the contents of the SOAP body
+ * element in a SOAP message. A SOAP body element consists of XML data
+ * that affects the way the application-specific content is processed.
+ * SOAPBody
object contains SOAPBodyElement
+ * objects, which have the content for the SOAP body.
+ * A SOAPFault
object, which carries status and/or
+ * error information, is an example of a SOAPBodyElement
object.
+ *
+ * @see SOAPFault
+ * @since 1.6
+ */
+public interface SOAPBody extends SOAPElement {
+
+ /**
+ * Creates a new SOAPFault
object and adds it to
+ * this SOAPBody
object. The new SOAPFault
will
+ * have default values set for the mandatory child elements. The type of
+ * the SOAPFault
will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
+ * depending on the protocol
specified while creating the
+ * MessageFactory
instance.
+ * SOAPBody
may contain at most one SOAPFault
+ * child element.
+ *
+ * @return the new SOAPFault
object
+ * @exception SOAPException if there is a SOAP error
+ */
+ public SOAPFault addFault() throws SOAPException;
+
+
+ /**
+ * Creates a new SOAPFault
object and adds it to
+ * this SOAPBody
object. The type of the
+ * SOAPFault
will be a SOAP 1.1 or a SOAP 1.2
+ * SOAPFault
depending on the protocol
+ * specified while creating the MessageFactory
instance.
+ * faultCode
parameter is the value of the
+ * Fault/Code/Value element and the faultString
parameter
+ * is the value of the Fault/Reason/Text element. For SOAP 1.1
+ * the faultCode
parameter is the value of the faultcode
+ * element and the faultString
parameter is the value of the faultstring
+ * element.
+ * SOAPBody
may contain at most one SOAPFault
+ * child element.
+ *
+ * @param faultCode a Name
object giving the fault
+ * code to be set; must be one of the fault codes defined in the Version
+ * of SOAP specification in use
+ * @param faultString a String
giving an explanation of
+ * the fault
+ * @param locale a {@link java.util.Locale} object indicating
+ * the native language of the faultString
+ * @return the new SOAPFault
object
+ * @exception SOAPException if there is a SOAP error
+ * @see SOAPFault#setFaultCode
+ * @see SOAPFault#setFaultString
+ * @since 1.6, SAAJ 1.2
+ */
+ public SOAPFault addFault(Name faultCode, String faultString, Locale locale) throws SOAPException;
+
+ /**
+ * Creates a new SOAPFault
object and adds it to this
+ * SOAPBody
object. The type of the SOAPFault
+ * will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on
+ * the protocol
specified while creating the MessageFactory
+ * instance.
+ * faultCode
parameter is the value of the
+ * Fault/Code/Value element and the faultString
parameter
+ * is the value of the Fault/Reason/Text element. For SOAP 1.1
+ * the faultCode
parameter is the value of the faultcode
+ * element and the faultString
parameter is the value of the faultstring
+ * element.
+ * SOAPBody
may contain at most one SOAPFault
+ * child element.
+ *
+ * @param faultCode
+ * a QName
object giving the fault code to be
+ * set; must be one of the fault codes defined in the version
+ * of SOAP specification in use.
+ * @param faultString
+ * a String
giving an explanation of the fault
+ * @param locale
+ * a {@link java.util.Locale Locale} object indicating the
+ * native language of the faultString
+ * @return the new SOAPFault
object
+ * @exception SOAPException
+ * if there is a SOAP error
+ * @see SOAPFault#setFaultCode
+ * @see SOAPFault#setFaultString
+ * @see SOAPBody#addFault(Name faultCode, String faultString, Locale locale)
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPFault addFault(QName faultCode, String faultString, Locale locale)
+ throws SOAPException;
+
+ /**
+ * Creates a new SOAPFault
object and adds it to this
+ * SOAPBody
object. The type of the SOAPFault
+ * will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on
+ * the protocol
specified while creating the MessageFactory
+ * instance.
+ * faultCode
parameter is the value of the
+ * Fault/Code/Value element and the faultString
parameter
+ * is the value of the Fault/Reason/Text element. For SOAP 1.1
+ * the faultCode
parameter is the value of the faultcode
+ * element and the faultString
parameter is the value of the faultstring
+ * element.
+ * xml:lang
+ * attribute on the Fault/Reason/Text element will be set to
+ * java.util.Locale.getDefault()
+ * SOAPBody
may contain at most one SOAPFault
+ * child element.
+ *
+ * @param faultCode
+ * a Name
object giving the fault code to be set;
+ * must be one of the fault codes defined in the version of SOAP
+ * specification in use
+ * @param faultString
+ * a String
giving an explanation of the fault
+ * @return the new SOAPFault
object
+ * @exception SOAPException
+ * if there is a SOAP error
+ * @see SOAPFault#setFaultCode
+ * @see SOAPFault#setFaultString
+ * @since 1.6, SAAJ 1.2
+ */
+ public SOAPFault addFault(Name faultCode, String faultString)
+ throws SOAPException;
+
+ /**
+ * Creates a new SOAPFault
object and adds it to this SOAPBody
+ * object. The type of the SOAPFault
+ * will be a SOAP 1.1 or a SOAP 1.2 SOAPFault
depending on
+ * the protocol
specified while creating the MessageFactory
+ * instance.
+ * faultCode
parameter is the value of the
+ * Fault/Code/Value element and the faultString
parameter
+ * is the value of the Fault/Reason/Text element. For SOAP 1.1
+ * the faultCode
parameter is the value of the faultcode
+ * element and the faultString
parameter is the value of the faultstring
+ * element.
+ * xml:lang
+ * attribute on the Fault/Reason/Text element will be set to
+ * java.util.Locale.getDefault()
+ * SOAPBody
may contain at most one SOAPFault
+ * child element
+ *
+ * @param faultCode
+ * a QName
object giving the fault code to be
+ * set; must be one of the fault codes defined in the version
+ * of SOAP specification in use
+ * @param faultString
+ * a String
giving an explanation of the fault
+ * @return the new SOAPFault
object
+ * @exception SOAPException
+ * if there is a SOAP error
+ * @see SOAPFault#setFaultCode
+ * @see SOAPFault#setFaultString
+ * @see SOAPBody#addFault(Name faultCode, String faultString)
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPFault addFault(QName faultCode, String faultString)
+ throws SOAPException;
+
+ /**
+ * Indicates whether a SOAPFault
object exists in this
+ * SOAPBody
object.
+ *
+ * @return true
if a SOAPFault
object exists
+ * in this SOAPBody
object; false
+ * otherwise
+ */
+ public boolean hasFault();
+
+ /**
+ * Returns the SOAPFault
object in this SOAPBody
+ * object.
+ *
+ * @return the SOAPFault
object in this SOAPBody
+ * object if present, null otherwise.
+ */
+ public SOAPFault getFault();
+
+ /**
+ * Creates a new SOAPBodyElement
object with the specified
+ * name and adds it to this SOAPBody
object.
+ *
+ * @param name
+ * a Name
object with the name for the new SOAPBodyElement
+ * object
+ * @return the new SOAPBodyElement
object
+ * @exception SOAPException
+ * if a SOAP error occurs
+ * @see SOAPBody#addBodyElement(javax.xml.namespace.QName)
+ */
+ public SOAPBodyElement addBodyElement(Name name) throws SOAPException;
+
+
+ /**
+ * Creates a new SOAPBodyElement
object with the specified
+ * QName and adds it to this SOAPBody
object.
+ *
+ * @param qname
+ * a QName
object with the qname for the new
+ * SOAPBodyElement
object
+ * @return the new SOAPBodyElement
object
+ * @exception SOAPException
+ * if a SOAP error occurs
+ * @see SOAPBody#addBodyElement(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPBodyElement addBodyElement(QName qname) throws SOAPException;
+
+ /**
+ * Adds the root node of the DOM {@link org.w3c.dom.Document}
+ * to this SOAPBody
object.
+ * document
parameter.
+ * The client application should discard all references to this Document
+ * and its contents upon calling addDocument
. The behavior
+ * of an application that continues to use such references is undefined.
+ *
+ * @param document
+ * the Document
object whose root node will be
+ * added to this SOAPBody
.
+ * @return the SOAPBodyElement
that represents the root node
+ * that was added.
+ * @exception SOAPException
+ * if the Document
cannot be added
+ * @since 1.6, SAAJ 1.2
+ */
+ public SOAPBodyElement addDocument(org.w3c.dom.Document document)
+ throws SOAPException;
+
+ /**
+ * Creates a new DOM {@link org.w3c.dom.Document}
and sets
+ * the first child of this SOAPBody
as it's document
+ * element. The child SOAPElement
is removed as part of the
+ * process.
+ *
+ * @return the {@link org.w3c.dom.Document}
representation
+ * of the SOAPBody
content.
+ *
+ * @exception SOAPException
+ * if there is not exactly one child SOAPElement
of the
+ *
SOAPBody
.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public org.w3c.dom.Document extractContentAsDocument()
+ throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBodyElement.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPBodyElement.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * A SOAPBodyElement
object represents the contents in
+ * a SOAPBody
object. The SOAPFault
interface
+ * is a SOAPBodyElement
object that has been defined.
+ * SOAPBodyElement
object can be created and added
+ * to a SOAPBody
object with the SOAPBody
+ * method addBodyElement
. In the following line of code,
+ * sb
is a SOAPBody
object, and
+ * myName
is a Name
object.
+ *
+ * SOAPBodyElement sbe = sb.addBodyElement(myName);
+ *
+ *
+ * @since 1.6
+ */
+public interface SOAPBodyElement extends SOAPElement {
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnection.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnection.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+
+/**
+ * A point-to-point connection that a client can use for sending messages
+ * directly to a remote party (represented by a URL, for instance).
+ * SOAPConnectionFactory.newInstance()
(see below) will
+ * throw an UnsupportedOperationException
.
+ * SOAPConnection
object using a
+ * {@link SOAPConnectionFactory} object as in the following example:
+ *
+ * SOAPConnectionFactory factory = SOAPConnectionFactory.newInstance();
+ * SOAPConnection con = factory.createConnection();
+ *
+ * A SOAPConnection
object can be used to send messages
+ * directly to a URL following the request/response paradigm. That is,
+ * messages are sent using the method call
, which sends the
+ * message and then waits until it gets a reply.
+ *
+ * @since 1.6
+ */
+public abstract class SOAPConnection {
+
+ /**
+ * Sends the given message to the specified endpoint and blocks until
+ * it has returned the response.
+ *
+ * @param request the SOAPMessage
object to be sent
+ * @param to an Object
that identifies
+ * where the message should be sent. It is required to
+ * support Objects of type
+ * java.lang.String
,
+ * java.net.URL
, and when JAXM is present
+ * javax.xml.messaging.URLEndpoint
+ *
+ * @return the SOAPMessage
object that is the response to the
+ * message that was sent
+ * @throws SOAPException if there is a SOAP error
+ */
+ public abstract SOAPMessage call(SOAPMessage request,
+ Object to) throws SOAPException;
+
+ /**
+ * Gets a message from a specific endpoint and blocks until it receives,
+ *
+ * @param to an Object
that identifies where
+ * the request should be sent. Objects of type
+ * java.lang.String
and
+ * java.net.URL
must be supported.
+ *
+ * @return the SOAPMessage
object that is the response to the
+ * get message request
+ * @throws SOAPException if there is a SOAP error
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPMessage get(Object to)
+ throws SOAPException {
+ throw new UnsupportedOperationException("All subclasses of SOAPConnection must override get()");
+ }
+
+ /**
+ * Closes this SOAPConnection
object.
+ *
+ * @throws SOAPException if there is a SOAP error
+ */
+ public abstract void close()
+ throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnectionFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConnectionFactory.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * A factory for creating SOAPConnection
objects. Implementation of this class
+ * is optional. If SOAPConnectionFactory.newInstance()
throws an
+ * UnsupportedOperationException then the implementation does not support the
+ * SAAJ communication infrastructure. Otherwise {@link SOAPConnection} objects
+ * can be created by calling createConnection()
on the newly
+ * created SOAPConnectionFactory
object.
+ *
+ * @since 1.6
+ */
+public abstract class SOAPConnectionFactory {
+ /**
+ * A constant representing the default value for a SOAPConnection
+ * object. The default is the point-to-point SOAP connection.
+ */
+ static final String DEFAULT_SOAP_CONNECTION_FACTORY
+ = "com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory";
+
+ /**
+ * A constant representing the SOAPConnection
class.
+ */
+ static private final String SF_PROPERTY
+ = "javax.xml.soap.SOAPConnectionFactory";
+
+ /**
+ * Creates an instance of the default
+ * SOAPConnectionFactory
object.
+ *
+ * @return a new instance of a default
+ * SOAPConnectionFactory
object
+ *
+ * @exception SOAPException if there was an error creating the
+ * SOAPConnectionFactory
+ *
+ * @exception UnsupportedOperationException if newInstance is not
+ * supported.
+ */
+ public static SOAPConnectionFactory newInstance()
+ throws SOAPException, UnsupportedOperationException
+ {
+ try {
+ return (SOAPConnectionFactory)
+ FactoryFinder.find(SF_PROPERTY,
+ DEFAULT_SOAP_CONNECTION_FACTORY);
+ } catch (Exception ex) {
+ throw new SOAPException("Unable to create SOAP connection factory: "
+ +ex.getMessage());
+ }
+ }
+
+ /**
+ * Create a new SOAPConnection
.
+ *
+ * @return the new SOAPConnection
object.
+ *
+ * @exception SOAPException if there was an exception creating the
+ * SOAPConnection
object.
+ */
+ public abstract SOAPConnection createConnection()
+ throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConstants.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPConstants.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import javax.xml.namespace.QName;
+
+/**
+ * The definition of constants pertaining to the SOAP protocol.
+ *
+ * @since 1.6
+ */
+public interface SOAPConstants {
+ /**
+ * Used to create MessageFactory
instances that create
+ * SOAPMessages
whose concrete type is based on the
+ * Content-Type
MIME header passed to the
+ * createMessage
method. If no Content-Type
+ * header is passed then the createMessage
may throw an
+ * IllegalArgumentException
or, in the case of the no
+ * argument version of createMessage
, an
+ * UnsupportedOperationException
.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String DYNAMIC_SOAP_PROTOCOL = "Dynamic Protocol";
+
+ /**
+ * Used to create MessageFactory
instances that create
+ * SOAPMessages
whose behavior supports the SOAP 1.1 specification.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String SOAP_1_1_PROTOCOL = "SOAP 1.1 Protocol";
+
+ /**
+ * Used to create MessageFactory
instances that create
+ * SOAPMessages
whose behavior supports the SOAP 1.2
+ * specification
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String SOAP_1_2_PROTOCOL = "SOAP 1.2 Protocol";
+
+ /**
+ * The default protocol: SOAP 1.1 for backwards compatibility.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String DEFAULT_SOAP_PROTOCOL = SOAP_1_1_PROTOCOL;
+
+ /**
+ * The namespace identifier for the SOAP 1.1 envelope.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ URI_NS_SOAP_1_1_ENVELOPE = "http://schemas.xmlsoap.org/soap/envelope/";
+ /**
+ * The namespace identifier for the SOAP 1.2 envelope.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ URI_NS_SOAP_1_2_ENVELOPE = "http://www.w3.org/2003/05/soap-envelope";
+
+ /**
+ * The namespace identifier for the SOAP 1.1 envelope, All SOAPElements in this
+ * namespace are defined by the SOAP 1.1 specification.
+ */
+ public static final String
+ URI_NS_SOAP_ENVELOPE = URI_NS_SOAP_1_1_ENVELOPE;
+
+ /**
+ * The namespace identifier for the SOAP 1.1 encoding.
+ * An attribute named encodingStyle
in the
+ * URI_NS_SOAP_ENVELOPE
namespace and set to the value
+ * URI_NS_SOAP_ENCODING
can be added to an element to indicate
+ * that it is encoded using the rules in section 5 of the SOAP 1.1
+ * specification.
+ */
+ public static final String
+ URI_NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
+
+ /**
+ * The namespace identifier for the SOAP 1.2 encoding.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ URI_NS_SOAP_1_2_ENCODING = "http://www.w3.org/2003/05/soap-encoding";
+
+ /**
+ * The media type of the Content-Type
MIME header in SOAP 1.1.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ SOAP_1_1_CONTENT_TYPE = "text/xml";
+
+ /**
+ * The media type of the Content-Type
MIME header in SOAP 1.2.
+ * @since 1.6, SAAJ 1.3
+ */
+ public static final String
+ SOAP_1_2_CONTENT_TYPE = "application/soap+xml";
+
+ /**
+ * The URI identifying the next application processing a SOAP request as the intended
+ * actor for a SOAP 1.1 header entry (see section 4.2.2 of the SOAP 1.1 specification).
+ * SOAPElement
object initialized with the
+ * given Name
object and adds the new element to this
+ * SOAPElement
object.
+ * Name
object with the XML name for the
+ * new element
+ *
+ * @return the new SOAPElement
object that was created
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ * @see SOAPElement#addChildElement(javax.xml.namespace.QName)
+ */
+ public SOAPElement addChildElement(Name name) throws SOAPException;
+
+ /**
+ * Creates a new SOAPElement
object initialized with the given
+ * QName
object and adds the new element to this SOAPElement
+ * object. The namespace, localname and prefix of the new
+ * SOAPElement
are all taken from the qname
argument.
+ *
+ * @param qname a QName
object with the XML name for the
+ * new element
+ *
+ * @return the new SOAPElement
object that was created
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ * @see SOAPElement#addChildElement(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPElement addChildElement(QName qname) throws SOAPException;
+
+ /**
+ * Creates a new SOAPElement
object initialized with the
+ * specified local name and adds the new element to this
+ * SOAPElement
object.
+ * The new SOAPElement
inherits any in-scope default namespace.
+ *
+ * @param localName a String
giving the local name for
+ * the element
+ * @return the new SOAPElement
object that was created
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ */
+ public SOAPElement addChildElement(String localName) throws SOAPException;
+
+ /**
+ * Creates a new SOAPElement
object initialized with the
+ * specified local name and prefix and adds the new element to this
+ * SOAPElement
object.
+ *
+ * @param localName a String
giving the local name for
+ * the new element
+ * @param prefix a String
giving the namespace prefix for
+ * the new element
+ *
+ * @return the new SOAPElement
object that was created
+ * @exception SOAPException if the prefix
is not valid in the
+ * context of this SOAPElement
or if there is an error in creating the
+ * SOAPElement
object
+ */
+ public SOAPElement addChildElement(String localName, String prefix)
+ throws SOAPException;
+
+ /**
+ * Creates a new SOAPElement
object initialized with the
+ * specified local name, prefix, and URI and adds the new element to this
+ * SOAPElement
object.
+ *
+ * @param localName a String
giving the local name for
+ * the new element
+ * @param prefix a String
giving the namespace prefix for
+ * the new element
+ * @param uri a String
giving the URI of the namespace
+ * to which the new element belongs
+ *
+ * @return the new SOAPElement
object that was created
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ */
+ public SOAPElement addChildElement(String localName, String prefix,
+ String uri)
+ throws SOAPException;
+
+ /**
+ * Add a SOAPElement
as a child of this
+ * SOAPElement
instance. The SOAPElement
+ * is expected to be created by a
+ * SOAPFactory
. Callers should not rely on the
+ * element instance being added as is into the XML
+ * tree. Implementations could end up copying the content
+ * of the SOAPElement
passed into an instance of
+ * a different SOAPElement
implementation. For
+ * instance if addChildElement()
is called on a
+ * SOAPHeader
, element
will be copied
+ * into an instance of a SOAPHeaderElement
.
+ *
+ * element
is either added
+ * as a whole or not at all, if there was an error.
+ *
+ * element
cannot contain
+ * elements named "Envelope", "Header" or "Body" and in the SOAP
+ * namespace. Any namespace prefixes present in the fragment
+ * should be fully resolved using appropriate namespace
+ * declarations within the fragment itself.
+ *
+ * @param element the SOAPElement
to be added as a
+ * new child
+ *
+ * @exception SOAPException if there was an error in adding this
+ * element as a child
+ *
+ * @return an instance representing the new SOAP element that was
+ * actually added to the tree.
+ */
+ public SOAPElement addChildElement(SOAPElement element)
+ throws SOAPException;
+
+ /**
+ * Detaches all children of this SOAPElement
.
+ * SOAPHeaders
and SOAPBodys
in
+ * preparation for sending a fault when an error condition is detected. It
+ * is also useful for recycling portions of a document within a SOAP
+ * message.
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public abstract void removeContents();
+
+ /**
+ * Creates a new Text
object initialized with the given
+ * String
and adds it to this SOAPElement
object.
+ *
+ * @param text a String
object with the textual content to be added
+ *
+ * @return the SOAPElement
object into which
+ * the new Text
object was inserted
+ * @exception SOAPException if there is an error in creating the
+ * new Text
object or if it is not legal to
+ * attach it as a child to this
+ * SOAPElement
+ */
+ public SOAPElement addTextNode(String text) throws SOAPException;
+
+ /**
+ * Adds an attribute with the specified name and value to this
+ * SOAPElement
object.
+ *
+ * @param name a Name
object with the name of the attribute
+ * @param value a String
giving the value of the attribute
+ * @return the SOAPElement
object into which the attribute was
+ * inserted
+ *
+ * @exception SOAPException if there is an error in creating the
+ * Attribute, or it is invalid to set
+ an attribute with Name
+ name
on this SOAPElement.
+ * @see SOAPElement#addAttribute(javax.xml.namespace.QName, String)
+ */
+ public SOAPElement addAttribute(Name name, String value)
+ throws SOAPException;
+
+ /**
+ * Adds an attribute with the specified name and value to this
+ * SOAPElement
object.
+ *
+ * @param qname a QName
object with the name of the attribute
+ * @param value a String
giving the value of the attribute
+ * @return the SOAPElement
object into which the attribute was
+ * inserted
+ *
+ * @exception SOAPException if there is an error in creating the
+ * Attribute, or it is invalid to set
+ an attribute with QName
+ qname
on this SOAPElement.
+ * @see SOAPElement#addAttribute(Name, String)
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPElement addAttribute(QName qname, String value)
+ throws SOAPException;
+
+ /**
+ * Adds a namespace declaration with the specified prefix and URI to this
+ * SOAPElement
object.
+ *
+ * @param prefix a String
giving the prefix of the namespace
+ * @param uri a String
giving the uri of the namespace
+ * @return the SOAPElement
object into which this
+ * namespace declaration was inserted.
+ *
+ * @exception SOAPException if there is an error in creating the
+ * namespace
+ */
+ public SOAPElement addNamespaceDeclaration(String prefix, String uri)
+ throws SOAPException;
+
+ /**
+ * Returns the value of the attribute with the specified name.
+ *
+ * @param name a Name
object with the name of the attribute
+ * @return a String
giving the value of the specified
+ * attribute, Null if there is no such attribute
+ * @see SOAPElement#getAttributeValue(javax.xml.namespace.QName)
+ */
+ public String getAttributeValue(Name name);
+
+ /**
+ * Returns the value of the attribute with the specified qname.
+ *
+ * @param qname a QName
object with the qname of the attribute
+ * @return a String
giving the value of the specified
+ * attribute, Null if there is no such attribute
+ * @see SOAPElement#getAttributeValue(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public String getAttributeValue(QName qname);
+
+ /**
+ * Returns an Iterator
over all of the attribute
+ * Name
objects in this
+ * SOAPElement
object. The iterator can be used to get
+ * the attribute names, which can then be passed to the method
+ * getAttributeValue
to retrieve the value of each
+ * attribute.
+ *
+ * @see SOAPElement#getAllAttributesAsQNames()
+ * @return an iterator over the names of the attributes
+ */
+ public Iterator getAllAttributes();
+
+ /**
+ * Returns an Iterator
over all of the attributes
+ * in this SOAPElement
as QName
objects.
+ * The iterator can be used to get the attribute QName, which can then
+ * be passed to the method getAttributeValue
to retrieve
+ * the value of each attribute.
+ *
+ * @return an iterator over the QNames of the attributes
+ * @see SOAPElement#getAllAttributes()
+ * @since 1.6, SAAJ 1.3
+ */
+ public Iterator getAllAttributesAsQNames();
+
+
+ /**
+ * Returns the URI of the namespace that has the given prefix.
+ *
+ * @param prefix a String
giving the prefix of the namespace
+ * for which to search
+ * @return a String
with the uri of the namespace that has
+ * the given prefix
+ */
+ public String getNamespaceURI(String prefix);
+
+ /**
+ * Returns an Iterator
over the namespace prefix
+ * String
s declared by this element. The prefixes returned by
+ * this iterator can be passed to the method
+ * getNamespaceURI
to retrieve the URI of each namespace.
+ *
+ * @return an iterator over the namespace prefixes in this
+ * SOAPElement
object
+ */
+ public Iterator getNamespacePrefixes();
+
+ /**
+ * Returns an Iterator
over the namespace prefix
+ * String
s visible to this element. The prefixes returned by
+ * this iterator can be passed to the method
+ * getNamespaceURI
to retrieve the URI of each namespace.
+ *
+ * @return an iterator over the namespace prefixes are within scope of this
+ * SOAPElement
object
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public Iterator getVisibleNamespacePrefixes();
+
+ /**
+ * Creates a QName
whose namespace URI is the one associated
+ * with the parameter, prefix
, in the context of this
+ * SOAPElement
. The remaining elements of the new
+ * QName
are taken directly from the parameters,
+ * localName
and prefix
.
+ *
+ * @param localName
+ * a String
containing the local part of the name.
+ * @param prefix
+ * a String
containing the prefix for the name.
+ *
+ * @return a QName
with the specified localName
+ * and prefix
, and with a namespace that is associated
+ * with the prefix
in the context of this
+ * SOAPElement
. This namespace will be the same as
+ * the one that would be returned by
+ * {@link #getNamespaceURI(String)}
if it were given
+ * prefix
as it's parameter.
+ *
+ * @exception SOAPException if the QName
cannot be created.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public QName createQName(String localName, String prefix)
+ throws SOAPException;
+ /**
+ * Returns the name of this SOAPElement
object.
+ *
+ * @return a Name
object with the name of this
+ * SOAPElement
object
+ */
+ public Name getElementName();
+
+ /**
+ * Returns the qname of this SOAPElement
object.
+ *
+ * @return a QName
object with the qname of this
+ * SOAPElement
object
+ * @see SOAPElement#getElementName()
+ * @since 1.6, SAAJ 1.3
+ */
+ public QName getElementQName();
+
+ /**
+ * Changes the name of this Element
to newName
if
+ * possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody
+ * etc. cannot have their names changed using this method. Any attempt to do
+ * so will result in a SOAPException being thrown.
+ *SOAPElement
to a renamed instance.
+ *
+ * @param newName the new name for the Element
.
+ *
+ * @exception SOAPException if changing the name of this Element
+ * is not allowed.
+ * @return The renamed Node
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPElement setElementQName(QName newName) throws SOAPException;
+
+ /**
+ * Removes the attribute with the specified name.
+ *
+ * @param name the Name
object with the name of the
+ * attribute to be removed
+ * @return true
if the attribute was
+ * removed successfully; false
if it was not
+ * @see SOAPElement#removeAttribute(javax.xml.namespace.QName)
+ */
+ public boolean removeAttribute(Name name);
+
+ /**
+ * Removes the attribute with the specified qname.
+ *
+ * @param qname the QName
object with the qname of the
+ * attribute to be removed
+ * @return true
if the attribute was
+ * removed successfully; false
if it was not
+ * @see SOAPElement#removeAttribute(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public boolean removeAttribute(QName qname);
+
+ /**
+ * Removes the namespace declaration corresponding to the given prefix.
+ *
+ * @param prefix a String
giving the prefix for which
+ * to search
+ * @return true
if the namespace declaration was
+ * removed successfully; false
if it was not
+ */
+ public boolean removeNamespaceDeclaration(String prefix);
+
+ /**
+ * Returns an Iterator
over all the immediate child
+ * {@link Node}s of this element. This includes javax.xml.soap.Text
+ * objects as well as SOAPElement
objects.
+ * Element
,
+ * SOAPElement
and org.w3c.dom.Text
nodes to be
+ * replaced by SOAPElement
, SOAPHeaderElement
,
+ * SOAPBodyElement
or javax.xml.soap.Text
nodes as
+ * appropriate for the type of this parent node. As a result the calling
+ * application must treat any existing references to these child nodes that
+ * have been obtained through DOM APIs as invalid and either discard them or
+ * refresh them with the values returned by this Iterator
. This
+ * behavior can be avoided by calling the equivalent DOM APIs. See
+ * {@link javax.xml.soap}
+ * for more details.
+ *
+ * @return an iterator with the content of this SOAPElement
+ * object
+ */
+ public Iterator getChildElements();
+
+ /**
+ * Returns an Iterator
over all the immediate child
+ * {@link Node}s of this element with the specified name. All of these
+ * children will be SOAPElement
nodes.
+ * Element
,
+ * SOAPElement
and org.w3c.dom.Text
nodes to be
+ * replaced by SOAPElement
, SOAPHeaderElement
,
+ * SOAPBodyElement
or javax.xml.soap.Text
nodes as
+ * appropriate for the type of this parent node. As a result the calling
+ * application must treat any existing references to these child nodes that
+ * have been obtained through DOM APIs as invalid and either discard them or
+ * refresh them with the values returned by this Iterator
. This
+ * behavior can be avoided by calling the equivalent DOM APIs. See
+ * {@link javax.xml.soap}
+ * for more details.
+ *
+ * @param name a Name
object with the name of the child
+ * elements to be returned
+ *
+ * @return an Iterator
object over all the elements
+ * in this SOAPElement
object with the
+ * specified name
+ * @see SOAPElement#getChildElements(javax.xml.namespace.QName)
+ */
+ public Iterator getChildElements(Name name);
+
+ /**
+ * Returns an Iterator
over all the immediate child
+ * {@link Node}s of this element with the specified qname. All of these
+ * children will be SOAPElement
nodes.
+ * Element
,
+ * SOAPElement
and org.w3c.dom.Text
nodes to be
+ * replaced by SOAPElement
, SOAPHeaderElement
,
+ * SOAPBodyElement
or javax.xml.soap.Text
nodes as
+ * appropriate for the type of this parent node. As a result the calling
+ * application must treat any existing references to these child nodes that
+ * have been obtained through DOM APIs as invalid and either discard them or
+ * refresh them with the values returned by this Iterator
. This
+ * behavior can be avoided by calling the equivalent DOM APIs. See
+ * {@link javax.xml.soap}
+ * for more details.
+ *
+ * @param qname a QName
object with the qname of the child
+ * elements to be returned
+ *
+ * @return an Iterator
object over all the elements
+ * in this SOAPElement
object with the
+ * specified qname
+ * @see SOAPElement#getChildElements(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public Iterator getChildElements(QName qname);
+
+ /**
+ * Sets the encoding style for this SOAPElement
object
+ * to one specified.
+ *
+ * @param encodingStyle a String
giving the encoding style
+ *
+ * @exception IllegalArgumentException if there was a problem in the
+ * encoding style being set.
+ * @exception SOAPException if setting the encodingStyle is invalid for this SOAPElement.
+ * @see #getEncodingStyle
+ */
+ public void setEncodingStyle(String encodingStyle)
+ throws SOAPException;
+ /**
+ * Returns the encoding style for this SOAPElement
object.
+ *
+ * @return a String
giving the encoding style
+ *
+ * @see #setEncodingStyle
+ */
+ public String getEncodingStyle();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPElementFactory.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * SOAPElementFactory
is a factory for XML fragments that
+ * will eventually end up in the SOAP part. These fragments
+ * can be inserted as children of the SOAPHeader
or
+ * SOAPBody
or SOAPEnvelope
.
+ *
+ * javax.xml.soap.SOAPFactory
for creating SOAPElements.
+ * @see javax.xml.soap.SOAPFactory
+ * @since 1.6
+ */
+public class SOAPElementFactory {
+
+ private SOAPFactory soapFactory;
+
+ private SOAPElementFactory(SOAPFactory soapFactory) {
+ this.soapFactory = soapFactory;
+ }
+
+ /**
+ * Create a SOAPElement
object initialized with the
+ * given Name
object.
+ *
+ * @param name a Name
object with the XML name for
+ * the new element
+ *
+ * @return the new SOAPElement
object that was
+ * created
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ *
+ * @deprecated Use
+ * javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
+ * instead
+ *
+ * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.soap.Name)
+ * @see javax.xml.soap.SOAPFactory#createElement(javax.xml.namespace.QName)
+ */
+ public SOAPElement create(Name name) throws SOAPException {
+ return soapFactory.createElement(name);
+ }
+
+ /**
+ * Create a SOAPElement
object initialized with the
+ * given local name.
+ *
+ * @param localName a String
giving the local name for
+ * the new element
+ *
+ * @return the new SOAPElement
object that was
+ * created
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ *
+ * @deprecated Use
+ * javax.xml.soap.SOAPFactory.createElement(String localName) instead
+ *
+ * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String)
+ */
+ public SOAPElement create(String localName) throws SOAPException {
+ return soapFactory.createElement(localName);
+ }
+
+ /**
+ * Create a new SOAPElement
object with the given
+ * local name, prefix and uri.
+ *
+ * @param localName a String
giving the local name
+ * for the new element
+ * @param prefix the prefix for this SOAPElement
+ * @param uri a String
giving the URI of the
+ * namespace to which the new element belongs
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ *
+ * @deprecated Use
+ * javax.xml.soap.SOAPFactory.createElement(String localName,
+ * String prefix,
+ * String uri)
+ * instead
+ *
+ * @see javax.xml.soap.SOAPFactory#createElement(java.lang.String, java.lang.String, java.lang.String)
+ */
+ public SOAPElement create(String localName, String prefix, String uri)
+ throws SOAPException {
+ return soapFactory.createElement(localName, prefix, uri);
+ }
+
+ /**
+ * Creates a new instance of SOAPElementFactory
.
+ *
+ * @return a new instance of a SOAPElementFactory
+ *
+ * @exception SOAPException if there was an error creating the
+ * default SOAPElementFactory
+ */
+ public static SOAPElementFactory newInstance() throws SOAPException {
+ try {
+ return new SOAPElementFactory(SOAPFactory.newInstance());
+ } catch (Exception ex) {
+ throw new SOAPException(
+ "Unable to create SOAP Element Factory: " + ex.getMessage());
+ }
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPEnvelope.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPEnvelope.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+
+/**
+ * The container for the SOAPHeader and SOAPBody portions of a
+ * SOAPPart
object. By default, a SOAPMessage
+ * object is created with a SOAPPart
object that has a
+ * SOAPEnvelope
object. The SOAPEnvelope
object
+ * by default has an empty SOAPBody
object and an empty
+ * SOAPHeader
object. The SOAPBody
object is
+ * required, and the SOAPHeader
object, though
+ * optional, is used in the majority of cases. If the
+ * SOAPHeader
object is not needed, it can be deleted,
+ * which is shown later.
+ * SOAPHeader
and SOAPBody
+ * objects by calling the methods SOAPEnvelope.getHeader
and
+ * SOAPEnvelope.getBody
. The
+ * following lines of code use these two methods after starting with
+ * the SOAPMessage
+ * object message to get the SOAPPart
object sp,
+ * which is then used to get the SOAPEnvelope
object se.
+ *
+ *
+ * SOAPPart sp = message.getSOAPPart();
+ * SOAPEnvelope se = sp.getEnvelope();
+ * SOAPHeader sh = se.getHeader();
+ * SOAPBody sb = se.getBody();
+ *
+ * SOAPEnvelope
+ * object by retrieving the current one, deleting it, and then adding
+ * a new body or header. The javax.xml.soap.Node
method
+ * deleteNode
deletes the XML element (node) on which it is
+ * called. For example, the following line of code deletes the
+ * SOAPBody
object that is retrieved by the method getBody
.
+ *
+ * se.getBody().detachNode();
+ *
+ * To create a SOAPHeader
object to replace the one that was removed,
+ * a client uses
+ * the method SOAPEnvelope.addHeader
, which creates a new header and
+ * adds it to the SOAPEnvelope
object. Similarly, the method
+ * addBody
creates a new SOAPBody
object and adds
+ * it to the SOAPEnvelope
object. The following code fragment
+ * retrieves the current header, removes it, and adds a new one. Then
+ * it retrieves the current body, removes it, and adds a new one.
+ *
+ *
+ * SOAPPart sp = message.getSOAPPart();
+ * SOAPEnvelope se = sp.getEnvelope();
+ * se.getHeader().detachNode();
+ * SOAPHeader sh = se.addHeader();
+ * se.getBody().detachNode();
+ * SOAPBody sb = se.addBody();
+ *
+ * It is an error to add a SOAPBody
or SOAPHeader
+ * object if one already exists.
+ * SOAPEnvelope
interface provides three methods for creating
+ * Name
objects. One method creates Name
objects with
+ * a local name, a namespace prefix, and a namesapce URI. The second method creates
+ * Name
objects with a local name and a namespace prefix, and the third
+ * creates Name
objects with just a local name. The following line of
+ * code, in which se is a SOAPEnvelope
object, creates a new
+ * Name
object with all three.
+ *
+ * Name name = se.createName("GetLastTradePrice", "WOMBAT",
+ * "http://www.wombat.org/trader");
+ *
+ *
+ * @since 1.6
+ */
+public interface SOAPEnvelope extends SOAPElement {
+
+ /**
+ * Creates a new Name
object initialized with the
+ * given local name, namespace prefix, and namespace URI.
+ * Name
objects for use in
+ * the SOAP/XML document.
+ *
+ * @param localName a String
giving the local name
+ * @param prefix a String
giving the prefix of the namespace
+ * @param uri a String
giving the URI of the namespace
+ * @return a Name
object initialized with the given
+ * local name, namespace prefix, and namespace URI
+ * @throws SOAPException if there is a SOAP error
+ */
+ public abstract Name createName(String localName, String prefix,
+ String uri)
+ throws SOAPException;
+
+ /**
+ * Creates a new Name
object initialized with the
+ * given local name.
+ * Name
objects for use in
+ * the SOAP/XML document.
+ *
+ * @param localName a String
giving the local name
+ * @return a Name
object initialized with the given
+ * local name
+ * @throws SOAPException if there is a SOAP error
+ */
+ public abstract Name createName(String localName)
+ throws SOAPException;
+
+ /**
+ * Returns the SOAPHeader
object for
+ * this SOAPEnvelope
object.
+ * SOAPMessage
object is by default created with a
+ * SOAPEnvelope
object that contains an empty
+ * SOAPHeader
object. As a result, the method
+ * getHeader
will always return a SOAPHeader
+ * object unless the header has been removed and a new one has not
+ * been added.
+ *
+ * @return the SOAPHeader
object or null
if
+ * there is none
+ * @exception SOAPException if there is a problem obtaining the
+ * SOAPHeader
object
+ */
+ public SOAPHeader getHeader() throws SOAPException;
+
+ /**
+ * Returns the SOAPBody
object associated with this
+ * SOAPEnvelope
object.
+ * SOAPMessage
object is by default created with a
+ * SOAPEnvelope
object that contains an empty
+ * SOAPBody
object. As a result, the method
+ * getBody
will always return a SOAPBody
+ * object unless the body has been removed and a new one has not
+ * been added.
+ *
+ * @return the SOAPBody
object for this
+ * SOAPEnvelope
object or null
+ * if there is none
+ * @exception SOAPException if there is a problem obtaining the
+ * SOAPBody
object
+ */
+ public SOAPBody getBody() throws SOAPException;
+ /**
+ * Creates a SOAPHeader
object and sets it as the
+ * SOAPHeader
object for this SOAPEnvelope
+ * object.
+ * SOAPHeader
object
+ *
+ * @exception SOAPException if this
+ * SOAPEnvelope
object already contains a
+ * valid SOAPHeader
object
+ */
+ public SOAPHeader addHeader() throws SOAPException;
+ /**
+ * Creates a SOAPBody
object and sets it as the
+ * SOAPBody
object for this SOAPEnvelope
+ * object.
+ * SOAPBody
object
+ *
+ * @exception SOAPException if this
+ * SOAPEnvelope
object already contains a
+ * valid SOAPBody
object
+ */
+ public SOAPBody addBody() throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPException.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * An exception that signals that a SOAP exception has occurred. A
+ * SOAPException
object may contain a String
+ * that gives the reason for the exception, an embedded
+ * Throwable
object, or both. This class provides methods
+ * for retrieving reason messages and for retrieving the embedded
+ * Throwable
object.
+ *
+ * SOAPException
+ * object are problems such as difficulty setting a header, not being
+ * able to send a message, and not being able to get a connection with
+ * the provider. Reasons for embedding a Throwable
+ * object include problems such as input/output errors or a parsing
+ * problem, such as an error in parsing a header.
+ *
+ * @since 1.6
+ */
+public class SOAPException extends Exception {
+ private Throwable cause;
+
+ /**
+ * Constructs a SOAPException
object with no
+ * reason or embedded Throwable
object.
+ */
+ public SOAPException() {
+ super();
+ this.cause = null;
+ }
+
+ /**
+ * Constructs a SOAPException
object with the given
+ * String
as the reason for the exception being thrown.
+ *
+ * @param reason a description of what caused the exception
+ */
+ public SOAPException(String reason) {
+ super(reason);
+ this.cause = null;
+ }
+
+ /**
+ * Constructs a SOAPException
object with the given
+ * String
as the reason for the exception being thrown
+ * and the given Throwable
object as an embedded
+ * exception.
+ *
+ * @param reason a description of what caused the exception
+ * @param cause a Throwable
object that is to
+ * be embedded in this SOAPException
object
+ */
+ public SOAPException(String reason, Throwable cause) {
+ super(reason);
+ initCause(cause);
+ }
+
+ /**
+ * Constructs a SOAPException
object initialized
+ * with the given Throwable
object.
+ */
+ public SOAPException(Throwable cause) {
+ super(cause.toString());
+ initCause(cause);
+ }
+
+ /**
+ * Returns the detail message for this SOAPException
+ * object.
+ * Throwable
object, and if the
+ * SOAPException
object has no detail message of its
+ * own, this method will return the detail message from the embedded
+ * Throwable
object.
+ *
+ * @return the error or warning message for this
+ * SOAPException
or, if it has none, the
+ * message of the embedded Throwable
object,
+ * if there is one
+ */
+ public String getMessage() {
+ String message = super.getMessage();
+ if (message == null && cause != null) {
+ return cause.getMessage();
+ } else {
+ return message;
+ }
+ }
+
+ /**
+ * Returns the Throwable
object embedded in this
+ * SOAPException
if there is one. Otherwise, this method
+ * returns null
.
+ *
+ * @return the embedded Throwable
object or null
+ * if there is none
+ */
+
+ public Throwable getCause() {
+ return cause;
+ }
+
+ /**
+ * Initializes the cause
field of this SOAPException
+ * object with the given Throwable
object.
+ * SOAPException
object.
+ * If this SOAPException
object was created with the
+ * constructor {@link #SOAPException(Throwable)} or
+ * {@link #SOAPException(String,Throwable)}, meaning that its
+ * cause
field already has a value, this method cannot be
+ * called even once.
+ *
+ * @param cause the Throwable
object that caused this
+ * SOAPException
object to be thrown. The value of this
+ * parameter is saved for later retrieval by the
+ * {@link #getCause()} method. A null value is
+ * permitted and indicates that the cause is nonexistent or
+ * unknown.
+ * @return a reference to this SOAPException
instance
+ * @throws IllegalArgumentException if cause
is this
+ * Throwable
object. (A Throwable
object
+ * cannot be its own cause.)
+ * @throws IllegalStateException if the cause for this SOAPException
object
+ * has already been initialized
+ */
+ public synchronized Throwable initCause(Throwable cause) {
+ if (this.cause != null) {
+ throw new IllegalStateException("Can't override cause");
+ }
+ if (cause == this) {
+ throw new IllegalArgumentException("Self-causation not permitted");
+ }
+ this.cause = cause;
+
+ return this;
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFactory.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,300 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+/**
+ * SOAPFactory
is a factory for creating various objects
+ * that exist in the SOAP XML tree.
+
+ * SOAPFactory
can be
+ * used to create XML fragments that will eventually end up in the
+ * SOAP part. These fragments can be inserted as children of the
+ * {@link SOAPHeaderElement} or {@link SOAPBodyElement} or
+ * {@link SOAPEnvelope} or other {@link SOAPElement} objects.
+ *
+ * SOAPFactory
also has methods to create
+ * javax.xml.soap.Detail
objects as well as
+ * java.xml.soap.Name
objects.
+ *
+ * @since 1.6
+ */
+public abstract class SOAPFactory {
+
+ /**
+ * A constant representing the property used to lookup the name of
+ * a SOAPFactory
implementation class.
+ */
+ static private final String SOAP_FACTORY_PROPERTY =
+ "javax.xml.soap.SOAPFactory";
+
+ /**
+ * Class name of default SOAPFactory
implementation.
+ */
+ static final String DEFAULT_SOAP_FACTORY
+ = "com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl";
+
+ /**
+ * Creates a SOAPElement
object from an existing DOM
+ * Element
. If the DOM Element
that is passed in
+ * as an argument is already a SOAPElement
then this method
+ * must return it unmodified without any further work. Otherwise, a new
+ * SOAPElement
is created and a deep copy is made of the
+ * domElement
argument. The concrete type of the return value
+ * will depend on the name of the domElement
argument. If any
+ * part of the tree rooted in domElement
violates SOAP rules, a
+ * SOAPException
will be thrown.
+ *
+ * @param domElement - the Element
to be copied.
+ *
+ * @return a new SOAPElement
that is a copy of domElement
.
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPElement createElement(Element domElement) throws SOAPException {
+ throw new UnsupportedOperationException("createElement(org.w3c.dom.Element) must be overridden by all subclasses of SOAPFactory.");
+ }
+
+ /**
+ * Creates a SOAPElement
object initialized with the
+ * given Name
object. The concrete type of the return value
+ * will depend on the name given to the new SOAPElement
. For
+ * instance, a new SOAPElement
with the name
+ * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
+ * SOAPEnvelope
that supports SOAP 1.2 behavior to be created.
+ *
+ * @param name a Name
object with the XML name for
+ * the new element
+ *
+ * @return the new SOAPElement
object that was
+ * created
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ * @see SOAPFactory#createElement(javax.xml.namespace.QName)
+ */
+ public abstract SOAPElement createElement(Name name) throws SOAPException;
+
+ /**
+ * Creates a SOAPElement
object initialized with the
+ * given QName
object. The concrete type of the return value
+ * will depend on the name given to the new SOAPElement
. For
+ * instance, a new SOAPElement
with the name
+ * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
+ * SOAPEnvelope
that supports SOAP 1.2 behavior to be created.
+ *
+ * @param qname a QName
object with the XML name for
+ * the new element
+ *
+ * @return the new SOAPElement
object that was
+ * created
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ * @see SOAPFactory#createElement(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPElement createElement(QName qname) throws SOAPException {
+ throw new UnsupportedOperationException("createElement(QName) must be overridden by all subclasses of SOAPFactory.");
+ }
+
+ /**
+ * Creates a SOAPElement
object initialized with the
+ * given local name.
+ *
+ * @param localName a String
giving the local name for
+ * the new element
+ *
+ * @return the new SOAPElement
object that was
+ * created
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ */
+ public abstract SOAPElement createElement(String localName)
+ throws SOAPException;
+
+
+ /**
+ * Creates a new SOAPElement
object with the given
+ * local name, prefix and uri. The concrete type of the return value
+ * will depend on the name given to the new SOAPElement
. For
+ * instance, a new SOAPElement
with the name
+ * "{http://www.w3.org/2003/05/soap-envelope}Envelope" would cause a
+ * SOAPEnvelope
that supports SOAP 1.2 behavior to be created.
+ *
+ * @param localName a String
giving the local name
+ * for the new element
+ * @param prefix the prefix for this SOAPElement
+ * @param uri a String
giving the URI of the
+ * namespace to which the new element belongs
+ *
+ * @exception SOAPException if there is an error in creating the
+ * SOAPElement
object
+ */
+ public abstract SOAPElement createElement(
+ String localName,
+ String prefix,
+ String uri)
+ throws SOAPException;
+
+ /**
+ * Creates a new Detail
object which serves as a container
+ * for DetailEntry
objects.
+ * Detail
objects for use in
+ * situations where it is not practical to use the SOAPFault
+ * abstraction.
+ *
+ * @return a Detail
object
+ * @throws SOAPException if there is a SOAP error
+ * @throws UnsupportedOperationException if the protocol specified
+ * for the SOAPFactory was DYNAMIC_SOAP_PROTOCOL
+ */
+ public abstract Detail createDetail() throws SOAPException;
+
+ /**
+ *Creates a new SOAPFault
object initialized with the given reasonText
+ * and faultCode
+ *@param reasonText the ReasonText/FaultString for the fault
+ *@param faultCode the FaultCode for the fault
+ *@return a SOAPFault
object
+ *@throws SOAPException if there is a SOAP error
+ *@since 1.6, SAAJ 1.3
+ */
+ public abstract SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException;
+
+ /**
+ *Creates a new default SOAPFault
object
+ *@return a SOAPFault
object
+ *@throws SOAPException if there is a SOAP error
+ *@since 1.6, SAAJ 1.3
+ */
+ public abstract SOAPFault createFault() throws SOAPException;
+
+ /**
+ * Creates a new Name
object initialized with the
+ * given local name, namespace prefix, and namespace URI.
+ * Name
objects for use in
+ * situations where it is not practical to use the SOAPEnvelope
+ * abstraction.
+ *
+ * @param localName a String
giving the local name
+ * @param prefix a String
giving the prefix of the namespace
+ * @param uri a String
giving the URI of the namespace
+ * @return a Name
object initialized with the given
+ * local name, namespace prefix, and namespace URI
+ * @throws SOAPException if there is a SOAP error
+ */
+ public abstract Name createName(
+ String localName,
+ String prefix,
+ String uri)
+ throws SOAPException;
+
+ /**
+ * Creates a new Name
object initialized with the
+ * given local name.
+ * Name
objects for use in
+ * situations where it is not practical to use the SOAPEnvelope
+ * abstraction.
+ *
+ * @param localName a String
giving the local name
+ * @return a Name
object initialized with the given
+ * local name
+ * @throws SOAPException if there is a SOAP error
+ */
+ public abstract Name createName(String localName) throws SOAPException;
+
+ /**
+ * Creates a new SOAPFactory
object that is an instance of
+ * the default implementation (SOAP 1.1),
+ *
+ * This method uses the following ordered lookup procedure to determine the SOAPFactory implementation class to load:
+ *
+ *
+ *
+ * @return a new instance of a SOAPFactory
+ *
+ * @exception SOAPException if there was an error creating the
+ * default SOAPFactory
+ * @see SAAJMetaFactory
+ */
+ public static SOAPFactory newInstance()
+ throws SOAPException
+ {
+ try {
+ SOAPFactory factory = (SOAPFactory) FactoryFinder.find(
+ SOAP_FACTORY_PROPERTY, DEFAULT_SOAP_FACTORY, false);
+ if (factory != null)
+ return factory;
+ return newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
+ } catch (Exception ex) {
+ throw new SOAPException(
+ "Unable to create SOAP Factory: " + ex.getMessage());
+ }
+
+ }
+
+ /**
+ * Creates a new SOAPFactory
object that is an instance of
+ * the specified implementation, this method uses the SAAJMetaFactory to
+ * locate the implementation class and create the SOAPFactory instance.
+ *
+ * @return a new instance of a SOAPFactory
+ *
+ * @param protocol a string constant representing the protocol of the
+ * specified SOAP factory implementation. May be
+ * either DYNAMIC_SOAP_PROTOCOL
,
+ * DEFAULT_SOAP_PROTOCOL
(which is the same
+ * as) SOAP_1_1_PROTOCOL
, or
+ * SOAP_1_2_PROTOCOL
.
+ *
+ * @exception SOAPException if there was an error creating the
+ * specified SOAPFactory
+ * @see SAAJMetaFactory
+ * @since 1.6, SAAJ 1.3
+ */
+ public static SOAPFactory newInstance(String protocol)
+ throws SOAPException {
+ return SAAJMetaFactory.getInstance().newSOAPFactory(protocol);
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFault.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,513 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Iterator;
+import java.util.Locale;
+
+import javax.xml.namespace.QName;
+
+/**
+ * An element in the SOAPBody
object that contains
+ * error and/or status information. This information may relate to
+ * errors in the SOAPMessage
object or to problems
+ * that are not related to the content in the message itself. Problems
+ * not related to the message itself are generally errors in
+ * processing, such as the inability to communicate with an upstream
+ * server.
+ * protocol
specified while creating the
+ * MessageFactory
instance, a SOAPFault
has
+ * sub-elements as defined in the SOAP 1.1/SOAP 1.2 specification.
+ *
+ * @since 1.6
+ */
+public interface SOAPFault extends SOAPBodyElement {
+
+ /**
+ * Sets this SOAPFault
object with the given fault code.
+ *
+ * Name
. This method provides a convenient
+ * way to set a fault code. For example,
+ *
+ *
+ * SOAPEnvelope se = ...;
+ * // Create a qualified name in the SOAP namespace with a localName
+ * // of "Client". Note that prefix parameter is optional and is null
+ * // here which causes the implementation to use an appropriate prefix.
+ * Name qname = se.createName("Client", null,
+ * SOAPConstants.URI_NS_SOAP_ENVELOPE);
+ * SOAPFault fault = ...;
+ * fault.setFaultCode(qname);
+ *
+ * It is preferable to use this method over {@link #setFaultCode(String)}.
+ *
+ * @param faultCodeQName a Name
object giving the fault
+ * code to be set. It must be namespace qualified.
+ * @see #getFaultCodeAsName
+ *
+ * @exception SOAPException if there was an error in adding the
+ * faultcode element to the underlying XML tree.
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public void setFaultCode(Name faultCodeQName) throws SOAPException;
+
+ /**
+ * Sets this SOAPFault
object with the given fault code.
+ *
+ * It is preferable to use this method over {@link #setFaultCode(Name)}.
+ *
+ * @param faultCodeQName a QName
object giving the fault
+ * code to be set. It must be namespace qualified.
+ * @see #getFaultCodeAsQName
+ *
+ * @exception SOAPException if there was an error in adding the
+ * faultcode
element to the underlying XML tree.
+ *
+ * @see #setFaultCode(Name)
+ * @see #getFaultCodeAsQName()
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void setFaultCode(QName faultCodeQName) throws SOAPException;
+
+ /**
+ * Sets this SOAPFault
object with the give fault code.
+ * String
giving the fault code to be set.
+ * It must be of the form "prefix:localName" where the prefix has
+ * been defined in a namespace declaration.
+ * @see #setFaultCode(Name)
+ * @see #getFaultCode
+ * @see SOAPElement#addNamespaceDeclaration
+ *
+ * @exception SOAPException if there was an error in adding the
+ * faultCode
to the underlying XML tree.
+ */
+ public void setFaultCode(String faultCode) throws SOAPException;
+
+ /**
+ * Gets the mandatory SOAP 1.1 fault code for this
+ * SOAPFault
object as a SAAJ Name
object.
+ * The SOAP 1.1 specification requires the value of the "faultcode"
+ * element to be of type QName. This method returns the content of the
+ * element as a QName in the form of a SAAJ Name object. This method
+ * should be used instead of the getFaultCode
method since
+ * it allows applications to easily access the namespace name without
+ * additional parsing.
+ *
+ * @return a Name
representing the faultcode
+ * @see #setFaultCode(Name)
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public Name getFaultCodeAsName();
+
+
+ /**
+ * Gets the fault code for this
+ * SOAPFault
object as a QName
object.
+ *
+ * @return a QName
representing the faultcode
+ *
+ * @see #setFaultCode(QName)
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public QName getFaultCodeAsQName();
+
+ /**
+ * Gets the Subcodes for this SOAPFault
as an iterator over
+ * QNames
.
+ *
+ * @return an Iterator
that accesses a sequence of
+ * QNames
. This Iterator
should not support
+ * the optional remove
method. The order in which the
+ * Subcodes are returned reflects the hierarchy of Subcodes present
+ * in the fault from top to bottom.
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Subcode.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public Iterator getFaultSubcodes();
+
+ /**
+ * Removes any Subcodes that may be contained by this
+ * SOAPFault
. Subsequent calls to
+ * getFaultSubcodes
will return an empty iterator until a call
+ * to appendFaultSubcode
is made.
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Subcode.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void removeAllFaultSubcodes();
+
+ /**
+ * Adds a Subcode to the end of the sequence of Subcodes contained by this
+ * SOAPFault
. Subcodes, which were introduced in SOAP 1.2, are
+ * represented by a recursive sequence of subelements rooted in the
+ * mandatory Code subelement of a SOAP Fault.
+ *
+ * @param subcode a QName containing the Value of the Subcode.
+ *
+ * @exception SOAPException if there was an error in setting the Subcode
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Subcode.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void appendFaultSubcode(QName subcode) throws SOAPException;
+
+ /**
+ * Gets the fault code for this SOAPFault
object.
+ *
+ * @return a String
with the fault code
+ * @see #getFaultCodeAsName
+ * @see #setFaultCode
+ */
+ public String getFaultCode();
+
+ /**
+ * Sets this SOAPFault
object with the given fault actor.
+ * SOAPFault
supports SOAP 1.2 then this call is
+ * equivalent to {@link #setFaultRole(String)}
+ *
+ * @param faultActor a String
identifying the actor that
+ * caused this SOAPFault
object
+ * @see #getFaultActor
+ *
+ * @exception SOAPException if there was an error in adding the
+ * faultActor
to the underlying XML tree.
+ */
+ public void setFaultActor(String faultActor) throws SOAPException;
+
+ /**
+ * Gets the fault actor for this SOAPFault
object.
+ * SOAPFault
supports SOAP 1.2 then this call is
+ * equivalent to {@link #getFaultRole()}
+ *
+ * @return a String
giving the actor in the message path
+ * that caused this SOAPFault
object
+ * @see #setFaultActor
+ */
+ public String getFaultActor();
+
+ /**
+ * Sets the fault string for this SOAPFault
object
+ * to the given string.
+ * SOAPFault
is part of a message that supports SOAP 1.2 then
+ * this call is equivalent to:
+ *
+ * addFaultReasonText(faultString, Locale.getDefault());
+ *
+ *
+ * @param faultString a String
giving an explanation of
+ * the fault
+ * @see #getFaultString
+ *
+ * @exception SOAPException if there was an error in adding the
+ * faultString
to the underlying XML tree.
+ */
+ public void setFaultString(String faultString) throws SOAPException;
+
+ /**
+ * Sets the fault string for this SOAPFault
object
+ * to the given string and localized to the given locale.
+ * SOAPFault
is part of a message that supports SOAP 1.2 then
+ * this call is equivalent to:
+ *
+ * addFaultReasonText(faultString, locale);
+ *
+ *
+ * @param faultString a String
giving an explanation of
+ * the fault
+ * @param locale a {@link java.util.Locale Locale} object indicating
+ * the native language of the faultString
+ * @see #getFaultString
+ *
+ * @exception SOAPException if there was an error in adding the
+ * faultString
to the underlying XML tree.
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public void setFaultString(String faultString, Locale locale)
+ throws SOAPException;
+
+ /**
+ * Gets the fault string for this SOAPFault
object.
+ * SOAPFault
is part of a message that supports SOAP 1.2 then
+ * this call is equivalent to:
+ *
+ * String reason = null;
+ * try {
+ * reason = (String) getFaultReasonTexts().next();
+ * } catch (SOAPException e) {}
+ * return reason;
+ *
+ *
+ * @return a String
giving an explanation of
+ * the fault
+ * @see #setFaultString(String)
+ * @see #setFaultString(String, Locale)
+ */
+ public String getFaultString();
+
+ /**
+ * Gets the locale of the fault string for this SOAPFault
+ * object.
+ * SOAPFault
is part of a message that supports SOAP 1.2 then
+ * this call is equivalent to:
+ *
+ * Locale locale = null;
+ * try {
+ * locale = (Locale) getFaultReasonLocales().next();
+ * } catch (SOAPException e) {}
+ * return locale;
+ *
+ *
+ * @return a Locale
object indicating the native language of
+ * the fault string or null
if no locale was specified
+ * @see #setFaultString(String, Locale)
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public Locale getFaultStringLocale();
+
+ /**
+ * Returns true if this SOAPFault
has a Detail
+ * subelement and false otherwise. Equivalent to
+ * (getDetail()!=null)
.
+ *
+ * @return true if this SOAPFault
has a Detail
+ * subelement and false otherwise.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public boolean hasDetail();
+
+ /**
+ * Returns the optional detail element for this SOAPFault
+ * object.
+ * Detail
object carries application-specific error
+ * information, the scope of the error information is restricted to
+ * faults in the SOAPBodyElement
objects if this is a
+ * SOAP 1.1 Fault.
+ *
+ * @return a Detail
object with application-specific
+ * error information if present, null otherwise
+ */
+ public Detail getDetail();
+
+ /**
+ * Creates an optional Detail
object and sets it as the
+ * Detail
object for this SOAPFault
+ * object.
+ * Detail
object
+ *
+ * @exception SOAPException if this
+ * SOAPFault
object already contains a
+ * valid Detail
object
+ */
+ public Detail addDetail() throws SOAPException;
+
+ /**
+ * Returns an Iterator
over a distinct sequence of
+ * Locale
s for which there are associated Reason Text items.
+ * Any of these Locale
s can be used in a call to
+ * getFaultReasonText
in order to obtain a localized version
+ * of the Reason Text string.
+ *
+ * @return an Iterator
over a sequence of Locale
+ * objects for which there are associated Reason Text items.
+ *
+ * @exception SOAPException if there was an error in retrieving
+ * the fault Reason locales.
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Reason.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public Iterator getFaultReasonLocales() throws SOAPException;
+
+ /**
+ * Returns an Iterator
over a sequence of
+ * String
objects containing all of the Reason Text items for
+ * this SOAPFault
.
+ *
+ * @return an Iterator
over env:Fault/env:Reason/env:Text items.
+ *
+ * @exception SOAPException if there was an error in retrieving
+ * the fault Reason texts.
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Reason.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public Iterator getFaultReasonTexts() throws SOAPException;
+
+ /**
+ * Returns the Reason Text associated with the given Locale
.
+ * If more than one such Reason Text exists the first matching Text is
+ * returned
+ *
+ * @param locale -- the Locale
for which a localized
+ * Reason Text is desired
+ *
+ * @return the Reason Text associated with locale
+ *
+ * @see #getFaultString
+ *
+ * @exception SOAPException if there was an error in retrieving
+ * the fault Reason text for the specified locale .
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Reason.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public String getFaultReasonText(Locale locale) throws SOAPException;
+
+ /**
+ * Appends or replaces a Reason Text item containing the specified
+ * text message and an xml:lang derived from
+ * locale
. If a Reason Text item with this
+ * xml:lang already exists its text value will be replaced
+ * with text
.
+ * The locale
parameter should not be null
+ *
+ * SOAPFault fault = ...;
+ * fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
+ *
+ *
+ * @param text -- reason message string
+ * @param locale -- Locale object representing the locale of the message
+ *
+ * @exception SOAPException if there was an error in adding the Reason text
+ * or the locale
passed was null
.
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Reason.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void addFaultReasonText(String text, java.util.Locale locale)
+ throws SOAPException;
+
+ /**
+ * Returns the optional Node element value for this
+ * SOAPFault
object. The Node element is
+ * optional in SOAP 1.2.
+ *
+ * @return Content of the env:Fault/env:Node element as a String
+ * or null
if none
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Node.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public String getFaultNode();
+
+ /**
+ * Creates or replaces any existing Node element value for
+ * this SOAPFault
object. The Node element
+ * is optional in SOAP 1.2.
+ *
+ * @exception SOAPException if there was an error in setting the
+ * Node for this SOAPFault
object.
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Node.
+ *
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void setFaultNode(String uri) throws SOAPException;
+
+ /**
+ * Returns the optional Role element value for this
+ * SOAPFault
object. The Role element is
+ * optional in SOAP 1.2.
+ *
+ * @return Content of the env:Fault/env:Role element as a String
+ * or null
if none
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Role.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public String getFaultRole();
+
+ /**
+ * Creates or replaces any existing Role element value for
+ * this SOAPFault
object. The Role element
+ * is optional in SOAP 1.2.
+ *
+ * @param uri - the URI of the Role
+ *
+ * @exception SOAPException if there was an error in setting the
+ * Role for this SOAPFault
object.
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Role.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void setFaultRole(String uri) throws SOAPException;
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFaultElement.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPFaultElement.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * A representation of the contents in
+ * a SOAPFault
object. The Detail
interface
+ * is a SOAPFaultElement
.
+ * SOAPFaultElement
using the
+ * SOAPElement
method addTextNode
.
+ *
+ * @since 1.6
+ */
+public interface SOAPFaultElement extends SOAPElement {
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeader.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
+/**
+ * A representation of the SOAP header
+ * element. A SOAP header element consists of XML data that affects
+ * the way the application-specific content is processed by the message
+ * provider. For example, transaction semantics, authentication information,
+ * and so on, can be specified as the content of a SOAPHeader
+ * object.
+ * SOAPEnvelope
object contains an empty
+ * SOAPHeader
object by default. If the SOAPHeader
+ * object, which is optional, is not needed, it can be retrieved and deleted
+ * with the following line of code. The variable se is a
+ * SOAPEnvelope
object.
+ *
+ * se.getHeader().detachNode();
+ *
+ *
+ * A SOAPHeader
object is created with the SOAPEnvelope
+ * method addHeader
. This method, which creates a new header and adds it
+ * to the envelope, may be called only after the existing header has been removed.
+ *
+ *
+ * se.getHeader().detachNode();
+ * SOAPHeader sh = se.addHeader();
+ *
+ * SOAPHeader
object can have only SOAPHeaderElement
+ * objects as its immediate children. The method addHeaderElement
+ * creates a new HeaderElement
object and adds it to the
+ * SOAPHeader
object. In the following line of code, the
+ * argument to the method addHeaderElement
is a Name
+ * object that is the name for the new HeaderElement
object.
+ *
+ * SOAPHeaderElement shElement = sh.addHeaderElement(name);
+ *
+ *
+ * @see SOAPHeaderElement
+ * @since 1.6
+ */
+public interface SOAPHeader extends SOAPElement {
+ /**
+ * Creates a new SOAPHeaderElement
object initialized with the
+ * specified name and adds it to this SOAPHeader
object.
+ *
+ * @param name a Name
object with the name of the new
+ * SOAPHeaderElement
object
+ * @return the new SOAPHeaderElement
object that was
+ * inserted into this SOAPHeader
object
+ * @exception SOAPException if a SOAP error occurs
+ * @see SOAPHeader#addHeaderElement(javax.xml.namespace.QName)
+ */
+ public SOAPHeaderElement addHeaderElement(Name name)
+ throws SOAPException;
+
+ /**
+ * Creates a new SOAPHeaderElement
object initialized with the
+ * specified qname and adds it to this SOAPHeader
object.
+ *
+ * @param qname a QName
object with the qname of the new
+ * SOAPHeaderElement
object
+ * @return the new SOAPHeaderElement
object that was
+ * inserted into this SOAPHeader
object
+ * @exception SOAPException if a SOAP error occurs
+ * @see SOAPHeader#addHeaderElement(Name)
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPHeaderElement addHeaderElement(QName qname)
+ throws SOAPException;
+
+ /**
+ * Returns an Iterator
over all the SOAPHeaderElement
objects
+ * in this SOAPHeader
object
+ * that have the specified actor and that have a MustUnderstand attribute
+ * whose value is equivalent to true
.
+ * String
giving the URI of the actor
/ role
+ * for which to search
+ * @return an Iterator
object over all the
+ * SOAPHeaderElement
objects that contain the specified
+ * actor
/ role
and are marked as MustUnderstand
+ * @see #examineHeaderElements
+ * @see #extractHeaderElements
+ * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public Iterator examineMustUnderstandHeaderElements(String actor);
+
+ /**
+ * Returns an Iterator
over all the SOAPHeaderElement
objects
+ * in this SOAPHeader
object
+ * that have the specified actor.
+ *
+ * An actor is a global attribute that indicates the intermediate
+ * parties that should process a message before it reaches its ultimate
+ * receiver. An actor receives the message and processes it before sending
+ * it on to the next actor. The default actor is the ultimate intended
+ * recipient for the message, so if no actor attribute is included in a
+ * SOAPHeader
object, it is sent to the ultimate receiver
+ * along with the message body.
+ * String
giving the URI of the actor
/ role
+ * for which to search
+ * @return an Iterator
object over all the
+ * SOAPHeaderElement
objects that contain the specified
+ * actor
/ role
+ * @see #extractHeaderElements
+ * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
+ */
+ public Iterator examineHeaderElements(String actor);
+
+ /**
+ * Returns an Iterator
over all the SOAPHeaderElement
objects
+ * in this SOAPHeader
object
+ * that have the specified actor and detaches them
+ * from this SOAPHeader
object.
+ * SOAPHeader
object that apply to it and to remove
+ * them before passing the message on to the next actor.
+ * String
giving the URI of the actor
/ role
+ * for which to search
+ * @return an Iterator
object over all the
+ * SOAPHeaderElement
objects that contain the specified
+ * actor
/ role
+ *
+ * @see #examineHeaderElements
+ * @see SOAPConstants#URI_SOAP_ACTOR_NEXT
+ */
+ public Iterator extractHeaderElements(String actor);
+
+ /**
+ * Creates a new NotUnderstood SOAPHeaderElement
object initialized
+ * with the specified name and adds it to this SOAPHeader
object.
+ * This operation is supported only by SOAP 1.2.
+ *
+ * @param name a QName
object with the name of the
+ * SOAPHeaderElement
object that was not understood.
+ * @return the new SOAPHeaderElement
object that was
+ * inserted into this SOAPHeader
object
+ * @exception SOAPException if a SOAP error occurs.
+ * @exception UnsupportedOperationException if this is a SOAP 1.1 Header.
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPHeaderElement addNotUnderstoodHeaderElement(QName name)
+ throws SOAPException;
+
+ /**
+ * Creates a new Upgrade SOAPHeaderElement
object initialized
+ * with the specified List of supported SOAP URIs and adds it to this
+ * SOAPHeader
object.
+ * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
+ *
+ * @param supportedSOAPURIs an Iterator
object with the URIs of SOAP
+ * versions supported.
+ * @return the new SOAPHeaderElement
object that was
+ * inserted into this SOAPHeader
object
+ * @exception SOAPException if a SOAP error occurs.
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPHeaderElement addUpgradeHeaderElement(Iterator supportedSOAPURIs)
+ throws SOAPException;
+
+ /**
+ * Creates a new Upgrade SOAPHeaderElement
object initialized
+ * with the specified array of supported SOAP URIs and adds it to this
+ * SOAPHeader
object.
+ * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
+ *
+ * @param supportedSoapUris an array of the URIs of SOAP versions supported.
+ * @return the new SOAPHeaderElement
object that was
+ * inserted into this SOAPHeader
object
+ * @exception SOAPException if a SOAP error occurs.
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPHeaderElement addUpgradeHeaderElement(String[] supportedSoapUris)
+ throws SOAPException;
+
+ /**
+ * Creates a new Upgrade SOAPHeaderElement
object initialized
+ * with the specified supported SOAP URI and adds it to this
+ * SOAPHeader
object.
+ * This operation is supported on both SOAP 1.1 and SOAP 1.2 header.
+ *
+ * @param supportedSoapUri the URI of SOAP the version that is supported.
+ * @return the new SOAPHeaderElement
object that was
+ * inserted into this SOAPHeader
object
+ * @exception SOAPException if a SOAP error occurs.
+ * @since 1.6, SAAJ 1.3
+ */
+ public SOAPHeaderElement addUpgradeHeaderElement(String supportedSoapUri)
+ throws SOAPException;
+
+ /**
+ * Returns an Iterator
over all the SOAPHeaderElement
objects
+ * in this SOAPHeader
object.
+ *
+ * @return an Iterator
object over all the
+ * SOAPHeaderElement
objects contained by this
+ * SOAPHeader
+ * @see #extractAllHeaderElements
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public Iterator examineAllHeaderElements();
+
+ /**
+ * Returns an Iterator
over all the SOAPHeaderElement
objects
+ * in this SOAPHeader
object and detaches them
+ * from this SOAPHeader
object.
+ *
+ * @return an Iterator
object over all the
+ * SOAPHeaderElement
objects contained by this
+ * SOAPHeader
+ *
+ * @see #examineAllHeaderElements
+ *
+ * @since 1.6, SAAJ 1.2
+ */
+ public Iterator extractAllHeaderElements();
+
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeaderElement.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPHeaderElement.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * An object representing the contents in the SOAP header part of the
+ * SOAP envelope.
+ * The immediate children of a SOAPHeader
object can
+ * be represented only as SOAPHeaderElement
objects.
+ * SOAPHeaderElement
object can have other
+ * SOAPElement
objects as its children.
+ *
+ * @since 1.6
+ */
+public interface SOAPHeaderElement extends SOAPElement {
+
+ /**
+ * Sets the actor associated with this SOAPHeaderElement
+ * object to the specified actor. The default value of an actor is:
+ * SOAPConstants.URI_SOAP_ACTOR_NEXT
+ * SOAPHeaderElement
supports SOAP 1.2 then this call is
+ * equivalent to {@link #setRole(String)}
+ *
+ * @param actorURI a String
giving the URI of the actor
+ * to set
+ *
+ * @exception IllegalArgumentException if there is a problem in
+ * setting the actor.
+ *
+ * @see #getActor
+ */
+ public void setActor(String actorURI);
+
+ /**
+ * Sets the Role
associated with this SOAPHeaderElement
+ * object to the specified Role
.
+ *
+ * @param uri - the URI of the Role
+ *
+ * @throws SOAPException if there is an error in setting the role
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Role.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void setRole(String uri) throws SOAPException;
+
+ /**
+ * Returns the uri of the actor attribute of this
+ * SOAPHeaderElement
.
+ *SOAPHeaderElement
supports SOAP 1.2 then this call is
+ * equivalent to {@link #getRole()}
+ * @return a String
giving the URI of the actor
+ * @see #setActor
+ */
+ public String getActor();
+
+ /**
+ * Returns the value of the Role attribute of this
+ * SOAPHeaderElement
.
+ *
+ * @return a String
giving the URI of the Role
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Fault Role.
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public String getRole();
+
+ /**
+ * Sets the mustUnderstand attribute for this SOAPHeaderElement
+ * object to be either true or false.
+ * SOAPHeaderElement
must process it correctly. This
+ * ensures, for example, that if the SOAPHeaderElement
+ * object modifies the message, that the message is being modified correctly.
+ *
+ * @param mustUnderstand true
to set the mustUnderstand
+ * attribute to true; false
to set it to false
+ *
+ * @exception IllegalArgumentException if there is a problem in
+ * setting the mustUnderstand attribute
+ * @see #getMustUnderstand
+ * @see #setRelay
+ */
+ public void setMustUnderstand(boolean mustUnderstand);
+
+ /**
+ * Returns the boolean value of the mustUnderstand attribute for this
+ * SOAPHeaderElement
.
+ *
+ * @return true
if the mustUnderstand attribute of this
+ * SOAPHeaderElement
object is turned on; false
+ * otherwise
+ */
+ public boolean getMustUnderstand();
+
+ /**
+ * Sets the relay attribute for this SOAPHeaderElement
to be
+ * either true or false.
+ * false
.
+ *
+ * @param relay the new value of the relay attribute
+ *
+ * @exception SOAPException if there is a problem in setting the
+ * relay attribute.
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Relay attribute.
+ *
+ * @see #setMustUnderstand
+ * @see #getRelay
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public void setRelay(boolean relay) throws SOAPException;
+
+ /**
+ * Returns the boolean value of the relay attribute for this
+ * SOAPHeaderElement
+ *
+ * @return true
if the relay attribute is turned on;
+ * false
otherwise
+ *
+ * @exception UnsupportedOperationException if this message does not
+ * support the SOAP 1.2 concept of Relay attribute.
+ *
+ * @see #getMustUnderstand
+ * @see #setRelay
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public boolean getRelay();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPMessage.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,457 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+import java.io.OutputStream;
+import java.io.IOException;
+
+import java.util.Iterator;
+
+import javax.activation.DataHandler;
+
+/**
+ * The root class for all SOAP messages. As transmitted on the "wire", a SOAP
+ * message is an XML document or a MIME message whose first body part is an
+ * XML/SOAP document.
+ * SOAPMessage
object consists of a SOAP part and optionally
+ * one or more attachment parts. The SOAP part for a SOAPMessage
+ * object is a SOAPPart
object, which contains information used
+ * for message routing and identification, and which can contain
+ * application-specific content. All data in the SOAP Part of a message must be
+ * in XML format.
+ * SOAPMessage
object contains the following by default:
+ *
+ *
+ * The SOAP part of a message can be retrieved by calling the method SOAPPart
object
+ * SOAPEnvelope
object
+ * SOAPBody
object
+ * SOAPHeader
object
+ * SOAPMessage.getSOAPPart()
.
+ * The SOAPEnvelope
object is retrieved from the SOAPPart
+ * object, and the SOAPEnvelope
object is used to retrieve the
+ * SOAPBody
and SOAPHeader
objects.
+ *
+ *
+ * SOAPPart sp = message.getSOAPPart();
+ * SOAPEnvelope se = sp.getEnvelope();
+ * SOAPBody sb = se.getBody();
+ * SOAPHeader sh = se.getHeader();
+ *
+ *
+ * SOAPPart
object, a SOAPMessage
+ * object may contain zero or more AttachmentPart
objects, each
+ * of which contains application-specific data. The SOAPMessage
+ * interface provides methods for creating AttachmentPart
+ * objects and also for adding them to a SOAPMessage
object. A
+ * party that has received a SOAPMessage
object can examine its
+ * contents by retrieving individual attachment parts.
+ * AttachmentPart
object.
+ * MessageFactory
object may create SOAPMessage
+ * objects with behavior that is specialized to a particular implementation or
+ * application of SAAJ. For instance, a MessageFactory
object
+ * may produce SOAPMessage
objects that conform to a particular
+ * Profile such as ebXML. In this case a MessageFactory
object
+ * might produce SOAPMessage
objects that are initialized with
+ * ebXML headers.
+ * UnsupportedOperationException
+ * and the SAAJ implementation code must override them with methods that
+ * provide the specified behavior. Legacy client code does not have this
+ * restriction, however, so long as there is no claim made that it conforms to
+ * some later version of the specification than it was originally written for.
+ * A legacy class that extends the SOAPMessage class can be compiled and/or run
+ * against succeeding versions of the SAAJ API without modification. If such a
+ * class was correctly implemented then it will continue to behave correctly
+ * relative to the version of the specification against which it was written.
+ *
+ * @see MessageFactory
+ * @see AttachmentPart
+ * @since 1.6
+ */
+public abstract class SOAPMessage {
+ /**
+ * Specifies the character type encoding for the SOAP Message. Valid values
+ * include "utf-8" and "utf-16". See vendor documentation for additional
+ * supported values. The default is "utf-8".
+ *
+ * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
+ * @since 1.6, SAAJ 1.2
+ */
+ public static final String CHARACTER_SET_ENCODING =
+ "javax.xml.soap.character-set-encoding";
+
+ /**
+ * Specifies whether the SOAP Message will contain an XML declaration when
+ * it is sent. The only valid values are "true" and "false". The default is
+ * "false".
+ *
+ * @see SOAPMessage#setProperty(String, Object) SOAPMessage.setProperty
+ * @since 1.6, SAAJ 1.2
+ */
+ public static final String WRITE_XML_DECLARATION =
+ "javax.xml.soap.write-xml-declaration";
+
+ /**
+ * Sets the description of this SOAPMessage
object's
+ * content with the given description.
+ *
+ * @param description a String
describing the content of this
+ * message
+ * @see #getContentDescription
+ */
+ public abstract void setContentDescription(String description);
+
+ /**
+ * Retrieves a description of this SOAPMessage
object's
+ * content.
+ *
+ * @return a String
describing the content of this
+ * message or null
if no description has been set
+ * @see #setContentDescription
+ */
+ public abstract String getContentDescription();
+
+ /**
+ * Gets the SOAP part of this SOAPMessage
object.
+ * SOAPMessage
object contains one or more attachments, the
+ * SOAP Part must be the first MIME body part in the message.
+ *
+ * @return the SOAPPart
object for this SOAPMessage
+ * object
+ */
+ public abstract SOAPPart getSOAPPart();
+
+ /**
+ * Gets the SOAP Body contained in this SOAPMessage
object.
+ * SOAPBody
object contained by this SOAPMessage
+ * object
+ * @exception SOAPException
+ * if the SOAP Body does not exist or cannot be retrieved
+ * @since 1.6, SAAJ 1.2
+ */
+ public SOAPBody getSOAPBody() throws SOAPException {
+ throw new UnsupportedOperationException("getSOAPBody must be overridden by all subclasses of SOAPMessage");
+ }
+
+ /**
+ * Gets the SOAP Header contained in this SOAPMessage
+ * object.
+ * SOAPHeader
object contained by this SOAPMessage
+ * object
+ * @exception SOAPException
+ * if the SOAP Header does not exist or cannot be retrieved
+ * @since 1.6, SAAJ 1.2
+ */
+ public SOAPHeader getSOAPHeader() throws SOAPException {
+ throw new UnsupportedOperationException("getSOAPHeader must be overridden by all subclasses of SOAPMessage");
+ }
+
+ /**
+ * Removes all AttachmentPart
objects that have been added
+ * to this SOAPMessage
object.
+ * AttachmentPart
objects that are
+ * part of this SOAPMessage
object
+ */
+ public abstract int countAttachments();
+
+ /**
+ * Retrieves all the AttachmentPart
objects that are part of
+ * this SOAPMessage
object.
+ *
+ * @return an iterator over all the attachments in this message
+ */
+ public abstract Iterator getAttachments();
+
+ /**
+ * Retrieves all the AttachmentPart
objects that have header
+ * entries that match the specified headers. Note that a returned
+ * attachment could have headers in addition to those specified.
+ *
+ * @param headers
+ * a MimeHeaders
object containing the MIME
+ * headers for which to search
+ * @return an iterator over all attachments that have a header that matches
+ * one of the given headers
+ */
+ public abstract Iterator getAttachments(MimeHeaders headers);
+
+ /**
+ * Removes all the AttachmentPart
objects that have header
+ * entries that match the specified headers. Note that the removed
+ * attachment could have headers in addition to those specified.
+ *
+ * @param headers
+ * a MimeHeaders
object containing the MIME
+ * headers for which to search
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract void removeAttachments(MimeHeaders headers);
+
+
+ /**
+ * Returns an AttachmentPart
object that is associated with an
+ * attachment that is referenced by this SOAPElement
or
+ * null
if no such attachment exists. References can be made
+ * via an href
attribute as described in
+ * {@link SOAP Messages with Attachments},
+ * or via a single Text
child node containing a URI as
+ * described in the WS-I Attachments Profile 1.0 for elements of schema
+ * type {@link ref:swaRef}. These two mechanisms must be supported.
+ * The support for references via href
attribute also implies that
+ * this method should also be supported on an element that is an
+ * xop:Include element (
+ * {@link XOP}).
+ * other reference mechanisms may be supported by individual
+ * implementations of this standard. Contact your vendor for details.
+ *
+ * @param element The SOAPElement
containing the reference to an Attachment
+ * @return the referenced AttachmentPart
or null if no such
+ * AttachmentPart
exists or no reference can be
+ * found in this SOAPElement
.
+ * @throws SOAPException if there is an error in the attempt to access the
+ * attachment
+ *
+ * @since 1.6, SAAJ 1.3
+ */
+ public abstract AttachmentPart getAttachment(SOAPElement element) throws SOAPException;
+
+
+ /**
+ * Adds the given AttachmentPart
object to this SOAPMessage
+ * object. An AttachmentPart
object must be created before
+ * it can be added to a message.
+ *
+ * @param AttachmentPart
+ * an AttachmentPart
object that is to become part
+ * of this SOAPMessage
object
+ * @exception IllegalArgumentException
+ */
+ public abstract void addAttachmentPart(AttachmentPart AttachmentPart);
+
+ /**
+ * Creates a new empty AttachmentPart
object. Note that the
+ * method addAttachmentPart
must be called with this new
+ * AttachmentPart
object as the parameter in order for it to
+ * become an attachment to this SOAPMessage
object.
+ *
+ * @return a new AttachmentPart
object that can be populated
+ * and added to this SOAPMessage
object
+ */
+ public abstract AttachmentPart createAttachmentPart();
+
+ /**
+ * Creates an AttachmentPart
object and populates it using
+ * the given DataHandler
object.
+ *
+ * @param dataHandler
+ * the javax.activation.DataHandler
object that
+ * will generate the content for this SOAPMessage
+ * object
+ * @return a new AttachmentPart
object that contains data
+ * generated by the given DataHandler
object
+ * @exception IllegalArgumentException
+ * if there was a problem with the specified DataHandler
+ * object
+ * @see javax.activation.DataHandler
+ * @see javax.activation.DataContentHandler
+ */
+ public AttachmentPart createAttachmentPart(DataHandler dataHandler) {
+ AttachmentPart attachment = createAttachmentPart();
+ attachment.setDataHandler(dataHandler);
+ return attachment;
+ }
+
+ /**
+ * Returns all the transport-specific MIME headers for this SOAPMessage
+ * object in a transport-independent fashion.
+ *
+ * @return a MimeHeaders
object containing the MimeHeader
+ * objects
+ */
+ public abstract MimeHeaders getMimeHeaders();
+
+ /**
+ * Creates an AttachmentPart
object and populates it with
+ * the specified data of the specified content type. The type of the
+ * Object
should correspond to the value given for the
+ * Content-Type
.
+ *
+ * @param content
+ * an Object
containing the content for the
+ * AttachmentPart
object to be created
+ * @param contentType
+ * a String
object giving the type of content;
+ * examples are "text/xml", "text/plain", and "image/jpeg"
+ * @return a new AttachmentPart
object that contains the
+ * given data
+ * @exception IllegalArgumentException
+ * may be thrown if the contentType does not match the type
+ * of the content object, or if there was no
+ * DataContentHandler
object for the given
+ * content object
+ * @see javax.activation.DataHandler
+ * @see javax.activation.DataContentHandler
+ */
+ public AttachmentPart createAttachmentPart(
+ Object content,
+ String contentType) {
+ AttachmentPart attachment = createAttachmentPart();
+ attachment.setContent(content, contentType);
+ return attachment;
+ }
+
+ /**
+ * Updates this SOAPMessage
object with all the changes that
+ * have been made to it. This method is called automatically when
+ * {@link SOAPMessage#writeTo(OutputStream)} is called. However, if
+ * changes are made to a message that was received or to one that has
+ * already been sent, the method saveChanges
needs to be
+ * called explicitly in order to save the changes. The method saveChanges
+ * also generates any changes that can be read back (for example, a
+ * MessageId in profiles that support a message id). All MIME headers in a
+ * message that is created for sending purposes are guaranteed to have
+ * valid values only after saveChanges
has been called.
+ * AttachmentPart
objects are pulled into the
+ * message.
+ * SOAPException
if there was a problem saving
+ * changes to this message.
+ */
+ public abstract void saveChanges() throws SOAPException;
+
+ /**
+ * Indicates whether this SOAPMessage
object needs to have
+ * the method saveChanges
called on it.
+ *
+ * @return true
if saveChanges
needs to be
+ * called; false
otherwise.
+ */
+ public abstract boolean saveRequired();
+
+ /**
+ * Writes this SOAPMessage
object to the given output
+ * stream. The externalization format is as defined by the SOAP 1.1 with
+ * Attachments specification.
+ * writeTo
writes a
+ * MIME-encoded byte stream.
+ * OutputStream
object to which this SOAPMessage
+ * object will be written
+ * @exception IOException
+ * if an I/O error occurs
+ * @exception SOAPException
+ * if there was a problem in externalizing this SOAP message
+ */
+ public abstract void writeTo(OutputStream out)
+ throws SOAPException, IOException;
+
+ /**
+ * Associates the specified value with the specified property. If there was
+ * already a value associated with this property, the old value is
+ * replaced.
+ * WRITE_XML_DECLARATION
to "true"
+ * will cause an XML Declaration to be written out at the start of the SOAP
+ * message. The default value of "false" suppresses this declaration.
+ * CHARACTER_SET_ENCODING
defaults to the value
+ * "utf-8"
which causes the SOAP message to be encoded using
+ * UTF-8. Setting CHARACTER_SET_ENCODING
to "utf-16"
+ * causes the SOAP message to be encoded using UTF-16.
+ * null
+ * if no such property exists.
+ * @exception SOAPException
+ * if the property name is not recognized.
+ * @since 1.6, SAAJ 1.2
+ */
+ public Object getProperty(String property) throws SOAPException {
+ throw new UnsupportedOperationException("getProperty must be overridden by all subclasses of SOAPMessage");
+ }
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/SOAPPart.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+import java.util.Iterator;
+
+import javax.xml.transform.Source;
+
+/**
+ * The container for the SOAP-specific portion of a SOAPMessage
+ * object. All messages are required to have a SOAP part, so when a
+ * SOAPMessage
object is created, it will automatically
+ * have a SOAPPart
object.
+ *SOAPPart
object is a MIME part and has the MIME headers
+ * Content-Id, Content-Location, and Content-Type. Because the value of
+ * Content-Type must be "text/xml", a SOAPPart
object automatically
+ * has a MIME header of Content-Type with its value set to "text/xml".
+ * The value must be "text/xml" because content in the SOAP part of a
+ * message must be in XML format. Content that is not of type "text/xml"
+ * must be in an AttachmentPart
object rather than in the
+ * SOAPPart
object.
+ * SOAPPart
object of a
+ * SOAPMessage
object by
+ * calling the method SOAPMessage.getSOAPPart
. The
+ * following line of code, in which message
is a
+ * SOAPMessage
object, retrieves the SOAP part of a message.
+ *
+ * SOAPPart soapPart = message.getSOAPPart();
+ *
+ * SOAPPart
object contains a SOAPEnvelope
object,
+ * which in turn contains a SOAPBody
object and a
+ * SOAPHeader
object.
+ * The SOAPPart
method getEnvelope
can be used
+ * to retrieve the SOAPEnvelope
object.
+ * SOAPEnvelope
object associated with this
+ * SOAPPart
object. Once the SOAP envelope is obtained, it
+ * can be used to get its contents.
+ *
+ * @return the SOAPEnvelope
object for this
+ * SOAPPart
object
+ * @exception SOAPException if there is a SOAP error
+ */
+ public abstract SOAPEnvelope getEnvelope() throws SOAPException;
+
+ /**
+ * Retrieves the value of the MIME header whose name is "Content-Id".
+ *
+ * @return a String
giving the value of the MIME header
+ * named "Content-Id"
+ * @see #setContentId
+ */
+ public String getContentId() {
+ String[] values = getMimeHeader("Content-Id");
+ if (values != null && values.length > 0)
+ return values[0];
+ return null;
+ }
+
+ /**
+ * Retrieves the value of the MIME header whose name is "Content-Location".
+ *
+ * @return a String
giving the value of the MIME header whose
+ * name is "Content-Location"
+ * @see #setContentLocation
+ */
+ public String getContentLocation() {
+ String[] values = getMimeHeader("Content-Location");
+ if (values != null && values.length > 0)
+ return values[0];
+ return null;
+ }
+
+ /**
+ * Sets the value of the MIME header named "Content-Id"
+ * to the given String
.
+ *
+ * @param contentId a String
giving the value of the MIME
+ * header "Content-Id"
+ *
+ * @exception IllegalArgumentException if there is a problem in
+ * setting the content id
+ * @see #getContentId
+ */
+ public void setContentId(String contentId)
+ {
+ setMimeHeader("Content-Id", contentId);
+ }
+ /**
+ * Sets the value of the MIME header "Content-Location"
+ * to the given String
.
+ *
+ * @param contentLocation a String
giving the value
+ * of the MIME
+ * header "Content-Location"
+ * @exception IllegalArgumentException if there is a problem in
+ * setting the content location.
+ * @see #getContentLocation
+ */
+ public void setContentLocation(String contentLocation)
+ {
+ setMimeHeader("Content-Location", contentLocation);
+ }
+ /**
+ * Removes all MIME headers that match the given name.
+ *
+ * @param header a String
giving the name of the MIME header(s) to
+ * be removed
+ */
+ public abstract void removeMimeHeader(String header);
+
+ /**
+ * Removes all the MimeHeader
objects for this
+ * SOAPEnvelope
object.
+ */
+ public abstract void removeAllMimeHeaders();
+
+ /**
+ * Gets all the values of the MimeHeader
object
+ * in this SOAPPart
object that
+ * is identified by the given String
.
+ *
+ * @param name the name of the header; example: "Content-Type"
+ * @return a String
array giving all the values for the
+ * specified header
+ * @see #setMimeHeader
+ */
+ public abstract String[] getMimeHeader(String name);
+
+ /**
+ * Changes the first header entry that matches the given header name
+ * so that its value is the given value, adding a new header with the
+ * given name and value if no
+ * existing header is a match. If there is a match, this method clears
+ * all existing values for the first header that matches and sets the
+ * given value instead. If more than one header has
+ * the given name, this method removes all of the matching headers after
+ * the first one.
+ * String
giving the header name
+ * for which to search
+ * @param value a String
giving the value to be set.
+ * This value will be substituted for the current value(s)
+ * of the first header that is a match if there is one.
+ * If there is no match, this value will be the value for
+ * a new MimeHeader
object.
+ *
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified mime header name or value
+ * @see #getMimeHeader
+ */
+ public abstract void setMimeHeader(String name, String value);
+
+ /**
+ * Creates a MimeHeader
object with the specified
+ * name and value and adds it to this SOAPPart
object.
+ * If a MimeHeader
with the specified name already
+ * exists, this method adds the specified value to the already
+ * existing value(s).
+ * String
giving the header name
+ * @param value a String
giving the value to be set
+ * or added
+ * @exception IllegalArgumentException if there was a problem with
+ * the specified mime header name or value
+ */
+ public abstract void addMimeHeader(String name, String value);
+
+ /**
+ * Retrieves all the headers for this SOAPPart
object
+ * as an iterator over the MimeHeader
objects.
+ *
+ * @return an Iterator
object with all of the Mime
+ * headers for this SOAPPart
object
+ */
+ public abstract Iterator getAllMimeHeaders();
+
+ /**
+ * Retrieves all MimeHeader
objects that match a name in
+ * the given array.
+ *
+ * @param names a String
array with the name(s) of the
+ * MIME headers to be returned
+ * @return all of the MIME headers that match one of the names in the
+ * given array, returned as an Iterator
object
+ */
+ public abstract Iterator getMatchingMimeHeaders(String[] names);
+
+ /**
+ * Retrieves all MimeHeader
objects whose name does
+ * not match a name in the given array.
+ *
+ * @param names a String
array with the name(s) of the
+ * MIME headers not to be returned
+ * @return all of the MIME headers in this SOAPPart
object
+ * except those that match one of the names in the
+ * given array. The nonmatching MIME headers are returned as an
+ * Iterator
object.
+ */
+ public abstract Iterator getNonMatchingMimeHeaders(String[] names);
+
+ /**
+ * Sets the content of the SOAPEnvelope
object with the data
+ * from the given Source
object. This Source
+ * must contain a valid SOAP document.
+ *
+ * @param source the javax.xml.transform.Source
object with the
+ * data to be set
+ *
+ * @exception SOAPException if there is a problem in setting the source
+ * @see #getContent
+ */
+ public abstract void setContent(Source source) throws SOAPException;
+
+ /**
+ * Returns the content of the SOAPEnvelope as a JAXP Source
+ * object.
+ *
+ * @return the content as a javax.xml.transform.Source
object
+ *
+ * @exception SOAPException if the implementation cannot convert
+ * the specified Source
object
+ * @see #setContent
+ */
+ public abstract Source getContent() throws SOAPException;
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Text.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/Text.java Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.xml.soap;
+
+/**
+ * A representation of a node whose value is text. A Text
object
+ * may represent text that is content or text that is a comment.
+ *
+ * @since 1.6
+ */
+public interface Text extends Node, org.w3c.dom.Text {
+
+ /**
+ * Retrieves whether this Text
object represents a comment.
+ *
+ * @return true
if this Text
object is a
+ * comment; false
otherwise
+ */
+ public boolean isComment();
+}
diff -r cb15fc6cc038 -r 9a2e5d103695 jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/java.xml.ws/share/classes/javax/xml/soap/package.html Sun Jan 18 11:50:10 2015 -0800
@@ -0,0 +1,92 @@
+
+
+
+
+javax.xml.soap
package allows you to do the
+ following:
+
+
+javax.xml.soap
package extend
+their counterparts in the org.w3c.dom
package. This means that
+the SOAPPart
of a SOAPMessage
is also a DOM Level
+2 Document
, and can be manipulated as such by applications,
+tools and libraries that use DOM (see http://www.w3.org/DOM/ for more information).
+It is important to note that, while it is possible to use DOM APIs to add
+ordinary DOM nodes to a SAAJ tree, the SAAJ APIs are still required to return
+SAAJ types when examining or manipulating the tree. In order to accomplish
+this the SAAJ APIs (specifically {@link javax.xml.soap.SOAPElement#getChildElements()})
+are allowed to silently replace objects that are incorrectly typed relative
+to SAAJ requirements with equivalent objects of the required type. These
+replacements must never cause the logical structure of the tree to change,
+so from the perspective of the DOM APIs the tree will remain unchanged. However,
+the physical composition of the tree will have changed so that references
+to the nodes that were replaced will refer to nodes that are no longer a
+part of the tree. The SAAJ APIs are not allowed to make these replacements
+if they are not required so the replacement objects will never subsequently
+be silently replaced by future calls to the SAAJ API.
+
+
+
+
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/.hgtags
--- a/jdk/.hgtags Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/.hgtags Sun Jan 18 11:50:10 2015 -0800
@@ -287,3 +287,4 @@
6b2314173433467245261364a52fb8e347fe6342 jdk9-b42
8c6ad41974f9ab6c33d544b088648314963f2a50 jdk9-b43
8cc4dc300041eb70a7a40e4b2431a8f4d4965ea4 jdk9-b44
+9acaa4f57b0b9e3757a7b4576ca9418a75ea8287 jdk9-b45
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/make/lib/LibCommon.gmk
--- a/jdk/make/lib/LibCommon.gmk Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/make/lib/LibCommon.gmk Sun Jan 18 11:50:10 2015 -0800
@@ -53,24 +53,21 @@
# Find the default set of src dirs for a native library.
# Param 1 - module name
# Param 2 - library name
-define FindSrcDirsForLib
+FindSrcDirsForLib = \
$(call uniq, $(wildcard \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_TYPE)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
-endef
################################################################################
# Find lib dir for module
# Param 1 - module name
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
- define FindLibDirForModule
- $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
- endef
+ FindLibDirForModule = \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
else
- define FindLibDirForModule
- $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
- endef
+ FindLibDirForModule = \
+ $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
endif
################################################################################
@@ -78,11 +75,10 @@
# Param 1 - module name
# Param 2 - library name
# Param 3 - subdir for library
-define FindLib
-$(strip \
- $(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) \
-)
-endef
+FindLib = \
+ $(call FindLibDirForModule, \
+ $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
+
################################################################################
# Define the header include flags needed to compile against it.
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/java/io/BufferedWriter.java
--- a/jdk/src/java.base/share/classes/java/io/BufferedWriter.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/io/BufferedWriter.java Sun Jan 18 11:50:10 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,12 +73,6 @@
private static int defaultCharBufferSize = 8192;
/**
- * Line separator string. This is the value of the line.separator
- * property at the moment that the stream was created.
- */
- private String lineSeparator;
-
- /**
* Creates a buffered character-output stream that uses a default-sized
* output buffer.
*
@@ -105,9 +99,6 @@
cb = new char[sz];
nChars = sz;
nextChar = 0;
-
- lineSeparator = java.security.AccessController.doPrivileged(
- new sun.security.action.GetPropertyAction("line.separator"));
}
/** Checks to make sure that the stream has not been closed */
@@ -240,7 +231,7 @@
* @exception IOException If an I/O error occurs
*/
public void newLine() throws IOException {
- write(lineSeparator);
+ write(System.lineSeparator());
}
/**
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/java/io/PrintWriter.java
--- a/jdk/src/java.base/share/classes/java/io/PrintWriter.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/io/PrintWriter.java Sun Jan 18 11:50:10 2015 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -69,12 +69,6 @@
private PrintStream psOut = null;
/**
- * Line separator string. This is the value of the line.separator
- * property at the moment that the stream was created.
- */
- private final String lineSeparator;
-
- /**
* Returns a charset object for the given charset name.
* @throws NullPointerException is csn is null
* @throws UnsupportedEncodingException if the charset is not supported
@@ -113,8 +107,6 @@
super(out);
this.out = out;
this.autoFlush = autoFlush;
- lineSeparator = java.security.AccessController.doPrivileged(
- new sun.security.action.GetPropertyAction("line.separator"));
}
/**
@@ -477,7 +469,7 @@
try {
synchronized (lock) {
ensureOpen();
- out.write(lineSeparator);
+ out.write(System.lineSeparator());
if (autoFlush)
out.flush();
}
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/java/lang/String.java
--- a/jdk/src/java.base/share/classes/java/lang/String.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/lang/String.java Sun Jan 18 11:50:10 2015 -0800
@@ -135,7 +135,7 @@
* unnecessary since Strings are immutable.
*/
public String() {
- this.value = new char[0];
+ this.value = "".value;
}
/**
@@ -175,7 +175,7 @@
* not affect the newly created string.
*
* @param value
- * Array that is the source of characters
+ * Array that is the source of characters
*
* @param offset
* The initial offset
@@ -191,8 +191,14 @@
if (offset < 0) {
throw new StringIndexOutOfBoundsException(offset);
}
- if (count < 0) {
- throw new StringIndexOutOfBoundsException(count);
+ if (count <= 0) {
+ if (count < 0) {
+ throw new StringIndexOutOfBoundsException(count);
+ }
+ if (offset <= value.length) {
+ this.value = "".value;
+ return;
+ }
}
// Note: offset or count might be near -1>>>1.
if (offset > value.length - count) {
@@ -233,8 +239,14 @@
if (offset < 0) {
throw new StringIndexOutOfBoundsException(offset);
}
- if (count < 0) {
- throw new StringIndexOutOfBoundsException(count);
+ if (count <= 0) {
+ if (count < 0) {
+ throw new StringIndexOutOfBoundsException(count);
+ }
+ if (offset <= codePoints.length) {
+ this.value = "".value;
+ return;
+ }
}
// Note: offset or count might be near -1>>>1.
if (offset > codePoints.length - count) {
@@ -246,11 +258,11 @@
// Pass 1: Compute precise size of char[]
int n = count;
for (int i = offset; i < end; i++) {
- int c = codePoints[i];
- if (Character.isBmpCodePoint(c))
- continue;
- else if (Character.isValidCodePoint(c))
- n++;
+ int c = codePoints[i];
+ if (Character.isBmpCodePoint(c))
+ continue;
+ else if (Character.isValidCodePoint(c))
+ n++;
else throw new IllegalArgumentException(Integer.toString(c));
}
@@ -783,7 +795,7 @@
* subarray of {@code dst} starting at index {@code dstBegin}
* and ending at index:
*
*
* @param srcBegin index of the first character in the string
@@ -828,7 +840,7 @@
* dst} starting at index {@code dstBegin} and ending at index:
*
*
- * dstbegin + (srcEnd-srcBegin) - 1
+ * dstBegin + (srcEnd-srcBegin) - 1
*
*
* @deprecated This method does not properly convert characters into
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/java/math/BigInteger.java
--- a/jdk/src/java.base/share/classes/java/math/BigInteger.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/math/BigInteger.java Sun Jan 18 11:50:10 2015 -0800
@@ -265,24 +265,41 @@
// Constructors
/**
- * Translates a byte array containing the two's-complement binary
- * representation of a BigInteger into a BigInteger. The input array is
+ * Translates a byte sub-array containing the two's-complement binary
+ * representation of a BigInteger into a BigInteger. The sub-array is
+ * specified via an offset into the array and a length. The sub-array is
* assumed to be in big-endian byte-order: the most significant
- * byte is in the zeroth element.
+ * byte is the element at index {@code off}. The {@code val} array is
+ * assumed to be unchanged for the duration of the constructor call.
*
- * @param val big-endian two's-complement binary representation of
- * BigInteger.
+ * An {@code IndexOutOfBoundsException} is thrown if the length of the array
+ * {@code val} is non-zero and either {@code off} is negative, {@code len}
+ * is negative, or {@code off+len} is greater than the length of
+ * {@code val}.
+ *
+ * @param val byte array containing a sub-array which is the big-endian
+ * two's-complement binary representation of a BigInteger.
+ * @param off the start offset of the binary representation.
+ * @param len the number of bytes to use.
* @throws NumberFormatException {@code val} is zero bytes long.
+ * @throws IndexOutOfBoundsException if the provided array offset and
+ * length would cause an index into the byte array to be
+ * negative or greater than or equal to the array length.
+ * @since 1.9
*/
- public BigInteger(byte[] val) {
- if (val.length == 0)
+ public BigInteger(byte[] val, int off, int len) {
+ if (val.length == 0) {
throw new NumberFormatException("Zero length BigInteger");
-
- if (val[0] < 0) {
- mag = makePositive(val);
+ } else if ((off < 0) || (off >= val.length) || (len < 0) ||
+ (len > val.length - off)) { // 0 <= off < val.length
+ throw new IndexOutOfBoundsException();
+ }
+
+ if (val[off] < 0) {
+ mag = makePositive(val, off, len);
signum = -1;
} else {
- mag = stripLeadingZeroBytes(val);
+ mag = stripLeadingZeroBytes(val, off, len);
signum = (mag.length == 0 ? 0 : 1);
}
if (mag.length >= MAX_MAG_LENGTH) {
@@ -291,10 +308,27 @@
}
/**
+ * Translates a byte array containing the two's-complement binary
+ * representation of a BigInteger into a BigInteger. The input array is
+ * assumed to be in big-endian byte-order: the most significant
+ * byte is in the zeroth element. The {@code val} array is assumed to be
+ * unchanged for the duration of the constructor call.
+ *
+ * @param val big-endian two's-complement binary representation of a
+ * BigInteger.
+ * @throws NumberFormatException {@code val} is zero bytes long.
+ */
+ public BigInteger(byte[] val) {
+ this(val, 0, val.length);
+ }
+
+ /**
* This private constructor translates an int array containing the
* two's-complement binary representation of a BigInteger into a
* BigInteger. The input array is assumed to be in big-endian
- * int-order: the most significant int is in the zeroth element.
+ * int-order: the most significant int is in the zeroth element. The
+ * {@code val} array is assumed to be unchanged for the duration of
+ * the constructor call.
*/
private BigInteger(int[] val) {
if (val.length == 0)
@@ -315,24 +349,44 @@
/**
* Translates the sign-magnitude representation of a BigInteger into a
* BigInteger. The sign is represented as an integer signum value: -1 for
- * negative, 0 for zero, or 1 for positive. The magnitude is a byte array
- * in big-endian byte-order: the most significant byte is in the
- * zeroth element. A zero-length magnitude array is permissible, and will
- * result in a BigInteger value of 0, whether signum is -1, 0 or 1.
+ * negative, 0 for zero, or 1 for positive. The magnitude is a sub-array of
+ * a byte array in big-endian byte-order: the most significant byte
+ * is the element at index {@code off}. A zero value of the length
+ * {@code len} is permissible, and will result in a BigInteger value of 0,
+ * whether signum is -1, 0 or 1. The {@code magnitude} array is assumed to
+ * be unchanged for the duration of the constructor call.
+ *
+ * An {@code IndexOutOfBoundsException} is thrown if the length of the array
+ * {@code magnitude} is non-zero and either {@code off} is negative,
+ * {@code len} is negative, or {@code off+len} is greater than the length of
+ * {@code magnitude}.
*
* @param signum signum of the number (-1 for negative, 0 for zero, 1
* for positive).
* @param magnitude big-endian binary representation of the magnitude of
* the number.
+ * @param off the start offset of the binary representation.
+ * @param len the number of bytes to use.
* @throws NumberFormatException {@code signum} is not one of the three
* legal values (-1, 0, and 1), or {@code signum} is 0 and
* {@code magnitude} contains one or more non-zero bytes.
+ * @throws IndexOutOfBoundsException if the provided array offset and
+ * length would cause an index into the byte array to be
+ * negative or greater than or equal to the array length.
+ * @since 1.9
*/
- public BigInteger(int signum, byte[] magnitude) {
- this.mag = stripLeadingZeroBytes(magnitude);
-
- if (signum < -1 || signum > 1)
+ public BigInteger(int signum, byte[] magnitude, int off, int len) {
+ if (signum < -1 || signum > 1) {
throw(new NumberFormatException("Invalid signum value"));
+ } else if ((off < 0) || (len < 0) ||
+ (len > 0 &&
+ ((off >= magnitude.length) ||
+ (len > magnitude.length - off)))) { // 0 <= off < magnitude.length
+ throw new IndexOutOfBoundsException();
+ }
+
+ // stripLeadingZeroBytes() returns a zero length array if len == 0
+ this.mag = stripLeadingZeroBytes(magnitude, off, len);
if (this.mag.length == 0) {
this.signum = 0;
@@ -347,10 +401,33 @@
}
/**
+ * Translates the sign-magnitude representation of a BigInteger into a
+ * BigInteger. The sign is represented as an integer signum value: -1 for
+ * negative, 0 for zero, or 1 for positive. The magnitude is a byte array
+ * in big-endian byte-order: the most significant byte is the
+ * zeroth element. A zero-length magnitude array is permissible, and will
+ * result in a BigInteger value of 0, whether signum is -1, 0 or 1. The
+ * {@code magnitude} array is assumed to be unchanged for the duration of
+ * the constructor call.
+ *
+ * @param signum signum of the number (-1 for negative, 0 for zero, 1
+ * for positive).
+ * @param magnitude big-endian binary representation of the magnitude of
+ * the number.
+ * @throws NumberFormatException {@code signum} is not one of the three
+ * legal values (-1, 0, and 1), or {@code signum} is 0 and
+ * {@code magnitude} contains one or more non-zero bytes.
+ */
+ public BigInteger(int signum, byte[] magnitude) {
+ this(signum, magnitude, 0, magnitude.length);
+ }
+
+ /**
* A constructor for internal use that translates the sign-magnitude
* representation of a BigInteger into a BigInteger. It checks the
* arguments and copies the magnitude so this constructor would be
- * safe for external use.
+ * safe for external use. The {@code magnitude} array is assumed to be
+ * unchanged for the duration of the constructor call.
*/
private BigInteger(int signum, int[] magnitude) {
this.mag = stripLeadingZeroInts(magnitude);
@@ -467,7 +544,9 @@
/*
* Constructs a new BigInteger using a char array with radix=10.
- * Sign is precalculated outside and not allowed in the val.
+ * Sign is precalculated outside and not allowed in the val. The {@code val}
+ * array is assumed to be unchanged for the duration of the constructor
+ * call.
*/
BigInteger(char[] val, int sign, int len) {
int cursor = 0, numDigits;
@@ -1035,11 +1114,12 @@
/**
* This private constructor is for internal use and assumes that its
- * arguments are correct.
+ * arguments are correct. The {@code magnitude} array is assumed to be
+ * unchanged for the duration of the constructor call.
*/
private BigInteger(byte[] magnitude, int signum) {
this.signum = (magnitude.length == 0 ? 0 : signum);
- this.mag = stripLeadingZeroBytes(magnitude);
+ this.mag = stripLeadingZeroBytes(magnitude, 0, magnitude.length);
if (mag.length >= MAX_MAG_LENGTH) {
checkRange();
}
@@ -3977,18 +4057,18 @@
/**
* Returns a copy of the input array stripped of any leading zero bytes.
*/
- private static int[] stripLeadingZeroBytes(byte a[]) {
- int byteLength = a.length;
+ private static int[] stripLeadingZeroBytes(byte a[], int off, int len) {
+ int indexBound = off + len;
int keep;
// Find first nonzero byte
- for (keep = 0; keep < byteLength && a[keep] == 0; keep++)
+ for (keep = off; keep < indexBound && a[keep] == 0; keep++)
;
// Allocate new array and copy relevant part of input array
- int intLength = ((byteLength - keep) + 3) >>> 2;
+ int intLength = ((indexBound - keep) + 3) >>> 2;
int[] result = new int[intLength];
- int b = byteLength - 1;
+ int b = indexBound - 1;
for (int i = intLength-1; i >= 0; i--) {
result[i] = a[b--] & 0xff;
int bytesRemaining = b - keep + 1;
@@ -4003,27 +4083,27 @@
* Takes an array a representing a negative 2's-complement number and
* returns the minimal (no leading zero bytes) unsigned whose value is -a.
*/
- private static int[] makePositive(byte a[]) {
+ private static int[] makePositive(byte a[], int off, int len) {
int keep, k;
- int byteLength = a.length;
+ int indexBound = off + len;
// Find first non-sign (0xff) byte of input
- for (keep=0; keep < byteLength && a[keep] == -1; keep++)
+ for (keep=off; keep < indexBound && a[keep] == -1; keep++)
;
/* Allocate output array. If all non-sign bytes are 0x00, we must
* allocate space for one extra output byte. */
- for (k=keep; k < byteLength && a[k] == 0; k++)
+ for (k=keep; k < indexBound && a[k] == 0; k++)
;
- int extraByte = (k == byteLength) ? 1 : 0;
- int intLength = ((byteLength - keep + extraByte) + 3) >>> 2;
+ int extraByte = (k == indexBound) ? 1 : 0;
+ int intLength = ((indexBound - keep + extraByte) + 3) >>> 2;
int result[] = new int[intLength];
/* Copy one's complement of input into output, leaving extra
* byte (if it exists) == 0x00 */
- int b = byteLength - 1;
+ int b = indexBound - 1;
for (int i = intLength-1; i >= 0; i--) {
result[i] = a[b--] & 0xff;
int numBytesToTransfer = Math.min(3, b-keep+1);
@@ -4248,7 +4328,7 @@
message = "BigInteger: Signum not present in stream";
throw new java.io.StreamCorruptedException(message);
}
- int[] mag = stripLeadingZeroBytes(magnitude);
+ int[] mag = stripLeadingZeroBytes(magnitude, 0, magnitude.length);
if ((mag.length == 0) != (sign == 0)) {
String message = "BigInteger: signum-magnitude mismatch";
if (fields.defaulted("magnitude"))
diff -r cb15fc6cc038 -r 9a2e5d103695 jdk/src/java.base/share/classes/java/util/stream/Collectors.java
--- a/jdk/src/java.base/share/classes/java/util/stream/Collectors.java Thu Jan 15 11:18:14 2015 +0100
+++ b/jdk/src/java.base/share/classes/java/util/stream/Collectors.java Sun Jan 18 11:50:10 2015 -0800
@@ -990,7 +990,7 @@
* function.
*
*
- * dstbegin + (srcEnd-srcBegin) - 1
+ * dstBegin + (srcEnd-srcBegin) - 1
*
{@code
@@ -1143,7 +1146,8 @@
* {@code Map
> normalizeTypes(int idx, List
> buf = new ArrayList<>();
+ for (MessageType alternative : head.accept(normalizeVisitor, null)) {
+ for (List
, Void> normalizeVisitor = new Visitor
, Void>() {
+ @Override
+ public List
* JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
@@ -110,7 +113,7 @@
*