Fri, 11 Oct 2013 00:07:42 -0700
Merge
1.1 --- a/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java Thu Oct 10 10:09:16 2013 -0700 1.2 +++ b/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java Fri Oct 11 00:07:42 2013 -0700 1.3 @@ -88,9 +88,9 @@ 1.4 return ID; 1.5 } 1.6 1.7 - public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableSecureXmlProcessing) { 1.8 + public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableXmlSecurity) { 1.9 if (reader != null && enabled) return reader; 1.10 - return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableSecureXmlProcessing) : null; 1.11 + return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableXmlSecurity) : null; 1.12 } 1.13 1.14 @Override
2.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties Thu Oct 10 10:09:16 2013 -0700 2.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties Fri Oct 11 00:07:42 2013 -0700 2.3 @@ -30,10 +30,10 @@ 2.4 Non-existent directory: {0} 2.5 2.6 VERSION = \ 2.7 - schemagen 2.2.8-b20130806.1801 2.8 + schemagen 2.2.8-b130911.1802 2.9 2.10 FULLVERSION = \ 2.11 - schemagen full version "2.2.8-b20130806.1801" 2.12 + schemagen full version "2.2.8-b130911.1802" 2.13 2.14 USAGE = \ 2.15 Usage: schemagen [-options ...] <java files> \n\
3.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties Thu Oct 10 10:09:16 2013 -0700 3.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties Fri Oct 11 00:07:42 2013 -0700 3.3 @@ -27,8 +27,8 @@ 3.4 3.5 BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0} 3.6 3.7 -VERSION = schemagen 2.2.8-b20130806.1801 3.8 +VERSION = schemagen 2.2.8-b130911.1802 3.9 3.10 -FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b20130806.1801" 3.11 +FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b130911.1802" 3.12 3.13 USAGE = Verwendung: schemagen [-options ...] <java files> \nOptionen: \n\\ \\ \\ \\ -d <path> : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp <path> : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath <path> : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding <encoding> : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode <file> : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an
4.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties Thu Oct 10 10:09:16 2013 -0700 4.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties Fri Oct 11 00:07:42 2013 -0700 4.3 @@ -27,8 +27,8 @@ 4.4 4.5 BASEDIR_DOESNT_EXIST = Directorio no existente: {0} 4.6 4.7 -VERSION = schemagen 2.2.8-b20130806.1801 4.8 +VERSION = schemagen 2.2.8-b130911.1802 4.9 4.10 -FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b20130806.1801" 4.11 +FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b130911.1802" 4.12 4.13 USAGE = Sintaxis: schemagen [-options ...] <archivos java> \nOpciones: \n\\ \\ \\ \\ -d <ruta de acceso> : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp <ruta de acceso> : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding <codificaci\u00F3n> : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode <archivo> : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis
5.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties Thu Oct 10 10:09:16 2013 -0700 5.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties Fri Oct 11 00:07:42 2013 -0700 5.3 @@ -27,8 +27,8 @@ 5.4 5.5 BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant 5.6 5.7 -VERSION = schemagen 2.2.8-b20130806.1801 5.8 +VERSION = schemagen 2.2.8-b130911.1802 5.9 5.10 -FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b20130806.1801" 5.11 +FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b130911.1802" 5.12 5.13 USAGE = Syntaxe : schemagen [-options ...] <java files> \nOptions : \n\ \ \ \ -d <path> : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath <path> : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding <encoding> : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode <file> : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe
6.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties Thu Oct 10 10:09:16 2013 -0700 6.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties Fri Oct 11 00:07:42 2013 -0700 6.3 @@ -27,8 +27,8 @@ 6.4 6.5 BASEDIR_DOESNT_EXIST = Directory non esistente: {0} 6.6 6.7 -VERSION = schemagen 2.2.8-b20130806.1801 6.8 +VERSION = schemagen 2.2.8-b130911.1802 6.9 6.10 -FULLVERSION = versione completa schemagen "2.2.8-b20130806.1801" 6.11 +FULLVERSION = versione completa schemagen "2.2.8-b130911.1802" 6.12 6.13 USAGE = Uso: schemagen [-options ...] <java files> \nOpzioni: \n\ \ \ \ -d <path> : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp <path> : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath <path> : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding <encoding> : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode <file> : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso
7.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties Thu Oct 10 10:09:16 2013 -0700 7.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties Fri Oct 11 00:07:42 2013 -0700 7.3 @@ -27,8 +27,8 @@ 7.4 7.5 BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} 7.6 7.7 -VERSION = schemagen 2.2.8-b20130806.1801 7.8 +VERSION = schemagen 2.2.8-b130911.1802 7.9 7.10 -FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801" 7.11 +FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802" 7.12 7.13 USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] <java files> \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d <path> : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp <path> : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath <path> : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding <encoding> : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode <file> : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059
8.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties Thu Oct 10 10:09:16 2013 -0700 8.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties Fri Oct 11 00:07:42 2013 -0700 8.3 @@ -27,8 +27,8 @@ 8.4 8.5 BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0} 8.6 8.7 -VERSION = schemagen 2.2.8-b20130806.1801 8.8 +VERSION = schemagen 2.2.8-b130911.1802 8.9 8.10 -FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801" 8.11 +FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802" 8.12 8.13 USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] <java files> \n\uC635\uC158: \n\ \ \ \ -d <path> : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp <path> : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath <path> : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding <encoding> : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode <file> : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.
9.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties Thu Oct 10 10:09:16 2013 -0700 9.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties Fri Oct 11 00:07:42 2013 -0700 9.3 @@ -27,8 +27,8 @@ 9.4 9.5 BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0} 9.6 9.7 -VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b20130806.1801 9.8 +VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b130911.1802 9.9 9.10 -FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b20130806.1801" 9.11 +FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b130911.1802" 9.12 9.13 USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] <java files> \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d <path> : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp <path> : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath <path> : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding <encoding> : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode <file> : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso
10.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties Thu Oct 10 10:09:16 2013 -0700 10.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties Fri Oct 11 00:07:42 2013 -0700 10.3 @@ -27,8 +27,8 @@ 10.4 10.5 BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0} 10.6 10.7 -VERSION = schemagen 2.2.8-b20130806.1801 10.8 +VERSION = schemagen 2.2.8-b130911.1802 10.9 10.10 -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801" 10.11 +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802" 10.12 10.13 USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9009\u9879: \n\ \ \ \ -d <path> : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp <path> : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath <path> : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding <encoding> : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode <file> : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F
11.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties Thu Oct 10 10:09:16 2013 -0700 11.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties Fri Oct 11 00:07:42 2013 -0700 11.3 @@ -27,8 +27,8 @@ 11.4 11.5 BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0} 11.6 11.7 -VERSION = schemagen 2.2.8-b20130806.1801 11.8 +VERSION = schemagen 2.2.8-b130911.1802 11.9 11.10 -FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801" 11.11 +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802" 11.12 11.13 USAGE = \u7528\u6CD5: schemagen [-options ...] <java files> \n\u9078\u9805: \n\\ \\ \\ \\ -d <path> : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp <path> : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath <path> : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding <encoding> : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode <file> : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F
12.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Thu Oct 10 10:09:16 2013 -0700 12.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java Fri Oct 11 00:07:42 2013 -0700 12.3 @@ -269,6 +269,20 @@ 12.4 return localizer.localize(localizableWSIMPORT_USAGE(arg0)); 12.5 } 12.6 12.7 + public static Localizable localizableWSGEN_USAGE_EXTENSIONS() { 12.8 + return messageFactory.getMessage("wsgen.usage.extensions"); 12.9 + } 12.10 + 12.11 + /** 12.12 + * 12.13 + * Extensions: 12.14 + * -Xnocompile do not compile generated Java files 12.15 + * 12.16 + */ 12.17 + public static String WSGEN_USAGE_EXTENSIONS() { 12.18 + return localizer.localize(localizableWSGEN_USAGE_EXTENSIONS()); 12.19 + } 12.20 + 12.21 public static Localizable localizablePLEASE() { 12.22 return messageFactory.getMessage("Please"); 12.23 } 12.24 @@ -283,6 +297,19 @@ 12.25 return localizer.localize(localizablePLEASE()); 12.26 } 12.27 12.28 + public static Localizable localizableWSCOMPILE_EXISTING_OPTION(Object arg0) { 12.29 + return messageFactory.getMessage("wscompile.existingOption", arg0); 12.30 + } 12.31 + 12.32 + /** 12.33 + * Ignoring already defined option {0} 12.34 + * 12.35 + * 12.36 + */ 12.37 + public static String WSCOMPILE_EXISTING_OPTION(Object arg0) { 12.38 + return localizer.localize(localizableWSCOMPILE_EXISTING_OPTION(arg0)); 12.39 + } 12.40 + 12.41 public static Localizable localizableWSIMPORT_PARSING_WSDL() { 12.42 return messageFactory.getMessage("wsimport.ParsingWSDL"); 12.43 } 12.44 @@ -323,6 +350,8 @@ 12.45 * -B<jaxbOption> Pass this option to JAXB schema compiler 12.46 * -catalog <file> specify catalog file to resolve external entity references 12.47 * supports TR9401, XCatalog, and OASIS XML Catalog format. 12.48 + * -classpath <path> specify where to find user class files and wsimport extensions 12.49 + * -cp <path> specify where to find user class files and wsimport extensions 12.50 * -d <directory> specify where to place generated output files 12.51 * -encoding <encoding> specify character encoding used by source files 12.52 * -extension allow vendor extensions - functionality not specified 12.53 @@ -332,6 +361,7 @@ 12.54 * -help display help 12.55 * -httpproxy:<proxy> set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort 12.56 * (port defaults to 8080) 12.57 + * -J<javacOption> pass this option to javac 12.58 * -keep keep generated files 12.59 * -p <pkg> specifies the target package 12.60 * -quiet suppress wsimport output 12.61 @@ -343,7 +373,7 @@ 12.62 * -version print version information 12.63 * -fullversion print full version information 12.64 * -wsdllocation <location> @WebServiceClient.wsdlLocation value 12.65 - * -clientjar <jarfile> Creates the jar file of the generated artifacts along with the 12.66 + * -clientjar <jarfile> creates the jar file of the generated artifacts along with the 12.67 * WSDL metadata required for invoking the web service. 12.68 * -generateJWS generate stubbed JWS implementation file 12.69 * -implDestDir <directory> specify where to generate JWS implementation file 12.70 @@ -656,8 +686,8 @@ 12.71 * Usage: {0} [options] <SEI> 12.72 * 12.73 * where [options] include: 12.74 - * -classpath <path> specify where to find input class files 12.75 - * -cp <path> same as -classpath <path> 12.76 + * -classpath <path> specify where to find input class files and wsgen extensions 12.77 + * -cp <path> specify where to find input class files and wsgen extensions 12.78 * -d <directory> specify where to place generated output files 12.79 * -encoding <encoding> specify character encoding used by source files 12.80 * -extension allow vendor extensions - functionality not specified 12.81 @@ -665,6 +695,7 @@ 12.82 * result in applications that are not portable or 12.83 * may not interoperate with other implementations 12.84 * -help display help 12.85 + * -J<javacOption> pass this option to javac 12.86 * -keep keep generated files 12.87 * -r <directory> resource destination directory, specify where to 12.88 * place resouce files such as WSDLs 12.89 @@ -675,7 +706,7 @@ 12.90 * -wsdl[:protocol] generate a WSDL file. The protocol is optional. 12.91 * Valid protocols are {1}, 12.92 * the default is soap1.1. 12.93 - * The non stanadard protocols {2} 12.94 + * The non standard protocols {2} 12.95 * can only be used in conjunction with the 12.96 * -extension option. 12.97 * -inlineSchemas inline schemas in the generated wsdl. Must be 12.98 @@ -684,6 +715,7 @@ 12.99 * Used in conjunction with the -wsdl option. 12.100 * -portname <name> specify the Port name to use in the generated WSDL 12.101 * Used in conjunction with the -wsdl option. 12.102 + * -x <file> specify External Web Service Metadata xml descriptor 12.103 * 12.104 */ 12.105 public static String WSGEN_HELP(Object arg0, Object arg1, Object arg2) { 12.106 @@ -835,6 +867,18 @@ 12.107 return localizer.localize(localizableWSIMPORT_AUTH_INFO_LINENO(arg0, arg1)); 12.108 } 12.109 12.110 + public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) { 12.111 + return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0); 12.112 + } 12.113 + 12.114 + /** 12.115 + * The service name "{0}" is missing a localname. 12.116 + * 12.117 + */ 12.118 + public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) { 12.119 + return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0)); 12.120 + } 12.121 + 12.122 public static Localizable localizableWSGEN_USAGE(Object arg0) { 12.123 return messageFactory.getMessage("wsgen.usage", arg0); 12.124 } 12.125 @@ -849,18 +893,6 @@ 12.126 return localizer.localize(localizableWSGEN_USAGE(arg0)); 12.127 } 12.128 12.129 - public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) { 12.130 - return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0); 12.131 - } 12.132 - 12.133 - /** 12.134 - * The service name "{0}" is missing a localname. 12.135 - * 12.136 - */ 12.137 - public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) { 12.138 - return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0)); 12.139 - } 12.140 - 12.141 public static Localizable localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) { 12.142 return messageFactory.getMessage("wsgen.servicename.missing.namespace", arg0); 12.143 }
13.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties Thu Oct 10 10:09:16 2013 -0700 13.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties Fri Oct 11 00:07:42 2013 -0700 13.3 @@ -33,6 +33,8 @@ 13.4 \ -B<jaxbOption> Pass this option to JAXB schema compiler\n\ 13.5 \ -catalog <file> specify catalog file to resolve external entity references\n\ 13.6 \ supports TR9401, XCatalog, and OASIS XML Catalog format.\n\ 13.7 +\ -classpath <path> specify where to find user class files and wsimport extensions\n\ 13.8 +\ -cp <path> specify where to find user class files and wsimport extensions\n\ 13.9 \ -d <directory> specify where to place generated output files\n\ 13.10 \ -encoding <encoding> specify character encoding used by source files\n\ 13.11 \ -extension allow vendor extensions - functionality not specified\n\ 13.12 @@ -42,6 +44,7 @@ 13.13 \ -help display help\n\ 13.14 \ -httpproxy:<proxy> set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort\n\ 13.15 \ (port defaults to 8080)\n\ 13.16 +\ -J<javacOption> pass this option to javac\n\ 13.17 \ -keep keep generated files\n\ 13.18 \ -p <pkg> specifies the target package\n\ 13.19 \ -quiet suppress wsimport output\n\ 13.20 @@ -53,7 +56,7 @@ 13.21 \ -version print version information\n\ 13.22 \ -fullversion print full version information\n\ 13.23 \ -wsdllocation <location> @WebServiceClient.wsdlLocation value\n\ 13.24 -\ -clientjar <jarfile> Creates the jar file of the generated artifacts along with the\n\ 13.25 +\ -clientjar <jarfile> creates the jar file of the generated artifacts along with the\n\ 13.26 \ WSDL metadata required for invoking the web service.\n\ 13.27 \ -generateJWS generate stubbed JWS implementation file\n\ 13.28 \ -implDestDir <directory> specify where to generate JWS implementation file\n\ 13.29 @@ -91,8 +94,8 @@ 13.30 13.31 wsgen.help=\nUsage: {0} [options] <SEI>\n\n\ 13.32 \where [options] include:\n\ 13.33 -\ -classpath <path> specify where to find input class files\n\ 13.34 -\ -cp <path> same as -classpath <path>\n\ 13.35 +\ -classpath <path> specify where to find input class files and wsgen extensions\n\ 13.36 +\ -cp <path> specify where to find input class files and wsgen extensions\n\ 13.37 \ -d <directory> specify where to place generated output files\n\ 13.38 \ -encoding <encoding> specify character encoding used by source files\n\ 13.39 \ -extension allow vendor extensions - functionality not specified\n\ 13.40 @@ -100,6 +103,7 @@ 13.41 \ result in applications that are not portable or\n\ 13.42 \ may not interoperate with other implementations\n\ 13.43 \ -help display help\n\ 13.44 +\ -J<javacOption> pass this option to javac\n\ 13.45 \ -keep keep generated files\n\ 13.46 \ -r <directory> resource destination directory, specify where to\n\ 13.47 \ place resouce files such as WSDLs\n\ 13.48 @@ -110,7 +114,7 @@ 13.49 \ -wsdl[:protocol] generate a WSDL file. The protocol is optional.\n\ 13.50 \ Valid protocols are {1},\n\ 13.51 \ the default is soap1.1.\n\ 13.52 -\ The non stanadard protocols {2}\n\ 13.53 +\ The non standard protocols {2}\n\ 13.54 \ can only be used in conjunction with the\n\ 13.55 \ -extension option.\n\ 13.56 \ -inlineSchemas inline schemas in the generated wsdl. Must be\n\ 13.57 @@ -118,8 +122,12 @@ 13.58 \ -servicename <name> specify the Service name to use in the generated WSDL\n\ 13.59 \ Used in conjunction with the -wsdl option.\n\ 13.60 \ -portname <name> specify the Port name to use in the generated WSDL\n\ 13.61 -\ Used in conjunction with the -wsdl option. 13.62 +\ Used in conjunction with the -wsdl option.\n\ 13.63 +\ -x <file> specify External Web Service Metadata xml descriptor 13.64 13.65 +wsgen.usage.extensions=\n\ 13.66 +\Extensions:\n\ 13.67 +\ -Xnocompile do not compile generated Java files 13.68 13.69 wsgen.usage.examples=\n\ 13.70 \Examples:\n\ 13.71 @@ -151,6 +159,7 @@ 13.72 # Generic Messages 13.73 # 13.74 wscompile.invalidOption=unrecognized parameter {0} 13.75 +wscompile.existingOption=Ignoring already defined option {0}\n 13.76 wsimport.noSuchJaxbOption=no such JAXB option: {0} 13.77 13.78 wscompile.error=error: {0}
14.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties Thu Oct 10 10:09:16 2013 -0700 14.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties Fri Oct 11 00:07:42 2013 -0700 14.3 @@ -23,7 +23,7 @@ 14.4 # questions. 14.5 # 14.6 14.7 -build-id=2.2.9-b14140 14.8 -build-version=JAX-WS RI 2.2.9-b14140 14.9 +build-id=2.2.9-b130926.1035 14.10 +build-version=JAX-WS RI 2.2.9-b130926.1035 14.11 major-version=2.2.9 14.12 -svn-revision=14140 14.13 +svn-revision=8c29a9a53251ff741fca1664a8221dc876b2eac8
15.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java Thu Oct 10 10:09:16 2013 -0700 15.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java Fri Oct 11 00:07:42 2013 -0700 15.3 @@ -87,6 +87,13 @@ 15.4 15.5 public String classpath = System.getProperty("java.class.path"); 15.6 15.7 + /** 15.8 + * -javacOptions 15.9 + * 15.10 + * @since 2.2.9 15.11 + */ 15.12 + public List<String> javacOptions; 15.13 + 15.14 15.15 /** 15.16 * -Xnocompile 15.17 @@ -94,10 +101,13 @@ 15.18 public boolean nocompile; 15.19 15.20 /** 15.21 - * Disable secure xml processing. 15.22 - * -XdisableSecureXmlProcessing 15.23 + * If true XML security features when parsing XML documents will be disabled. 15.24 + * The default value is false. 15.25 + * 15.26 + * Boolean 15.27 + * @since 2.2.9 15.28 */ 15.29 - public boolean disableSecureXmlProcessing = false; 15.30 + public boolean disableXmlSecurity; 15.31 15.32 public enum Target { 15.33 V2_0, V2_1, V2_2; 15.34 @@ -354,13 +364,24 @@ 15.35 throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding)); 15.36 } 15.37 return 2; 15.38 - } else if (args[i].equals("-XdisableSecureXmlProcessing")) { 15.39 - disableSecureXmlProcessing= true; 15.40 + } else if (args[i].equals("-disableXmlSecurity")) { 15.41 + disableXmlSecurity(); 15.42 + return 1; 15.43 + } else if (args[i].startsWith("-J")) { 15.44 + if (javacOptions == null) { 15.45 + javacOptions = new ArrayList<String>(); 15.46 + } 15.47 + javacOptions.add(args[i].substring(2)); 15.48 return 1; 15.49 } 15.50 return 0; 15.51 } 15.52 15.53 + // protected method to allow overriding 15.54 + protected void disableXmlSecurity() { 15.55 + disableXmlSecurity= true; 15.56 + } 15.57 + 15.58 /** 15.59 * Obtains an operand and reports an error if it's not there. 15.60 */ 15.61 @@ -372,7 +393,28 @@ 15.62 return args[i]; 15.63 } 15.64 15.65 - 15.66 + List<String> getJavacOptions(List<String> existingOptions, WsimportListener listener) { 15.67 + List<String> result = new ArrayList<String>(); 15.68 + for (String o: javacOptions) { 15.69 + if (o.contains("=") && !o.startsWith("A")) { 15.70 + int i = o.indexOf('='); 15.71 + String key = o.substring(0, i); 15.72 + if (existingOptions.contains(key)) { 15.73 + listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(key)); 15.74 + } else { 15.75 + result.add(key); 15.76 + result.add(o.substring(i + 1)); 15.77 + } 15.78 + } else { 15.79 + if (existingOptions.contains(o)) { 15.80 + listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(o)); 15.81 + } else { 15.82 + result.add(o); 15.83 + } 15.84 + } 15.85 + } 15.86 + return result; 15.87 + } 15.88 15.89 /** 15.90 * Used to signal that we've finished processing.
16.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java Thu Oct 10 10:09:16 2013 -0700 16.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java Fri Oct 11 00:07:42 2013 -0700 16.3 @@ -161,7 +161,7 @@ 16.4 final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener); 16.5 16.6 boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class); 16.7 - Collection<String> args = new ArrayList<String>(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0) 16.8 + List<String> args = new ArrayList<String>(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0) 16.9 + (options.encoding != null ? 2 : 0)); 16.10 args.add("-d"); 16.11 args.add(options.destDir.getAbsolutePath()); 16.12 @@ -183,6 +183,9 @@ 16.13 .append(File.pathSeparator) 16.14 .append(JavaCompilerHelper.getJarFile(XmlSeeAlso.class)).toString()); 16.15 } 16.16 + if (options.javacOptions != null) { 16.17 + args.addAll(options.getJavacOptions(args, listener)); 16.18 + } 16.19 16.20 JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();// compiler = JavacTool.create(); 16.21 DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>(); 16.22 @@ -205,9 +208,9 @@ 16.23 DatabindingConfig config = new DatabindingConfig(); 16.24 16.25 List<String> externalMetadataFileNames = options.externalMetadataFiles; 16.26 - boolean disableSecureXmlProcessing = options.disableSecureXmlProcessing; 16.27 + boolean disableXmlSecurity = options.disableXmlSecurity; 16.28 if (externalMetadataFileNames != null && externalMetadataFileNames.size() > 0) { 16.29 - config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableSecureXmlProcessing)); 16.30 + config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableXmlSecurity)); 16.31 } 16.32 16.33 String tmpPath = options.destDir.getAbsolutePath() + File.pathSeparator + options.classpath; 16.34 @@ -243,7 +246,7 @@ 16.35 final Map<String, File> schemaFiles = new HashMap<String, File>(); 16.36 16.37 WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); 16.38 - wsdlGenInfo.setSecureXmlProcessingDisabled(disableSecureXmlProcessing); 16.39 + wsdlGenInfo.setSecureXmlProcessingDisabled(disableXmlSecurity); 16.40 16.41 wsdlGenInfo.setWsdlResolver( 16.42 new WSDLResolver() { 16.43 @@ -404,6 +407,7 @@ 16.44 System.out.println(WscompileMessages.WSGEN_HELP("WSGEN", 16.45 ((WsgenOptions)options).protocols, 16.46 ((WsgenOptions)options).nonstdProtocols.keySet())); 16.47 + System.out.println(WscompileMessages.WSGEN_USAGE_EXTENSIONS()); 16.48 System.out.println(WscompileMessages.WSGEN_USAGE_EXAMPLES()); 16.49 } 16.50 }
17.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java Thu Oct 10 10:09:16 2013 -0700 17.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java Fri Oct 11 00:07:42 2013 -0700 17.3 @@ -774,4 +774,10 @@ 17.4 is.setSystemId(systemId); 17.5 } 17.6 } 17.7 + 17.8 + @Override 17.9 + protected void disableXmlSecurity() { 17.10 + super.disableXmlSecurity(); 17.11 + schemaCompiler.getOptions().disableXmlSecurity = true; 17.12 + } 17.13 }
18.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java Thu Oct 10 10:09:16 2013 -0700 18.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java Fri Oct 11 00:07:42 2013 -0700 18.3 @@ -332,7 +332,7 @@ 18.4 if(options.verbose) { 18.5 listener.message(WscompileMessages.WSIMPORT_ARCHIVE_ARTIFACT(f, options.clientjar)); 18.6 } 18.7 - String entry = f.getCanonicalPath().substring(base.length()+1); 18.8 + String entry = f.getCanonicalPath().substring(base.length()+1).replace(File.separatorChar, '/'); 18.9 fi = new FileInputStream(f); 18.10 bis = new BufferedInputStream(fi); 18.11 JarEntry jarEntry = new JarEntry(entry); 18.12 @@ -524,29 +524,34 @@ 18.13 String classDir = options.destDir.getAbsolutePath(); 18.14 String classpathString = createClasspathString(); 18.15 boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class); 18.16 - String[] args = new String[4 + (bootCP ? 1 : 0) + (options.debug ? 1 : 0) 18.17 - + (options.encoding != null ? 2 : 0) + sourceFiles.size()]; 18.18 - args[0] = "-d"; 18.19 - args[1] = classDir; 18.20 - args[2] = "-classpath"; 18.21 - args[3] = classpathString; 18.22 - int baseIndex = 4; 18.23 + List<String> args = new ArrayList<String>(); 18.24 + args.add("-d"); 18.25 + args.add(classDir); 18.26 + args.add("-classpath"); 18.27 + args.add(classpathString); 18.28 //javac is not working in osgi as the url starts with a bundle 18.29 if (bootCP) { 18.30 - args[baseIndex++] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointContext.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(JAXBPermission.class); 18.31 + args.add("-Xbootclasspath/p:" 18.32 + + JavaCompilerHelper.getJarFile(EndpointContext.class) 18.33 + + File.pathSeparator 18.34 + + JavaCompilerHelper.getJarFile(JAXBPermission.class)); 18.35 } 18.36 18.37 if (options.debug) { 18.38 - args[baseIndex++] = "-g"; 18.39 + args.add("-g"); 18.40 } 18.41 18.42 if (options.encoding != null) { 18.43 - args[baseIndex++] = "-encoding"; 18.44 - args[baseIndex++] = options.encoding; 18.45 + args.add("-encoding"); 18.46 + args.add(options.encoding); 18.47 + } 18.48 + 18.49 + if (options.javacOptions != null) { 18.50 + args.addAll(options.getJavacOptions(args, listener)); 18.51 } 18.52 18.53 for (int i = 0; i < sourceFiles.size(); ++i) { 18.54 - args[baseIndex + i] = sourceFiles.get(i); 18.55 + args.add(sourceFiles.get(i)); 18.56 } 18.57 18.58 listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE()); 18.59 @@ -558,7 +563,7 @@ 18.60 listener.message("javac "+ argstr.toString()); 18.61 } 18.62 18.63 - return JavaCompilerHelper.compile(args, out, receiver); 18.64 + return JavaCompilerHelper.compile(args.toArray(new String[args.size()]), out, receiver); 18.65 } 18.66 //there are no files to compile, so return true? 18.67 return true;
19.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java Thu Oct 10 10:09:16 2013 -0700 19.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java Fri Oct 11 00:07:42 2013 -0700 19.3 @@ -114,7 +114,7 @@ 19.4 this.logic = logic; 19.5 try { 19.6 // secure xml processing can be switched off if input requires it 19.7 - boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; 19.8 + boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity; 19.9 DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled); 19.10 dbf.setNamespaceAware(true); 19.11 this.documentBuilder = dbf.newDocumentBuilder(); 19.12 @@ -365,7 +365,7 @@ 19.13 try { 19.14 // create identity transformer 19.15 // secure xml processing can be switched off if input requires it 19.16 - boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; 19.17 + boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity; 19.18 TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled); 19.19 Transformer it = tf.newTransformer(); 19.20
20.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties Thu Oct 10 10:09:16 2013 -0700 20.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties Fri Oct 11 00:07:42 2013 -0700 20.3 @@ -171,20 +171,20 @@ 20.4 Driver.FailedToGenerateCode = \ 20.5 Failed to produce code. 20.6 20.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 20.8 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 20.9 Driver.FilePrologComment = \ 20.10 - This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \n\ 20.11 + This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \n\ 20.12 See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\ 20.13 Any modifications to this file will be lost upon recompilation of the source schema. \n\ 20.14 Generated on: {0} \n 20.15 20.16 Driver.Version = \ 20.17 - xjc 2.2.8-b20130806.1801 20.18 + xjc 2.2.8-b130911.1802 20.19 20.20 Driver.FullVersion = \ 20.21 - xjc full version "2.2.8-b20130806.1801" 20.22 + xjc full version "2.2.8-b130911.1802" 20.23 20.24 -Driver.BuildID = 2.2.8-b20130806.1801 20.25 +Driver.BuildID = 2.2.8-b130911.1802 20.26 20.27 # for JDK integration - include version in source zip 20.28 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
21.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties Thu Oct 10 10:09:16 2013 -0700 21.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties Fri Oct 11 00:07:42 2013 -0700 21.3 @@ -96,14 +96,14 @@ 21.4 21.5 Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden. 21.6 21.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 21.8 -Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n 21.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 21.10 +Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert \nSiehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n 21.11 21.12 -Driver.Version = xjc 2.2.8-b20130806.1801 21.13 +Driver.Version = xjc 2.2.8-b130911.1802 21.14 21.15 -Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b20130806.1801" 21.16 +Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b130911.1802" 21.17 21.18 -Driver.BuildID = 2.2.8-b20130806.1801 21.19 +Driver.BuildID = 2.2.8-b130911.1802 21.20 21.21 # for JDK integration - include version in source zip 21.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
22.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties Thu Oct 10 10:09:16 2013 -0700 22.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties Fri Oct 11 00:07:42 2013 -0700 22.3 @@ -96,14 +96,14 @@ 22.4 22.5 Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo. 22.6 22.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 22.8 -Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.8-b20130806.1801 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n 22.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 22.10 +Driver.FilePrologComment = Este archivo ha sido generado por la arquitectura JavaTM para la implantaci\u00f3n de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 \nVisite <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas las modificaciones realizadas en este archivo se perder\u00e1n si se vuelve a compilar el esquema de origen. \nGenerado el: {0} \n 22.11 22.12 -Driver.Version = xjc 2.2.8-b20130806.1801 22.13 +Driver.Version = xjc 2.2.8-b130911.1802 22.14 22.15 -Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b20130806.1801" 22.16 +Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b130911.1802" 22.17 22.18 -Driver.BuildID = 2.2.8-b20130806.1801 22.19 +Driver.BuildID = 2.2.8-b130911.1802 22.20 22.21 # for JDK integration - include version in source zip 22.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
23.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties Thu Oct 10 10:09:16 2013 -0700 23.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties Fri Oct 11 00:07:42 2013 -0700 23.3 @@ -96,14 +96,14 @@ 23.4 23.5 Driver.FailedToGenerateCode = Echec de la production du code. 23.6 23.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 23.8 -Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b20130806.1801 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n 23.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 23.10 +Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802 \nVoir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n 23.11 23.12 -Driver.Version = xjc 2.2.8-b20130806.1801 23.13 +Driver.Version = xjc 2.2.8-b130911.1802 23.14 23.15 -Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b20130806.1801" 23.16 +Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b130911.1802" 23.17 23.18 -Driver.BuildID = 2.2.8-b20130806.1801 23.19 +Driver.BuildID = 2.2.8-b130911.1802 23.20 23.21 # for JDK integration - include version in source zip 23.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
24.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties Thu Oct 10 10:09:16 2013 -0700 24.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties Fri Oct 11 00:07:42 2013 -0700 24.3 @@ -96,14 +96,14 @@ 24.4 24.5 Driver.FailedToGenerateCode = Produzione del codice non riuscita. 24.6 24.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 24.8 -Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b20130806.1801 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n 24.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 24.10 +Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.8-b130911.1802 \nVedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n 24.11 24.12 -Driver.Version = xjc 2.2.8-b20130806.1801 24.13 +Driver.Version = xjc 2.2.8-b130911.1802 24.14 24.15 -Driver.FullVersion = versione completa xjc "2.2.8-b20130806.1801" 24.16 +Driver.FullVersion = versione completa xjc "2.2.8-b130911.1802" 24.17 24.18 -Driver.BuildID = 2.2.8-b20130806.1801 24.19 +Driver.BuildID = 2.2.8-b130911.1802 24.20 24.21 # for JDK integration - include version in source zip 24.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
25.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties Thu Oct 10 10:09:16 2013 -0700 25.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties Fri Oct 11 00:07:42 2013 -0700 25.3 @@ -96,14 +96,14 @@ 25.4 25.5 Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 25.6 25.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 25.8 -Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.8-b20130806.1801\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n 25.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 25.10 +Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.8-b130911.1802\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n 25.11 25.12 -Driver.Version = xjc 2.2.8-b20130806.1801 25.13 +Driver.Version = xjc 2.2.8-b130911.1802 25.14 25.15 -Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801" 25.16 +Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802" 25.17 25.18 -Driver.BuildID = 2.2.8-b20130806.1801 25.19 +Driver.BuildID = 2.2.8-b130911.1802 25.20 25.21 # for JDK integration - include version in source zip 25.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
26.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties Thu Oct 10 10:09:16 2013 -0700 26.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties Fri Oct 11 00:07:42 2013 -0700 26.3 @@ -96,14 +96,14 @@ 26.4 26.5 Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. 26.6 26.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 26.8 -Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.8-b20130806.1801 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n 26.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 26.10 +Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.8-b130911.1802 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \n<a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n 26.11 26.12 -Driver.Version = XJC 2.2.8-b20130806.1801 26.13 +Driver.Version = XJC 2.2.8-b130911.1802 26.14 26.15 -Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801" 26.16 +Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802" 26.17 26.18 -Driver.BuildID = 2.2.8-b20130806.1801 26.19 +Driver.BuildID = 2.2.8-b130911.1802 26.20 26.21 # for JDK integration - include version in source zip 26.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
27.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties Thu Oct 10 10:09:16 2013 -0700 27.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties Fri Oct 11 00:07:42 2013 -0700 27.3 @@ -96,14 +96,14 @@ 27.4 27.5 Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo. 27.6 27.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 27.8 -Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.8-b20130806.1801 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n 27.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 27.10 +Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.8-b130911.1802 \nConsulte <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n 27.11 27.12 -Driver.Version = xjc 2.2.8-b20130806.1801 27.13 +Driver.Version = xjc 2.2.8-b130911.1802 27.14 27.15 -Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b20130806.1801" 27.16 +Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b130911.1802" 27.17 27.18 -Driver.BuildID = 2.2.8-b20130806.1801 27.19 +Driver.BuildID = 2.2.8-b130911.1802 27.20 27.21 # for JDK integration - include version in source zip 27.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
28.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties Thu Oct 10 10:09:16 2013 -0700 28.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties Fri Oct 11 00:07:42 2013 -0700 28.3 @@ -96,14 +96,14 @@ 28.4 28.5 Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002 28.6 28.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 28.8 -Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.8-b20130806.1801 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n 28.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 28.10 +Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.8-b130911.1802 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n 28.11 28.12 -Driver.Version = xjc 2.2.8-b20130806.1801 28.13 +Driver.Version = xjc 2.2.8-b130911.1802 28.14 28.15 -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801" 28.16 +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802" 28.17 28.18 -Driver.BuildID = 2.2.8-b20130806.1801 28.19 +Driver.BuildID = 2.2.8-b130911.1802 28.20 28.21 # for JDK integration - include version in source zip 28.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
29.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties Thu Oct 10 10:09:16 2013 -0700 29.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties Fri Oct 11 00:07:42 2013 -0700 29.3 @@ -96,14 +96,14 @@ 29.4 29.5 Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc. 29.6 29.7 -# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter> 29.8 -Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n 29.9 +# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter> 29.10 +Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n 29.11 29.12 -Driver.Version = xjc 2.2.8-b20130806.1801 29.13 +Driver.Version = xjc 2.2.8-b130911.1802 29.14 29.15 -Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801" 29.16 +Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802" 29.17 29.18 -Driver.BuildID = 2.2.8-b20130806.1801 29.19 +Driver.BuildID = 2.2.8-b130911.1802 29.20 29.21 # for JDK integration - include version in source zip 29.22 jaxb.jdk.version=@@JAXB_JDK_VERSION@@
30.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java Thu Oct 10 10:09:16 2013 -0700 30.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/SchemaCache.java Fri Oct 11 00:07:42 2013 -0700 30.3 @@ -35,7 +35,7 @@ 30.4 import javax.xml.XMLConstants; 30.5 import org.xml.sax.SAXException; 30.6 30.7 -import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess; 30.8 +import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess; 30.9 30.10 /** 30.11 * Wraps a JAXP {@link Schema} object and lazily instantiate it. 30.12 @@ -61,7 +61,7 @@ 30.13 try { 30.14 // do not disable secure processing - these are well-known schemas 30.15 SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false); 30.16 - schema = allowFileAccess(sf, false).newSchema(source); 30.17 + schema = allowExternalAccess(sf, "file", false).newSchema(source); 30.18 } catch (SAXException e) { 30.19 // we make sure that the schema is correct before we ship. 30.20 throw new AssertionError(e);
31.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java Thu Oct 10 10:09:16 2013 -0700 31.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/DOMForest.java Fri Oct 11 00:07:42 2013 -0700 31.3 @@ -59,7 +59,7 @@ 31.4 import java.io.OutputStreamWriter; 31.5 import java.util.*; 31.6 31.7 -import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess; 31.8 +import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess; 31.9 import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI; 31.10 31.11 31.12 @@ -460,7 +460,7 @@ 31.13 } 31.14 31.15 try { 31.16 - allowFileAccess(sf, options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0])); 31.17 + allowExternalAccess(sf, "file,http", options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0])); 31.18 } catch (SAXException e) { 31.19 // error should have been reported. 31.20 } catch (RuntimeException re) {
32.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java Thu Oct 10 10:09:16 2013 -0700 32.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/AbstractExtendedComplexTypeBuilder.java Fri Oct 11 00:07:42 2013 -0700 32.3 @@ -41,6 +41,7 @@ 32.4 import com.sun.xml.internal.xsom.XSType; 32.5 import com.sun.xml.internal.xsom.XSWildcard; 32.6 import com.sun.xml.internal.xsom.visitor.XSTermFunction; 32.7 +import javax.xml.namespace.QName; 32.8 32.9 import com.sun.xml.internal.rngom.nc.ChoiceNameClass; 32.10 import com.sun.xml.internal.rngom.nc.NameClass; 32.11 @@ -65,14 +66,17 @@ 32.12 * Computes a name class that represents everything in a given content model. 32.13 */ 32.14 protected final XSTermFunction<NameClass> contentModelNameClassBuilder = new XSTermFunction<NameClass>() { 32.15 + @Override 32.16 public NameClass wildcard(XSWildcard wc) { 32.17 return WildcardNameClassBuilder.build(wc); 32.18 } 32.19 32.20 + @Override 32.21 public NameClass modelGroupDecl(XSModelGroupDecl decl) { 32.22 return modelGroup(decl.getModelGroup()); 32.23 } 32.24 32.25 + @Override 32.26 public NameClass modelGroup(XSModelGroup group) { 32.27 NameClass nc = NameClass.NULL; 32.28 for( int i=0; i<group.getSize(); i++ ) 32.29 @@ -216,7 +220,7 @@ 32.30 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}. 32.31 */ 32.32 private NameClass getNameClass(XSDeclaration decl) { 32.33 - return new SimpleNameClass(decl.getTargetNamespace(), decl.getName()); 32.34 + return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName())); 32.35 } 32.36 32.37 }
33.1 --- a/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java Thu Oct 10 10:09:16 2013 -0700 33.2 +++ b/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/SchemaConstraintChecker.java Fri Oct 11 00:07:42 2013 -0700 33.3 @@ -69,6 +69,7 @@ 33.4 boolean hadErrors = false; 33.5 33.6 SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity); 33.7 + XmlFactory.allowExternalAccess(sf, "all", disableXmlSecurity); 33.8 sf.setErrorHandler(errorFilter); 33.9 if( entityResolver != null ) { 33.10 sf.setResourceResolver(new LSResourceResolver() { 33.11 @@ -91,6 +92,7 @@ 33.12 } 33.13 33.14 try { 33.15 + XmlFactory.allowExternalDTDAccess(sf, "all", disableXmlSecurity); 33.16 sf.newSchema(getSchemaSource(schemas, entityResolver)); 33.17 } catch (SAXException e) { 33.18 // TODO: we haven't thrown exceptions from here before. should we just trap them and return false?
34.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java Thu Oct 10 10:09:16 2013 -0700 34.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.java Fri Oct 11 00:07:42 2013 -0700 34.3 @@ -42,6 +42,8 @@ 34.4 INVALID_JAXP_IMPLEMENTATION, // 1 arg 34.5 JAXP_SUPPORTED_PROPERTY, // 1 arg 34.6 JAXP_UNSUPPORTED_PROPERTY, // 1 arg 34.7 + JAXP_XML_SECURITY_DISABLED, // no arg 34.8 + JAXP_EXTERNAL_ACCESS_CONFIGURED, // no arg 34.9 ; 34.10 34.11 private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
35.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties Thu Oct 10 10:09:16 2013 -0700 35.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages.properties Fri Oct 11 00:07:42 2013 -0700 35.3 @@ -56,3 +56,9 @@ 35.4 35.5 JAXP_UNSUPPORTED_PROPERTY =\ 35.6 Property "{0}" is not supported by used JAXP implementation. 35.7 + 35.8 +JAXP_XML_SECURITY_DISABLED=\ 35.9 + "Xml Security disabled, no JAXP xsd external access configuration necessary." 35.10 + 35.11 +JAXP_EXTERNAL_ACCESS_CONFIGURED=\ 35.12 + "Detected explicitly JAXP configuration, no JAXP xsd external access configuration necessary."
36.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java Thu Oct 10 10:09:16 2013 -0700 36.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java Fri Oct 11 00:07:42 2013 -0700 36.3 @@ -140,22 +140,23 @@ 36.4 */ 36.5 private final Loader itemsLoader = new Loader(false) { 36.6 36.7 - private ThreadLocal<BeanT> target = new ThreadLocal<BeanT>(); 36.8 - private ThreadLocal<ValueT> map = new ThreadLocal<ValueT>(); 36.9 - private int depthCounter = 0; // needed to clean ThreadLocals 36.10 + private ThreadLocal<Stack<BeanT>> target = new ThreadLocal<Stack<BeanT>>(); 36.11 + private ThreadLocal<Stack<ValueT>> map = new ThreadLocal<Stack<ValueT>>(); 36.12 36.13 @Override 36.14 public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException { 36.15 // create or obtain the Map object 36.16 try { 36.17 - target.set((BeanT)state.prev.target); 36.18 - map.set(acc.get(target.get())); 36.19 - depthCounter++; 36.20 - if(map.get() == null) { 36.21 - map.set(ClassFactory.create(mapImplClass)); 36.22 - } 36.23 - map.get().clear(); 36.24 - state.target = map.get(); 36.25 + BeanT target = (BeanT) state.prev.target; 36.26 + ValueT mapValue = acc.get(target); 36.27 + if(mapValue == null) 36.28 + mapValue = ClassFactory.create(mapImplClass); 36.29 + else 36.30 + mapValue.clear(); 36.31 + 36.32 + Stack.push(this.target, target); 36.33 + Stack.push(map, mapValue); 36.34 + state.target = mapValue; 36.35 } catch (AccessorException e) { 36.36 // recover from error by setting a dummy Map that receives and discards the values 36.37 handleGenericException(e,true); 36.38 @@ -167,11 +168,7 @@ 36.39 public void leaveElement(State state, TagName ea) throws SAXException { 36.40 super.leaveElement(state, ea); 36.41 try { 36.42 - acc.set(target.get(), map.get()); 36.43 - if (--depthCounter == 0) { 36.44 - target.remove(); 36.45 - map.remove(); 36.46 - } 36.47 + acc.set(Stack.pop(target), Stack.pop(map)); 36.48 } catch (AccessorException ex) { 36.49 handleGenericException(ex,true); 36.50 } 36.51 @@ -289,4 +286,36 @@ 36.52 return acc; 36.53 return null; 36.54 } 36.55 + 36.56 + private static final class Stack<T> { 36.57 + private Stack<T> parent; 36.58 + private T value; 36.59 + 36.60 + private Stack(Stack<T> parent, T value) { 36.61 + this.parent = parent; 36.62 + this.value = value; 36.63 + } 36.64 + 36.65 + private Stack(T value) { 36.66 + this.value = value; 36.67 + } 36.68 + 36.69 + private static <T> void push(ThreadLocal<Stack<T>> holder, T value) { 36.70 + Stack<T> parent = holder.get(); 36.71 + if (parent == null) 36.72 + holder.set(new Stack<T>(value)); 36.73 + else 36.74 + holder.set(new Stack<T>(parent, value)); 36.75 + } 36.76 + 36.77 + private static <T> T pop(ThreadLocal<Stack<T>> holder) { 36.78 + Stack<T> current = holder.get(); 36.79 + if (current.parent == null) 36.80 + holder.remove(); 36.81 + else 36.82 + holder.set(current.parent); 36.83 + return current.value; 36.84 + } 36.85 + 36.86 + } 36.87 }
37.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java Thu Oct 10 10:09:16 2013 -0700 37.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/AccessorInjector.java Fri Oct 11 00:07:42 2013 -0700 37.3 @@ -1,5 +1,5 @@ 37.4 /* 37.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 37.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 37.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 37.8 * 37.9 * This code is free software; you can redistribute it and/or modify it 37.10 @@ -63,19 +63,15 @@ 37.11 ClassLoader cl = SecureLoader.getClassClassLoader(beanClass); 37.12 if(cl==null) return null; // how do I inject classes to this "null" class loader? for now, back off. 37.13 37.14 - Class c = null; 37.15 - synchronized (AccessorInjector.class) { 37.16 - c = Injector.find(cl,newClassName); 37.17 - if(c==null) { 37.18 - byte[] image = tailor(templateClassName,newClassName,replacements); 37.19 - // try { 37.20 - // new FileOutputStream("debug.class").write(image); 37.21 - // } catch (IOException e) { 37.22 - // e.printStackTrace(); 37.23 - // } 37.24 - if(image==null) 37.25 - return null; 37.26 - c = Injector.inject(cl,newClassName,image); 37.27 + Class c = Injector.find(cl,newClassName); 37.28 + if (c==null) { 37.29 + byte[] image = tailor(templateClassName,newClassName,replacements); 37.30 + if (image==null) { 37.31 + return null; 37.32 + } 37.33 + c = Injector.inject(cl,newClassName,image); 37.34 + if (c == null) { 37.35 + Injector.find(cl, newClassName); 37.36 } 37.37 } 37.38 return c; 37.39 @@ -112,4 +108,5 @@ 37.40 } 37.41 37.42 private static final ClassLoader CLASS_LOADER = SecureLoader.getClassClassLoader(AccessorInjector.class); 37.43 + 37.44 }
38.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java Thu Oct 10 10:09:16 2013 -0700 38.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java Fri Oct 11 00:07:42 2013 -0700 38.3 @@ -1,5 +1,5 @@ 38.4 /* 38.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 38.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 38.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 38.8 * 38.9 * This code is free software; you can redistribute it and/or modify it 38.10 @@ -156,6 +156,7 @@ 38.11 } 38.12 AccessController.doPrivileged(new PrivilegedAction<Void>() { 38.13 38.14 + @Override 38.15 public Void run() { 38.16 // TODO: check security implication 38.17 // do these setAccessible allow anyone to call these methods freely?s
39.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java Thu Oct 10 10:09:16 2013 -0700 39.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/OptimizedAccessorFactory.java Fri Oct 11 00:07:42 2013 -0700 39.3 @@ -1,5 +1,5 @@ 39.4 /* 39.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 39.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 39.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 39.8 * 39.9 * This code is free software; you can redistribute it and/or modify it 39.10 @@ -127,8 +127,11 @@ 39.11 return null; 39.12 39.13 Accessor<B,V> acc = instanciate(opt); 39.14 - if(acc!=null) 39.15 - logger.log(Level.FINE,"Using optimized Accessor for "+getter+" and "+setter); 39.16 + if (acc!=null) { 39.17 + if (logger.isLoggable(Level.FINE)) { 39.18 + logger.log(Level.FINE, "Using optimized Accessor for {0} and {1}", new Object[]{getter, setter}); 39.19 + } 39.20 + } 39.21 return acc; 39.22 } 39.23 39.24 @@ -174,8 +177,11 @@ 39.25 return null; 39.26 39.27 Accessor<B,V> acc = instanciate(opt); 39.28 - if(acc!=null) 39.29 - logger.log(Level.FINE,"Using optimized Accessor for "+field); 39.30 + if (acc!=null) { 39.31 + if (logger.isLoggable(Level.FINE)) { 39.32 + logger.log(Level.FINE, "Using optimized Accessor for {0}", field); 39.33 + } 39.34 + } 39.35 return acc; 39.36 } 39.37
40.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java Thu Oct 10 10:09:16 2013 -0700 40.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java Fri Oct 11 00:07:42 2013 -0700 40.3 @@ -43,6 +43,8 @@ 40.4 import org.xml.sax.SAXNotRecognizedException; 40.5 import org.xml.sax.SAXNotSupportedException; 40.6 40.7 +import static com.sun.xml.internal.bind.Util.getSystemProperty; 40.8 + 40.9 /** 40.10 * Provides helper methods for creating properly configured XML parser 40.11 * factory instances with namespace support turned on and configured for 40.12 @@ -53,6 +55,7 @@ 40.13 40.14 // not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used 40.15 public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema"; 40.16 + public static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD"; 40.17 40.18 private static final Logger LOGGER = Logger.getLogger(XmlFactory.class.getName()); 40.19 40.20 @@ -65,11 +68,10 @@ 40.21 */ 40.22 private static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity"; 40.23 40.24 - public static final boolean DISABLE_SECURE_PROCESSING = 40.25 - Boolean.parseBoolean(Util.getSystemProperty(DISABLE_XML_SECURITY)); 40.26 + public static final boolean XML_SECURITY_DISABLED = Boolean.parseBoolean(getSystemProperty(DISABLE_XML_SECURITY)); 40.27 40.28 - private static boolean xmlFeatureValue(boolean runtimeSetting) { 40.29 - return !(DISABLE_SECURE_PROCESSING || runtimeSetting); 40.30 + private static boolean isXMLSecurityDisabled(boolean runtimeSetting) { 40.31 + return XML_SECURITY_DISABLED || runtimeSetting; 40.32 } 40.33 40.34 /** 40.35 @@ -83,7 +85,7 @@ 40.36 if (LOGGER.isLoggable(Level.FINE)) { 40.37 LOGGER.log(Level.FINE, "SchemaFactory instance: {0}", factory); 40.38 } 40.39 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing)); 40.40 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing)); 40.41 return factory; 40.42 } catch (SAXNotRecognizedException ex) { 40.43 LOGGER.log(Level.SEVERE, null, ex); 40.44 @@ -109,7 +111,7 @@ 40.45 LOGGER.log(Level.FINE, "SAXParserFactory instance: {0}", factory); 40.46 } 40.47 factory.setNamespaceAware(true); 40.48 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing)); 40.49 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing)); 40.50 return factory; 40.51 } catch (ParserConfigurationException ex) { 40.52 LOGGER.log(Level.SEVERE, null, ex); 40.53 @@ -136,7 +138,7 @@ 40.54 if (LOGGER.isLoggable(Level.FINE)) { 40.55 LOGGER.log(Level.FINE, "XPathFactory instance: {0}", factory); 40.56 } 40.57 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing)); 40.58 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing)); 40.59 return factory; 40.60 } catch (XPathFactoryConfigurationException ex) { 40.61 LOGGER.log(Level.SEVERE, null, ex); 40.62 @@ -157,7 +159,7 @@ 40.63 if (LOGGER.isLoggable(Level.FINE)) { 40.64 LOGGER.log(Level.FINE, "TransformerFactory instance: {0}", factory); 40.65 } 40.66 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing)); 40.67 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing)); 40.68 return factory; 40.69 } catch (TransformerConfigurationException ex) { 40.70 LOGGER.log(Level.SEVERE, null, ex); 40.71 @@ -180,7 +182,7 @@ 40.72 LOGGER.log(Level.FINE, "DocumentBuilderFactory instance: {0}", factory); 40.73 } 40.74 factory.setNamespaceAware(true); 40.75 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing)); 40.76 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing)); 40.77 return factory; 40.78 } catch (ParserConfigurationException ex) { 40.79 LOGGER.log(Level.SEVERE, null, ex); 40.80 @@ -191,20 +193,64 @@ 40.81 } 40.82 } 40.83 40.84 - public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) { 40.85 + public static SchemaFactory allowExternalAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) { 40.86 40.87 - // if feature secure processing enabled, nothing to do, file is allowed, 40.88 - // or user is able to control access by standard JAXP mechanisms 40.89 - if (disableSecureProcessing) { 40.90 + // if xml security (feature secure processing) disabled, nothing to do, no restrictions applied 40.91 + if (isXMLSecurityDisabled(disableSecureProcessing)) { 40.92 + if (LOGGER.isLoggable(Level.FINE)) { 40.93 + LOGGER.log(Level.FINE, Messages.JAXP_XML_SECURITY_DISABLED.format()); 40.94 + } 40.95 + return sf; 40.96 + } 40.97 + 40.98 + if (System.getProperty("javax.xml.accessExternalSchema") != null) { 40.99 + if (LOGGER.isLoggable(Level.FINE)) { 40.100 + LOGGER.log(Level.FINE, Messages.JAXP_EXTERNAL_ACCESS_CONFIGURED.format()); 40.101 + } 40.102 return sf; 40.103 } 40.104 40.105 try { 40.106 - sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file"); 40.107 - LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA)); 40.108 + sf.setProperty(ACCESS_EXTERNAL_SCHEMA, value); 40.109 + if (LOGGER.isLoggable(Level.FINE)) { 40.110 + LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA)); 40.111 + } 40.112 } catch (SAXException ignored) { 40.113 // nothing to do; support depends on version JDK or SAX implementation 40.114 - LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored); 40.115 + if (LOGGER.isLoggable(Level.CONFIG)) { 40.116 + LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored); 40.117 + } 40.118 + } 40.119 + return sf; 40.120 + } 40.121 + 40.122 + public static SchemaFactory allowExternalDTDAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) { 40.123 + 40.124 + // if xml security (feature secure processing) disabled, nothing to do, no restrictions applied 40.125 + if (isXMLSecurityDisabled(disableSecureProcessing)) { 40.126 + if (LOGGER.isLoggable(Level.FINE)) { 40.127 + LOGGER.log(Level.FINE, Messages.JAXP_XML_SECURITY_DISABLED.format()); 40.128 + } 40.129 + return sf; 40.130 + } 40.131 + 40.132 + if (System.getProperty("javax.xml.accessExternalDTD") != null) { 40.133 + if (LOGGER.isLoggable(Level.FINE)) { 40.134 + LOGGER.log(Level.FINE, Messages.JAXP_EXTERNAL_ACCESS_CONFIGURED.format()); 40.135 + } 40.136 + return sf; 40.137 + } 40.138 + 40.139 + try { 40.140 + sf.setProperty(ACCESS_EXTERNAL_DTD, value); 40.141 + if (LOGGER.isLoggable(Level.FINE)) { 40.142 + LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD)); 40.143 + } 40.144 + } catch (SAXException ignored) { 40.145 + // nothing to do; support depends on version JDK or SAX implementation 40.146 + if (LOGGER.isLoggable(Level.CONFIG)) { 40.147 + LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD), ignored); 40.148 + } 40.149 } 40.150 return sf; 40.151 }
41.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java Thu Oct 10 10:09:16 2013 -0700 41.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java Fri Oct 11 00:07:42 2013 -0700 41.3 @@ -287,10 +287,11 @@ 41.4 * @throws IOException if i/o error occurs 41.5 */ 41.6 public InputStream getInputStream() throws IOException { 41.7 - if(dataHandler!=null) 41.8 + if(dataHandler!=null) { 41.9 return dataHandler.getInputStream(); 41.10 - else 41.11 + } else { 41.12 return new ByteArrayInputStream(data,0,dataLen); 41.13 + } 41.14 } 41.15 41.16 /** 41.17 @@ -342,8 +343,9 @@ 41.18 } 41.19 41.20 public String getMimeType() { 41.21 - if(mimeType==null) 41.22 + if (mimeType==null) { 41.23 return "application/octet-stream"; 41.24 + } 41.25 return mimeType; 41.26 } 41.27 41.28 @@ -376,31 +378,35 @@ 41.29 case 0: 41.30 return Base64Encoder.encode(data[base]>>2); 41.31 case 1: 41.32 - if(base+1<dataLen) 41.33 + if (base+1<dataLen) { 41.34 b1 = data[base+1]; 41.35 - else 41.36 + } else { 41.37 b1 = 0; 41.38 + } 41.39 return Base64Encoder.encode( 41.40 ((data[base]&0x3)<<4) | 41.41 ((b1>>4)&0xF)); 41.42 case 2: 41.43 - if(base+1<dataLen) { 41.44 + if (base+1<dataLen) { 41.45 b1 = data[base+1]; 41.46 - if(base+2<dataLen) 41.47 + if (base+2<dataLen) { 41.48 b2 = data[base+2]; 41.49 - else 41.50 + } else { 41.51 b2 = 0; 41.52 + } 41.53 41.54 return Base64Encoder.encode( 41.55 ((b1&0xF)<<2)| 41.56 ((b2>>6)&0x3)); 41.57 - } else 41.58 + } else { 41.59 return '='; 41.60 + } 41.61 case 3: 41.62 - if(base+2<dataLen) 41.63 + if(base+2<dataLen) { 41.64 return Base64Encoder.encode(data[base+2]&0x3F); 41.65 - else 41.66 + } else { 41.67 return '='; 41.68 + } 41.69 } 41.70 41.71 throw new IllegalStateException(); 41.72 @@ -414,8 +420,9 @@ 41.73 public CharSequence subSequence(int start, int end) { 41.74 StringBuilder buf = new StringBuilder(); 41.75 get(); // fill in the buffer if we haven't done so 41.76 - for( int i=start; i<end; i++ ) 41.77 + for (int i=start; i<end; i++ ) { 41.78 buf.append(charAt(i)); 41.79 + } 41.80 return buf; 41.81 } 41.82 41.83 @@ -473,7 +480,25 @@ 41.84 41.85 @Override 41.86 public Base64Data clone() { 41.87 - return new Base64Data(this); 41.88 + try { 41.89 + Base64Data clone = (Base64Data) super.clone(); 41.90 + clone.get(); 41.91 + if (clone.dataCloneByRef) { 41.92 + this.data = clone.data; 41.93 + } else { 41.94 + this.data = new byte[clone.dataLen]; 41.95 + System.arraycopy(clone.data, 0, this.data, 0, clone.dataLen); 41.96 + } 41.97 + 41.98 + this.dataCloneByRef = true; 41.99 + this.dataLen = clone.dataLen; 41.100 + this.dataHandler = null; 41.101 + this.mimeType = clone.mimeType; 41.102 + return clone; 41.103 + } catch (CloneNotSupportedException ex) { 41.104 + Logger.getLogger(Base64Data.class.getName()).log(Level.SEVERE, null, ex); 41.105 + return null; 41.106 + } 41.107 } 41.108 41.109 static String getProperty(final String propName) {
42.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java Thu Oct 10 10:09:16 2013 -0700 42.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Encoder.java Fri Oct 11 00:07:42 2013 -0700 42.3 @@ -1,5 +1,5 @@ 42.4 /* 42.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 42.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 42.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 42.8 * 42.9 * This code is free software; you can redistribute it and/or modify it
43.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java Thu Oct 10 10:09:16 2013 -0700 43.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64EncoderStream.java Fri Oct 11 00:07:42 2013 -0700 43.3 @@ -1,5 +1,5 @@ 43.4 /* 43.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 43.6 + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 43.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 43.8 * 43.9 * This code is free software; you can redistribute it and/or modify it
44.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java Thu Oct 10 10:09:16 2013 -0700 44.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/ByteArrayOutputStreamEx.java Fri Oct 11 00:07:42 2013 -0700 44.3 @@ -1,5 +1,5 @@ 44.4 /* 44.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 44.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 44.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 44.8 * 44.9 * This code is free software; you can redistribute it and/or modify it
45.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java Thu Oct 10 10:09:16 2013 -0700 45.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/NamespaceContextEx.java Fri Oct 11 00:07:42 2013 -0700 45.3 @@ -1,5 +1,5 @@ 45.4 /* 45.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 45.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 45.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 45.8 * 45.9 * This code is free software; you can redistribute it and/or modify it
46.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java Thu Oct 10 10:09:16 2013 -0700 46.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/StreamingDataHandler.java Fri Oct 11 00:07:42 2013 -0700 46.3 @@ -1,5 +1,5 @@ 46.4 /* 46.5 - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 46.6 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 46.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 46.8 * 46.9 * This code is free software; you can redistribute it and/or modify it
47.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java Thu Oct 10 10:09:16 2013 -0700 47.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamWriterEx.java Fri Oct 11 00:07:42 2013 -0700 47.3 @@ -1,5 +1,5 @@ 47.4 /* 47.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 47.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 47.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 47.8 * 47.9 * This code is free software; you can redistribute it and/or modify it
48.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java Thu Oct 10 10:09:16 2013 -0700 48.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/binary/SchemaBuilderImpl.java Fri Oct 11 00:07:42 2013 -0700 48.3 @@ -23,7 +23,7 @@ 48.4 * questions. 48.5 */ 48.6 /* 48.7 - * Copyright (C) 2004-2011 48.8 + * Copyright (C) 2004-2012 48.9 * 48.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 48.11 * of this software and associated documentation files (the "Software"), to deal 48.12 @@ -88,703 +88,705 @@ 48.13 import org.xml.sax.SAXParseException; 48.14 48.15 public class SchemaBuilderImpl implements SchemaBuilder, ElementAnnotationBuilder, CommentList { 48.16 - private final SchemaBuilderImpl parent; 48.17 - private boolean hadError = false; 48.18 - private final SchemaPatternBuilder pb; 48.19 - private final DatatypeLibraryFactory datatypeLibraryFactory; 48.20 - private final String inheritNs; 48.21 - private final ErrorHandler eh; 48.22 - private final OpenIncludes openIncludes; 48.23 - private final NameClassBuilder ncb =new NameClassBuilderImpl(); 48.24 - static final Localizer localizer = new Localizer(SchemaBuilderImpl.class); 48.25 48.26 - static class OpenIncludes { 48.27 - final String uri; 48.28 - final OpenIncludes parent; 48.29 + private final SchemaBuilderImpl parent; 48.30 + private boolean hadError = false; 48.31 + private final SchemaPatternBuilder pb; 48.32 + private final DatatypeLibraryFactory datatypeLibraryFactory; 48.33 + private final String inheritNs; 48.34 + private final ErrorHandler eh; 48.35 + private final OpenIncludes openIncludes; 48.36 + private final NameClassBuilder ncb = new NameClassBuilderImpl(); 48.37 + static final Localizer localizer = new Localizer(SchemaBuilderImpl.class); 48.38 48.39 - OpenIncludes(String uri, OpenIncludes parent) { 48.40 - this.uri = uri; 48.41 - this.parent = parent; 48.42 + static class OpenIncludes { 48.43 + 48.44 + final String uri; 48.45 + final OpenIncludes parent; 48.46 + 48.47 + OpenIncludes(String uri, OpenIncludes parent) { 48.48 + this.uri = uri; 48.49 + this.parent = parent; 48.50 + } 48.51 } 48.52 - } 48.53 48.54 - public ParsedPattern expandPattern(ParsedPattern _pattern) 48.55 - throws BuildException, IllegalSchemaException { 48.56 + public ParsedPattern expandPattern(ParsedPattern _pattern) 48.57 + throws BuildException, IllegalSchemaException { 48.58 Pattern pattern = (Pattern) _pattern; 48.59 if (!hadError) { 48.60 try { 48.61 pattern.checkRecursion(0); 48.62 pattern = pattern.expand(pb); 48.63 pattern.checkRestrictions(Pattern.START_CONTEXT, null, null); 48.64 - if (!hadError) return pattern; 48.65 + if (!hadError) { 48.66 + return pattern; 48.67 + } 48.68 } catch (SAXParseException e) { 48.69 error(e); 48.70 } catch (SAXException e) { 48.71 throw new BuildException(e); 48.72 } catch (RestrictionViolationException e) { 48.73 - if (e.getName() != null) 48.74 + if (e.getName() != null) { 48.75 error(e.getMessageId(), e.getName().toString(), e 48.76 - .getLocator()); 48.77 - else 48.78 + .getLocator()); 48.79 + } else { 48.80 error(e.getMessageId(), e.getLocator()); 48.81 + } 48.82 } 48.83 } 48.84 throw new IllegalSchemaException(); 48.85 } 48.86 48.87 - /** 48.88 - * 48.89 - * @param eh 48.90 - * Error handler to receive errors while building the schema. 48.91 - */ 48.92 - public SchemaBuilderImpl(ErrorHandler eh) { 48.93 - this(eh, 48.94 - new CascadingDatatypeLibraryFactory(new DatatypeLibraryLoader(), 48.95 - new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader())), 48.96 - new SchemaPatternBuilder()); 48.97 - } 48.98 + /** 48.99 + * 48.100 + * @param eh Error handler to receive errors while building the schema. 48.101 + */ 48.102 + public SchemaBuilderImpl(ErrorHandler eh) { 48.103 + this(eh, 48.104 + new CascadingDatatypeLibraryFactory(new DatatypeLibraryLoader(), 48.105 + new BuiltinDatatypeLibraryFactory(new DatatypeLibraryLoader())), 48.106 + new SchemaPatternBuilder()); 48.107 + } 48.108 48.109 - /** 48.110 - * 48.111 - * @param eh 48.112 - * Error handler to receive errors while building the schema. 48.113 - * @param datatypeLibraryFactory 48.114 - * This is consulted to locate datatype libraries. 48.115 - * @param pb 48.116 - * Used to build patterns. 48.117 - */ 48.118 - public SchemaBuilderImpl(ErrorHandler eh, 48.119 - DatatypeLibraryFactory datatypeLibraryFactory, 48.120 - SchemaPatternBuilder pb) { 48.121 - this.parent = null; 48.122 - this.eh = eh; 48.123 - this.datatypeLibraryFactory = datatypeLibraryFactory; 48.124 - this.pb = pb; 48.125 - this.inheritNs = ""; 48.126 - this.openIncludes = null; 48.127 - } 48.128 + /** 48.129 + * 48.130 + * @param eh Error handler to receive errors while building the schema. 48.131 + * @param datatypeLibraryFactory This is consulted to locate datatype 48.132 + * libraries. 48.133 + * @param pb Used to build patterns. 48.134 + */ 48.135 + public SchemaBuilderImpl(ErrorHandler eh, 48.136 + DatatypeLibraryFactory datatypeLibraryFactory, 48.137 + SchemaPatternBuilder pb) { 48.138 + this.parent = null; 48.139 + this.eh = eh; 48.140 + this.datatypeLibraryFactory = datatypeLibraryFactory; 48.141 + this.pb = pb; 48.142 + this.inheritNs = ""; 48.143 + this.openIncludes = null; 48.144 + } 48.145 48.146 - private SchemaBuilderImpl(String inheritNs, 48.147 - String uri, 48.148 - SchemaBuilderImpl parent) { 48.149 - this.parent = parent; 48.150 - this.eh = parent.eh; 48.151 - this.datatypeLibraryFactory = parent.datatypeLibraryFactory; 48.152 - this.pb = parent.pb; 48.153 - this.inheritNs = inheritNs; 48.154 - this.openIncludes = new OpenIncludes(uri, parent.openIncludes); 48.155 - } 48.156 + private SchemaBuilderImpl(String inheritNs, 48.157 + String uri, 48.158 + SchemaBuilderImpl parent) { 48.159 + this.parent = parent; 48.160 + this.eh = parent.eh; 48.161 + this.datatypeLibraryFactory = parent.datatypeLibraryFactory; 48.162 + this.pb = parent.pb; 48.163 + this.inheritNs = inheritNs; 48.164 + this.openIncludes = new OpenIncludes(uri, parent.openIncludes); 48.165 + } 48.166 48.167 - public NameClassBuilder getNameClassBuilder() { 48.168 - return ncb; 48.169 - } 48.170 + public NameClassBuilder getNameClassBuilder() { 48.171 + return ncb; 48.172 + } 48.173 48.174 - public ParsedPattern makeChoice(List patterns, Location loc, Annotations anno) 48.175 - throws BuildException { 48.176 - if (patterns.isEmpty()) 48.177 - throw new IllegalArgumentException(); 48.178 - Pattern result = (Pattern)patterns.get(0); 48.179 - for (int i = 1; i < patterns.size(); i++) 48.180 - result = pb.makeChoice(result, (Pattern)patterns.get(i)); 48.181 - return result; 48.182 - } 48.183 + public ParsedPattern makeChoice(List patterns, Location loc, Annotations anno) 48.184 + throws BuildException { 48.185 + if (patterns.isEmpty()) { 48.186 + throw new IllegalArgumentException(); 48.187 + } 48.188 + Pattern result = (Pattern) patterns.get(0); 48.189 + for (int i = 1; i < patterns.size(); i++) { 48.190 + result = pb.makeChoice(result, (Pattern) patterns.get(i)); 48.191 + } 48.192 + return result; 48.193 + } 48.194 48.195 - public ParsedPattern makeInterleave(List patterns, Location loc, Annotations anno) 48.196 - throws BuildException { 48.197 - if (patterns.isEmpty()) 48.198 - throw new IllegalArgumentException(); 48.199 - Pattern result = (Pattern)patterns.get(0); 48.200 - for (int i = 1; i < patterns.size(); i++) 48.201 - result = pb.makeInterleave(result, (Pattern)patterns.get(i)); 48.202 - return result; 48.203 - } 48.204 + public ParsedPattern makeInterleave(List patterns, Location loc, Annotations anno) 48.205 + throws BuildException { 48.206 + if (patterns.isEmpty()) { 48.207 + throw new IllegalArgumentException(); 48.208 + } 48.209 + Pattern result = (Pattern) patterns.get(0); 48.210 + for (int i = 1; i < patterns.size(); i++) { 48.211 + result = pb.makeInterleave(result, (Pattern) patterns.get(i)); 48.212 + } 48.213 + return result; 48.214 + } 48.215 48.216 - public ParsedPattern makeGroup(List patterns, Location loc, Annotations anno) 48.217 - throws BuildException { 48.218 - if (patterns.isEmpty()) 48.219 - throw new IllegalArgumentException(); 48.220 - Pattern result = (Pattern)patterns.get(0); 48.221 - for (int i = 1; i < patterns.size(); i++) 48.222 - result = pb.makeGroup(result, (Pattern)patterns.get(i)); 48.223 - return result; 48.224 - } 48.225 + public ParsedPattern makeGroup(List patterns, Location loc, Annotations anno) 48.226 + throws BuildException { 48.227 + if (patterns.isEmpty()) { 48.228 + throw new IllegalArgumentException(); 48.229 + } 48.230 + Pattern result = (Pattern) patterns.get(0); 48.231 + for (int i = 1; i < patterns.size(); i++) { 48.232 + result = pb.makeGroup(result, (Pattern) patterns.get(i)); 48.233 + } 48.234 + return result; 48.235 + } 48.236 48.237 - public ParsedPattern makeOneOrMore(ParsedPattern p, Location loc, Annotations anno) 48.238 - throws BuildException { 48.239 - return pb.makeOneOrMore((Pattern)p); 48.240 - } 48.241 + public ParsedPattern makeOneOrMore(ParsedPattern p, Location loc, Annotations anno) 48.242 + throws BuildException { 48.243 + return pb.makeOneOrMore((Pattern) p); 48.244 + } 48.245 48.246 - public ParsedPattern makeZeroOrMore(ParsedPattern p, Location loc, Annotations anno) 48.247 - throws BuildException { 48.248 - return pb.makeZeroOrMore((Pattern)p); 48.249 - } 48.250 + public ParsedPattern makeZeroOrMore(ParsedPattern p, Location loc, Annotations anno) 48.251 + throws BuildException { 48.252 + return pb.makeZeroOrMore((Pattern) p); 48.253 + } 48.254 48.255 - public ParsedPattern makeOptional(ParsedPattern p, Location loc, Annotations anno) 48.256 - throws BuildException { 48.257 - return pb.makeOptional((Pattern)p); 48.258 - } 48.259 + public ParsedPattern makeOptional(ParsedPattern p, Location loc, Annotations anno) 48.260 + throws BuildException { 48.261 + return pb.makeOptional((Pattern) p); 48.262 + } 48.263 48.264 - public ParsedPattern makeList(ParsedPattern p, Location loc, Annotations anno) 48.265 - throws BuildException { 48.266 - return pb.makeList((Pattern)p, (Locator)loc); 48.267 - } 48.268 + public ParsedPattern makeList(ParsedPattern p, Location loc, Annotations anno) 48.269 + throws BuildException { 48.270 + return pb.makeList((Pattern) p, (Locator) loc); 48.271 + } 48.272 48.273 - public ParsedPattern makeMixed(ParsedPattern p, Location loc, Annotations anno) 48.274 - throws BuildException { 48.275 - return pb.makeMixed((Pattern)p); 48.276 - } 48.277 + public ParsedPattern makeMixed(ParsedPattern p, Location loc, Annotations anno) 48.278 + throws BuildException { 48.279 + return pb.makeMixed((Pattern) p); 48.280 + } 48.281 48.282 - public ParsedPattern makeEmpty(Location loc, Annotations anno) { 48.283 - return pb.makeEmpty(); 48.284 - } 48.285 + public ParsedPattern makeEmpty(Location loc, Annotations anno) { 48.286 + return pb.makeEmpty(); 48.287 + } 48.288 48.289 - public ParsedPattern makeNotAllowed(Location loc, Annotations anno) { 48.290 - return pb.makeUnexpandedNotAllowed(); 48.291 - } 48.292 + public ParsedPattern makeNotAllowed(Location loc, Annotations anno) { 48.293 + return pb.makeUnexpandedNotAllowed(); 48.294 + } 48.295 48.296 - public ParsedPattern makeText(Location loc, Annotations anno) { 48.297 - return pb.makeText(); 48.298 - } 48.299 + public ParsedPattern makeText(Location loc, Annotations anno) { 48.300 + return pb.makeText(); 48.301 + } 48.302 48.303 - public ParsedPattern makeErrorPattern() { 48.304 - return pb.makeError(); 48.305 - } 48.306 + public ParsedPattern makeErrorPattern() { 48.307 + return pb.makeError(); 48.308 + } 48.309 48.310 // public ParsedNameClass makeErrorNameClass() { 48.311 // return new ErrorNameClass(); 48.312 // } 48.313 - 48.314 - public ParsedPattern makeAttribute(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno) 48.315 - throws BuildException { 48.316 - return pb.makeAttribute((NameClass)nc, (Pattern)p, (Locator)loc); 48.317 - } 48.318 - 48.319 - public ParsedPattern makeElement(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno) 48.320 - throws BuildException { 48.321 - return pb.makeElement((NameClass)nc, (Pattern)p, (Locator)loc); 48.322 - } 48.323 - 48.324 - private class DummyDataPatternBuilder implements DataPatternBuilder { 48.325 - public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno) 48.326 + public ParsedPattern makeAttribute(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno) 48.327 throws BuildException { 48.328 + return pb.makeAttribute((NameClass) nc, (Pattern) p, (Locator) loc); 48.329 } 48.330 48.331 - public ParsedPattern makePattern(Location loc, Annotations anno) 48.332 + public ParsedPattern makeElement(ParsedNameClass nc, ParsedPattern p, Location loc, Annotations anno) 48.333 throws BuildException { 48.334 - return pb.makeError(); 48.335 + return pb.makeElement((NameClass) nc, (Pattern) p, (Locator) loc); 48.336 } 48.337 48.338 - public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) 48.339 - throws BuildException { 48.340 - return pb.makeError(); 48.341 + private class DummyDataPatternBuilder implements DataPatternBuilder { 48.342 + 48.343 + public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno) 48.344 + throws BuildException { 48.345 + } 48.346 + 48.347 + public ParsedPattern makePattern(Location loc, Annotations anno) 48.348 + throws BuildException { 48.349 + return pb.makeError(); 48.350 + } 48.351 + 48.352 + public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) 48.353 + throws BuildException { 48.354 + return pb.makeError(); 48.355 + } 48.356 + 48.357 + public void annotation(ParsedElementAnnotation ea) { 48.358 + } 48.359 } 48.360 48.361 - public void annotation(ParsedElementAnnotation ea) { 48.362 - } 48.363 - } 48.364 + private static class ValidationContextImpl implements ValidationContext { 48.365 48.366 - private class ValidationContextImpl implements ValidationContext { 48.367 - private ValidationContext vc; 48.368 - private String ns; 48.369 + private ValidationContext vc; 48.370 + private String ns; 48.371 48.372 - ValidationContextImpl(ValidationContext vc, String ns) { 48.373 - this.vc = vc; 48.374 - this.ns = ns.length() == 0 ? null : ns; 48.375 + ValidationContextImpl(ValidationContext vc, String ns) { 48.376 + this.vc = vc; 48.377 + this.ns = ns.length() == 0 ? null : ns; 48.378 + } 48.379 + 48.380 + public String resolveNamespacePrefix(String prefix) { 48.381 + return prefix.length() == 0 ? ns : vc.resolveNamespacePrefix(prefix); 48.382 + } 48.383 + 48.384 + public String getBaseUri() { 48.385 + return vc.getBaseUri(); 48.386 + } 48.387 + 48.388 + public boolean isUnparsedEntity(String entityName) { 48.389 + return vc.isUnparsedEntity(entityName); 48.390 + } 48.391 + 48.392 + public boolean isNotation(String notationName) { 48.393 + return vc.isNotation(notationName); 48.394 + } 48.395 } 48.396 48.397 - public String resolveNamespacePrefix(String prefix) { 48.398 - return prefix.length() == 0 ? ns : vc.resolveNamespacePrefix(prefix); 48.399 + private class DataPatternBuilderImpl implements DataPatternBuilder { 48.400 + 48.401 + private DatatypeBuilder dtb; 48.402 + 48.403 + DataPatternBuilderImpl(DatatypeBuilder dtb) { 48.404 + this.dtb = dtb; 48.405 + } 48.406 + 48.407 + public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno) 48.408 + throws BuildException { 48.409 + try { 48.410 + dtb.addParameter(name, value, new ValidationContextImpl(context, ns)); 48.411 + } catch (DatatypeException e) { 48.412 + String detail = e.getMessage(); 48.413 + int pos = e.getIndex(); 48.414 + String displayedParam; 48.415 + if (pos == DatatypeException.UNKNOWN) { 48.416 + displayedParam = null; 48.417 + } else { 48.418 + displayedParam = displayParam(value, pos); 48.419 + } 48.420 + if (displayedParam != null) { 48.421 + if (detail != null) { 48.422 + error("invalid_param_detail_display", detail, displayedParam, (Locator) loc); 48.423 + } else { 48.424 + error("invalid_param_display", displayedParam, (Locator) loc); 48.425 + } 48.426 + } else if (detail != null) { 48.427 + error("invalid_param_detail", detail, (Locator) loc); 48.428 + } else { 48.429 + error("invalid_param", (Locator) loc); 48.430 + } 48.431 + } 48.432 + } 48.433 + 48.434 + String displayParam(String value, int pos) { 48.435 + if (pos < 0) { 48.436 + pos = 0; 48.437 + } else if (pos > value.length()) { 48.438 + pos = value.length(); 48.439 + } 48.440 + return localizer.message("display_param", value.substring(0, pos), value.substring(pos)); 48.441 + } 48.442 + 48.443 + public ParsedPattern makePattern(Location loc, Annotations anno) 48.444 + throws BuildException { 48.445 + try { 48.446 + return pb.makeData(dtb.createDatatype()); 48.447 + } catch (DatatypeException e) { 48.448 + String detail = e.getMessage(); 48.449 + if (detail != null) { 48.450 + error("invalid_params_detail", detail, (Locator) loc); 48.451 + } else { 48.452 + error("invalid_params", (Locator) loc); 48.453 + } 48.454 + return pb.makeError(); 48.455 + } 48.456 + } 48.457 + 48.458 + public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) 48.459 + throws BuildException { 48.460 + try { 48.461 + return pb.makeDataExcept(dtb.createDatatype(), (Pattern) except, (Locator) loc); 48.462 + } catch (DatatypeException e) { 48.463 + String detail = e.getMessage(); 48.464 + if (detail != null) { 48.465 + error("invalid_params_detail", detail, (Locator) loc); 48.466 + } else { 48.467 + error("invalid_params", (Locator) loc); 48.468 + } 48.469 + return pb.makeError(); 48.470 + } 48.471 + } 48.472 + 48.473 + public void annotation(ParsedElementAnnotation ea) { 48.474 + } 48.475 } 48.476 48.477 - public String getBaseUri() { 48.478 - return vc.getBaseUri(); 48.479 + public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc) 48.480 + throws BuildException { 48.481 + DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary); 48.482 + if (dl == null) { 48.483 + error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc); 48.484 + } else { 48.485 + try { 48.486 + return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type)); 48.487 + } catch (DatatypeException e) { 48.488 + String detail = e.getMessage(); 48.489 + if (detail != null) { 48.490 + error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator) loc); 48.491 + } else { 48.492 + error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc); 48.493 + } 48.494 + } 48.495 + } 48.496 + return new DummyDataPatternBuilder(); 48.497 } 48.498 48.499 - public boolean isUnparsedEntity(String entityName) { 48.500 - return vc.isUnparsedEntity(entityName); 48.501 + public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context context, String ns, 48.502 + Location loc, Annotations anno) throws BuildException { 48.503 + DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary); 48.504 + if (dl == null) { 48.505 + error("unrecognized_datatype_library", datatypeLibrary, (Locator) loc); 48.506 + } else { 48.507 + try { 48.508 + DatatypeBuilder dtb = dl.createDatatypeBuilder(type); 48.509 + try { 48.510 + Datatype dt = dtb.createDatatype(); 48.511 + Object obj = dt.createValue(value, new ValidationContextImpl(context, ns)); 48.512 + if (obj != null) { 48.513 + return pb.makeValue(dt, obj); 48.514 + } 48.515 + error("invalid_value", value, (Locator) loc); 48.516 + } catch (DatatypeException e) { 48.517 + String detail = e.getMessage(); 48.518 + if (detail != null) { 48.519 + error("datatype_requires_param_detail", detail, (Locator) loc); 48.520 + } else { 48.521 + error("datatype_requires_param", (Locator) loc); 48.522 + } 48.523 + } 48.524 + } catch (DatatypeException e) { 48.525 + error("unrecognized_datatype", datatypeLibrary, type, (Locator) loc); 48.526 + } 48.527 + } 48.528 + return pb.makeError(); 48.529 } 48.530 48.531 - public boolean isNotation(String notationName) { 48.532 - return vc.isNotation(notationName); 48.533 - } 48.534 - } 48.535 + static class GrammarImpl implements Grammar, Div, IncludedGrammar { 48.536 48.537 - private class DataPatternBuilderImpl implements DataPatternBuilder { 48.538 - private DatatypeBuilder dtb; 48.539 - DataPatternBuilderImpl(DatatypeBuilder dtb) { 48.540 - this.dtb = dtb; 48.541 + private final SchemaBuilderImpl sb; 48.542 + private final Hashtable defines; 48.543 + private final RefPattern startRef; 48.544 + private final Scope parent; 48.545 + 48.546 + private GrammarImpl(SchemaBuilderImpl sb, Scope parent) { 48.547 + this.sb = sb; 48.548 + this.parent = parent; 48.549 + this.defines = new Hashtable(); 48.550 + this.startRef = new RefPattern(null); 48.551 + } 48.552 + 48.553 + protected GrammarImpl(SchemaBuilderImpl sb, GrammarImpl g) { 48.554 + this.sb = sb; 48.555 + parent = g.parent; 48.556 + startRef = g.startRef; 48.557 + defines = g.defines; 48.558 + } 48.559 + 48.560 + public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException { 48.561 + for (Enumeration e = defines.keys(); 48.562 + e.hasMoreElements();) { 48.563 + String name = (String) e.nextElement(); 48.564 + RefPattern rp = (RefPattern) defines.get(name); 48.565 + if (rp.getPattern() == null) { 48.566 + sb.error("reference_to_undefined", name, rp.getRefLocator()); 48.567 + rp.setPattern(sb.pb.makeError()); 48.568 + } 48.569 + } 48.570 + Pattern start = startRef.getPattern(); 48.571 + if (start == null) { 48.572 + sb.error("missing_start_element", (Locator) loc); 48.573 + start = sb.pb.makeError(); 48.574 + } 48.575 + return start; 48.576 + } 48.577 + 48.578 + public void endDiv(Location loc, Annotations anno) throws BuildException { 48.579 + // nothing to do 48.580 + } 48.581 + 48.582 + public ParsedPattern endIncludedGrammar(Location loc, Annotations anno) throws BuildException { 48.583 + return null; 48.584 + } 48.585 + 48.586 + public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno) 48.587 + throws BuildException { 48.588 + define(lookup(name), combine, pattern, loc); 48.589 + } 48.590 + 48.591 + private void define(RefPattern rp, GrammarSection.Combine combine, ParsedPattern pattern, Location loc) 48.592 + throws BuildException { 48.593 + switch (rp.getReplacementStatus()) { 48.594 + case RefPattern.REPLACEMENT_KEEP: 48.595 + if (combine == null) { 48.596 + if (rp.isCombineImplicit()) { 48.597 + if (rp.getName() == null) { 48.598 + sb.error("duplicate_start", (Locator) loc); 48.599 + } else { 48.600 + sb.error("duplicate_define", rp.getName(), (Locator) loc); 48.601 + } 48.602 + } else { 48.603 + rp.setCombineImplicit(); 48.604 + } 48.605 + } else { 48.606 + byte combineType = (combine == COMBINE_CHOICE ? RefPattern.COMBINE_CHOICE : RefPattern.COMBINE_INTERLEAVE); 48.607 + if (rp.getCombineType() != RefPattern.COMBINE_NONE 48.608 + && rp.getCombineType() != combineType) { 48.609 + if (rp.getName() == null) { 48.610 + sb.error("conflict_combine_start", (Locator) loc); 48.611 + } else { 48.612 + sb.error("conflict_combine_define", rp.getName(), (Locator) loc); 48.613 + } 48.614 + } 48.615 + rp.setCombineType(combineType); 48.616 + } 48.617 + Pattern p = (Pattern) pattern; 48.618 + if (rp.getPattern() == null) { 48.619 + rp.setPattern(p); 48.620 + } else if (rp.getCombineType() == RefPattern.COMBINE_INTERLEAVE) { 48.621 + rp.setPattern(sb.pb.makeInterleave(rp.getPattern(), p)); 48.622 + } else { 48.623 + rp.setPattern(sb.pb.makeChoice(rp.getPattern(), p)); 48.624 + } 48.625 + break; 48.626 + case RefPattern.REPLACEMENT_REQUIRE: 48.627 + rp.setReplacementStatus(RefPattern.REPLACEMENT_IGNORE); 48.628 + break; 48.629 + case RefPattern.REPLACEMENT_IGNORE: 48.630 + break; 48.631 + } 48.632 + } 48.633 + 48.634 + public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException { 48.635 + } 48.636 + 48.637 + public void topLevelComment(CommentList comments) throws BuildException { 48.638 + } 48.639 + 48.640 + private RefPattern lookup(String name) { 48.641 + if (name == START) { 48.642 + return startRef; 48.643 + } 48.644 + return lookup1(name); 48.645 + } 48.646 + 48.647 + private RefPattern lookup1(String name) { 48.648 + RefPattern p = (RefPattern) defines.get(name); 48.649 + if (p == null) { 48.650 + p = new RefPattern(name); 48.651 + defines.put(name, p); 48.652 + } 48.653 + return p; 48.654 + } 48.655 + 48.656 + public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException { 48.657 + RefPattern p = lookup1(name); 48.658 + if (p.getRefLocator() == null && loc != null) { 48.659 + p.setRefLocator((Locator) loc); 48.660 + } 48.661 + return p; 48.662 + } 48.663 + 48.664 + public ParsedPattern makeParentRef(String name, Location loc, Annotations anno) throws BuildException { 48.665 + // TODO: do this check by the caller 48.666 + if (parent == null) { 48.667 + sb.error("parent_ref_outside_grammar", (Locator) loc); 48.668 + return sb.makeErrorPattern(); 48.669 + } 48.670 + return parent.makeRef(name, loc, anno); 48.671 + } 48.672 + 48.673 + public Div makeDiv() { 48.674 + return this; 48.675 + } 48.676 + 48.677 + public Include makeInclude() { 48.678 + return new IncludeImpl(sb, this); 48.679 + } 48.680 } 48.681 48.682 - public void addParam(String name, String value, Context context, String ns, Location loc, Annotations anno) 48.683 - throws BuildException { 48.684 - try { 48.685 - dtb.addParameter(name, value, new ValidationContextImpl(context, ns)); 48.686 - } 48.687 - catch (DatatypeException e) { 48.688 - String detail = e.getMessage(); 48.689 - int pos = e.getIndex(); 48.690 - String displayedParam; 48.691 - if (pos == DatatypeException.UNKNOWN) 48.692 - displayedParam = null; 48.693 - else 48.694 - displayedParam = displayParam(value, pos); 48.695 - if (displayedParam != null) { 48.696 - if (detail != null) 48.697 - error("invalid_param_detail_display", detail, displayedParam, (Locator)loc); 48.698 - else 48.699 - error("invalid_param_display", displayedParam, (Locator)loc); 48.700 + static class Override { 48.701 + 48.702 + Override(RefPattern prp, Override next) { 48.703 + this.prp = prp; 48.704 + this.next = next; 48.705 } 48.706 - else if (detail != null) 48.707 - error("invalid_param_detail", detail, (Locator)loc); 48.708 - else 48.709 - error("invalid_param", (Locator)loc); 48.710 - } 48.711 + RefPattern prp; 48.712 + Override next; 48.713 + byte replacementStatus; 48.714 } 48.715 48.716 - String displayParam(String value, int pos) { 48.717 - if (pos < 0) 48.718 - pos = 0; 48.719 - else if (pos > value.length()) 48.720 - pos = value.length(); 48.721 - return localizer.message("display_param", value.substring(0, pos), value.substring(pos)); 48.722 + private static class IncludeImpl implements Include, Div { 48.723 + 48.724 + private SchemaBuilderImpl sb; 48.725 + private Override overrides; 48.726 + private GrammarImpl grammar; 48.727 + 48.728 + private IncludeImpl(SchemaBuilderImpl sb, GrammarImpl grammar) { 48.729 + this.sb = sb; 48.730 + this.grammar = grammar; 48.731 + } 48.732 + 48.733 + public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno) 48.734 + throws BuildException { 48.735 + RefPattern rp = grammar.lookup(name); 48.736 + overrides = new Override(rp, overrides); 48.737 + grammar.define(rp, combine, pattern, loc); 48.738 + } 48.739 + 48.740 + public void endDiv(Location loc, Annotations anno) throws BuildException { 48.741 + // nothing to do 48.742 + } 48.743 + 48.744 + public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException { 48.745 + // nothing to do 48.746 + } 48.747 + 48.748 + public void topLevelComment(CommentList comments) throws BuildException { 48.749 + } 48.750 + 48.751 + public Div makeDiv() { 48.752 + return this; 48.753 + } 48.754 + 48.755 + public void endInclude(Parseable current, String uri, String ns, 48.756 + Location loc, Annotations anno) throws BuildException { 48.757 + for (OpenIncludes inc = sb.openIncludes; 48.758 + inc != null; 48.759 + inc = inc.parent) { 48.760 + if (inc.uri.equals(uri)) { 48.761 + sb.error("recursive_include", uri, (Locator) loc); 48.762 + return; 48.763 + } 48.764 + } 48.765 + 48.766 + for (Override o = overrides; o != null; o = o.next) { 48.767 + o.replacementStatus = o.prp.getReplacementStatus(); 48.768 + o.prp.setReplacementStatus(RefPattern.REPLACEMENT_REQUIRE); 48.769 + } 48.770 + try { 48.771 + SchemaBuilderImpl isb = new SchemaBuilderImpl(ns, uri, sb); 48.772 + current.parseInclude(uri, isb, new GrammarImpl(isb, grammar), ns); 48.773 + for (Override o = overrides; o != null; o = o.next) { 48.774 + if (o.prp.getReplacementStatus() == RefPattern.REPLACEMENT_REQUIRE) { 48.775 + if (o.prp.getName() == null) { 48.776 + sb.error("missing_start_replacement", (Locator) loc); 48.777 + } else { 48.778 + sb.error("missing_define_replacement", o.prp.getName(), (Locator) loc); 48.779 + } 48.780 + } 48.781 + } 48.782 + } catch (IllegalSchemaException e) { 48.783 + sb.noteError(); 48.784 + } finally { 48.785 + for (Override o = overrides; o != null; o = o.next) { 48.786 + o.prp.setReplacementStatus(o.replacementStatus); 48.787 + } 48.788 + } 48.789 + } 48.790 + 48.791 + public Include makeInclude() { 48.792 + return null; 48.793 + } 48.794 } 48.795 48.796 - public ParsedPattern makePattern(Location loc, Annotations anno) 48.797 - throws BuildException { 48.798 - try { 48.799 - return pb.makeData(dtb.createDatatype()); 48.800 - } 48.801 - catch (DatatypeException e) { 48.802 - String detail = e.getMessage(); 48.803 - if (detail != null) 48.804 - error("invalid_params_detail", detail, (Locator)loc); 48.805 - else 48.806 - error("invalid_params", (Locator)loc); 48.807 - return pb.makeError(); 48.808 - } 48.809 + public Grammar makeGrammar(Scope parent) { 48.810 + return new GrammarImpl(this, parent); 48.811 } 48.812 48.813 - public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) 48.814 - throws BuildException { 48.815 - try { 48.816 - return pb.makeDataExcept(dtb.createDatatype(), (Pattern)except, (Locator)loc); 48.817 - } 48.818 - catch (DatatypeException e) { 48.819 - String detail = e.getMessage(); 48.820 - if (detail != null) 48.821 - error("invalid_params_detail", detail, (Locator)loc); 48.822 - else 48.823 - error("invalid_params", (Locator)loc); 48.824 - return pb.makeError(); 48.825 - } 48.826 + public ParsedPattern annotate(ParsedPattern p, Annotations anno) throws BuildException { 48.827 + return p; 48.828 } 48.829 48.830 - public void annotation(ParsedElementAnnotation ea) { 48.831 - } 48.832 - } 48.833 - 48.834 - public DataPatternBuilder makeDataPatternBuilder(String datatypeLibrary, String type, Location loc) 48.835 - throws BuildException { 48.836 - DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary); 48.837 - if (dl == null) 48.838 - error("unrecognized_datatype_library", datatypeLibrary, (Locator)loc); 48.839 - else { 48.840 - try { 48.841 - return new DataPatternBuilderImpl(dl.createDatatypeBuilder(type)); 48.842 - } 48.843 - catch (DatatypeException e) { 48.844 - String detail = e.getMessage(); 48.845 - if (detail != null) 48.846 - error("unsupported_datatype_detail", datatypeLibrary, type, detail, (Locator)loc); 48.847 - else 48.848 - error("unrecognized_datatype", datatypeLibrary, type, (Locator)loc); 48.849 - } 48.850 - } 48.851 - return new DummyDataPatternBuilder(); 48.852 - } 48.853 - 48.854 - public ParsedPattern makeValue(String datatypeLibrary, String type, String value, Context context, String ns, 48.855 - Location loc, Annotations anno) throws BuildException { 48.856 - DatatypeLibrary dl = datatypeLibraryFactory.createDatatypeLibrary(datatypeLibrary); 48.857 - if (dl == null) 48.858 - error("unrecognized_datatype_library", datatypeLibrary, (Locator)loc); 48.859 - else { 48.860 - try { 48.861 - DatatypeBuilder dtb = dl.createDatatypeBuilder(type); 48.862 - try { 48.863 - Datatype dt = dtb.createDatatype(); 48.864 - Object obj = dt.createValue(value, new ValidationContextImpl(context, ns)); 48.865 - if (obj != null) 48.866 - return pb.makeValue(dt, obj); 48.867 - error("invalid_value", value, (Locator)loc); 48.868 - } 48.869 - catch (DatatypeException e) { 48.870 - String detail = e.getMessage(); 48.871 - if (detail != null) 48.872 - error("datatype_requires_param_detail", detail, (Locator)loc); 48.873 - else 48.874 - error("datatype_requires_param", (Locator)loc); 48.875 - } 48.876 - } 48.877 - catch (DatatypeException e) { 48.878 - error("unrecognized_datatype", datatypeLibrary, type, (Locator)loc); 48.879 - } 48.880 - } 48.881 - return pb.makeError(); 48.882 - } 48.883 - 48.884 - static class GrammarImpl implements Grammar, Div, IncludedGrammar { 48.885 - private final SchemaBuilderImpl sb; 48.886 - private final Hashtable defines; 48.887 - private final RefPattern startRef; 48.888 - private final Scope parent; 48.889 - 48.890 - private GrammarImpl(SchemaBuilderImpl sb, Scope parent) { 48.891 - this.sb = sb; 48.892 - this.parent = parent; 48.893 - this.defines = new Hashtable(); 48.894 - this.startRef = new RefPattern(null); 48.895 + public ParsedPattern annotateAfter(ParsedPattern p, ParsedElementAnnotation e) throws BuildException { 48.896 + return p; 48.897 } 48.898 48.899 - protected GrammarImpl(SchemaBuilderImpl sb, GrammarImpl g) { 48.900 - this.sb = sb; 48.901 - parent = g.parent; 48.902 - startRef = g.startRef; 48.903 - defines = g.defines; 48.904 + public ParsedPattern commentAfter(ParsedPattern p, CommentList comments) throws BuildException { 48.905 + return p; 48.906 } 48.907 48.908 - public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException { 48.909 - for (Enumeration e = defines.keys(); 48.910 - e.hasMoreElements();) { 48.911 - String name = (String)e.nextElement(); 48.912 - RefPattern rp = (RefPattern)defines.get(name); 48.913 - if (rp.getPattern() == null) { 48.914 - sb.error("reference_to_undefined", name, rp.getRefLocator()); 48.915 - rp.setPattern(sb.pb.makeError()); 48.916 + public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope, 48.917 + Location loc, Annotations anno) 48.918 + throws BuildException { 48.919 + for (OpenIncludes inc = openIncludes; 48.920 + inc != null; 48.921 + inc = inc.parent) { 48.922 + if (inc.uri.equals(uri)) { 48.923 + error("recursive_include", uri, (Locator) loc); 48.924 + return pb.makeError(); 48.925 + } 48.926 } 48.927 - } 48.928 - Pattern start = startRef.getPattern(); 48.929 - if (start == null) { 48.930 - sb.error("missing_start_element", (Locator)loc); 48.931 - start = sb.pb.makeError(); 48.932 - } 48.933 - return start; 48.934 + try { 48.935 + return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns); 48.936 + } catch (IllegalSchemaException e) { 48.937 + noteError(); 48.938 + return pb.makeError(); 48.939 + } 48.940 } 48.941 48.942 - public void endDiv(Location loc, Annotations anno) throws BuildException { 48.943 - // nothing to do 48.944 + public Location makeLocation(String systemId, int lineNumber, int columnNumber) { 48.945 + return new LocatorImpl(systemId, lineNumber, columnNumber); 48.946 } 48.947 48.948 - public ParsedPattern endIncludedGrammar(Location loc, Annotations anno) throws BuildException { 48.949 + public Annotations makeAnnotations(CommentList comments, Context context) { 48.950 + return this; 48.951 + } 48.952 + 48.953 + public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, 48.954 + Location loc, CommentList comments, Context context) { 48.955 + return this; 48.956 + } 48.957 + 48.958 + public CommentList makeCommentList() { 48.959 + return this; 48.960 + } 48.961 + 48.962 + public void addComment(String value, Location loc) throws BuildException { 48.963 + } 48.964 + 48.965 + public void addAttribute(String ns, String localName, String prefix, String value, Location loc) { 48.966 + // nothing needed 48.967 + } 48.968 + 48.969 + public void addElement(ParsedElementAnnotation ea) { 48.970 + // nothing needed 48.971 + } 48.972 + 48.973 + public void addComment(CommentList comments) throws BuildException { 48.974 + // nothing needed 48.975 + } 48.976 + 48.977 + public void addLeadingComment(CommentList comments) throws BuildException { 48.978 + // nothing needed 48.979 + } 48.980 + 48.981 + public ParsedElementAnnotation makeElementAnnotation() { 48.982 return null; 48.983 } 48.984 48.985 - public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno) 48.986 - throws BuildException { 48.987 - define(lookup(name), combine, pattern, loc); 48.988 + public void addText(String value, Location loc, CommentList comments) throws BuildException { 48.989 } 48.990 48.991 - private void define(RefPattern rp, GrammarSection.Combine combine, ParsedPattern pattern, Location loc) 48.992 - throws BuildException { 48.993 - switch (rp.getReplacementStatus()) { 48.994 - case RefPattern.REPLACEMENT_KEEP: 48.995 - if (combine == null) { 48.996 - if (rp.isCombineImplicit()) { 48.997 - if (rp.getName() == null) 48.998 - sb.error("duplicate_start", (Locator)loc); 48.999 - else 48.1000 - sb.error("duplicate_define", rp.getName(), (Locator)loc); 48.1001 - } 48.1002 - else 48.1003 - rp.setCombineImplicit(); 48.1004 - } 48.1005 - else { 48.1006 - byte combineType = (combine == COMBINE_CHOICE ? RefPattern.COMBINE_CHOICE : RefPattern.COMBINE_INTERLEAVE); 48.1007 - if (rp.getCombineType() != RefPattern.COMBINE_NONE 48.1008 - && rp.getCombineType() != combineType) { 48.1009 - if (rp.getName() == null) 48.1010 - sb.error("conflict_combine_start", (Locator)loc); 48.1011 - else 48.1012 - sb.error("conflict_combine_define", rp.getName(), (Locator)loc); 48.1013 - } 48.1014 - rp.setCombineType(combineType); 48.1015 - } 48.1016 - Pattern p = (Pattern)pattern; 48.1017 - if (rp.getPattern() == null) 48.1018 - rp.setPattern(p); 48.1019 - else if (rp.getCombineType() == RefPattern.COMBINE_INTERLEAVE) 48.1020 - rp.setPattern(sb.pb.makeInterleave(rp.getPattern(), p)); 48.1021 - else 48.1022 - rp.setPattern(sb.pb.makeChoice(rp.getPattern(), p)); 48.1023 - break; 48.1024 - case RefPattern.REPLACEMENT_REQUIRE: 48.1025 - rp.setReplacementStatus(RefPattern.REPLACEMENT_IGNORE); 48.1026 - break; 48.1027 - case RefPattern.REPLACEMENT_IGNORE: 48.1028 - break; 48.1029 - } 48.1030 + public boolean usesComments() { 48.1031 + return false; 48.1032 } 48.1033 48.1034 - public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException { 48.1035 + private void error(SAXParseException message) throws BuildException { 48.1036 + noteError(); 48.1037 + try { 48.1038 + if (eh != null) { 48.1039 + eh.error(message); 48.1040 + } 48.1041 + } catch (SAXException e) { 48.1042 + throw new BuildException(e); 48.1043 + } 48.1044 } 48.1045 48.1046 - public void topLevelComment(CommentList comments) throws BuildException { 48.1047 + private void error(String key, Locator loc) throws BuildException { 48.1048 + error(new SAXParseException(localizer.message(key), loc)); 48.1049 } 48.1050 48.1051 - private RefPattern lookup(String name) { 48.1052 - if (name == START) 48.1053 - return startRef; 48.1054 - return lookup1(name); 48.1055 + private void error(String key, String arg, Locator loc) throws BuildException { 48.1056 + error(new SAXParseException(localizer.message(key, arg), loc)); 48.1057 } 48.1058 48.1059 - private RefPattern lookup1(String name) { 48.1060 - RefPattern p = (RefPattern)defines.get(name); 48.1061 - if (p == null) { 48.1062 - p = new RefPattern(name); 48.1063 - defines.put(name, p); 48.1064 - } 48.1065 - return p; 48.1066 + private void error(String key, String arg1, String arg2, Locator loc) throws BuildException { 48.1067 + error(new SAXParseException(localizer.message(key, arg1, arg2), loc)); 48.1068 } 48.1069 48.1070 - public ParsedPattern makeRef(String name, Location loc, Annotations anno) throws BuildException { 48.1071 - RefPattern p = lookup1(name); 48.1072 - if (p.getRefLocator() == null && loc != null) 48.1073 - p.setRefLocator((Locator)loc); 48.1074 - return p; 48.1075 + private void error(String key, String arg1, String arg2, String arg3, Locator loc) throws BuildException { 48.1076 + error(new SAXParseException(localizer.message(key, new Object[]{arg1, arg2, arg3}), loc)); 48.1077 } 48.1078 48.1079 - public ParsedPattern makeParentRef(String name, Location loc, Annotations anno) throws BuildException { 48.1080 - // TODO: do this check by the caller 48.1081 - if (parent == null) { 48.1082 - sb.error("parent_ref_outside_grammar", (Locator)loc); 48.1083 - return sb.makeErrorPattern(); 48.1084 - } 48.1085 - return parent.makeRef(name, loc, anno); 48.1086 + private void noteError() { 48.1087 + if (!hadError && parent != null) { 48.1088 + parent.noteError(); 48.1089 + } 48.1090 + hadError = true; 48.1091 } 48.1092 - 48.1093 - public Div makeDiv() { 48.1094 - return this; 48.1095 - } 48.1096 - 48.1097 - public Include makeInclude() { 48.1098 - return new IncludeImpl(sb, this); 48.1099 - } 48.1100 - 48.1101 - } 48.1102 - 48.1103 - 48.1104 - static class Override { 48.1105 - Override(RefPattern prp, Override next) { 48.1106 - this.prp = prp; 48.1107 - this.next = next; 48.1108 - } 48.1109 - 48.1110 - RefPattern prp; 48.1111 - Override next; 48.1112 - byte replacementStatus; 48.1113 - } 48.1114 - 48.1115 - 48.1116 - private static class IncludeImpl implements Include, Div { 48.1117 - private SchemaBuilderImpl sb; 48.1118 - private Override overrides; 48.1119 - private GrammarImpl grammar; 48.1120 - 48.1121 - private IncludeImpl(SchemaBuilderImpl sb, GrammarImpl grammar) { 48.1122 - this.sb = sb; 48.1123 - this.grammar = grammar; 48.1124 - } 48.1125 - 48.1126 - public void define(String name, GrammarSection.Combine combine, ParsedPattern pattern, Location loc, Annotations anno) 48.1127 - throws BuildException { 48.1128 - RefPattern rp = grammar.lookup(name); 48.1129 - overrides = new Override(rp, overrides); 48.1130 - grammar.define(rp, combine, pattern, loc); 48.1131 - } 48.1132 - 48.1133 - public void endDiv(Location loc, Annotations anno) throws BuildException { 48.1134 - // nothing to do 48.1135 - } 48.1136 - 48.1137 - public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException { 48.1138 - // nothing to do 48.1139 - } 48.1140 - 48.1141 - public void topLevelComment(CommentList comments) throws BuildException { 48.1142 - } 48.1143 - 48.1144 - public Div makeDiv() { 48.1145 - return this; 48.1146 - } 48.1147 - 48.1148 - public void endInclude(Parseable current,String uri, String ns, 48.1149 - Location loc, Annotations anno) throws BuildException { 48.1150 - for (OpenIncludes inc = sb.openIncludes; 48.1151 - inc != null; 48.1152 - inc = inc.parent) { 48.1153 - if (inc.uri.equals(uri)) { 48.1154 - sb.error("recursive_include", uri, (Locator)loc); 48.1155 - return; 48.1156 - } 48.1157 - } 48.1158 - 48.1159 - for (Override o = overrides; o != null; o = o.next) { 48.1160 - o.replacementStatus = o.prp.getReplacementStatus(); 48.1161 - o.prp.setReplacementStatus(RefPattern.REPLACEMENT_REQUIRE); 48.1162 - } 48.1163 - try { 48.1164 - SchemaBuilderImpl isb = new SchemaBuilderImpl(ns, uri, sb); 48.1165 - current.parseInclude(uri, isb, new GrammarImpl(isb, grammar), ns); 48.1166 - for (Override o = overrides; o != null; o = o.next) { 48.1167 - if (o.prp.getReplacementStatus() == RefPattern.REPLACEMENT_REQUIRE) { 48.1168 - if (o.prp.getName() == null) 48.1169 - sb.error("missing_start_replacement", (Locator)loc); 48.1170 - else 48.1171 - sb.error("missing_define_replacement", o.prp.getName(), (Locator)loc); 48.1172 - } 48.1173 - } 48.1174 - } 48.1175 - catch (IllegalSchemaException e) { 48.1176 - sb.noteError(); 48.1177 - } 48.1178 - finally { 48.1179 - for (Override o = overrides; o != null; o = o.next) 48.1180 - o.prp.setReplacementStatus(o.replacementStatus); 48.1181 - } 48.1182 - } 48.1183 - 48.1184 - public Include makeInclude() { 48.1185 - return null; 48.1186 - } 48.1187 - } 48.1188 - 48.1189 - public Grammar makeGrammar(Scope parent) { 48.1190 - return new GrammarImpl(this, parent); 48.1191 - } 48.1192 - 48.1193 - public ParsedPattern annotate(ParsedPattern p, Annotations anno) throws BuildException { 48.1194 - return p; 48.1195 - } 48.1196 - 48.1197 - 48.1198 - public ParsedPattern annotateAfter(ParsedPattern p, ParsedElementAnnotation e) throws BuildException { 48.1199 - return p; 48.1200 - } 48.1201 - 48.1202 - public ParsedPattern commentAfter(ParsedPattern p, CommentList comments) throws BuildException { 48.1203 - return p; 48.1204 - } 48.1205 - 48.1206 - 48.1207 - public ParsedPattern makeExternalRef(Parseable current, String uri, String ns, Scope scope, 48.1208 - Location loc, Annotations anno) 48.1209 - throws BuildException { 48.1210 - for (OpenIncludes inc = openIncludes; 48.1211 - inc != null; 48.1212 - inc = inc.parent) { 48.1213 - if (inc.uri.equals(uri)) { 48.1214 - error("recursive_include", uri, (Locator)loc); 48.1215 - return pb.makeError(); 48.1216 - } 48.1217 - } 48.1218 - try { 48.1219 - return current.parseExternal(uri, new SchemaBuilderImpl(ns, uri, this), scope, ns ); 48.1220 - } 48.1221 - catch (IllegalSchemaException e) { 48.1222 - noteError(); 48.1223 - return pb.makeError(); 48.1224 - } 48.1225 - } 48.1226 - 48.1227 - 48.1228 - 48.1229 - public Location makeLocation(String systemId, int lineNumber, int columnNumber) { 48.1230 - return new LocatorImpl(systemId, lineNumber, columnNumber); 48.1231 - } 48.1232 - 48.1233 - public Annotations makeAnnotations(CommentList comments, Context context) { 48.1234 - return this; 48.1235 - } 48.1236 - 48.1237 - public ElementAnnotationBuilder makeElementAnnotationBuilder(String ns, String localName, String prefix, 48.1238 - Location loc, CommentList comments, Context context) { 48.1239 - return this; 48.1240 - } 48.1241 - 48.1242 - public CommentList makeCommentList() { 48.1243 - return this; 48.1244 - } 48.1245 - 48.1246 - public void addComment(String value, Location loc) throws BuildException { 48.1247 - } 48.1248 - 48.1249 - public void addAttribute(String ns, String localName, String prefix, String value, Location loc) { 48.1250 - // nothing needed 48.1251 - } 48.1252 - 48.1253 - public void addElement(ParsedElementAnnotation ea) { 48.1254 - // nothing needed 48.1255 - } 48.1256 - 48.1257 - public void addComment(CommentList comments) throws BuildException { 48.1258 - // nothing needed 48.1259 - } 48.1260 - 48.1261 - public void addLeadingComment(CommentList comments) throws BuildException { 48.1262 - // nothing needed 48.1263 - } 48.1264 - 48.1265 - public ParsedElementAnnotation makeElementAnnotation() { 48.1266 - return null; 48.1267 - } 48.1268 - 48.1269 - public void addText(String value, Location loc, CommentList comments) throws BuildException { 48.1270 - } 48.1271 - 48.1272 - public boolean usesComments() { 48.1273 - return false; 48.1274 - } 48.1275 - 48.1276 - private void error(SAXParseException message) throws BuildException { 48.1277 - noteError(); 48.1278 - try { 48.1279 - if (eh != null) 48.1280 - eh.error(message); 48.1281 - } 48.1282 - catch (SAXException e) { 48.1283 - throw new BuildException(e); 48.1284 - } 48.1285 - } 48.1286 - 48.1287 - private void warning(SAXParseException message) throws BuildException { 48.1288 - try { 48.1289 - if (eh != null) 48.1290 - eh.warning(message); 48.1291 - } 48.1292 - catch (SAXException e) { 48.1293 - throw new BuildException(e); 48.1294 - } 48.1295 - } 48.1296 - 48.1297 - private void error(String key, Locator loc) throws BuildException { 48.1298 - error(new SAXParseException(localizer.message(key), loc)); 48.1299 - } 48.1300 - 48.1301 - private void error(String key, String arg, Locator loc) throws BuildException { 48.1302 - error(new SAXParseException(localizer.message(key, arg), loc)); 48.1303 - } 48.1304 - 48.1305 - private void error(String key, String arg1, String arg2, Locator loc) throws BuildException { 48.1306 - error(new SAXParseException(localizer.message(key, arg1, arg2), loc)); 48.1307 - } 48.1308 - 48.1309 - private void error(String key, String arg1, String arg2, String arg3, Locator loc) throws BuildException { 48.1310 - error(new SAXParseException(localizer.message(key, new Object[]{arg1, arg2, arg3}), loc)); 48.1311 - } 48.1312 - private void noteError() { 48.1313 - if (!hadError && parent != null) 48.1314 - parent.noteError(); 48.1315 - hadError = true; 48.1316 - } 48.1317 - 48.1318 }
49.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java Thu Oct 10 10:09:16 2013 -0700 49.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DDataPattern.java Fri Oct 11 00:07:42 2013 -0700 49.3 @@ -23,7 +23,7 @@ 49.4 * questions. 49.5 */ 49.6 /* 49.7 - * Copyright (C) 2004-2011 49.8 + * Copyright (C) 2004-2012 49.9 * 49.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 49.11 * of this software and associated documentation files (the "Software"), to deal
50.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java Thu Oct 10 10:09:16 2013 -0700 50.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DPattern.java Fri Oct 11 00:07:42 2013 -0700 50.3 @@ -23,7 +23,7 @@ 50.4 * questions. 50.5 */ 50.6 /* 50.7 - * Copyright (C) 2004-2011 50.8 + * Copyright (C) 2004-2012 50.9 * 50.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 50.11 * of this software and associated documentation files (the "Software"), to deal 50.12 @@ -55,9 +55,9 @@ 50.13 * @author Kohsuke Kawaguchi (kk@kohsuke.org) 50.14 */ 50.15 public abstract class DPattern implements ParsedPattern { 50.16 + 50.17 Locator location; 50.18 DAnnotation annotation; 50.19 - 50.20 /** 50.21 * Used to chain the child patterns in a doubly-linked list. 50.22 */ 50.23 @@ -74,12 +74,12 @@ 50.24 /** 50.25 * Returns the annotation associated with it. 50.26 * 50.27 - * @return 50.28 - * may be empty, but never be null. 50.29 + * @return may be empty, but never be null. 50.30 */ 50.31 public DAnnotation getAnnotation() { 50.32 - if(annotation==null) 50.33 + if (annotation == null) { 50.34 return DAnnotation.EMPTY; 50.35 + } 50.36 return annotation; 50.37 } 50.38 50.39 @@ -90,7 +90,7 @@ 50.40 */ 50.41 public abstract boolean isNullable(); 50.42 50.43 - public abstract <V> V accept( DPatternVisitor<V> visitor ); 50.44 + public abstract <V> V accept(DPatternVisitor<V> visitor); 50.45 50.46 /** 50.47 * Creates a {@link Parseable} object that reparses this pattern.
51.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java Thu Oct 10 10:09:16 2013 -0700 51.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DXMLPrinter.java Fri Oct 11 00:07:42 2013 -0700 51.3 @@ -110,7 +110,11 @@ 51.4 visitor.on(grammar); 51.5 visitor.endDocument(); 51.6 } catch (XMLWriterException e) { 51.7 - throw (XMLStreamException) e.getCause(); 51.8 + if (e.getCause() instanceof XMLStreamException) { 51.9 + throw (XMLStreamException) e.getCause(); 51.10 + } else { 51.11 + throw new XMLStreamException(e); 51.12 + } 51.13 } 51.14 } 51.15 51.16 @@ -123,7 +127,11 @@ 51.17 try { 51.18 pattern.accept(visitor); 51.19 } catch (XMLWriterException e) { 51.20 - throw (XMLStreamException) e.getCause(); 51.21 + if (e.getCause() instanceof XMLStreamException) { 51.22 + throw (XMLStreamException) e.getCause(); 51.23 + } else { 51.24 + throw new XMLStreamException(e); 51.25 + } 51.26 } 51.27 } 51.28 51.29 @@ -136,7 +144,11 @@ 51.30 try { 51.31 nc.accept(ncVisitor); 51.32 } catch (XMLWriterException e) { 51.33 - throw (XMLStreamException) e.getCause(); 51.34 + if (e.getCause() instanceof XMLStreamException) { 51.35 + throw (XMLStreamException) e.getCause(); 51.36 + } else { 51.37 + throw new XMLStreamException(e); 51.38 + } 51.39 } 51.40 } 51.41
52.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java Thu Oct 10 10:09:16 2013 -0700 52.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/DataPatternBuilderImpl.java Fri Oct 11 00:07:42 2013 -0700 52.3 @@ -23,7 +23,7 @@ 52.4 * questions. 52.5 */ 52.6 /* 52.7 - * Copyright (C) 2004-2011 52.8 + * Copyright (C) 2004-2012 52.9 * 52.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 52.11 * of this software and associated documentation files (the "Software"), to deal 52.12 @@ -82,8 +82,9 @@ 52.13 52.14 public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) throws BuildException { 52.15 p.except = (DPattern)except; 52.16 - if(anno!=null) 52.17 + if (anno!=null) { 52.18 p.annotation = ((Annotation)anno).getResult(); 52.19 + } 52.20 return p; 52.21 } 52.22 }
53.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java Thu Oct 10 10:09:16 2013 -0700 53.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/digested/GrammarBuilderImpl.java Fri Oct 11 00:07:42 2013 -0700 53.3 @@ -23,7 +23,7 @@ 53.4 * questions. 53.5 */ 53.6 /* 53.7 - * Copyright (C) 2004-2011 53.8 + * Copyright (C) 2004-2012 53.9 * 53.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 53.11 * of this software and associated documentation files (the "Software"), to deal 53.12 @@ -45,6 +45,9 @@ 53.13 */ 53.14 package com.sun.xml.internal.rngom.digested; 53.15 53.16 +import java.util.ArrayList; 53.17 +import java.util.List; 53.18 + 53.19 import com.sun.xml.internal.rngom.ast.builder.Annotations; 53.20 import com.sun.xml.internal.rngom.ast.builder.BuildException; 53.21 import com.sun.xml.internal.rngom.ast.builder.CommentList; 53.22 @@ -58,9 +61,6 @@ 53.23 import com.sun.xml.internal.rngom.ast.util.LocatorImpl; 53.24 import org.w3c.dom.Element; 53.25 53.26 -import java.util.ArrayList; 53.27 -import java.util.List; 53.28 - 53.29 /** 53.30 * @author Kohsuke Kawaguchi (kk@kohsuke.org) 53.31 */ 53.32 @@ -85,12 +85,11 @@ 53.33 } 53.34 53.35 public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException { 53.36 - if(anno!=null) 53.37 - grammar.annotation = ((Annotation)anno).getResult(); 53.38 - if(additionalElementAnnotations!=null) { 53.39 - if(grammar.annotation==null) 53.40 - grammar.annotation = new DAnnotation(); 53.41 - grammar.annotation.contents.addAll(additionalElementAnnotations); 53.42 + // Harshit : Fixed possible NPE and issue in handling of annotations 53.43 + if (anno != null) { 53.44 + if (grammar.annotation != null) { 53.45 + grammar.annotation.contents.addAll(((Annotation) anno).getResult().contents); 53.46 + } 53.47 } 53.48 return grammar; 53.49 } 53.50 @@ -99,21 +98,28 @@ 53.51 } 53.52 53.53 public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException { 53.54 - if(name==START) 53.55 + if(name==START) { 53.56 grammar.start = (DPattern)pattern; 53.57 - else { 53.58 + } else { 53.59 // TODO: handle combine 53.60 DDefine d = grammar.getOrAdd(name); 53.61 d.setPattern( (DPattern) pattern ); 53.62 - if(anno!=null) 53.63 + if (anno!=null) { 53.64 d.annotation = ((Annotation)anno).getResult(); 53.65 + } 53.66 } 53.67 } 53.68 53.69 public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException { 53.70 - if(additionalElementAnnotations==null) 53.71 + // Harshit : Fixed issue in handling of annotations 53.72 + if (additionalElementAnnotations==null) { 53.73 additionalElementAnnotations = new ArrayList<Element>(); 53.74 + } 53.75 additionalElementAnnotations.add(((ElementWrapper)ea).element); 53.76 + if (grammar.annotation==null) { 53.77 + grammar.annotation = new DAnnotation(); 53.78 + } 53.79 + grammar.annotation.contents.addAll(additionalElementAnnotations); 53.80 } 53.81 53.82 public void topLevelComment(CommentList comments) throws BuildException {
54.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java Thu Oct 10 10:09:16 2013 -0700 54.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/AnyNameClass.java Fri Oct 11 00:07:42 2013 -0700 54.3 @@ -77,7 +77,4 @@ 54.4 return true; 54.5 } 54.6 54.7 - private static Object readReplace() { 54.8 - return NameClass.ANY; 54.9 - } 54.10 }
55.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java Thu Oct 10 10:09:16 2013 -0700 55.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/NameClassBuilderImpl.java Fri Oct 11 00:07:42 2013 -0700 55.3 @@ -23,7 +23,7 @@ 55.4 * questions. 55.5 */ 55.6 /* 55.7 - * Copyright (C) 2004-2011 55.8 + * Copyright (C) 2004-2012 55.9 * 55.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 55.11 * of this software and associated documentation files (the "Software"), to deal 55.12 @@ -65,17 +65,25 @@ 55.13 A extends Annotations<E,L,CL>, 55.14 CL extends CommentList<L>> implements NameClassBuilder<NameClass,E,L,A,CL> { 55.15 55.16 + @Override 55.17 public NameClass makeChoice(List<NameClass> nameClasses, L loc, A anno) { 55.18 - NameClass result = nameClasses.get(0); 55.19 - for (int i = 1; i < nameClasses.size(); i++) 55.20 - result = new ChoiceNameClass(result, nameClasses.get(i)); 55.21 - return result; 55.22 + NameClass result = nameClasses.get(0); 55.23 + for (int i = 1; i < nameClasses.size(); i++) { 55.24 + result = new ChoiceNameClass(result, nameClasses.get(i)); 55.25 + } 55.26 + return result; 55.27 } 55.28 55.29 + @Override 55.30 public NameClass makeName(String ns, String localName, String prefix, L loc, A anno) { 55.31 - return new SimpleNameClass(ns, localName); 55.32 + if (prefix == null) { 55.33 + return new SimpleNameClass(ns, localName); 55.34 + } else { 55.35 + return new SimpleNameClass(ns, localName, prefix); 55.36 + } 55.37 } 55.38 55.39 + @Override 55.40 public NameClass makeNsName(String ns, L loc, A anno) { 55.41 return new NsNameClass(ns); 55.42 }
56.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java Thu Oct 10 10:09:16 2013 -0700 56.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/nc/SimpleNameClass.java Fri Oct 11 00:07:42 2013 -0700 56.3 @@ -23,7 +23,7 @@ 56.4 * questions. 56.5 */ 56.6 /* 56.7 - * Copyright (C) 2004-2011 56.8 + * Copyright (C) 2004-2012 56.9 * 56.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 56.11 * of this software and associated documentation files (the "Software"), to deal 56.12 @@ -55,14 +55,20 @@ 56.13 this.name = name; 56.14 } 56.15 56.16 - public SimpleNameClass( String nsUri, String localPart ) { 56.17 - this( new QName(nsUri,localPart) ); 56.18 + public SimpleNameClass(String nsUri, String localPart) { 56.19 + this(new QName(nsUri, localPart)); 56.20 } 56.21 56.22 + public SimpleNameClass(String nsUri, String localPart, String prefix) { 56.23 + this(new QName(nsUri, localPart, prefix)); 56.24 + } 56.25 + 56.26 + @Override 56.27 public boolean contains(QName name) { 56.28 return this.name.equals(name); 56.29 } 56.30 56.31 + @Override 56.32 public int containsSpecificity(QName name) { 56.33 return contains(name) ? SPECIFICITY_NAME : SPECIFICITY_NONE; 56.34 } 56.35 @@ -74,16 +80,19 @@ 56.36 56.37 @Override 56.38 public boolean equals(Object obj) { 56.39 - if (obj == null || !(obj instanceof SimpleNameClass)) 56.40 + if (obj == null || !(obj instanceof SimpleNameClass)) { 56.41 return false; 56.42 + } 56.43 SimpleNameClass other = (SimpleNameClass) obj; 56.44 return name.equals(other.name); 56.45 } 56.46 56.47 + @Override 56.48 public <V> V accept(NameClassVisitor<V> visitor) { 56.49 return visitor.visitName(name); 56.50 } 56.51 56.52 + @Override 56.53 public boolean isOpen() { 56.54 return false; 56.55 }
57.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java Thu Oct 10 10:09:16 2013 -0700 57.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/compact/UCode_UCodeESC_CharStream.java Fri Oct 11 00:07:42 2013 -0700 57.3 @@ -23,7 +23,7 @@ 57.4 * questions. 57.5 */ 57.6 /* 57.7 - * Copyright (C) 2004-2011 57.8 + * Copyright (C) 2004-2012 57.9 * 57.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 57.11 * of this software and associated documentation files (the "Software"), to deal 57.12 @@ -45,7 +45,7 @@ 57.13 */ 57.14 /* Generated By:JavaCC: Do not edit this line. UCode_UCodeESC_CharStream.java Version 0.7pre6 */ 57.15 /* The previous line keeps JavaCC quiet. In fact, the JavaCC generated file 57.16 - has been edited to fix some bugs. */ 57.17 + has been edited to fix some bugs. */ 57.18 package com.sun.xml.internal.rngom.parse.compact; 57.19 57.20 import com.sun.xml.internal.rngom.util.Utf16; 57.21 @@ -58,537 +58,537 @@ 57.22 * contain 16-bit unicode characters. 57.23 */ 57.24 public final class UCode_UCodeESC_CharStream { 57.25 - public static final boolean staticFlag = false; 57.26 57.27 - static final int hexval(char c) { 57.28 - switch (c) { 57.29 - case '0': 57.30 - return 0; 57.31 - case '1': 57.32 - return 1; 57.33 - case '2': 57.34 - return 2; 57.35 - case '3': 57.36 - return 3; 57.37 - case '4': 57.38 - return 4; 57.39 - case '5': 57.40 - return 5; 57.41 - case '6': 57.42 - return 6; 57.43 - case '7': 57.44 - return 7; 57.45 - case '8': 57.46 - return 8; 57.47 - case '9': 57.48 - return 9; 57.49 + public static final boolean staticFlag = false; 57.50 57.51 - case 'a': 57.52 - case 'A': 57.53 - return 10; 57.54 - case 'b': 57.55 - case 'B': 57.56 - return 11; 57.57 - case 'c': 57.58 - case 'C': 57.59 - return 12; 57.60 - case 'd': 57.61 - case 'D': 57.62 - return 13; 57.63 - case 'e': 57.64 - case 'E': 57.65 - return 14; 57.66 - case 'f': 57.67 - case 'F': 57.68 - return 15; 57.69 + static final int hexval(char c) { 57.70 + switch (c) { 57.71 + case '0': 57.72 + return 0; 57.73 + case '1': 57.74 + return 1; 57.75 + case '2': 57.76 + return 2; 57.77 + case '3': 57.78 + return 3; 57.79 + case '4': 57.80 + return 4; 57.81 + case '5': 57.82 + return 5; 57.83 + case '6': 57.84 + return 6; 57.85 + case '7': 57.86 + return 7; 57.87 + case '8': 57.88 + return 8; 57.89 + case '9': 57.90 + return 9; 57.91 + 57.92 + case 'a': 57.93 + case 'A': 57.94 + return 10; 57.95 + case 'b': 57.96 + case 'B': 57.97 + return 11; 57.98 + case 'c': 57.99 + case 'C': 57.100 + return 12; 57.101 + case 'd': 57.102 + case 'D': 57.103 + return 13; 57.104 + case 'e': 57.105 + case 'E': 57.106 + return 14; 57.107 + case 'f': 57.108 + case 'F': 57.109 + return 15; 57.110 + } 57.111 + return -1; 57.112 } 57.113 - return -1; 57.114 - } 57.115 + public int bufpos = -1; 57.116 + int bufsize; 57.117 + int available; 57.118 + int tokenBegin; 57.119 + private int bufline[]; 57.120 + private int bufcolumn[]; 57.121 + private int column = 0; 57.122 + private int line = 1; 57.123 + private java.io.Reader inputStream; 57.124 + private boolean closed = false; 57.125 + private boolean prevCharIsLF = false; 57.126 + private char[] nextCharBuf; 57.127 + private char[] buffer; 57.128 + private int maxNextCharInd = 0; 57.129 + private int nextCharInd = -1; 57.130 + private int inBuf = 0; 57.131 57.132 - public int bufpos = -1; 57.133 - int bufsize; 57.134 - int available; 57.135 - int tokenBegin; 57.136 - private int bufline[]; 57.137 - private int bufcolumn[]; 57.138 + private final void ExpandBuff(boolean wrapAround) { 57.139 + char[] newbuffer = new char[bufsize + 2048]; 57.140 + int newbufline[] = new int[bufsize + 2048]; 57.141 + int newbufcolumn[] = new int[bufsize + 2048]; 57.142 57.143 - private int column = 0; 57.144 - private int line = 1; 57.145 + if (wrapAround) { 57.146 + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); 57.147 + System.arraycopy(buffer, 0, newbuffer, 57.148 + bufsize - tokenBegin, bufpos); 57.149 + buffer = newbuffer; 57.150 57.151 - private java.io.Reader inputStream; 57.152 - private boolean closed = false; 57.153 + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); 57.154 + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); 57.155 + bufline = newbufline; 57.156 57.157 - private boolean prevCharIsLF = false; 57.158 + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); 57.159 + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); 57.160 + bufcolumn = newbufcolumn; 57.161 57.162 - private char[] nextCharBuf; 57.163 - private char[] buffer; 57.164 - private int maxNextCharInd = 0; 57.165 - private int nextCharInd = -1; 57.166 - private int inBuf = 0; 57.167 + bufpos += (bufsize - tokenBegin); 57.168 + } else { 57.169 + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); 57.170 + buffer = newbuffer; 57.171 57.172 - private final void ExpandBuff(boolean wrapAround) { 57.173 - char[] newbuffer = new char[bufsize + 2048]; 57.174 - int newbufline[] = new int[bufsize + 2048]; 57.175 - int newbufcolumn[] = new int[bufsize + 2048]; 57.176 + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); 57.177 + bufline = newbufline; 57.178 57.179 - if (wrapAround) { 57.180 - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); 57.181 - System.arraycopy(buffer, 0, newbuffer, 57.182 - bufsize - tokenBegin, bufpos); 57.183 - buffer = newbuffer; 57.184 + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); 57.185 + bufcolumn = newbufcolumn; 57.186 57.187 - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); 57.188 - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); 57.189 - bufline = newbufline; 57.190 + bufpos -= tokenBegin; 57.191 + } 57.192 57.193 - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); 57.194 - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); 57.195 - bufcolumn = newbufcolumn; 57.196 - 57.197 - bufpos += (bufsize - tokenBegin); 57.198 - } 57.199 - else { 57.200 - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); 57.201 - buffer = newbuffer; 57.202 - 57.203 - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); 57.204 - bufline = newbufline; 57.205 - 57.206 - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); 57.207 - bufcolumn = newbufcolumn; 57.208 - 57.209 - bufpos -= tokenBegin; 57.210 + available = (bufsize += 2048); 57.211 + tokenBegin = 0; 57.212 } 57.213 57.214 - available = (bufsize += 2048); 57.215 - tokenBegin = 0; 57.216 - } 57.217 + private final void FillBuff() throws EOFException { 57.218 + int i; 57.219 + if (maxNextCharInd == 4096) { 57.220 + maxNextCharInd = nextCharInd = 0; 57.221 + } 57.222 57.223 - private final void FillBuff() throws EOFException { 57.224 - int i; 57.225 - if (maxNextCharInd == 4096) 57.226 - maxNextCharInd = nextCharInd = 0; 57.227 - 57.228 - if (closed) 57.229 - throw new EOFException(); 57.230 - try { 57.231 - if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { 57.232 - closed = true; 57.233 - inputStream.close(); 57.234 - throw new EOFException(); 57.235 - } 57.236 - else 57.237 - maxNextCharInd += i; 57.238 - } 57.239 - catch (IOException e) { 57.240 - throw new BuildException(e); 57.241 - } 57.242 - } 57.243 - 57.244 - private final char ReadChar() throws EOFException { 57.245 - if (++nextCharInd >= maxNextCharInd) 57.246 - FillBuff(); 57.247 - 57.248 - return nextCharBuf[nextCharInd]; 57.249 - } 57.250 - 57.251 - private final char PeekChar() throws EOFException { 57.252 - char c = ReadChar(); 57.253 - --nextCharInd; 57.254 - return c; 57.255 - } 57.256 - 57.257 - public final char BeginToken() throws EOFException { 57.258 - if (inBuf > 0) { 57.259 - --inBuf; 57.260 - return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0) 57.261 - : ++bufpos]; 57.262 + if (closed) { 57.263 + throw new EOFException(); 57.264 + } 57.265 + try { 57.266 + if ((i = inputStream.read(nextCharBuf, maxNextCharInd, 4096 - maxNextCharInd)) == -1) { 57.267 + closed = true; 57.268 + inputStream.close(); 57.269 + throw new EOFException(); 57.270 + } else { 57.271 + maxNextCharInd += i; 57.272 + } 57.273 + } catch (IOException e) { 57.274 + throw new BuildException(e); 57.275 + } 57.276 } 57.277 57.278 - tokenBegin = 0; 57.279 - bufpos = -1; 57.280 + private final char ReadChar() throws EOFException { 57.281 + if (++nextCharInd >= maxNextCharInd) { 57.282 + FillBuff(); 57.283 + } 57.284 57.285 - return readChar(); 57.286 - } 57.287 - 57.288 - private final void AdjustBuffSize() { 57.289 - if (available == bufsize) { 57.290 - if (tokenBegin > 2048) { 57.291 - bufpos = 0; 57.292 - available = tokenBegin; 57.293 - } 57.294 - else 57.295 - ExpandBuff(false); 57.296 - } 57.297 - else if (available > tokenBegin) 57.298 - available = bufsize; 57.299 - else if ((tokenBegin - available) < 2048) 57.300 - ExpandBuff(true); 57.301 - else 57.302 - available = tokenBegin; 57.303 - } 57.304 - 57.305 - private final void UpdateLineColumn(char c) { 57.306 - column++; 57.307 - 57.308 - if (prevCharIsLF) { 57.309 - prevCharIsLF = false; 57.310 - line += (column = 1); 57.311 + return nextCharBuf[nextCharInd]; 57.312 } 57.313 57.314 - switch (c) { 57.315 - case NEWLINE_MARKER: 57.316 - prevCharIsLF = true; 57.317 - break; 57.318 - case '\t': 57.319 - column--; 57.320 - column += (8 - (column & 07)); 57.321 - break; 57.322 - default : 57.323 - break; 57.324 + private final char PeekChar() throws EOFException { 57.325 + char c = ReadChar(); 57.326 + --nextCharInd; 57.327 + return c; 57.328 } 57.329 57.330 - bufline[bufpos] = line; 57.331 - bufcolumn[bufpos] = column; 57.332 - } 57.333 + public final char BeginToken() throws EOFException { 57.334 + if (inBuf > 0) { 57.335 + --inBuf; 57.336 + return buffer[tokenBegin = (bufpos == bufsize - 1) ? (bufpos = 0) 57.337 + : ++bufpos]; 57.338 + } 57.339 57.340 - private final char NEWLINE_MARKER = '\u0000'; 57.341 + tokenBegin = 0; 57.342 + bufpos = -1; 57.343 57.344 - public final char readChar() throws EOFException { 57.345 - if (inBuf > 0) { 57.346 - --inBuf; 57.347 - return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; 57.348 + return readChar(); 57.349 } 57.350 57.351 - char c; 57.352 - try { 57.353 - c = ReadChar(); 57.354 - switch (c) { 57.355 - case '\r': 57.356 - c = NEWLINE_MARKER; 57.357 - try { 57.358 - if (PeekChar() == '\n') 57.359 - ReadChar(); 57.360 + private final void AdjustBuffSize() { 57.361 + if (available == bufsize) { 57.362 + if (tokenBegin > 2048) { 57.363 + bufpos = 0; 57.364 + available = tokenBegin; 57.365 + } else { 57.366 + ExpandBuff(false); 57.367 + } 57.368 + } else if (available > tokenBegin) { 57.369 + available = bufsize; 57.370 + } else if ((tokenBegin - available) < 2048) { 57.371 + ExpandBuff(true); 57.372 + } else { 57.373 + available = tokenBegin; 57.374 } 57.375 - catch (EOFException e) { 57.376 + } 57.377 + 57.378 + private final void UpdateLineColumn(char c) { 57.379 + column++; 57.380 + 57.381 + if (prevCharIsLF) { 57.382 + prevCharIsLF = false; 57.383 + line += (column = 1); 57.384 } 57.385 - break; 57.386 - case '\n': 57.387 - c = NEWLINE_MARKER; 57.388 - break; 57.389 - case '\t': 57.390 - break; 57.391 - default: 57.392 - if (c >= 0x20) { 57.393 - if (Utf16.isSurrogate(c)) { 57.394 - if (Utf16.isSurrogate2(c)) 57.395 - throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1); 57.396 - if (++bufpos == available) 57.397 - AdjustBuffSize(); 57.398 - buffer[bufpos] = c; 57.399 - // UpdateLineColumn(c); 57.400 - try { 57.401 - c = ReadChar(); 57.402 - } 57.403 - catch (EOFException e) { 57.404 - throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1); 57.405 - } 57.406 - if (!Utf16.isSurrogate2(c)) 57.407 - throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 2); 57.408 - } 57.409 - break; 57.410 + 57.411 + switch (c) { 57.412 + case NEWLINE_MARKER: 57.413 + prevCharIsLF = true; 57.414 + break; 57.415 + case '\t': 57.416 + column--; 57.417 + column += (8 - (column & 07)); 57.418 + break; 57.419 + default: 57.420 + break; 57.421 } 57.422 - // fall through 57.423 - case '\uFFFE': 57.424 - case '\uFFFF': 57.425 - throw new EscapeSyntaxException("illegal_char_code", line, column + 1); 57.426 - } 57.427 - } 57.428 - catch (EOFException e) { 57.429 - if (bufpos == -1) { 57.430 - if (++bufpos == available) 57.431 - AdjustBuffSize(); 57.432 + 57.433 bufline[bufpos] = line; 57.434 bufcolumn[bufpos] = column; 57.435 - } 57.436 - throw e; 57.437 } 57.438 - if (++bufpos == available) 57.439 - AdjustBuffSize(); 57.440 - buffer[bufpos] = c; 57.441 - UpdateLineColumn(c); 57.442 - try { 57.443 - if (c != '\\' || PeekChar() != 'x') 57.444 - return c; 57.445 - } 57.446 - catch (EOFException e) { 57.447 - return c; 57.448 + private static final char NEWLINE_MARKER = '\u0000'; 57.449 + 57.450 + public final char readChar() throws EOFException { 57.451 + if (inBuf > 0) { 57.452 + --inBuf; 57.453 + return buffer[(bufpos == bufsize - 1) ? (bufpos = 0) : ++bufpos]; 57.454 + } 57.455 + 57.456 + char c; 57.457 + try { 57.458 + c = ReadChar(); 57.459 + switch (c) { 57.460 + case '\r': 57.461 + c = NEWLINE_MARKER; 57.462 + try { 57.463 + if (PeekChar() == '\n') { 57.464 + ReadChar(); 57.465 + } 57.466 + } catch (EOFException e) { 57.467 + } 57.468 + break; 57.469 + case '\n': 57.470 + c = NEWLINE_MARKER; 57.471 + break; 57.472 + case '\t': 57.473 + break; 57.474 + default: 57.475 + if (c >= 0x20) { 57.476 + if (Utf16.isSurrogate(c)) { 57.477 + if (Utf16.isSurrogate2(c)) { 57.478 + throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1); 57.479 + } 57.480 + if (++bufpos == available) { 57.481 + AdjustBuffSize(); 57.482 + } 57.483 + buffer[bufpos] = c; 57.484 + // UpdateLineColumn(c); 57.485 + try { 57.486 + c = ReadChar(); 57.487 + } catch (EOFException e) { 57.488 + throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 1); 57.489 + } 57.490 + if (!Utf16.isSurrogate2(c)) { 57.491 + throw new EscapeSyntaxException("illegal_surrogate_pair", line, column + 2); 57.492 + } 57.493 + } 57.494 + break; 57.495 + } 57.496 + // fall through 57.497 + case '\uFFFE': 57.498 + case '\uFFFF': 57.499 + throw new EscapeSyntaxException("illegal_char_code", line, column + 1); 57.500 + } 57.501 + } catch (EOFException e) { 57.502 + if (bufpos == -1) { 57.503 + if (++bufpos == available) { 57.504 + AdjustBuffSize(); 57.505 + } 57.506 + bufline[bufpos] = line; 57.507 + bufcolumn[bufpos] = column; 57.508 + } 57.509 + throw e; 57.510 + } 57.511 + if (++bufpos == available) { 57.512 + AdjustBuffSize(); 57.513 + } 57.514 + buffer[bufpos] = c; 57.515 + UpdateLineColumn(c); 57.516 + try { 57.517 + if (c != '\\' || PeekChar() != 'x') { 57.518 + return c; 57.519 + } 57.520 + } catch (EOFException e) { 57.521 + return c; 57.522 + } 57.523 + 57.524 + int xCnt = 1; 57.525 + for (;;) { 57.526 + ReadChar(); 57.527 + if (++bufpos == available) { 57.528 + AdjustBuffSize(); 57.529 + } 57.530 + buffer[bufpos] = 'x'; 57.531 + UpdateLineColumn('x'); 57.532 + try { 57.533 + c = PeekChar(); 57.534 + } catch (EOFException e) { 57.535 + backup(xCnt); 57.536 + return '\\'; 57.537 + } 57.538 + if (c == '{') { 57.539 + ReadChar(); 57.540 + column++; 57.541 + // backup past the 'x's 57.542 + bufpos -= xCnt; 57.543 + if (bufpos < 0) { 57.544 + bufpos += bufsize; 57.545 + } 57.546 + break; 57.547 + } 57.548 + if (c != 'x') { 57.549 + backup(xCnt); 57.550 + return '\\'; 57.551 + } 57.552 + xCnt++; 57.553 + } 57.554 + try { 57.555 + int scalarValue = hexval(ReadChar()); 57.556 + column++; 57.557 + if (scalarValue < 0) { 57.558 + throw new EscapeSyntaxException("illegal_hex_digit", line, column); 57.559 + } 57.560 + while ((c = ReadChar()) != '}') { 57.561 + column++; 57.562 + int n = hexval(c); 57.563 + if (n < 0) { 57.564 + throw new EscapeSyntaxException("illegal_hex_digit", line, column); 57.565 + } 57.566 + scalarValue <<= 4; 57.567 + scalarValue |= n; 57.568 + if (scalarValue >= 0x110000) { 57.569 + throw new EscapeSyntaxException("char_code_too_big", line, column); 57.570 + } 57.571 + } 57.572 + column++; // for the '}' 57.573 + if (scalarValue <= 0xFFFF) { 57.574 + c = (char) scalarValue; 57.575 + switch (c) { 57.576 + case '\n': 57.577 + case '\r': 57.578 + case '\t': 57.579 + break; 57.580 + default: 57.581 + if (c >= 0x20 && !Utf16.isSurrogate(c)) { 57.582 + break; 57.583 + } 57.584 + // fall through 57.585 + case '\uFFFE': 57.586 + case '\uFFFF': 57.587 + throw new EscapeSyntaxException("illegal_char_code_ref", line, column); 57.588 + } 57.589 + buffer[bufpos] = c; 57.590 + return c; 57.591 + } 57.592 + c = Utf16.surrogate1(scalarValue); 57.593 + buffer[bufpos] = c; 57.594 + int bufpos1 = bufpos; 57.595 + if (++bufpos == bufsize) { 57.596 + bufpos = 0; 57.597 + } 57.598 + buffer[bufpos] = Utf16.surrogate2(scalarValue); 57.599 + bufline[bufpos] = bufline[bufpos1]; 57.600 + bufcolumn[bufpos] = bufcolumn[bufpos1]; 57.601 + backup(1); 57.602 + return c; 57.603 + } catch (EOFException e) { 57.604 + throw new EscapeSyntaxException("incomplete_escape", line, column); 57.605 + } 57.606 } 57.607 57.608 - int xCnt = 1; 57.609 - for (;;) { 57.610 - ReadChar(); 57.611 - if (++bufpos == available) 57.612 - AdjustBuffSize(); 57.613 - buffer[bufpos] = 'x'; 57.614 - UpdateLineColumn('x'); 57.615 - try { 57.616 - c = PeekChar(); 57.617 - } 57.618 - catch (EOFException e) { 57.619 - backup(xCnt); 57.620 - return '\\'; 57.621 - } 57.622 - if (c == '{') { 57.623 - ReadChar(); 57.624 - column++; 57.625 - // backup past the 'x's 57.626 - bufpos -= xCnt; 57.627 - if (bufpos < 0) 57.628 - bufpos += bufsize; 57.629 - break; 57.630 - } 57.631 - if (c != 'x') { 57.632 - backup(xCnt); 57.633 - return '\\'; 57.634 - } 57.635 - xCnt++; 57.636 - } 57.637 - try { 57.638 - int scalarValue = hexval(ReadChar()); 57.639 - column++; 57.640 - if (scalarValue < 0) 57.641 - throw new EscapeSyntaxException("illegal_hex_digit", line, column); 57.642 - while ((c = ReadChar()) != '}') { 57.643 - column++; 57.644 - int n = hexval(c); 57.645 - if (n < 0) 57.646 - throw new EscapeSyntaxException("illegal_hex_digit", line, column); 57.647 - scalarValue <<= 4; 57.648 - scalarValue |= n; 57.649 - if (scalarValue >= 0x110000) 57.650 - throw new EscapeSyntaxException("char_code_too_big", line, column); 57.651 - } 57.652 - column++; // for the '}' 57.653 - if (scalarValue <= 0xFFFF) { 57.654 - c = (char)scalarValue; 57.655 - switch (c) { 57.656 - case '\n': 57.657 - case '\r': 57.658 - case '\t': 57.659 - break; 57.660 - default: 57.661 - if (c >= 0x20 && !Utf16.isSurrogate(c)) 57.662 - break; 57.663 - // fall through 57.664 - case '\uFFFE': 57.665 - case '\uFFFF': 57.666 - throw new EscapeSyntaxException("illegal_char_code_ref", line, column); 57.667 - } 57.668 - buffer[bufpos] = c; 57.669 - return c; 57.670 - } 57.671 - c = Utf16.surrogate1(scalarValue); 57.672 - buffer[bufpos] = c; 57.673 - int bufpos1 = bufpos; 57.674 - if (++bufpos == bufsize) 57.675 - bufpos = 0; 57.676 - buffer[bufpos] = Utf16.surrogate2(scalarValue); 57.677 - bufline[bufpos] = bufline[bufpos1]; 57.678 - bufcolumn[bufpos] = bufcolumn[bufpos1]; 57.679 - backup(1); 57.680 - return c; 57.681 - } 57.682 - catch (EOFException e) { 57.683 - throw new EscapeSyntaxException("incomplete_escape", line, column); 57.684 - } 57.685 - } 57.686 - 57.687 - /** 57.688 - * @deprecated 57.689 - * @see #getEndColumn 57.690 - */ 57.691 - 57.692 - public final int getColumn() { 57.693 - return bufcolumn[bufpos]; 57.694 - } 57.695 - 57.696 - /** 57.697 - * @deprecated 57.698 - * @see #getEndLine 57.699 - */ 57.700 - 57.701 - public final int getLine() { 57.702 - return bufline[bufpos]; 57.703 - } 57.704 - 57.705 - public final int getEndColumn() { 57.706 - return bufcolumn[bufpos]; 57.707 - } 57.708 - 57.709 - public final int getEndLine() { 57.710 - return bufline[bufpos]; 57.711 - } 57.712 - 57.713 - public final int getBeginColumn() { 57.714 - return bufcolumn[tokenBegin]; 57.715 - } 57.716 - 57.717 - public final int getBeginLine() { 57.718 - return bufline[tokenBegin]; 57.719 - } 57.720 - 57.721 - public final void backup(int amount) { 57.722 - 57.723 - inBuf += amount; 57.724 - if ((bufpos -= amount) < 0) 57.725 - bufpos += bufsize; 57.726 - } 57.727 - 57.728 - public UCode_UCodeESC_CharStream(java.io.Reader dstream, 57.729 - int startline, int startcolumn, int buffersize) { 57.730 - inputStream = dstream; 57.731 - line = startline; 57.732 - column = startcolumn - 1; 57.733 - 57.734 - available = bufsize = buffersize; 57.735 - buffer = new char[buffersize]; 57.736 - bufline = new int[buffersize]; 57.737 - bufcolumn = new int[buffersize]; 57.738 - nextCharBuf = new char[4096]; 57.739 - skipBOM(); 57.740 - } 57.741 - 57.742 - public UCode_UCodeESC_CharStream(java.io.Reader dstream, 57.743 - int startline, int startcolumn) { 57.744 - this(dstream, startline, startcolumn, 4096); 57.745 - } 57.746 - 57.747 - public void ReInit(java.io.Reader dstream, 57.748 - int startline, int startcolumn, int buffersize) { 57.749 - inputStream = dstream; 57.750 - closed = false; 57.751 - line = startline; 57.752 - column = startcolumn - 1; 57.753 - 57.754 - if (buffer == null || buffersize != buffer.length) { 57.755 - available = bufsize = buffersize; 57.756 - buffer = new char[buffersize]; 57.757 - bufline = new int[buffersize]; 57.758 - bufcolumn = new int[buffersize]; 57.759 - nextCharBuf = new char[4096]; 57.760 - } 57.761 - prevCharIsLF = false; 57.762 - tokenBegin = inBuf = maxNextCharInd = 0; 57.763 - nextCharInd = bufpos = -1; 57.764 - skipBOM(); 57.765 - } 57.766 - 57.767 - public void ReInit(java.io.Reader dstream, 57.768 - int startline, int startcolumn) { 57.769 - ReInit(dstream, startline, startcolumn, 4096); 57.770 - } 57.771 - 57.772 - public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline, 57.773 - int startcolumn, int buffersize) { 57.774 - this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); 57.775 - } 57.776 - 57.777 - public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline, 57.778 - int startcolumn) { 57.779 - this(dstream, startline, startcolumn, 4096); 57.780 - } 57.781 - 57.782 - public void ReInit(java.io.InputStream dstream, int startline, 57.783 - int startcolumn, int buffersize) { 57.784 - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); 57.785 - } 57.786 - 57.787 - public void ReInit(java.io.InputStream dstream, int startline, 57.788 - int startcolumn) { 57.789 - ReInit(dstream, startline, startcolumn, 4096); 57.790 - } 57.791 - 57.792 - static private final char BOM = '\ufeff'; 57.793 - 57.794 - private void skipBOM() { 57.795 - try { 57.796 - if (PeekChar() == BOM) 57.797 - ReadChar(); 57.798 - } 57.799 - catch (EOFException e) { 57.800 - } 57.801 - } 57.802 - 57.803 - public final String GetImage() { 57.804 - if (bufpos >= tokenBegin) 57.805 - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); 57.806 - else 57.807 - return new String(buffer, tokenBegin, bufsize - tokenBegin) + 57.808 - new String(buffer, 0, bufpos + 1); 57.809 - } 57.810 - 57.811 - public final char[] GetSuffix(int len) { 57.812 - char[] ret = new char[len]; 57.813 - 57.814 - if ((bufpos + 1) >= len) 57.815 - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); 57.816 - else { 57.817 - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, 57.818 - len - bufpos - 1); 57.819 - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); 57.820 + /** 57.821 + * @deprecated @see #getEndColumn 57.822 + */ 57.823 + public final int getColumn() { 57.824 + return bufcolumn[bufpos]; 57.825 } 57.826 57.827 - return ret; 57.828 - } 57.829 - 57.830 - public void Done() { 57.831 - nextCharBuf = null; 57.832 - buffer = null; 57.833 - bufline = null; 57.834 - bufcolumn = null; 57.835 - } 57.836 - 57.837 - /** 57.838 - * Method to adjust line and column numbers for the start of a token.<BR> 57.839 - */ 57.840 - public void adjustBeginLineColumn(int newLine, int newCol) { 57.841 - int start = tokenBegin; 57.842 - int len; 57.843 - 57.844 - if (bufpos >= tokenBegin) { 57.845 - len = bufpos - tokenBegin + inBuf + 1; 57.846 - } 57.847 - else { 57.848 - len = bufsize - tokenBegin + bufpos + 1 + inBuf; 57.849 + /** 57.850 + * @deprecated @see #getEndLine 57.851 + */ 57.852 + public final int getLine() { 57.853 + return bufline[bufpos]; 57.854 } 57.855 57.856 - int i = 0, j = 0, k = 0; 57.857 - int nextColDiff = 0, columnDiff = 0; 57.858 - 57.859 - while (i < len && 57.860 - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) { 57.861 - bufline[j] = newLine; 57.862 - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; 57.863 - bufcolumn[j] = newCol + columnDiff; 57.864 - columnDiff = nextColDiff; 57.865 - i++; 57.866 + public final int getEndColumn() { 57.867 + return bufcolumn[bufpos]; 57.868 } 57.869 57.870 - if (i < len) { 57.871 - bufline[j] = newLine++; 57.872 - bufcolumn[j] = newCol + columnDiff; 57.873 - 57.874 - while (i++ < len) { 57.875 - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) 57.876 - bufline[j] = newLine++; 57.877 - else 57.878 - bufline[j] = newLine; 57.879 - } 57.880 + public final int getEndLine() { 57.881 + return bufline[bufpos]; 57.882 } 57.883 57.884 - line = bufline[j]; 57.885 - column = bufcolumn[j]; 57.886 - } 57.887 + public final int getBeginColumn() { 57.888 + return bufcolumn[tokenBegin]; 57.889 + } 57.890 57.891 + public final int getBeginLine() { 57.892 + return bufline[tokenBegin]; 57.893 + } 57.894 + 57.895 + public final void backup(int amount) { 57.896 + 57.897 + inBuf += amount; 57.898 + if ((bufpos -= amount) < 0) { 57.899 + bufpos += bufsize; 57.900 + } 57.901 + } 57.902 + 57.903 + public UCode_UCodeESC_CharStream(java.io.Reader dstream, 57.904 + int startline, int startcolumn, int buffersize) { 57.905 + inputStream = dstream; 57.906 + line = startline; 57.907 + column = startcolumn - 1; 57.908 + 57.909 + available = bufsize = buffersize; 57.910 + buffer = new char[buffersize]; 57.911 + bufline = new int[buffersize]; 57.912 + bufcolumn = new int[buffersize]; 57.913 + nextCharBuf = new char[4096]; 57.914 + skipBOM(); 57.915 + } 57.916 + 57.917 + public UCode_UCodeESC_CharStream(java.io.Reader dstream, 57.918 + int startline, int startcolumn) { 57.919 + this(dstream, startline, startcolumn, 4096); 57.920 + } 57.921 + 57.922 + public void ReInit(java.io.Reader dstream, 57.923 + int startline, int startcolumn, int buffersize) { 57.924 + inputStream = dstream; 57.925 + closed = false; 57.926 + line = startline; 57.927 + column = startcolumn - 1; 57.928 + 57.929 + if (buffer == null || buffersize != buffer.length) { 57.930 + available = bufsize = buffersize; 57.931 + buffer = new char[buffersize]; 57.932 + bufline = new int[buffersize]; 57.933 + bufcolumn = new int[buffersize]; 57.934 + nextCharBuf = new char[4096]; 57.935 + } 57.936 + prevCharIsLF = false; 57.937 + tokenBegin = inBuf = maxNextCharInd = 0; 57.938 + nextCharInd = bufpos = -1; 57.939 + skipBOM(); 57.940 + } 57.941 + 57.942 + public void ReInit(java.io.Reader dstream, 57.943 + int startline, int startcolumn) { 57.944 + ReInit(dstream, startline, startcolumn, 4096); 57.945 + } 57.946 + 57.947 + public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline, 57.948 + int startcolumn, int buffersize) { 57.949 + this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); 57.950 + } 57.951 + 57.952 + public UCode_UCodeESC_CharStream(java.io.InputStream dstream, int startline, 57.953 + int startcolumn) { 57.954 + this(dstream, startline, startcolumn, 4096); 57.955 + } 57.956 + 57.957 + public void ReInit(java.io.InputStream dstream, int startline, 57.958 + int startcolumn, int buffersize) { 57.959 + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); 57.960 + } 57.961 + 57.962 + public void ReInit(java.io.InputStream dstream, int startline, 57.963 + int startcolumn) { 57.964 + ReInit(dstream, startline, startcolumn, 4096); 57.965 + } 57.966 + static private final char BOM = '\ufeff'; 57.967 + 57.968 + private void skipBOM() { 57.969 + try { 57.970 + if (PeekChar() == BOM) { 57.971 + ReadChar(); 57.972 + } 57.973 + } catch (EOFException e) { 57.974 + } 57.975 + } 57.976 + 57.977 + public final String GetImage() { 57.978 + if (bufpos >= tokenBegin) { 57.979 + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); 57.980 + } else { 57.981 + return new String(buffer, tokenBegin, bufsize - tokenBegin) 57.982 + + new String(buffer, 0, bufpos + 1); 57.983 + } 57.984 + } 57.985 + 57.986 + public final char[] GetSuffix(int len) { 57.987 + char[] ret = new char[len]; 57.988 + 57.989 + if ((bufpos + 1) >= len) { 57.990 + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); 57.991 + } else { 57.992 + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, 57.993 + len - bufpos - 1); 57.994 + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); 57.995 + } 57.996 + 57.997 + return ret; 57.998 + } 57.999 + 57.1000 + public void Done() { 57.1001 + nextCharBuf = null; 57.1002 + buffer = null; 57.1003 + bufline = null; 57.1004 + bufcolumn = null; 57.1005 + } 57.1006 + 57.1007 + /** 57.1008 + * Method to adjust line and column numbers for the start of a token.<BR> 57.1009 + */ 57.1010 + public void adjustBeginLineColumn(int newLine, int newCol) { 57.1011 + int start = tokenBegin; 57.1012 + int len; 57.1013 + 57.1014 + if (bufpos >= tokenBegin) { 57.1015 + len = bufpos - tokenBegin + inBuf + 1; 57.1016 + } else { 57.1017 + len = bufsize - tokenBegin + bufpos + 1 + inBuf; 57.1018 + } 57.1019 + 57.1020 + int i = 0, j = 0, k = 0; 57.1021 + int nextColDiff, columnDiff = 0; 57.1022 + 57.1023 + while (i < len 57.1024 + && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) { 57.1025 + bufline[j] = newLine; 57.1026 + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; 57.1027 + bufcolumn[j] = newCol + columnDiff; 57.1028 + columnDiff = nextColDiff; 57.1029 + i++; 57.1030 + } 57.1031 + 57.1032 + if (i < len) { 57.1033 + bufline[j] = newLine++; 57.1034 + bufcolumn[j] = newCol + columnDiff; 57.1035 + 57.1036 + while (i++ < len) { 57.1037 + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) { 57.1038 + bufline[j] = newLine++; 57.1039 + } else { 57.1040 + bufline[j] = newLine; 57.1041 + } 57.1042 + } 57.1043 + } 57.1044 + 57.1045 + line = bufline[j]; 57.1046 + column = bufcolumn[j]; 57.1047 + } 57.1048 }
58.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java Thu Oct 10 10:09:16 2013 -0700 58.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/parse/xml/SchemaParser.java Fri Oct 11 00:07:42 2013 -0700 58.3 @@ -23,7 +23,7 @@ 58.4 * questions. 58.5 */ 58.6 /* 58.7 - * Copyright (C) 2004-2011 58.8 + * Copyright (C) 2004-2012 58.9 * 58.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 58.11 * of this software and associated documentation files (the "Software"), to deal 58.12 @@ -91,1594 +91,1783 @@ 58.13 58.14 class SchemaParser { 58.15 58.16 - private static final String relaxngURIPrefix = 58.17 - WellKnownNamespaces.RELAX_NG.substring(0, WellKnownNamespaces.RELAX_NG.lastIndexOf('/') + 1); 58.18 - static final String relaxng10URI = WellKnownNamespaces.RELAX_NG; 58.19 - private static final Localizer localizer = new Localizer(new Localizer(Parseable.class),SchemaParser.class); 58.20 + private static final String relaxngURIPrefix = 58.21 + WellKnownNamespaces.RELAX_NG.substring(0, WellKnownNamespaces.RELAX_NG.lastIndexOf('/') + 1); 58.22 + static final String relaxng10URI = WellKnownNamespaces.RELAX_NG; 58.23 + private static final Localizer localizer = new Localizer(new Localizer(Parseable.class), SchemaParser.class); 58.24 + private String relaxngURI; 58.25 + private final XMLReader xr; 58.26 + private final ErrorHandler eh; 58.27 + private final SchemaBuilder schemaBuilder; 58.28 + /** 58.29 + * The value of the {@link SchemaBuilder#getNameClassBuilder()} for the 58.30 + * {@link #schemaBuilder} object. 58.31 + */ 58.32 + private final NameClassBuilder nameClassBuilder; 58.33 + private ParsedPattern startPattern; 58.34 + private Locator locator; 58.35 + private final XmlBaseHandler xmlBaseHandler = new XmlBaseHandler(); 58.36 + private final ContextImpl context = new ContextImpl(); 58.37 + private boolean hadError = false; 58.38 + private Hashtable patternTable; 58.39 + private Hashtable nameClassTable; 58.40 58.41 - private String relaxngURI; 58.42 - private final XMLReader xr; 58.43 - private final ErrorHandler eh; 58.44 - private final SchemaBuilder schemaBuilder; 58.45 - /** 58.46 - * The value of the {@link SchemaBuilder#getNameClassBuilder()} 58.47 - * for the {@link #schemaBuilder} object. 58.48 - */ 58.49 - private final NameClassBuilder nameClassBuilder; 58.50 - private ParsedPattern startPattern; 58.51 - private Locator locator; 58.52 - private final XmlBaseHandler xmlBaseHandler = new XmlBaseHandler(); 58.53 - private final ContextImpl context = new ContextImpl(); 58.54 + static class PrefixMapping { 58.55 58.56 - private boolean hadError = false; 58.57 + final String prefix; 58.58 + final String uri; 58.59 + final PrefixMapping next; 58.60 58.61 - private Hashtable patternTable; 58.62 - private Hashtable nameClassTable; 58.63 - 58.64 - static class PrefixMapping { 58.65 - final String prefix; 58.66 - final String uri; 58.67 - final PrefixMapping next; 58.68 - 58.69 - PrefixMapping(String prefix, String uri, PrefixMapping next) { 58.70 - this.prefix = prefix; 58.71 - this.uri = uri; 58.72 - this.next = next; 58.73 - } 58.74 - } 58.75 - 58.76 - static abstract class AbstractContext extends DtdContext implements Context { 58.77 - PrefixMapping prefixMapping; 58.78 - 58.79 - AbstractContext() { 58.80 - prefixMapping = new PrefixMapping("xml", WellKnownNamespaces.XML, null); 58.81 + PrefixMapping(String prefix, String uri, PrefixMapping next) { 58.82 + this.prefix = prefix; 58.83 + this.uri = uri; 58.84 + this.next = next; 58.85 + } 58.86 } 58.87 58.88 - AbstractContext(AbstractContext context) { 58.89 - super(context); 58.90 - prefixMapping = context.prefixMapping; 58.91 + static abstract class AbstractContext extends DtdContext implements Context { 58.92 + 58.93 + PrefixMapping prefixMapping; 58.94 + 58.95 + AbstractContext() { 58.96 + prefixMapping = new PrefixMapping("xml", WellKnownNamespaces.XML, null); 58.97 + } 58.98 + 58.99 + AbstractContext(AbstractContext context) { 58.100 + super(context); 58.101 + prefixMapping = context.prefixMapping; 58.102 + } 58.103 + 58.104 + public String resolveNamespacePrefix(String prefix) { 58.105 + for (PrefixMapping p = prefixMapping; p != null; p = p.next) { 58.106 + if (p.prefix.equals(prefix)) { 58.107 + return p.uri; 58.108 + } 58.109 + } 58.110 + return null; 58.111 + } 58.112 + 58.113 + public Enumeration prefixes() { 58.114 + Vector v = new Vector(); 58.115 + for (PrefixMapping p = prefixMapping; p != null; p = p.next) { 58.116 + if (!v.contains(p.prefix)) { 58.117 + v.addElement(p.prefix); 58.118 + } 58.119 + } 58.120 + return v.elements(); 58.121 + } 58.122 + 58.123 + public Context copy() { 58.124 + return new SavedContext(this); 58.125 + } 58.126 } 58.127 58.128 - public String resolveNamespacePrefix(String prefix) { 58.129 - for (PrefixMapping p = prefixMapping; p != null; p = p.next) 58.130 - if (p.prefix.equals(prefix)) 58.131 - return p.uri; 58.132 - return null; 58.133 + static class SavedContext extends AbstractContext { 58.134 + 58.135 + private final String baseUri; 58.136 + 58.137 + SavedContext(AbstractContext context) { 58.138 + super(context); 58.139 + this.baseUri = context.getBaseUri(); 58.140 + } 58.141 + 58.142 + public String getBaseUri() { 58.143 + return baseUri; 58.144 + } 58.145 } 58.146 58.147 - public Enumeration prefixes() { 58.148 - Vector v = new Vector(); 58.149 - for (PrefixMapping p = prefixMapping; p != null; p = p.next) { 58.150 - if (!v.contains(p.prefix)) 58.151 - v.addElement(p.prefix); 58.152 - } 58.153 - return v.elements(); 58.154 + class ContextImpl extends AbstractContext { 58.155 + 58.156 + public String getBaseUri() { 58.157 + return xmlBaseHandler.getBaseUri(); 58.158 + } 58.159 } 58.160 58.161 - public Context copy() { 58.162 - return new SavedContext(this); 58.163 - } 58.164 - } 58.165 + static interface CommentHandler { 58.166 58.167 - static class SavedContext extends AbstractContext { 58.168 - private final String baseUri; 58.169 - SavedContext(AbstractContext context) { 58.170 - super(context); 58.171 - this.baseUri = context.getBaseUri(); 58.172 + void comment(String value); 58.173 } 58.174 58.175 - public String getBaseUri() { 58.176 - return baseUri; 58.177 - } 58.178 - } 58.179 + abstract class Handler implements ContentHandler, CommentHandler { 58.180 58.181 - class ContextImpl extends AbstractContext { 58.182 - public String getBaseUri() { 58.183 - return xmlBaseHandler.getBaseUri(); 58.184 - } 58.185 - } 58.186 + CommentList comments; 58.187 58.188 - static interface CommentHandler { 58.189 - void comment(String value); 58.190 - } 58.191 + CommentList getComments() { 58.192 + CommentList tem = comments; 58.193 + comments = null; 58.194 + return tem; 58.195 + } 58.196 58.197 - abstract class Handler implements ContentHandler, CommentHandler { 58.198 - CommentList comments; 58.199 + public void comment(String value) { 58.200 + if (comments == null) { 58.201 + comments = schemaBuilder.makeCommentList(); 58.202 + } 58.203 + comments.addComment(value, makeLocation()); 58.204 + } 58.205 58.206 - CommentList getComments() { 58.207 - CommentList tem = comments; 58.208 - comments = null; 58.209 - return tem; 58.210 + public void processingInstruction(String target, String date) { 58.211 + } 58.212 + 58.213 + public void skippedEntity(String name) { 58.214 + } 58.215 + 58.216 + public void ignorableWhitespace(char[] ch, int start, int len) { 58.217 + } 58.218 + 58.219 + public void startDocument() { 58.220 + } 58.221 + 58.222 + public void endDocument() { 58.223 + } 58.224 + 58.225 + public void startPrefixMapping(String prefix, String uri) { 58.226 + context.prefixMapping = new PrefixMapping(prefix, uri, context.prefixMapping); 58.227 + } 58.228 + 58.229 + public void endPrefixMapping(String prefix) { 58.230 + context.prefixMapping = context.prefixMapping.next; 58.231 + } 58.232 + 58.233 + public void setDocumentLocator(Locator loc) { 58.234 + locator = loc; 58.235 + xmlBaseHandler.setLocator(loc); 58.236 + } 58.237 } 58.238 58.239 - public void comment(String value) { 58.240 - if (comments == null) 58.241 - comments = schemaBuilder.makeCommentList(); 58.242 - comments.addComment(value, makeLocation()); 58.243 - } 58.244 - public void processingInstruction(String target, String date) { } 58.245 - public void skippedEntity(String name) { } 58.246 - public void ignorableWhitespace(char[] ch, int start, int len) { } 58.247 - public void startDocument() { } 58.248 - public void endDocument() { } 58.249 - public void startPrefixMapping(String prefix, String uri) { 58.250 - context.prefixMapping = new PrefixMapping(prefix, uri, context.prefixMapping); 58.251 + abstract class State extends Handler { 58.252 + 58.253 + State parent; 58.254 + String nsInherit; 58.255 + String ns; 58.256 + String datatypeLibrary; 58.257 + /** 58.258 + * The current scope, or null if there's none. 58.259 + */ 58.260 + Scope scope; 58.261 + Location startLocation; 58.262 + Annotations annotations; 58.263 + 58.264 + void set() { 58.265 + xr.setContentHandler(this); 58.266 + } 58.267 + 58.268 + abstract State create(); 58.269 + 58.270 + abstract State createChildState(String localName) throws SAXException; 58.271 + 58.272 + void setParent(State parent) { 58.273 + this.parent = parent; 58.274 + this.nsInherit = parent.getNs(); 58.275 + this.datatypeLibrary = parent.datatypeLibrary; 58.276 + this.scope = parent.scope; 58.277 + this.startLocation = makeLocation(); 58.278 + if (parent.comments != null) { 58.279 + annotations = schemaBuilder.makeAnnotations(parent.comments, getContext()); 58.280 + parent.comments = null; 58.281 + } else if (parent instanceof RootState) { 58.282 + annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.283 + } 58.284 + } 58.285 + 58.286 + String getNs() { 58.287 + return ns == null ? nsInherit : ns; 58.288 + } 58.289 + 58.290 + boolean isRelaxNGElement(String uri) throws SAXException { 58.291 + return uri.equals(relaxngURI); 58.292 + } 58.293 + 58.294 + public void startElement(String namespaceURI, 58.295 + String localName, 58.296 + String qName, 58.297 + Attributes atts) throws SAXException { 58.298 + xmlBaseHandler.startElement(); 58.299 + if (isRelaxNGElement(namespaceURI)) { 58.300 + State state = createChildState(localName); 58.301 + if (state == null) { 58.302 + xr.setContentHandler(new Skipper(this)); 58.303 + return; 58.304 + } 58.305 + state.setParent(this); 58.306 + state.set(); 58.307 + state.attributes(atts); 58.308 + } else { 58.309 + checkForeignElement(); 58.310 + ForeignElementHandler feh = new ForeignElementHandler(this, getComments()); 58.311 + feh.startElement(namespaceURI, localName, qName, atts); 58.312 + xr.setContentHandler(feh); 58.313 + } 58.314 + } 58.315 + 58.316 + public void endElement(String namespaceURI, 58.317 + String localName, 58.318 + String qName) throws SAXException { 58.319 + xmlBaseHandler.endElement(); 58.320 + parent.set(); 58.321 + end(); 58.322 + } 58.323 + 58.324 + void setName(String name) throws SAXException { 58.325 + error("illegal_name_attribute"); 58.326 + } 58.327 + 58.328 + void setOtherAttribute(String name, String value) throws SAXException { 58.329 + error("illegal_attribute_ignored", name); 58.330 + } 58.331 + 58.332 + void endAttributes() throws SAXException { 58.333 + } 58.334 + 58.335 + void checkForeignElement() throws SAXException { 58.336 + } 58.337 + 58.338 + void attributes(Attributes atts) throws SAXException { 58.339 + int len = atts.getLength(); 58.340 + for (int i = 0; i < len; i++) { 58.341 + String uri = atts.getURI(i); 58.342 + if (uri.length() == 0) { 58.343 + String name = atts.getLocalName(i); 58.344 + if (name.equals("name")) { 58.345 + setName(atts.getValue(i).trim()); 58.346 + } else if (name.equals("ns")) { 58.347 + ns = atts.getValue(i); 58.348 + } else if (name.equals("datatypeLibrary")) { 58.349 + datatypeLibrary = atts.getValue(i); 58.350 + checkUri(datatypeLibrary); 58.351 + if (!datatypeLibrary.equals("") 58.352 + && !Uri.isAbsolute(datatypeLibrary)) { 58.353 + error("relative_datatype_library"); 58.354 + } 58.355 + if (Uri.hasFragmentId(datatypeLibrary)) { 58.356 + error("fragment_identifier_datatype_library"); 58.357 + } 58.358 + datatypeLibrary = Uri.escapeDisallowedChars(datatypeLibrary); 58.359 + } else { 58.360 + setOtherAttribute(name, atts.getValue(i)); 58.361 + } 58.362 + } else if (uri.equals(relaxngURI)) { 58.363 + error("qualified_attribute", atts.getLocalName(i)); 58.364 + } else if (uri.equals(WellKnownNamespaces.XML) 58.365 + && atts.getLocalName(i).equals("base")) { 58.366 + xmlBaseHandler.xmlBaseAttribute(atts.getValue(i)); 58.367 + } else { 58.368 + if (annotations == null) { 58.369 + annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.370 + } 58.371 + annotations.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri), 58.372 + atts.getValue(i), startLocation); 58.373 + } 58.374 + } 58.375 + endAttributes(); 58.376 + } 58.377 + 58.378 + abstract void end() throws SAXException; 58.379 + 58.380 + void endChild(ParsedPattern pattern) { 58.381 + // XXX cannot happen; throw exception 58.382 + } 58.383 + 58.384 + void endChild(ParsedNameClass nc) { 58.385 + // XXX cannot happen; throw exception 58.386 + } 58.387 + 58.388 + @Override 58.389 + public void startDocument() { 58.390 + } 58.391 + 58.392 + @Override 58.393 + public void endDocument() { 58.394 + if (comments != null && startPattern != null) { 58.395 + startPattern = schemaBuilder.commentAfter(startPattern, comments); 58.396 + comments = null; 58.397 + } 58.398 + } 58.399 + 58.400 + public void characters(char[] ch, int start, int len) throws SAXException { 58.401 + for (int i = 0; i < len; i++) { 58.402 + switch (ch[start + i]) { 58.403 + case ' ': 58.404 + case '\r': 58.405 + case '\n': 58.406 + case '\t': 58.407 + break; 58.408 + default: 58.409 + error("illegal_characters_ignored"); 58.410 + break; 58.411 + } 58.412 + } 58.413 + } 58.414 + 58.415 + boolean isPatternNamespaceURI(String s) { 58.416 + return s.equals(relaxngURI); 58.417 + } 58.418 + 58.419 + void endForeignChild(ParsedElementAnnotation ea) { 58.420 + if (annotations == null) { 58.421 + annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.422 + } 58.423 + annotations.addElement(ea); 58.424 + } 58.425 + 58.426 + void mergeLeadingComments() { 58.427 + if (comments != null) { 58.428 + if (annotations == null) { 58.429 + annotations = schemaBuilder.makeAnnotations(comments, getContext()); 58.430 + } else { 58.431 + annotations.addLeadingComment(comments); 58.432 + } 58.433 + comments = null; 58.434 + } 58.435 + } 58.436 } 58.437 58.438 - public void endPrefixMapping(String prefix) { 58.439 - context.prefixMapping = context.prefixMapping.next; 58.440 + class ForeignElementHandler extends Handler { 58.441 + 58.442 + final State nextState; 58.443 + ElementAnnotationBuilder builder; 58.444 + final Stack builderStack = new Stack(); 58.445 + StringBuffer textBuf; 58.446 + Location textLoc; 58.447 + 58.448 + ForeignElementHandler(State nextState, CommentList comments) { 58.449 + this.nextState = nextState; 58.450 + this.comments = comments; 58.451 + } 58.452 + 58.453 + public void startElement(String namespaceURI, String localName, 58.454 + String qName, Attributes atts) { 58.455 + flushText(); 58.456 + if (builder != null) { 58.457 + builderStack.push(builder); 58.458 + } 58.459 + Location loc = makeLocation(); 58.460 + builder = schemaBuilder.makeElementAnnotationBuilder(namespaceURI, 58.461 + localName, 58.462 + findPrefix(qName, namespaceURI), 58.463 + loc, 58.464 + getComments(), 58.465 + getContext()); 58.466 + int len = atts.getLength(); 58.467 + for (int i = 0; i < len; i++) { 58.468 + String uri = atts.getURI(i); 58.469 + builder.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri), 58.470 + atts.getValue(i), loc); 58.471 + } 58.472 + } 58.473 + 58.474 + public void endElement(String namespaceURI, String localName, 58.475 + String qName) { 58.476 + flushText(); 58.477 + if (comments != null) { 58.478 + builder.addComment(getComments()); 58.479 + } 58.480 + ParsedElementAnnotation ea = builder.makeElementAnnotation(); 58.481 + if (builderStack.empty()) { 58.482 + nextState.endForeignChild(ea); 58.483 + nextState.set(); 58.484 + } else { 58.485 + builder = (ElementAnnotationBuilder) builderStack.pop(); 58.486 + builder.addElement(ea); 58.487 + } 58.488 + } 58.489 + 58.490 + public void characters(char ch[], int start, int length) { 58.491 + if (textBuf == null) { 58.492 + textBuf = new StringBuffer(); 58.493 + } 58.494 + textBuf.append(ch, start, length); 58.495 + if (textLoc == null) { 58.496 + textLoc = makeLocation(); 58.497 + } 58.498 + } 58.499 + 58.500 + @Override 58.501 + public void comment(String value) { 58.502 + flushText(); 58.503 + super.comment(value); 58.504 + } 58.505 + 58.506 + void flushText() { 58.507 + if (textBuf != null && textBuf.length() != 0) { 58.508 + builder.addText(textBuf.toString(), textLoc, getComments()); 58.509 + textBuf.setLength(0); 58.510 + } 58.511 + textLoc = null; 58.512 + } 58.513 } 58.514 58.515 - public void setDocumentLocator(Locator loc) { 58.516 - locator = loc; 58.517 - xmlBaseHandler.setLocator(loc); 58.518 - } 58.519 - } 58.520 + static class Skipper extends DefaultHandler implements CommentHandler { 58.521 58.522 - abstract class State extends Handler { 58.523 - State parent; 58.524 - String nsInherit; 58.525 - String ns; 58.526 - String datatypeLibrary; 58.527 - /** 58.528 - * The current scope, or null if there's none. 58.529 - */ 58.530 - Scope scope; 58.531 - Location startLocation; 58.532 - Annotations annotations; 58.533 + int level = 1; 58.534 + final State nextState; 58.535 58.536 - void set() { 58.537 - xr.setContentHandler(this); 58.538 + Skipper(State nextState) { 58.539 + this.nextState = nextState; 58.540 + } 58.541 + 58.542 + @Override 58.543 + public void startElement(String namespaceURI, 58.544 + String localName, 58.545 + String qName, 58.546 + Attributes atts) throws SAXException { 58.547 + ++level; 58.548 + } 58.549 + 58.550 + @Override 58.551 + public void endElement(String namespaceURI, 58.552 + String localName, 58.553 + String qName) throws SAXException { 58.554 + if (--level == 0) { 58.555 + nextState.set(); 58.556 + } 58.557 + } 58.558 + 58.559 + public void comment(String value) { 58.560 + } 58.561 } 58.562 58.563 - abstract State create(); 58.564 - abstract State createChildState(String localName) throws SAXException; 58.565 + abstract class EmptyContentState extends State { 58.566 58.567 + State createChildState(String localName) throws SAXException { 58.568 + error("expected_empty", localName); 58.569 + return null; 58.570 + } 58.571 58.572 - void setParent(State parent) { 58.573 - this.parent = parent; 58.574 - this.nsInherit = parent.getNs(); 58.575 - this.datatypeLibrary = parent.datatypeLibrary; 58.576 - this.scope = parent.scope; 58.577 - this.startLocation = makeLocation(); 58.578 - if (parent.comments != null) { 58.579 - annotations = schemaBuilder.makeAnnotations(parent.comments, getContext()); 58.580 - parent.comments = null; 58.581 - } 58.582 - else if (parent instanceof RootState) 58.583 - annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.584 + abstract ParsedPattern makePattern() throws SAXException; 58.585 + 58.586 + void end() throws SAXException { 58.587 + if (comments != null) { 58.588 + if (annotations == null) { 58.589 + annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.590 + } 58.591 + annotations.addComment(comments); 58.592 + comments = null; 58.593 + } 58.594 + parent.endChild(makePattern()); 58.595 + } 58.596 + } 58.597 + static private final int INIT_CHILD_ALLOC = 5; 58.598 + 58.599 + abstract class PatternContainerState extends State { 58.600 + 58.601 + List<ParsedPattern> childPatterns; 58.602 + 58.603 + State createChildState(String localName) throws SAXException { 58.604 + State state = (State) patternTable.get(localName); 58.605 + if (state == null) { 58.606 + error("expected_pattern", localName); 58.607 + return null; 58.608 + } 58.609 + return state.create(); 58.610 + } 58.611 + 58.612 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.613 + if (patterns.size() == 1 && anno == null) { 58.614 + return patterns.get(0); 58.615 + } 58.616 + return schemaBuilder.makeGroup(patterns, loc, anno); 58.617 + } 58.618 + 58.619 + @Override 58.620 + void endChild(ParsedPattern pattern) { 58.621 + if (childPatterns == null) { 58.622 + childPatterns = new ArrayList<ParsedPattern>(INIT_CHILD_ALLOC); 58.623 + } 58.624 + childPatterns.add(pattern); 58.625 + } 58.626 + 58.627 + @Override 58.628 + void endForeignChild(ParsedElementAnnotation ea) { 58.629 + // Harshit : Annotation handling should always be taken care of, irrespective of childPatterns being null or not. 58.630 + super.endForeignChild(ea); 58.631 + if (childPatterns != null) { 58.632 + int idx = childPatterns.size() - 1; 58.633 + childPatterns.set(idx, schemaBuilder.annotateAfter(childPatterns.get(idx), ea)); 58.634 + } 58.635 + } 58.636 + 58.637 + void end() throws SAXException { 58.638 + if (childPatterns == null) { 58.639 + error("missing_children"); 58.640 + endChild(schemaBuilder.makeErrorPattern()); 58.641 + } 58.642 + if (comments != null) { 58.643 + int idx = childPatterns.size() - 1; 58.644 + childPatterns.set(idx, schemaBuilder.commentAfter(childPatterns.get(idx), comments)); 58.645 + comments = null; 58.646 + } 58.647 + sendPatternToParent(buildPattern(childPatterns, startLocation, annotations)); 58.648 + } 58.649 + 58.650 + void sendPatternToParent(ParsedPattern p) { 58.651 + parent.endChild(p); 58.652 + } 58.653 } 58.654 58.655 - String getNs() { 58.656 - return ns == null ? nsInherit : ns; 58.657 + class GroupState extends PatternContainerState { 58.658 + 58.659 + State create() { 58.660 + return new GroupState(); 58.661 + } 58.662 } 58.663 58.664 - boolean isRelaxNGElement(String uri) throws SAXException { 58.665 - return uri.equals(relaxngURI); 58.666 + class ZeroOrMoreState extends PatternContainerState { 58.667 + 58.668 + State create() { 58.669 + return new ZeroOrMoreState(); 58.670 + } 58.671 + 58.672 + @Override 58.673 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.674 + return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno); 58.675 + } 58.676 } 58.677 58.678 - public void startElement(String namespaceURI, 58.679 - String localName, 58.680 - String qName, 58.681 - Attributes atts) throws SAXException { 58.682 - xmlBaseHandler.startElement(); 58.683 - if (isRelaxNGElement(namespaceURI)) { 58.684 - State state = createChildState(localName); 58.685 - if (state == null) { 58.686 - xr.setContentHandler(new Skipper(this)); 58.687 - return; 58.688 + class OneOrMoreState extends PatternContainerState { 58.689 + 58.690 + State create() { 58.691 + return new OneOrMoreState(); 58.692 } 58.693 - state.setParent(this); 58.694 - state.set(); 58.695 - state.attributes(atts); 58.696 - } 58.697 - else { 58.698 - checkForeignElement(); 58.699 - ForeignElementHandler feh = new ForeignElementHandler(this, getComments()); 58.700 - feh.startElement(namespaceURI, localName, qName, atts); 58.701 - xr.setContentHandler(feh); 58.702 - } 58.703 + 58.704 + @Override 58.705 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.706 + return schemaBuilder.makeOneOrMore(super.buildPattern(patterns, loc, null), loc, anno); 58.707 + } 58.708 } 58.709 58.710 - public void endElement(String namespaceURI, 58.711 - String localName, 58.712 - String qName) throws SAXException { 58.713 - xmlBaseHandler.endElement(); 58.714 - parent.set(); 58.715 - end(); 58.716 + class OptionalState extends PatternContainerState { 58.717 + 58.718 + State create() { 58.719 + return new OptionalState(); 58.720 + } 58.721 + 58.722 + @Override 58.723 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.724 + return schemaBuilder.makeOptional(super.buildPattern(patterns, loc, null), loc, anno); 58.725 + } 58.726 } 58.727 58.728 - void setName(String name) throws SAXException { 58.729 - error("illegal_name_attribute"); 58.730 + class ListState extends PatternContainerState { 58.731 + 58.732 + State create() { 58.733 + return new ListState(); 58.734 + } 58.735 + 58.736 + @Override 58.737 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.738 + return schemaBuilder.makeList(super.buildPattern(patterns, loc, null), loc, anno); 58.739 + } 58.740 } 58.741 58.742 - void setOtherAttribute(String name, String value) throws SAXException { 58.743 - error("illegal_attribute_ignored", name); 58.744 + class ChoiceState extends PatternContainerState { 58.745 + 58.746 + State create() { 58.747 + return new ChoiceState(); 58.748 + } 58.749 + 58.750 + @Override 58.751 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.752 + return schemaBuilder.makeChoice(patterns, loc, anno); 58.753 + } 58.754 } 58.755 58.756 - void endAttributes() throws SAXException { 58.757 + class InterleaveState extends PatternContainerState { 58.758 + 58.759 + State create() { 58.760 + return new InterleaveState(); 58.761 + } 58.762 + 58.763 + @Override 58.764 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) { 58.765 + return schemaBuilder.makeInterleave(patterns, loc, anno); 58.766 + } 58.767 } 58.768 58.769 - void checkForeignElement() throws SAXException { 58.770 + class MixedState extends PatternContainerState { 58.771 + 58.772 + State create() { 58.773 + return new MixedState(); 58.774 + } 58.775 + 58.776 + @Override 58.777 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.778 + return schemaBuilder.makeMixed(super.buildPattern(patterns, loc, null), loc, anno); 58.779 + } 58.780 } 58.781 58.782 - void attributes(Attributes atts) throws SAXException { 58.783 - int len = atts.getLength(); 58.784 - for (int i = 0; i < len; i++) { 58.785 - String uri = atts.getURI(i); 58.786 - if (uri.length() == 0) { 58.787 - String name = atts.getLocalName(i); 58.788 - if (name.equals("name")) 58.789 - setName(atts.getValue(i).trim()); 58.790 - else if (name.equals("ns")) 58.791 - ns = atts.getValue(i); 58.792 - else if (name.equals("datatypeLibrary")) { 58.793 - datatypeLibrary = atts.getValue(i); 58.794 - checkUri(datatypeLibrary); 58.795 - if (!datatypeLibrary.equals("") 58.796 - && !Uri.isAbsolute(datatypeLibrary)) 58.797 - error("relative_datatype_library"); 58.798 - if (Uri.hasFragmentId(datatypeLibrary)) 58.799 - error("fragment_identifier_datatype_library"); 58.800 - datatypeLibrary = Uri.escapeDisallowedChars(datatypeLibrary); 58.801 - } 58.802 - else 58.803 - setOtherAttribute(name, atts.getValue(i)); 58.804 - } 58.805 - else if (uri.equals(relaxngURI)) 58.806 - error("qualified_attribute", atts.getLocalName(i)); 58.807 - else if (uri.equals(WellKnownNamespaces.XML) 58.808 - && atts.getLocalName(i).equals("base")) 58.809 - xmlBaseHandler.xmlBaseAttribute(atts.getValue(i)); 58.810 - else { 58.811 - if (annotations == null) 58.812 - annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.813 - annotations.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri), 58.814 - atts.getValue(i), startLocation); 58.815 - } 58.816 - } 58.817 - endAttributes(); 58.818 + static interface NameClassRef { 58.819 + 58.820 + void setNameClass(ParsedNameClass nc); 58.821 } 58.822 58.823 - abstract void end() throws SAXException; 58.824 + class ElementState extends PatternContainerState implements NameClassRef { 58.825 58.826 - void endChild(ParsedPattern pattern) { 58.827 - // XXX cannot happen; throw exception 58.828 + ParsedNameClass nameClass; 58.829 + boolean nameClassWasAttribute; 58.830 + String name; 58.831 + 58.832 + @Override 58.833 + void setName(String name) { 58.834 + this.name = name; 58.835 + } 58.836 + 58.837 + public void setNameClass(ParsedNameClass nc) { 58.838 + nameClass = nc; 58.839 + } 58.840 + 58.841 + @Override 58.842 + void endAttributes() throws SAXException { 58.843 + if (name != null) { 58.844 + nameClass = expandName(name, getNs(), null); 58.845 + nameClassWasAttribute = true; 58.846 + } else { 58.847 + new NameClassChildState(this, this).set(); 58.848 + } 58.849 + } 58.850 + 58.851 + State create() { 58.852 + return new ElementState(); 58.853 + } 58.854 + 58.855 + @Override 58.856 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.857 + return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno); 58.858 + } 58.859 + 58.860 + @Override 58.861 + void endForeignChild(ParsedElementAnnotation ea) { 58.862 + if (nameClassWasAttribute || childPatterns != null || nameClass == null) { 58.863 + super.endForeignChild(ea); 58.864 + } else { 58.865 + nameClass = nameClassBuilder.annotateAfter(nameClass, ea); 58.866 + } 58.867 + } 58.868 } 58.869 58.870 - void endChild(ParsedNameClass nc) { 58.871 - // XXX cannot happen; throw exception 58.872 + class RootState extends PatternContainerState { 58.873 + 58.874 + IncludedGrammar grammar; 58.875 + 58.876 + RootState() { 58.877 + } 58.878 + 58.879 + RootState(IncludedGrammar grammar, Scope scope, String ns) { 58.880 + this.grammar = grammar; 58.881 + this.scope = scope; 58.882 + this.nsInherit = ns; 58.883 + this.datatypeLibrary = ""; 58.884 + } 58.885 + 58.886 + State create() { 58.887 + return new RootState(); 58.888 + } 58.889 + 58.890 + @Override 58.891 + State createChildState(String localName) throws SAXException { 58.892 + if (grammar == null) { 58.893 + return super.createChildState(localName); 58.894 + } 58.895 + if (localName.equals("grammar")) { 58.896 + return new MergeGrammarState(grammar); 58.897 + } 58.898 + error("expected_grammar", localName); 58.899 + return null; 58.900 + } 58.901 + 58.902 + @Override 58.903 + void checkForeignElement() throws SAXException { 58.904 + error("root_bad_namespace_uri", WellKnownNamespaces.RELAX_NG); 58.905 + } 58.906 + 58.907 + @Override 58.908 + void endChild(ParsedPattern pattern) { 58.909 + startPattern = pattern; 58.910 + } 58.911 + 58.912 + @Override 58.913 + boolean isRelaxNGElement(String uri) throws SAXException { 58.914 + if (!uri.startsWith(relaxngURIPrefix)) { 58.915 + return false; 58.916 + } 58.917 + if (!uri.equals(WellKnownNamespaces.RELAX_NG)) { 58.918 + warning("wrong_uri_version", 58.919 + WellKnownNamespaces.RELAX_NG.substring(relaxngURIPrefix.length()), 58.920 + uri.substring(relaxngURIPrefix.length())); 58.921 + } 58.922 + relaxngURI = uri; 58.923 + return true; 58.924 + } 58.925 } 58.926 58.927 - public void startDocument() { } 58.928 - public void endDocument() { 58.929 - if (comments != null && startPattern != null) { 58.930 - startPattern = schemaBuilder.commentAfter(startPattern, comments); 58.931 - comments = null; 58.932 - } 58.933 + class NotAllowedState extends EmptyContentState { 58.934 + 58.935 + State create() { 58.936 + return new NotAllowedState(); 58.937 + } 58.938 + 58.939 + ParsedPattern makePattern() { 58.940 + return schemaBuilder.makeNotAllowed(startLocation, annotations); 58.941 + } 58.942 } 58.943 58.944 - public void characters(char[] ch, int start, int len) throws SAXException { 58.945 - for (int i = 0; i < len; i++) { 58.946 - switch(ch[start + i]) { 58.947 - case ' ': 58.948 - case '\r': 58.949 - case '\n': 58.950 - case '\t': 58.951 - break; 58.952 - default: 58.953 - error("illegal_characters_ignored"); 58.954 - break; 58.955 + class EmptyState extends EmptyContentState { 58.956 + 58.957 + State create() { 58.958 + return new EmptyState(); 58.959 } 58.960 - } 58.961 + 58.962 + ParsedPattern makePattern() { 58.963 + return schemaBuilder.makeEmpty(startLocation, annotations); 58.964 + } 58.965 } 58.966 58.967 - boolean isPatternNamespaceURI(String s) { 58.968 - return s.equals(relaxngURI); 58.969 + class TextState extends EmptyContentState { 58.970 + 58.971 + State create() { 58.972 + return new TextState(); 58.973 + } 58.974 + 58.975 + ParsedPattern makePattern() { 58.976 + return schemaBuilder.makeText(startLocation, annotations); 58.977 + } 58.978 } 58.979 58.980 - void endForeignChild(ParsedElementAnnotation ea) { 58.981 - if (annotations == null) 58.982 - annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.983 - annotations.addElement(ea); 58.984 + class ValueState extends EmptyContentState { 58.985 + 58.986 + final StringBuffer buf = new StringBuffer(); 58.987 + String type; 58.988 + 58.989 + State create() { 58.990 + return new ValueState(); 58.991 + } 58.992 + 58.993 + @Override 58.994 + void setOtherAttribute(String name, String value) throws SAXException { 58.995 + if (name.equals("type")) { 58.996 + type = checkNCName(value.trim()); 58.997 + } else { 58.998 + super.setOtherAttribute(name, value); 58.999 + } 58.1000 + } 58.1001 + 58.1002 + @Override 58.1003 + public void characters(char[] ch, int start, int len) { 58.1004 + buf.append(ch, start, len); 58.1005 + } 58.1006 + 58.1007 + @Override 58.1008 + void checkForeignElement() throws SAXException { 58.1009 + error("value_contains_foreign_element"); 58.1010 + } 58.1011 + 58.1012 + ParsedPattern makePattern() throws SAXException { 58.1013 + if (type == null) { 58.1014 + return makePattern("", "token"); 58.1015 + } else { 58.1016 + return makePattern(datatypeLibrary, type); 58.1017 + } 58.1018 + } 58.1019 + 58.1020 + @Override 58.1021 + void end() throws SAXException { 58.1022 + mergeLeadingComments(); 58.1023 + super.end(); 58.1024 + } 58.1025 + 58.1026 + ParsedPattern makePattern(String datatypeLibrary, String type) { 58.1027 + return schemaBuilder.makeValue(datatypeLibrary, 58.1028 + type, 58.1029 + buf.toString(), 58.1030 + getContext(), 58.1031 + getNs(), 58.1032 + startLocation, 58.1033 + annotations); 58.1034 + } 58.1035 } 58.1036 58.1037 - void mergeLeadingComments() { 58.1038 - if (comments != null) { 58.1039 - if (annotations == null) 58.1040 - annotations = schemaBuilder.makeAnnotations(comments, getContext()); 58.1041 - else 58.1042 - annotations.addLeadingComment(comments); 58.1043 - comments = null; 58.1044 - } 58.1045 - } 58.1046 - } 58.1047 + class DataState extends State { 58.1048 58.1049 - class ForeignElementHandler extends Handler { 58.1050 - final State nextState; 58.1051 - ElementAnnotationBuilder builder; 58.1052 - final Stack builderStack = new Stack(); 58.1053 - StringBuffer textBuf; 58.1054 - Location textLoc; 58.1055 + String type; 58.1056 + ParsedPattern except = null; 58.1057 + DataPatternBuilder dpb = null; 58.1058 58.1059 - ForeignElementHandler(State nextState, CommentList comments) { 58.1060 - this.nextState = nextState; 58.1061 - this.comments = comments; 58.1062 + State create() { 58.1063 + return new DataState(); 58.1064 + } 58.1065 + 58.1066 + State createChildState(String localName) throws SAXException { 58.1067 + if (localName.equals("param")) { 58.1068 + if (except != null) { 58.1069 + error("param_after_except"); 58.1070 + } 58.1071 + return new ParamState(dpb); 58.1072 + } 58.1073 + if (localName.equals("except")) { 58.1074 + if (except != null) { 58.1075 + error("multiple_except"); 58.1076 + } 58.1077 + return new ChoiceState(); 58.1078 + } 58.1079 + error("expected_param_except", localName); 58.1080 + return null; 58.1081 + } 58.1082 + 58.1083 + @Override 58.1084 + void setOtherAttribute(String name, String value) throws SAXException { 58.1085 + if (name.equals("type")) { 58.1086 + type = checkNCName(value.trim()); 58.1087 + } else { 58.1088 + super.setOtherAttribute(name, value); 58.1089 + } 58.1090 + } 58.1091 + 58.1092 + @Override 58.1093 + void endAttributes() throws SAXException { 58.1094 + if (type == null) { 58.1095 + error("missing_type_attribute"); 58.1096 + } else { 58.1097 + dpb = schemaBuilder.makeDataPatternBuilder(datatypeLibrary, type, startLocation); 58.1098 + } 58.1099 + } 58.1100 + 58.1101 + void end() throws SAXException { 58.1102 + ParsedPattern p; 58.1103 + if (dpb != null) { 58.1104 + if (except != null) { 58.1105 + p = dpb.makePattern(except, startLocation, annotations); 58.1106 + } else { 58.1107 + p = dpb.makePattern(startLocation, annotations); 58.1108 + } 58.1109 + } else { 58.1110 + p = schemaBuilder.makeErrorPattern(); 58.1111 + } 58.1112 + // XXX need to capture comments 58.1113 + parent.endChild(p); 58.1114 + } 58.1115 + 58.1116 + @Override 58.1117 + void endChild(ParsedPattern pattern) { 58.1118 + except = pattern; 58.1119 + } 58.1120 } 58.1121 58.1122 - public void startElement(String namespaceURI, String localName, 58.1123 - String qName, Attributes atts) { 58.1124 - flushText(); 58.1125 - if (builder != null) 58.1126 - builderStack.push(builder); 58.1127 - Location loc = makeLocation(); 58.1128 - builder = schemaBuilder.makeElementAnnotationBuilder(namespaceURI, 58.1129 - localName, 58.1130 - findPrefix(qName, namespaceURI), 58.1131 - loc, 58.1132 - getComments(), 58.1133 - getContext()); 58.1134 - int len = atts.getLength(); 58.1135 - for (int i = 0; i < len; i++) { 58.1136 - String uri = atts.getURI(i); 58.1137 - builder.addAttribute(uri, atts.getLocalName(i), findPrefix(atts.getQName(i), uri), 58.1138 - atts.getValue(i), loc); 58.1139 - } 58.1140 + class ParamState extends State { 58.1141 + 58.1142 + private final StringBuffer buf = new StringBuffer(); 58.1143 + private final DataPatternBuilder dpb; 58.1144 + private String name; 58.1145 + 58.1146 + ParamState(DataPatternBuilder dpb) { 58.1147 + this.dpb = dpb; 58.1148 + } 58.1149 + 58.1150 + State create() { 58.1151 + return new ParamState(null); 58.1152 + } 58.1153 + 58.1154 + @Override 58.1155 + void setName(String name) throws SAXException { 58.1156 + this.name = checkNCName(name); 58.1157 + } 58.1158 + 58.1159 + @Override 58.1160 + void endAttributes() throws SAXException { 58.1161 + if (name == null) { 58.1162 + error("missing_name_attribute"); 58.1163 + } 58.1164 + } 58.1165 + 58.1166 + State createChildState(String localName) throws SAXException { 58.1167 + error("expected_empty", localName); 58.1168 + return null; 58.1169 + } 58.1170 + 58.1171 + @Override 58.1172 + public void characters(char[] ch, int start, int len) { 58.1173 + buf.append(ch, start, len); 58.1174 + } 58.1175 + 58.1176 + @Override 58.1177 + void checkForeignElement() throws SAXException { 58.1178 + error("param_contains_foreign_element"); 58.1179 + } 58.1180 + 58.1181 + void end() throws SAXException { 58.1182 + if (name == null) { 58.1183 + return; 58.1184 + } 58.1185 + if (dpb == null) { 58.1186 + return; 58.1187 + } 58.1188 + mergeLeadingComments(); 58.1189 + dpb.addParam(name, buf.toString(), getContext(), getNs(), startLocation, annotations); 58.1190 + } 58.1191 } 58.1192 58.1193 - public void endElement(String namespaceURI, String localName, 58.1194 - String qName) { 58.1195 - flushText(); 58.1196 - if (comments != null) 58.1197 - builder.addComment(getComments()); 58.1198 - ParsedElementAnnotation ea = builder.makeElementAnnotation(); 58.1199 - if (builderStack.empty()) { 58.1200 - nextState.endForeignChild(ea); 58.1201 - nextState.set(); 58.1202 - } 58.1203 - else { 58.1204 - builder = (ElementAnnotationBuilder)builderStack.pop(); 58.1205 - builder.addElement(ea); 58.1206 - } 58.1207 + class AttributeState extends PatternContainerState implements NameClassRef { 58.1208 + 58.1209 + ParsedNameClass nameClass; 58.1210 + boolean nameClassWasAttribute; 58.1211 + String name; 58.1212 + 58.1213 + State create() { 58.1214 + return new AttributeState(); 58.1215 + } 58.1216 + 58.1217 + @Override 58.1218 + void setName(String name) { 58.1219 + this.name = name; 58.1220 + } 58.1221 + 58.1222 + public void setNameClass(ParsedNameClass nc) { 58.1223 + nameClass = nc; 58.1224 + } 58.1225 + 58.1226 + @Override 58.1227 + void endAttributes() throws SAXException { 58.1228 + if (name != null) { 58.1229 + String nsUse; 58.1230 + if (ns != null) { 58.1231 + nsUse = ns; 58.1232 + } else { 58.1233 + nsUse = ""; 58.1234 + } 58.1235 + nameClass = expandName(name, nsUse, null); 58.1236 + nameClassWasAttribute = true; 58.1237 + } else { 58.1238 + new NameClassChildState(this, this).set(); 58.1239 + } 58.1240 + } 58.1241 + 58.1242 + @Override 58.1243 + void endForeignChild(ParsedElementAnnotation ea) { 58.1244 + if (nameClassWasAttribute || childPatterns != null || nameClass == null) { 58.1245 + super.endForeignChild(ea); 58.1246 + } else { 58.1247 + nameClass = nameClassBuilder.annotateAfter(nameClass, ea); 58.1248 + } 58.1249 + } 58.1250 + 58.1251 + @Override 58.1252 + void end() throws SAXException { 58.1253 + if (childPatterns == null) { 58.1254 + endChild(schemaBuilder.makeText(startLocation, null)); 58.1255 + } 58.1256 + super.end(); 58.1257 + } 58.1258 + 58.1259 + @Override 58.1260 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1261 + return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno); 58.1262 + } 58.1263 + 58.1264 + @Override 58.1265 + State createChildState(String localName) throws SAXException { 58.1266 + State tem = super.createChildState(localName); 58.1267 + if (tem != null && childPatterns != null) { 58.1268 + error("attribute_multi_pattern"); 58.1269 + } 58.1270 + return tem; 58.1271 + } 58.1272 } 58.1273 58.1274 - public void characters(char ch[], int start, int length) { 58.1275 - if (textBuf == null) 58.1276 - textBuf = new StringBuffer(); 58.1277 - textBuf.append(ch, start, length); 58.1278 - if (textLoc == null) 58.1279 - textLoc = makeLocation(); 58.1280 + abstract class SinglePatternContainerState extends PatternContainerState { 58.1281 + 58.1282 + @Override 58.1283 + State createChildState(String localName) throws SAXException { 58.1284 + if (childPatterns == null) { 58.1285 + return super.createChildState(localName); 58.1286 + } 58.1287 + error("too_many_children"); 58.1288 + return null; 58.1289 + } 58.1290 } 58.1291 58.1292 - public void comment(String value) { 58.1293 - flushText(); 58.1294 - super.comment(value); 58.1295 + class GrammarSectionState extends State { 58.1296 + 58.1297 + GrammarSection section; 58.1298 + 58.1299 + GrammarSectionState() { 58.1300 + } 58.1301 + 58.1302 + GrammarSectionState(GrammarSection section) { 58.1303 + this.section = section; 58.1304 + } 58.1305 + 58.1306 + State create() { 58.1307 + return new GrammarSectionState(null); 58.1308 + } 58.1309 + 58.1310 + State createChildState(String localName) throws SAXException { 58.1311 + if (localName.equals("define")) { 58.1312 + return new DefineState(section); 58.1313 + } 58.1314 + if (localName.equals("start")) { 58.1315 + return new StartState(section); 58.1316 + } 58.1317 + if (localName.equals("include")) { 58.1318 + Include include = section.makeInclude(); 58.1319 + if (include != null) { 58.1320 + return new IncludeState(include); 58.1321 + } 58.1322 + } 58.1323 + if (localName.equals("div")) { 58.1324 + return new DivState(section.makeDiv()); 58.1325 + } 58.1326 + error("expected_define", localName); 58.1327 + // XXX better errors 58.1328 + return null; 58.1329 + } 58.1330 + 58.1331 + void end() throws SAXException { 58.1332 + if (comments != null) { 58.1333 + section.topLevelComment(comments); 58.1334 + comments = null; 58.1335 + } 58.1336 + } 58.1337 + 58.1338 + @Override 58.1339 + void endForeignChild(ParsedElementAnnotation ea) { 58.1340 + section.topLevelAnnotation(ea); 58.1341 + } 58.1342 } 58.1343 58.1344 - void flushText() { 58.1345 - if (textBuf != null && textBuf.length() != 0) { 58.1346 - builder.addText(textBuf.toString(), textLoc, getComments()); 58.1347 - textBuf.setLength(0); 58.1348 - } 58.1349 - textLoc = null; 58.1350 - } 58.1351 - } 58.1352 + class DivState extends GrammarSectionState { 58.1353 58.1354 - class Skipper extends DefaultHandler implements CommentHandler { 58.1355 - int level = 1; 58.1356 - final State nextState; 58.1357 + final Div div; 58.1358 58.1359 - Skipper(State nextState) { 58.1360 - this.nextState = nextState; 58.1361 + DivState(Div div) { 58.1362 + super(div); 58.1363 + this.div = div; 58.1364 + } 58.1365 + 58.1366 + @Override 58.1367 + void end() throws SAXException { 58.1368 + super.end(); 58.1369 + div.endDiv(startLocation, annotations); 58.1370 + } 58.1371 } 58.1372 58.1373 - public void startElement(String namespaceURI, 58.1374 - String localName, 58.1375 - String qName, 58.1376 - Attributes atts) throws SAXException { 58.1377 - ++level; 58.1378 + class IncludeState extends GrammarSectionState { 58.1379 + 58.1380 + String href; 58.1381 + final Include include; 58.1382 + 58.1383 + IncludeState(Include include) { 58.1384 + super(include); 58.1385 + this.include = include; 58.1386 + } 58.1387 + 58.1388 + @Override 58.1389 + void setOtherAttribute(String name, String value) throws SAXException { 58.1390 + if (name.equals("href")) { 58.1391 + href = value; 58.1392 + checkUri(href); 58.1393 + } else { 58.1394 + super.setOtherAttribute(name, value); 58.1395 + } 58.1396 + } 58.1397 + 58.1398 + @Override 58.1399 + void endAttributes() throws SAXException { 58.1400 + if (href == null) { 58.1401 + error("missing_href_attribute"); 58.1402 + } else { 58.1403 + href = resolve(href); 58.1404 + } 58.1405 + } 58.1406 + 58.1407 + @Override 58.1408 + void end() throws SAXException { 58.1409 + super.end(); 58.1410 + if (href != null) { 58.1411 + try { 58.1412 + include.endInclude(parseable, href, getNs(), startLocation, annotations); 58.1413 + } catch (IllegalSchemaException e) { 58.1414 + } 58.1415 + } 58.1416 + } 58.1417 } 58.1418 58.1419 - public void endElement(String namespaceURI, 58.1420 - String localName, 58.1421 - String qName) throws SAXException { 58.1422 - if (--level == 0) 58.1423 - nextState.set(); 58.1424 + class MergeGrammarState extends GrammarSectionState { 58.1425 + 58.1426 + final IncludedGrammar grammar; 58.1427 + 58.1428 + MergeGrammarState(IncludedGrammar grammar) { 58.1429 + super(grammar); 58.1430 + this.grammar = grammar; 58.1431 + } 58.1432 + 58.1433 + @Override 58.1434 + void end() throws SAXException { 58.1435 + super.end(); 58.1436 + parent.endChild(grammar.endIncludedGrammar(startLocation, annotations)); 58.1437 + } 58.1438 } 58.1439 58.1440 - public void comment(String value) { 58.1441 - } 58.1442 - } 58.1443 + class GrammarState extends GrammarSectionState { 58.1444 58.1445 - abstract class EmptyContentState extends State { 58.1446 + Grammar grammar; 58.1447 58.1448 - State createChildState(String localName) throws SAXException { 58.1449 - error("expected_empty", localName); 58.1450 - return null; 58.1451 + @Override 58.1452 + void setParent(State parent) { 58.1453 + super.setParent(parent); 58.1454 + grammar = schemaBuilder.makeGrammar(scope); 58.1455 + section = grammar; 58.1456 + scope = grammar; 58.1457 + } 58.1458 + 58.1459 + @Override 58.1460 + State create() { 58.1461 + return new GrammarState(); 58.1462 + } 58.1463 + 58.1464 + @Override 58.1465 + void end() throws SAXException { 58.1466 + super.end(); 58.1467 + parent.endChild(grammar.endGrammar(startLocation, annotations)); 58.1468 + } 58.1469 } 58.1470 58.1471 - abstract ParsedPattern makePattern() throws SAXException; 58.1472 + class RefState extends EmptyContentState { 58.1473 58.1474 - void end() throws SAXException { 58.1475 - if (comments != null) { 58.1476 - if (annotations == null) 58.1477 - annotations = schemaBuilder.makeAnnotations(null, getContext()); 58.1478 - annotations.addComment(comments); 58.1479 - comments = null; 58.1480 - } 58.1481 - parent.endChild(makePattern()); 58.1482 - } 58.1483 - } 58.1484 + String name; 58.1485 58.1486 - static private final int INIT_CHILD_ALLOC = 5; 58.1487 + State create() { 58.1488 + return new RefState(); 58.1489 + } 58.1490 58.1491 - abstract class PatternContainerState extends State { 58.1492 - List<ParsedPattern> childPatterns; 58.1493 + @Override 58.1494 + void endAttributes() throws SAXException { 58.1495 + if (name == null) { 58.1496 + error("missing_name_attribute"); 58.1497 + } 58.1498 + } 58.1499 58.1500 - State createChildState(String localName) throws SAXException { 58.1501 - State state = (State)patternTable.get(localName); 58.1502 - if (state == null) { 58.1503 - error("expected_pattern", localName); 58.1504 - return null; 58.1505 - } 58.1506 - return state.create(); 58.1507 + @Override 58.1508 + void setName(String name) throws SAXException { 58.1509 + this.name = checkNCName(name); 58.1510 + } 58.1511 + 58.1512 + ParsedPattern makePattern() throws SAXException { 58.1513 + if (name == null) { 58.1514 + return schemaBuilder.makeErrorPattern(); 58.1515 + } 58.1516 + if (scope == null) { 58.1517 + error("ref_outside_grammar", name); 58.1518 + return schemaBuilder.makeErrorPattern(); 58.1519 + } else { 58.1520 + return scope.makeRef(name, startLocation, annotations); 58.1521 + } 58.1522 + } 58.1523 } 58.1524 58.1525 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1526 - if (patterns.size() == 1 && anno == null) 58.1527 - return patterns.get(0); 58.1528 - return schemaBuilder.makeGroup(patterns, loc, anno); 58.1529 + class ParentRefState extends RefState { 58.1530 + 58.1531 + @Override 58.1532 + State create() { 58.1533 + return new ParentRefState(); 58.1534 + } 58.1535 + 58.1536 + @Override 58.1537 + ParsedPattern makePattern() throws SAXException { 58.1538 + if (name == null) { 58.1539 + return schemaBuilder.makeErrorPattern(); 58.1540 + } 58.1541 + if (scope == null) { 58.1542 + error("parent_ref_outside_grammar", name); 58.1543 + return schemaBuilder.makeErrorPattern(); 58.1544 + } else { 58.1545 + return scope.makeParentRef(name, startLocation, annotations); 58.1546 + } 58.1547 + } 58.1548 } 58.1549 58.1550 - void endChild(ParsedPattern pattern) { 58.1551 - if (childPatterns == null) 58.1552 - childPatterns = new ArrayList<ParsedPattern>(INIT_CHILD_ALLOC); 58.1553 - childPatterns.add(pattern); 58.1554 + class ExternalRefState extends EmptyContentState { 58.1555 + 58.1556 + String href; 58.1557 + 58.1558 + State create() { 58.1559 + return new ExternalRefState(); 58.1560 + } 58.1561 + 58.1562 + @Override 58.1563 + void setOtherAttribute(String name, String value) throws SAXException { 58.1564 + if (name.equals("href")) { 58.1565 + href = value; 58.1566 + checkUri(href); 58.1567 + } else { 58.1568 + super.setOtherAttribute(name, value); 58.1569 + } 58.1570 + } 58.1571 + 58.1572 + @Override 58.1573 + void endAttributes() throws SAXException { 58.1574 + if (href == null) { 58.1575 + error("missing_href_attribute"); 58.1576 + } else { 58.1577 + href = resolve(href); 58.1578 + } 58.1579 + } 58.1580 + 58.1581 + ParsedPattern makePattern() { 58.1582 + if (href != null) { 58.1583 + try { 58.1584 + return schemaBuilder.makeExternalRef(parseable, 58.1585 + href, 58.1586 + getNs(), 58.1587 + scope, 58.1588 + startLocation, 58.1589 + annotations); 58.1590 + } catch (IllegalSchemaException e) { 58.1591 + } 58.1592 + } 58.1593 + return schemaBuilder.makeErrorPattern(); 58.1594 + } 58.1595 } 58.1596 58.1597 - void endForeignChild(ParsedElementAnnotation ea) { 58.1598 - if (childPatterns == null) 58.1599 - super.endForeignChild(ea); 58.1600 - else { 58.1601 - int idx = childPatterns.size()-1; 58.1602 - childPatterns.set(idx, schemaBuilder.annotateAfter(childPatterns.get(idx), ea)); 58.1603 - } 58.1604 + abstract class DefinitionState extends PatternContainerState { 58.1605 + 58.1606 + GrammarSection.Combine combine = null; 58.1607 + final GrammarSection section; 58.1608 + 58.1609 + DefinitionState(GrammarSection section) { 58.1610 + this.section = section; 58.1611 + } 58.1612 + 58.1613 + @Override 58.1614 + void setOtherAttribute(String name, String value) throws SAXException { 58.1615 + if (name.equals("combine")) { 58.1616 + value = value.trim(); 58.1617 + if (value.equals("choice")) { 58.1618 + combine = GrammarSection.COMBINE_CHOICE; 58.1619 + } else if (value.equals("interleave")) { 58.1620 + combine = GrammarSection.COMBINE_INTERLEAVE; 58.1621 + } else { 58.1622 + error("combine_attribute_bad_value", value); 58.1623 + } 58.1624 + } else { 58.1625 + super.setOtherAttribute(name, value); 58.1626 + } 58.1627 + } 58.1628 + 58.1629 + @Override 58.1630 + ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1631 + return super.buildPattern(patterns, loc, null); 58.1632 + } 58.1633 } 58.1634 58.1635 - void end() throws SAXException { 58.1636 - if (childPatterns == null) { 58.1637 - error("missing_children"); 58.1638 - endChild(schemaBuilder.makeErrorPattern()); 58.1639 - } 58.1640 - if (comments != null) { 58.1641 - int idx = childPatterns.size()-1; 58.1642 - childPatterns.set(idx,schemaBuilder.commentAfter(childPatterns.get(idx), comments)); 58.1643 - comments = null; 58.1644 - } 58.1645 - sendPatternToParent(buildPattern(childPatterns, startLocation, annotations)); 58.1646 + class DefineState extends DefinitionState { 58.1647 + 58.1648 + String name; 58.1649 + 58.1650 + DefineState(GrammarSection section) { 58.1651 + super(section); 58.1652 + } 58.1653 + 58.1654 + State create() { 58.1655 + return new DefineState(null); 58.1656 + } 58.1657 + 58.1658 + @Override 58.1659 + void setName(String name) throws SAXException { 58.1660 + this.name = checkNCName(name); 58.1661 + } 58.1662 + 58.1663 + @Override 58.1664 + void endAttributes() throws SAXException { 58.1665 + if (name == null) { 58.1666 + error("missing_name_attribute"); 58.1667 + } 58.1668 + } 58.1669 + 58.1670 + @Override 58.1671 + void sendPatternToParent(ParsedPattern p) { 58.1672 + if (name != null) { 58.1673 + section.define(name, combine, p, startLocation, annotations); 58.1674 + } 58.1675 + } 58.1676 } 58.1677 58.1678 - void sendPatternToParent(ParsedPattern p) { 58.1679 - parent.endChild(p); 58.1680 - } 58.1681 - } 58.1682 + class StartState extends DefinitionState { 58.1683 58.1684 - class GroupState extends PatternContainerState { 58.1685 - State create() { 58.1686 - return new GroupState(); 58.1687 - } 58.1688 - } 58.1689 + StartState(GrammarSection section) { 58.1690 + super(section); 58.1691 + } 58.1692 58.1693 - class ZeroOrMoreState extends PatternContainerState { 58.1694 - State create() { 58.1695 - return new ZeroOrMoreState(); 58.1696 + State create() { 58.1697 + return new StartState(null); 58.1698 + } 58.1699 + 58.1700 + @Override 58.1701 + void sendPatternToParent(ParsedPattern p) { 58.1702 + section.define(GrammarSection.START, combine, p, startLocation, annotations); 58.1703 + } 58.1704 + 58.1705 + @Override 58.1706 + State createChildState(String localName) throws SAXException { 58.1707 + State tem = super.createChildState(localName); 58.1708 + if (tem != null && childPatterns != null) { 58.1709 + error("start_multi_pattern"); 58.1710 + } 58.1711 + return tem; 58.1712 + } 58.1713 } 58.1714 58.1715 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1716 - return schemaBuilder.makeZeroOrMore(super.buildPattern(patterns, loc, null), loc, anno); 58.1717 - } 58.1718 - } 58.1719 + abstract class NameClassContainerState extends State { 58.1720 58.1721 - class OneOrMoreState extends PatternContainerState { 58.1722 - State create() { 58.1723 - return new OneOrMoreState(); 58.1724 - } 58.1725 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1726 - return schemaBuilder.makeOneOrMore(super.buildPattern(patterns, loc, null), loc, anno); 58.1727 - } 58.1728 - } 58.1729 - 58.1730 - class OptionalState extends PatternContainerState { 58.1731 - State create() { 58.1732 - return new OptionalState(); 58.1733 - } 58.1734 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1735 - return schemaBuilder.makeOptional(super.buildPattern(patterns, loc, null), loc, anno); 58.1736 - } 58.1737 - } 58.1738 - 58.1739 - class ListState extends PatternContainerState { 58.1740 - State create() { 58.1741 - return new ListState(); 58.1742 - } 58.1743 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1744 - return schemaBuilder.makeList(super.buildPattern(patterns, loc, null), loc, anno); 58.1745 - } 58.1746 - } 58.1747 - 58.1748 - class ChoiceState extends PatternContainerState { 58.1749 - State create() { 58.1750 - return new ChoiceState(); 58.1751 - } 58.1752 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1753 - return schemaBuilder.makeChoice(patterns, loc, anno); 58.1754 - } 58.1755 - } 58.1756 - 58.1757 - class InterleaveState extends PatternContainerState { 58.1758 - State create() { 58.1759 - return new InterleaveState(); 58.1760 - } 58.1761 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) { 58.1762 - return schemaBuilder.makeInterleave(patterns, loc, anno); 58.1763 - } 58.1764 - } 58.1765 - 58.1766 - class MixedState extends PatternContainerState { 58.1767 - State create() { 58.1768 - return new MixedState(); 58.1769 - } 58.1770 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1771 - return schemaBuilder.makeMixed(super.buildPattern(patterns, loc, null), loc, anno); 58.1772 - } 58.1773 - } 58.1774 - 58.1775 - static interface NameClassRef { 58.1776 - void setNameClass(ParsedNameClass nc); 58.1777 - } 58.1778 - 58.1779 - class ElementState extends PatternContainerState implements NameClassRef { 58.1780 - ParsedNameClass nameClass; 58.1781 - boolean nameClassWasAttribute; 58.1782 - String name; 58.1783 - 58.1784 - void setName(String name) { 58.1785 - this.name = name; 58.1786 + State createChildState(String localName) throws SAXException { 58.1787 + State state = (State) nameClassTable.get(localName); 58.1788 + if (state == null) { 58.1789 + error("expected_name_class", localName); 58.1790 + return null; 58.1791 + } 58.1792 + return state.create(); 58.1793 + } 58.1794 } 58.1795 58.1796 - public void setNameClass(ParsedNameClass nc) { 58.1797 - nameClass = nc; 58.1798 + class NameClassChildState extends NameClassContainerState { 58.1799 + 58.1800 + final State prevState; 58.1801 + final NameClassRef nameClassRef; 58.1802 + 58.1803 + State create() { 58.1804 + return null; 58.1805 + } 58.1806 + 58.1807 + NameClassChildState(State prevState, NameClassRef nameClassRef) { 58.1808 + this.prevState = prevState; 58.1809 + this.nameClassRef = nameClassRef; 58.1810 + setParent(prevState.parent); 58.1811 + this.ns = prevState.ns; 58.1812 + } 58.1813 + 58.1814 + @Override 58.1815 + void endChild(ParsedNameClass nameClass) { 58.1816 + nameClassRef.setNameClass(nameClass); 58.1817 + prevState.set(); 58.1818 + } 58.1819 + 58.1820 + @Override 58.1821 + void endForeignChild(ParsedElementAnnotation ea) { 58.1822 + prevState.endForeignChild(ea); 58.1823 + } 58.1824 + 58.1825 + void end() throws SAXException { 58.1826 + nameClassRef.setNameClass(nameClassBuilder.makeErrorNameClass()); 58.1827 + error("missing_name_class"); 58.1828 + prevState.set(); 58.1829 + prevState.end(); 58.1830 + } 58.1831 } 58.1832 58.1833 - void endAttributes() throws SAXException { 58.1834 - if (name != null) { 58.1835 - nameClass = expandName(name, getNs(), null); 58.1836 - nameClassWasAttribute = true; 58.1837 - } 58.1838 - else 58.1839 - new NameClassChildState(this, this).set(); 58.1840 + abstract class NameClassBaseState extends State { 58.1841 + 58.1842 + abstract ParsedNameClass makeNameClass() throws SAXException; 58.1843 + 58.1844 + void end() throws SAXException { 58.1845 + parent.endChild(makeNameClass()); 58.1846 + } 58.1847 } 58.1848 58.1849 - State create() { 58.1850 - return new ElementState(); 58.1851 + class NameState extends NameClassBaseState { 58.1852 + 58.1853 + final StringBuffer buf = new StringBuffer(); 58.1854 + 58.1855 + State createChildState(String localName) throws SAXException { 58.1856 + error("expected_name", localName); 58.1857 + return null; 58.1858 + } 58.1859 + 58.1860 + State create() { 58.1861 + return new NameState(); 58.1862 + } 58.1863 + 58.1864 + @Override 58.1865 + public void characters(char[] ch, int start, int len) { 58.1866 + buf.append(ch, start, len); 58.1867 + } 58.1868 + 58.1869 + @Override 58.1870 + void checkForeignElement() throws SAXException { 58.1871 + error("name_contains_foreign_element"); 58.1872 + } 58.1873 + 58.1874 + ParsedNameClass makeNameClass() throws SAXException { 58.1875 + mergeLeadingComments(); 58.1876 + return expandName(buf.toString().trim(), getNs(), annotations); 58.1877 + } 58.1878 + } 58.1879 + private static final int PATTERN_CONTEXT = 0; 58.1880 + private static final int ANY_NAME_CONTEXT = 1; 58.1881 + private static final int NS_NAME_CONTEXT = 2; 58.1882 + private SAXParseable parseable; 58.1883 + 58.1884 + class AnyNameState extends NameClassBaseState { 58.1885 + 58.1886 + ParsedNameClass except = null; 58.1887 + 58.1888 + State create() { 58.1889 + return new AnyNameState(); 58.1890 + } 58.1891 + 58.1892 + State createChildState(String localName) throws SAXException { 58.1893 + if (localName.equals("except")) { 58.1894 + if (except != null) { 58.1895 + error("multiple_except"); 58.1896 + } 58.1897 + return new NameClassChoiceState(getContext()); 58.1898 + } 58.1899 + error("expected_except", localName); 58.1900 + return null; 58.1901 + } 58.1902 + 58.1903 + int getContext() { 58.1904 + return ANY_NAME_CONTEXT; 58.1905 + } 58.1906 + 58.1907 + ParsedNameClass makeNameClass() { 58.1908 + if (except == null) { 58.1909 + return makeNameClassNoExcept(); 58.1910 + } else { 58.1911 + return makeNameClassExcept(except); 58.1912 + } 58.1913 + } 58.1914 + 58.1915 + ParsedNameClass makeNameClassNoExcept() { 58.1916 + return nameClassBuilder.makeAnyName(startLocation, annotations); 58.1917 + } 58.1918 + 58.1919 + ParsedNameClass makeNameClassExcept(ParsedNameClass except) { 58.1920 + return nameClassBuilder.makeAnyName(except, startLocation, annotations); 58.1921 + } 58.1922 + 58.1923 + @Override 58.1924 + void endChild(ParsedNameClass nameClass) { 58.1925 + except = nameClass; 58.1926 + } 58.1927 } 58.1928 58.1929 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.1930 - return schemaBuilder.makeElement(nameClass, super.buildPattern(patterns, loc, null), loc, anno); 58.1931 + class NsNameState extends AnyNameState { 58.1932 + 58.1933 + @Override 58.1934 + State create() { 58.1935 + return new NsNameState(); 58.1936 + } 58.1937 + 58.1938 + @Override 58.1939 + ParsedNameClass makeNameClassNoExcept() { 58.1940 + return nameClassBuilder.makeNsName(getNs(), null, null); 58.1941 + } 58.1942 + 58.1943 + @Override 58.1944 + ParsedNameClass makeNameClassExcept(ParsedNameClass except) { 58.1945 + return nameClassBuilder.makeNsName(getNs(), except, null, null); 58.1946 + } 58.1947 + 58.1948 + @Override 58.1949 + int getContext() { 58.1950 + return NS_NAME_CONTEXT; 58.1951 + } 58.1952 } 58.1953 58.1954 - void endForeignChild(ParsedElementAnnotation ea) { 58.1955 - if (nameClassWasAttribute || childPatterns!=null || nameClass == null) 58.1956 - super.endForeignChild(ea); 58.1957 - else 58.1958 - nameClass = nameClassBuilder.annotateAfter(nameClass, ea); 58.1959 - } 58.1960 - } 58.1961 + class NameClassChoiceState extends NameClassContainerState { 58.1962 58.1963 - class RootState extends PatternContainerState { 58.1964 - IncludedGrammar grammar; 58.1965 + private ParsedNameClass[] nameClasses; 58.1966 + private int nNameClasses; 58.1967 + private int context; 58.1968 58.1969 - RootState() { 58.1970 + NameClassChoiceState() { 58.1971 + this.context = PATTERN_CONTEXT; 58.1972 + } 58.1973 + 58.1974 + NameClassChoiceState(int context) { 58.1975 + this.context = context; 58.1976 + } 58.1977 + 58.1978 + @Override 58.1979 + void setParent(State parent) { 58.1980 + super.setParent(parent); 58.1981 + if (parent instanceof NameClassChoiceState) { 58.1982 + this.context = ((NameClassChoiceState) parent).context; 58.1983 + } 58.1984 + } 58.1985 + 58.1986 + State create() { 58.1987 + return new NameClassChoiceState(); 58.1988 + } 58.1989 + 58.1990 + @Override 58.1991 + State createChildState(String localName) throws SAXException { 58.1992 + if (localName.equals("anyName")) { 58.1993 + if (context >= ANY_NAME_CONTEXT) { 58.1994 + error(context == ANY_NAME_CONTEXT 58.1995 + ? "any_name_except_contains_any_name" 58.1996 + : "ns_name_except_contains_any_name"); 58.1997 + return null; 58.1998 + } 58.1999 + } else if (localName.equals("nsName")) { 58.2000 + if (context == NS_NAME_CONTEXT) { 58.2001 + error("ns_name_except_contains_ns_name"); 58.2002 + return null; 58.2003 + } 58.2004 + } 58.2005 + return super.createChildState(localName); 58.2006 + } 58.2007 + 58.2008 + @Override 58.2009 + void endChild(ParsedNameClass nc) { 58.2010 + if (nameClasses == null) { 58.2011 + nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC]; 58.2012 + } else if (nNameClasses >= nameClasses.length) { 58.2013 + ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2]; 58.2014 + System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length); 58.2015 + nameClasses = newNameClasses; 58.2016 + } 58.2017 + nameClasses[nNameClasses++] = nc; 58.2018 + } 58.2019 + 58.2020 + @Override 58.2021 + void endForeignChild(ParsedElementAnnotation ea) { 58.2022 + if (nNameClasses == 0) { 58.2023 + super.endForeignChild(ea); 58.2024 + } else { 58.2025 + nameClasses[nNameClasses - 1] = nameClassBuilder.annotateAfter(nameClasses[nNameClasses - 1], ea); 58.2026 + } 58.2027 + } 58.2028 + 58.2029 + void end() throws SAXException { 58.2030 + if (nNameClasses == 0) { 58.2031 + error("missing_name_class"); 58.2032 + parent.endChild(nameClassBuilder.makeErrorNameClass()); 58.2033 + return; 58.2034 + } 58.2035 + if (comments != null) { 58.2036 + nameClasses[nNameClasses - 1] = nameClassBuilder.commentAfter(nameClasses[nNameClasses - 1], comments); 58.2037 + comments = null; 58.2038 + } 58.2039 + parent.endChild(nameClassBuilder.makeChoice(Arrays.asList(nameClasses).subList(0, nNameClasses), startLocation, annotations)); 58.2040 + } 58.2041 } 58.2042 58.2043 - RootState(IncludedGrammar grammar, Scope scope, String ns) { 58.2044 - this.grammar = grammar; 58.2045 - this.scope = scope; 58.2046 - this.nsInherit = ns; 58.2047 - this.datatypeLibrary = ""; 58.2048 + private void initPatternTable() { 58.2049 + patternTable = new Hashtable(); 58.2050 + patternTable.put("zeroOrMore", new ZeroOrMoreState()); 58.2051 + patternTable.put("oneOrMore", new OneOrMoreState()); 58.2052 + patternTable.put("optional", new OptionalState()); 58.2053 + patternTable.put("list", new ListState()); 58.2054 + patternTable.put("choice", new ChoiceState()); 58.2055 + patternTable.put("interleave", new InterleaveState()); 58.2056 + patternTable.put("group", new GroupState()); 58.2057 + patternTable.put("mixed", new MixedState()); 58.2058 + patternTable.put("element", new ElementState()); 58.2059 + patternTable.put("attribute", new AttributeState()); 58.2060 + patternTable.put("empty", new EmptyState()); 58.2061 + patternTable.put("text", new TextState()); 58.2062 + patternTable.put("value", new ValueState()); 58.2063 + patternTable.put("data", new DataState()); 58.2064 + patternTable.put("notAllowed", new NotAllowedState()); 58.2065 + patternTable.put("grammar", new GrammarState()); 58.2066 + patternTable.put("ref", new RefState()); 58.2067 + patternTable.put("parentRef", new ParentRefState()); 58.2068 + patternTable.put("externalRef", new ExternalRefState()); 58.2069 } 58.2070 58.2071 - State create() { 58.2072 - return new RootState(); 58.2073 + private void initNameClassTable() { 58.2074 + nameClassTable = new Hashtable(); 58.2075 + nameClassTable.put("name", new NameState()); 58.2076 + nameClassTable.put("anyName", new AnyNameState()); 58.2077 + nameClassTable.put("nsName", new NsNameState()); 58.2078 + nameClassTable.put("choice", new NameClassChoiceState()); 58.2079 } 58.2080 58.2081 - State createChildState(String localName) throws SAXException { 58.2082 - if (grammar == null) 58.2083 - return super.createChildState(localName); 58.2084 - if (localName.equals("grammar")) 58.2085 - return new MergeGrammarState(grammar); 58.2086 - error("expected_grammar", localName); 58.2087 - return null; 58.2088 + public ParsedPattern getParsedPattern() throws IllegalSchemaException { 58.2089 + if (hadError) { 58.2090 + throw new IllegalSchemaException(); 58.2091 + } 58.2092 + return startPattern; 58.2093 } 58.2094 58.2095 - void checkForeignElement() throws SAXException { 58.2096 - error("root_bad_namespace_uri", WellKnownNamespaces.RELAX_NG); 58.2097 + private void error(String key) throws SAXException { 58.2098 + error(key, locator); 58.2099 } 58.2100 58.2101 - void endChild(ParsedPattern pattern) { 58.2102 - startPattern = pattern; 58.2103 + private void error(String key, String arg) throws SAXException { 58.2104 + error(key, arg, locator); 58.2105 } 58.2106 58.2107 - boolean isRelaxNGElement(String uri) throws SAXException { 58.2108 - if (!uri.startsWith(relaxngURIPrefix)) 58.2109 - return false; 58.2110 - if (!uri.equals(WellKnownNamespaces.RELAX_NG)) 58.2111 - warning("wrong_uri_version", 58.2112 - WellKnownNamespaces.RELAX_NG.substring(relaxngURIPrefix.length()), 58.2113 - uri.substring(relaxngURIPrefix.length())); 58.2114 - relaxngURI = uri; 58.2115 - return true; 58.2116 + void error(String key, String arg1, String arg2) throws SAXException { 58.2117 + error(key, arg1, arg2, locator); 58.2118 } 58.2119 58.2120 - } 58.2121 - 58.2122 - class NotAllowedState extends EmptyContentState { 58.2123 - State create() { 58.2124 - return new NotAllowedState(); 58.2125 + private void error(String key, Locator loc) throws SAXException { 58.2126 + error(new SAXParseException(localizer.message(key), loc)); 58.2127 } 58.2128 58.2129 - ParsedPattern makePattern() { 58.2130 - return schemaBuilder.makeNotAllowed(startLocation, annotations); 58.2131 - } 58.2132 - } 58.2133 - 58.2134 - class EmptyState extends EmptyContentState { 58.2135 - State create() { 58.2136 - return new EmptyState(); 58.2137 + private void error(String key, String arg, Locator loc) throws SAXException { 58.2138 + error(new SAXParseException(localizer.message(key, arg), loc)); 58.2139 } 58.2140 58.2141 - ParsedPattern makePattern() { 58.2142 - return schemaBuilder.makeEmpty(startLocation, annotations); 58.2143 - } 58.2144 - } 58.2145 - 58.2146 - class TextState extends EmptyContentState { 58.2147 - State create() { 58.2148 - return new TextState(); 58.2149 + private void error(String key, String arg1, String arg2, Locator loc) 58.2150 + throws SAXException { 58.2151 + error(new SAXParseException(localizer.message(key, arg1, arg2), loc)); 58.2152 } 58.2153 58.2154 - ParsedPattern makePattern() { 58.2155 - return schemaBuilder.makeText(startLocation, annotations); 58.2156 - } 58.2157 - } 58.2158 - 58.2159 - class ValueState extends EmptyContentState { 58.2160 - final StringBuffer buf = new StringBuffer(); 58.2161 - String type; 58.2162 - 58.2163 - State create() { 58.2164 - return new ValueState(); 58.2165 + private void error(SAXParseException e) throws SAXException { 58.2166 + hadError = true; 58.2167 + if (eh != null) { 58.2168 + eh.error(e); 58.2169 + } 58.2170 } 58.2171 58.2172 - void setOtherAttribute(String name, String value) throws SAXException { 58.2173 - if (name.equals("type")) 58.2174 - type = checkNCName(value.trim()); 58.2175 - else 58.2176 - super.setOtherAttribute(name, value); 58.2177 + void warning(String key) throws SAXException { 58.2178 + warning(key, locator); 58.2179 } 58.2180 58.2181 - public void characters(char[] ch, int start, int len) { 58.2182 - buf.append(ch, start, len); 58.2183 + private void warning(String key, String arg) throws SAXException { 58.2184 + warning(key, arg, locator); 58.2185 } 58.2186 58.2187 - void checkForeignElement() throws SAXException { 58.2188 - error("value_contains_foreign_element"); 58.2189 + private void warning(String key, String arg1, String arg2) throws SAXException { 58.2190 + warning(key, arg1, arg2, locator); 58.2191 } 58.2192 58.2193 - ParsedPattern makePattern() throws SAXException { 58.2194 - if (type == null) 58.2195 - return makePattern("", "token"); 58.2196 - else 58.2197 - return makePattern(datatypeLibrary, type); 58.2198 + private void warning(String key, Locator loc) throws SAXException { 58.2199 + warning(new SAXParseException(localizer.message(key), loc)); 58.2200 } 58.2201 58.2202 - void end() throws SAXException { 58.2203 - mergeLeadingComments(); 58.2204 - super.end(); 58.2205 + private void warning(String key, String arg, Locator loc) throws SAXException { 58.2206 + warning(new SAXParseException(localizer.message(key, arg), loc)); 58.2207 } 58.2208 58.2209 - ParsedPattern makePattern(String datatypeLibrary, String type) { 58.2210 - return schemaBuilder.makeValue(datatypeLibrary, 58.2211 - type, 58.2212 - buf.toString(), 58.2213 - getContext(), 58.2214 - getNs(), 58.2215 - startLocation, 58.2216 - annotations); 58.2217 + private void warning(String key, String arg1, String arg2, Locator loc) 58.2218 + throws SAXException { 58.2219 + warning(new SAXParseException(localizer.message(key, arg1, arg2), loc)); 58.2220 } 58.2221 58.2222 - } 58.2223 - 58.2224 - class DataState extends State { 58.2225 - String type; 58.2226 - ParsedPattern except = null; 58.2227 - DataPatternBuilder dpb = null; 58.2228 - 58.2229 - State create() { 58.2230 - return new DataState(); 58.2231 + private void warning(SAXParseException e) throws SAXException { 58.2232 + if (eh != null) { 58.2233 + eh.warning(e); 58.2234 + } 58.2235 } 58.2236 58.2237 - State createChildState(String localName) throws SAXException { 58.2238 - if (localName.equals("param")) { 58.2239 - if (except != null) 58.2240 - error("param_after_except"); 58.2241 - return new ParamState(dpb); 58.2242 - } 58.2243 - if (localName.equals("except")) { 58.2244 - if (except != null) 58.2245 - error("multiple_except"); 58.2246 - return new ChoiceState(); 58.2247 - } 58.2248 - error("expected_param_except", localName); 58.2249 - return null; 58.2250 + SchemaParser(SAXParseable parseable, 58.2251 + XMLReader xr, 58.2252 + ErrorHandler eh, 58.2253 + SchemaBuilder schemaBuilder, 58.2254 + IncludedGrammar grammar, 58.2255 + Scope scope, 58.2256 + String inheritedNs) throws SAXException { 58.2257 + this.parseable = parseable; 58.2258 + this.xr = xr; 58.2259 + this.eh = eh; 58.2260 + this.schemaBuilder = schemaBuilder; 58.2261 + this.nameClassBuilder = schemaBuilder.getNameClassBuilder(); 58.2262 + if (eh != null) { 58.2263 + xr.setErrorHandler(eh); 58.2264 + } 58.2265 + xr.setDTDHandler(context); 58.2266 + if (schemaBuilder.usesComments()) { 58.2267 + try { 58.2268 + xr.setProperty("http://xml.org/sax/properties/lexical-handler", new LexicalHandlerImpl()); 58.2269 + } catch (SAXNotRecognizedException e) { 58.2270 + warning("no_comment_support", xr.getClass().getName()); 58.2271 + } catch (SAXNotSupportedException e) { 58.2272 + warning("no_comment_support", xr.getClass().getName()); 58.2273 + } 58.2274 + } 58.2275 + initPatternTable(); 58.2276 + initNameClassTable(); 58.2277 + new RootState(grammar, scope, inheritedNs).set(); 58.2278 } 58.2279 58.2280 - void setOtherAttribute(String name, String value) throws SAXException { 58.2281 - if (name.equals("type")) 58.2282 - type = checkNCName(value.trim()); 58.2283 - else 58.2284 - super.setOtherAttribute(name, value); 58.2285 + private Context getContext() { 58.2286 + return context; 58.2287 } 58.2288 58.2289 - void endAttributes() throws SAXException { 58.2290 - if (type == null) 58.2291 - error("missing_type_attribute"); 58.2292 - else 58.2293 - dpb = schemaBuilder.makeDataPatternBuilder(datatypeLibrary, type, startLocation); 58.2294 + class LexicalHandlerImpl extends AbstractLexicalHandler { 58.2295 + 58.2296 + private boolean inDtd = false; 58.2297 + 58.2298 + @Override 58.2299 + public void startDTD(String s, String s1, String s2) throws SAXException { 58.2300 + inDtd = true; 58.2301 + } 58.2302 + 58.2303 + @Override 58.2304 + public void endDTD() throws SAXException { 58.2305 + inDtd = false; 58.2306 + } 58.2307 + 58.2308 + @Override 58.2309 + public void comment(char[] chars, int start, int length) throws SAXException { 58.2310 + if (!inDtd) { 58.2311 + ((CommentHandler) xr.getContentHandler()).comment(new String(chars, start, length)); 58.2312 + } 58.2313 + } 58.2314 } 58.2315 58.2316 - void endForeignChild(ParsedElementAnnotation ea) { 58.2317 - dpb.annotation(ea); 58.2318 + private ParsedNameClass expandName(String name, String ns, Annotations anno) throws SAXException { 58.2319 + int ic = name.indexOf(':'); 58.2320 + if (ic == -1) { 58.2321 + return nameClassBuilder.makeName(ns, checkNCName(name), null, null, anno); 58.2322 + } 58.2323 + String prefix = checkNCName(name.substring(0, ic)); 58.2324 + String localName = checkNCName(name.substring(ic + 1)); 58.2325 + for (PrefixMapping tem = context.prefixMapping; tem != null; tem = tem.next) { 58.2326 + if (tem.prefix.equals(prefix)) { 58.2327 + return nameClassBuilder.makeName(tem.uri, localName, prefix, null, anno); 58.2328 + } 58.2329 + } 58.2330 + error("undefined_prefix", prefix); 58.2331 + return nameClassBuilder.makeName("", localName, null, null, anno); 58.2332 } 58.2333 58.2334 - void end() throws SAXException { 58.2335 - ParsedPattern p; 58.2336 - if (dpb != null) { 58.2337 - if (except != null) 58.2338 - p = dpb.makePattern(except, startLocation, annotations); 58.2339 - else 58.2340 - p = dpb.makePattern(startLocation, annotations); 58.2341 - } 58.2342 - else 58.2343 - p = schemaBuilder.makeErrorPattern(); 58.2344 - // XXX need to capture comments 58.2345 - parent.endChild(p); 58.2346 + private String findPrefix(String qName, String uri) { 58.2347 + String prefix = null; 58.2348 + if (qName == null || qName.equals("")) { 58.2349 + for (PrefixMapping p = context.prefixMapping; p != null; p = p.next) { 58.2350 + if (p.uri.equals(uri)) { 58.2351 + prefix = p.prefix; 58.2352 + break; 58.2353 + } 58.2354 + } 58.2355 + } else { 58.2356 + int off = qName.indexOf(':'); 58.2357 + if (off > 0) { 58.2358 + prefix = qName.substring(0, off); 58.2359 + } 58.2360 + } 58.2361 + return prefix; 58.2362 } 58.2363 58.2364 - void endChild(ParsedPattern pattern) { 58.2365 - except = pattern; 58.2366 + private String checkNCName(String str) throws SAXException { 58.2367 + if (!Naming.isNcname(str)) { 58.2368 + error("invalid_ncname", str); 58.2369 + } 58.2370 + return str; 58.2371 } 58.2372 58.2373 - } 58.2374 - 58.2375 - class ParamState extends State { 58.2376 - private final StringBuffer buf = new StringBuffer(); 58.2377 - private final DataPatternBuilder dpb; 58.2378 - private String name; 58.2379 - 58.2380 - ParamState(DataPatternBuilder dpb) { 58.2381 - this.dpb = dpb; 58.2382 + private String resolve(String systemId) throws SAXException { 58.2383 + if (Uri.hasFragmentId(systemId)) { 58.2384 + error("href_fragment_id"); 58.2385 + } 58.2386 + systemId = Uri.escapeDisallowedChars(systemId); 58.2387 + return Uri.resolve(xmlBaseHandler.getBaseUri(), systemId); 58.2388 } 58.2389 58.2390 - State create() { 58.2391 - return new ParamState(null); 58.2392 + private Location makeLocation() { 58.2393 + if (locator == null) { 58.2394 + return null; 58.2395 + } 58.2396 + return schemaBuilder.makeLocation(locator.getSystemId(), 58.2397 + locator.getLineNumber(), 58.2398 + locator.getColumnNumber()); 58.2399 } 58.2400 58.2401 - void setName(String name) throws SAXException { 58.2402 - this.name = checkNCName(name); 58.2403 - } 58.2404 - 58.2405 - void endAttributes() throws SAXException { 58.2406 - if (name == null) 58.2407 - error("missing_name_attribute"); 58.2408 - } 58.2409 - 58.2410 - State createChildState(String localName) throws SAXException { 58.2411 - error("expected_empty", localName); 58.2412 - return null; 58.2413 - } 58.2414 - 58.2415 - public void characters(char[] ch, int start, int len) { 58.2416 - buf.append(ch, start, len); 58.2417 - } 58.2418 - 58.2419 - void checkForeignElement() throws SAXException { 58.2420 - error("param_contains_foreign_element"); 58.2421 - } 58.2422 - 58.2423 - void end() throws SAXException { 58.2424 - if (name == null) 58.2425 - return; 58.2426 - if (dpb == null) 58.2427 - return; 58.2428 - mergeLeadingComments(); 58.2429 - dpb.addParam(name, buf.toString(), getContext(), getNs(), startLocation, annotations); 58.2430 - } 58.2431 - } 58.2432 - 58.2433 - class AttributeState extends PatternContainerState implements NameClassRef { 58.2434 - ParsedNameClass nameClass; 58.2435 - boolean nameClassWasAttribute; 58.2436 - String name; 58.2437 - 58.2438 - State create() { 58.2439 - return new AttributeState(); 58.2440 - } 58.2441 - 58.2442 - void setName(String name) { 58.2443 - this.name = name; 58.2444 - } 58.2445 - 58.2446 - public void setNameClass(ParsedNameClass nc) { 58.2447 - nameClass = nc; 58.2448 - } 58.2449 - 58.2450 - void endAttributes() throws SAXException { 58.2451 - if (name != null) { 58.2452 - String nsUse; 58.2453 - if (ns != null) 58.2454 - nsUse = ns; 58.2455 - else 58.2456 - nsUse = ""; 58.2457 - nameClass = expandName(name, nsUse, null); 58.2458 - nameClassWasAttribute = true; 58.2459 - } 58.2460 - else 58.2461 - new NameClassChildState(this, this).set(); 58.2462 - } 58.2463 - 58.2464 - void endForeignChild(ParsedElementAnnotation ea) { 58.2465 - if (nameClassWasAttribute || childPatterns!=null || nameClass == null) 58.2466 - super.endForeignChild(ea); 58.2467 - else 58.2468 - nameClass = nameClassBuilder.annotateAfter(nameClass, ea); 58.2469 - } 58.2470 - 58.2471 - void end() throws SAXException { 58.2472 - if (childPatterns == null) 58.2473 - endChild(schemaBuilder.makeText(startLocation, null)); 58.2474 - super.end(); 58.2475 - } 58.2476 - 58.2477 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.2478 - return schemaBuilder.makeAttribute(nameClass, super.buildPattern(patterns, loc, null), loc, anno); 58.2479 - } 58.2480 - 58.2481 - State createChildState(String localName) throws SAXException { 58.2482 - State tem = super.createChildState(localName); 58.2483 - if (tem != null && childPatterns!=null) 58.2484 - error("attribute_multi_pattern"); 58.2485 - return tem; 58.2486 - } 58.2487 - 58.2488 - } 58.2489 - 58.2490 - abstract class SinglePatternContainerState extends PatternContainerState { 58.2491 - State createChildState(String localName) throws SAXException { 58.2492 - if (childPatterns==null) 58.2493 - return super.createChildState(localName); 58.2494 - error("too_many_children"); 58.2495 - return null; 58.2496 - } 58.2497 - } 58.2498 - 58.2499 - class GrammarSectionState extends State { 58.2500 - GrammarSection section; 58.2501 - 58.2502 - GrammarSectionState() { } 58.2503 - 58.2504 - GrammarSectionState(GrammarSection section) { 58.2505 - this.section = section; 58.2506 - } 58.2507 - 58.2508 - State create() { 58.2509 - return new GrammarSectionState(null); 58.2510 - } 58.2511 - 58.2512 - State createChildState(String localName) throws SAXException { 58.2513 - if (localName.equals("define")) 58.2514 - return new DefineState(section); 58.2515 - if (localName.equals("start")) 58.2516 - return new StartState(section); 58.2517 - if (localName.equals("include")) { 58.2518 - Include include = section.makeInclude(); 58.2519 - if (include != null) 58.2520 - return new IncludeState(include); 58.2521 - } 58.2522 - if (localName.equals("div")) 58.2523 - return new DivState(section.makeDiv()); 58.2524 - error("expected_define", localName); 58.2525 - // XXX better errors 58.2526 - return null; 58.2527 - } 58.2528 - 58.2529 - void end() throws SAXException { 58.2530 - if (comments != null) { 58.2531 - section.topLevelComment(comments); 58.2532 - comments = null; 58.2533 - } 58.2534 - } 58.2535 - 58.2536 - void endForeignChild(ParsedElementAnnotation ea) { 58.2537 - section.topLevelAnnotation(ea); 58.2538 - } 58.2539 - } 58.2540 - 58.2541 - class DivState extends GrammarSectionState { 58.2542 - final Div div; 58.2543 - DivState(Div div) { 58.2544 - super(div); 58.2545 - this.div = div; 58.2546 - } 58.2547 - 58.2548 - void end() throws SAXException { 58.2549 - super.end(); 58.2550 - div.endDiv(startLocation, annotations); 58.2551 - } 58.2552 - } 58.2553 - 58.2554 - class IncludeState extends GrammarSectionState { 58.2555 - String href; 58.2556 - final Include include; 58.2557 - 58.2558 - IncludeState(Include include) { 58.2559 - super(include); 58.2560 - this.include = include; 58.2561 - } 58.2562 - 58.2563 - void setOtherAttribute(String name, String value) throws SAXException { 58.2564 - if (name.equals("href")) { 58.2565 - href = value; 58.2566 - checkUri(href); 58.2567 - } 58.2568 - else 58.2569 - super.setOtherAttribute(name, value); 58.2570 - } 58.2571 - 58.2572 - void endAttributes() throws SAXException { 58.2573 - if (href == null) 58.2574 - error("missing_href_attribute"); 58.2575 - else 58.2576 - href = resolve(href); 58.2577 - } 58.2578 - 58.2579 - void end() throws SAXException { 58.2580 - super.end(); 58.2581 - if (href != null) { 58.2582 - try { 58.2583 - include.endInclude(parseable, href, getNs(), startLocation, annotations); 58.2584 - } 58.2585 - catch (IllegalSchemaException e) { 58.2586 - } 58.2587 - } 58.2588 - } 58.2589 - } 58.2590 - 58.2591 - class MergeGrammarState extends GrammarSectionState { 58.2592 - final IncludedGrammar grammar; 58.2593 - MergeGrammarState(IncludedGrammar grammar) { 58.2594 - super(grammar); 58.2595 - this.grammar = grammar; 58.2596 - } 58.2597 - 58.2598 - void end() throws SAXException { 58.2599 - super.end(); 58.2600 - parent.endChild(grammar.endIncludedGrammar(startLocation, annotations)); 58.2601 - } 58.2602 - } 58.2603 - 58.2604 - class GrammarState extends GrammarSectionState { 58.2605 - Grammar grammar; 58.2606 - 58.2607 - void setParent(State parent) { 58.2608 - super.setParent(parent); 58.2609 - grammar = schemaBuilder.makeGrammar(scope); 58.2610 - section = grammar; 58.2611 - scope = grammar; 58.2612 - } 58.2613 - 58.2614 - State create() { 58.2615 - return new GrammarState(); 58.2616 - } 58.2617 - 58.2618 - void end() throws SAXException { 58.2619 - super.end(); 58.2620 - parent.endChild(grammar.endGrammar(startLocation, annotations)); 58.2621 - } 58.2622 - } 58.2623 - 58.2624 - class RefState extends EmptyContentState { 58.2625 - String name; 58.2626 - 58.2627 - State create() { 58.2628 - return new RefState(); 58.2629 - } 58.2630 - 58.2631 - 58.2632 - void endAttributes() throws SAXException { 58.2633 - if (name == null) 58.2634 - error("missing_name_attribute"); 58.2635 - } 58.2636 - 58.2637 - void setName(String name) throws SAXException { 58.2638 - this.name = checkNCName(name); 58.2639 - } 58.2640 - 58.2641 - ParsedPattern makePattern() throws SAXException { 58.2642 - if (name == null) 58.2643 - return schemaBuilder.makeErrorPattern(); 58.2644 - if(scope==null) { 58.2645 - error("ref_outside_grammar",name); 58.2646 - return schemaBuilder.makeErrorPattern(); 58.2647 - } else 58.2648 - return scope.makeRef(name, startLocation, annotations); 58.2649 - } 58.2650 - } 58.2651 - 58.2652 - class ParentRefState extends RefState { 58.2653 - State create() { 58.2654 - return new ParentRefState(); 58.2655 - } 58.2656 - 58.2657 - ParsedPattern makePattern() throws SAXException { 58.2658 - if (name == null) 58.2659 - return schemaBuilder.makeErrorPattern(); 58.2660 - if(scope==null) { 58.2661 - error("parent_ref_outside_grammar",name); 58.2662 - return schemaBuilder.makeErrorPattern(); 58.2663 - } else 58.2664 - return scope.makeParentRef(name, startLocation, annotations); 58.2665 - } 58.2666 - } 58.2667 - 58.2668 - class ExternalRefState extends EmptyContentState { 58.2669 - String href; 58.2670 - ParsedPattern includedPattern; 58.2671 - 58.2672 - State create() { 58.2673 - return new ExternalRefState(); 58.2674 - } 58.2675 - 58.2676 - void setOtherAttribute(String name, String value) throws SAXException { 58.2677 - if (name.equals("href")) { 58.2678 - href = value; 58.2679 - checkUri(href); 58.2680 - } 58.2681 - else 58.2682 - super.setOtherAttribute(name, value); 58.2683 - } 58.2684 - 58.2685 - void endAttributes() throws SAXException { 58.2686 - if (href == null) 58.2687 - error("missing_href_attribute"); 58.2688 - else 58.2689 - href = resolve(href); 58.2690 - } 58.2691 - 58.2692 - ParsedPattern makePattern() { 58.2693 - if (href != null) { 58.2694 - try { 58.2695 - return schemaBuilder.makeExternalRef(parseable, 58.2696 - href, 58.2697 - getNs(), 58.2698 - scope, 58.2699 - startLocation, 58.2700 - annotations); 58.2701 - } 58.2702 - catch (IllegalSchemaException e) { } 58.2703 - } 58.2704 - return schemaBuilder.makeErrorPattern(); 58.2705 - } 58.2706 - } 58.2707 - 58.2708 - abstract class DefinitionState extends PatternContainerState { 58.2709 - GrammarSection.Combine combine = null; 58.2710 - final GrammarSection section; 58.2711 - 58.2712 - DefinitionState(GrammarSection section) { 58.2713 - this.section = section; 58.2714 - } 58.2715 - 58.2716 - void setOtherAttribute(String name, String value) throws SAXException { 58.2717 - if (name.equals("combine")) { 58.2718 - value = value.trim(); 58.2719 - if (value.equals("choice")) 58.2720 - combine = GrammarSection.COMBINE_CHOICE; 58.2721 - else if (value.equals("interleave")) 58.2722 - combine = GrammarSection.COMBINE_INTERLEAVE; 58.2723 - else 58.2724 - error("combine_attribute_bad_value", value); 58.2725 - } 58.2726 - else 58.2727 - super.setOtherAttribute(name, value); 58.2728 - } 58.2729 - 58.2730 - ParsedPattern buildPattern(List<ParsedPattern> patterns, Location loc, Annotations anno) throws SAXException { 58.2731 - return super.buildPattern(patterns, loc, null); 58.2732 - } 58.2733 - } 58.2734 - 58.2735 - class DefineState extends DefinitionState { 58.2736 - String name; 58.2737 - 58.2738 - DefineState(GrammarSection section) { 58.2739 - super(section); 58.2740 - } 58.2741 - 58.2742 - State create() { 58.2743 - return new DefineState(null); 58.2744 - } 58.2745 - 58.2746 - void setName(String name) throws SAXException { 58.2747 - this.name = checkNCName(name); 58.2748 - } 58.2749 - 58.2750 - void endAttributes() throws SAXException { 58.2751 - if (name == null) 58.2752 - error("missing_name_attribute"); 58.2753 - } 58.2754 - 58.2755 - void sendPatternToParent(ParsedPattern p) { 58.2756 - if (name != null) 58.2757 - section.define(name, combine, p, startLocation, annotations); 58.2758 - } 58.2759 - 58.2760 - } 58.2761 - 58.2762 - class StartState extends DefinitionState { 58.2763 - 58.2764 - StartState(GrammarSection section) { 58.2765 - super(section); 58.2766 - } 58.2767 - 58.2768 - State create() { 58.2769 - return new StartState(null); 58.2770 - } 58.2771 - 58.2772 - void sendPatternToParent(ParsedPattern p) { 58.2773 - section.define(GrammarSection.START, combine, p, startLocation, annotations); 58.2774 - } 58.2775 - 58.2776 - State createChildState(String localName) throws SAXException { 58.2777 - State tem = super.createChildState(localName); 58.2778 - if (tem != null && childPatterns!=null) 58.2779 - error("start_multi_pattern"); 58.2780 - return tem; 58.2781 - } 58.2782 - 58.2783 - } 58.2784 - 58.2785 - abstract class NameClassContainerState extends State { 58.2786 - State createChildState(String localName) throws SAXException { 58.2787 - State state = (State)nameClassTable.get(localName); 58.2788 - if (state == null) { 58.2789 - error("expected_name_class", localName); 58.2790 - return null; 58.2791 - } 58.2792 - return state.create(); 58.2793 - } 58.2794 - } 58.2795 - 58.2796 - class NameClassChildState extends NameClassContainerState { 58.2797 - final State prevState; 58.2798 - final NameClassRef nameClassRef; 58.2799 - 58.2800 - State create() { 58.2801 - return null; 58.2802 - } 58.2803 - 58.2804 - NameClassChildState(State prevState, NameClassRef nameClassRef) { 58.2805 - this.prevState = prevState; 58.2806 - this.nameClassRef = nameClassRef; 58.2807 - setParent(prevState.parent); 58.2808 - this.ns = prevState.ns; 58.2809 - } 58.2810 - 58.2811 - void endChild(ParsedNameClass nameClass) { 58.2812 - nameClassRef.setNameClass(nameClass); 58.2813 - prevState.set(); 58.2814 - } 58.2815 - 58.2816 - void endForeignChild(ParsedElementAnnotation ea) { 58.2817 - prevState.endForeignChild(ea); 58.2818 - } 58.2819 - 58.2820 - void end() throws SAXException { 58.2821 - nameClassRef.setNameClass(nameClassBuilder.makeErrorNameClass()); 58.2822 - error("missing_name_class"); 58.2823 - prevState.set(); 58.2824 - prevState.end(); 58.2825 - } 58.2826 - } 58.2827 - 58.2828 - abstract class NameClassBaseState extends State { 58.2829 - 58.2830 - abstract ParsedNameClass makeNameClass() throws SAXException; 58.2831 - 58.2832 - void end() throws SAXException { 58.2833 - parent.endChild(makeNameClass()); 58.2834 - } 58.2835 - } 58.2836 - 58.2837 - class NameState extends NameClassBaseState { 58.2838 - final StringBuffer buf = new StringBuffer(); 58.2839 - 58.2840 - State createChildState(String localName) throws SAXException { 58.2841 - error("expected_name", localName); 58.2842 - return null; 58.2843 - } 58.2844 - 58.2845 - State create() { 58.2846 - return new NameState(); 58.2847 - } 58.2848 - 58.2849 - public void characters(char[] ch, int start, int len) { 58.2850 - buf.append(ch, start, len); 58.2851 - } 58.2852 - 58.2853 - void checkForeignElement() throws SAXException { 58.2854 - error("name_contains_foreign_element"); 58.2855 - } 58.2856 - 58.2857 - ParsedNameClass makeNameClass() throws SAXException { 58.2858 - mergeLeadingComments(); 58.2859 - return expandName(buf.toString().trim(), getNs(), annotations); 58.2860 - } 58.2861 - 58.2862 - } 58.2863 - 58.2864 - private static final int PATTERN_CONTEXT = 0; 58.2865 - private static final int ANY_NAME_CONTEXT = 1; 58.2866 - private static final int NS_NAME_CONTEXT = 2; 58.2867 -private SAXParseable parseable; 58.2868 - 58.2869 - class AnyNameState extends NameClassBaseState { 58.2870 - ParsedNameClass except = null; 58.2871 - 58.2872 - State create() { 58.2873 - return new AnyNameState(); 58.2874 - } 58.2875 - 58.2876 - State createChildState(String localName) throws SAXException { 58.2877 - if (localName.equals("except")) { 58.2878 - if (except != null) 58.2879 - error("multiple_except"); 58.2880 - return new NameClassChoiceState(getContext()); 58.2881 - } 58.2882 - error("expected_except", localName); 58.2883 - return null; 58.2884 - } 58.2885 - 58.2886 - int getContext() { 58.2887 - return ANY_NAME_CONTEXT; 58.2888 - } 58.2889 - 58.2890 - ParsedNameClass makeNameClass() { 58.2891 - if (except == null) 58.2892 - return makeNameClassNoExcept(); 58.2893 - else 58.2894 - return makeNameClassExcept(except); 58.2895 - } 58.2896 - 58.2897 - ParsedNameClass makeNameClassNoExcept() { 58.2898 - return nameClassBuilder.makeAnyName(startLocation, annotations); 58.2899 - } 58.2900 - 58.2901 - ParsedNameClass makeNameClassExcept(ParsedNameClass except) { 58.2902 - return nameClassBuilder.makeAnyName(except, startLocation, annotations); 58.2903 - } 58.2904 - 58.2905 - void endChild(ParsedNameClass nameClass) { 58.2906 - except = nameClass; 58.2907 - } 58.2908 - 58.2909 - } 58.2910 - 58.2911 - class NsNameState extends AnyNameState { 58.2912 - State create() { 58.2913 - return new NsNameState(); 58.2914 - } 58.2915 - 58.2916 - ParsedNameClass makeNameClassNoExcept() { 58.2917 - return nameClassBuilder.makeNsName(getNs(), null, null); 58.2918 - } 58.2919 - 58.2920 - ParsedNameClass makeNameClassExcept(ParsedNameClass except) { 58.2921 - return nameClassBuilder.makeNsName(getNs(), except, null, null); 58.2922 - } 58.2923 - 58.2924 - int getContext() { 58.2925 - return NS_NAME_CONTEXT; 58.2926 - } 58.2927 - 58.2928 - } 58.2929 - 58.2930 - class NameClassChoiceState extends NameClassContainerState { 58.2931 - private ParsedNameClass[] nameClasses; 58.2932 - private int nNameClasses; 58.2933 - private int context; 58.2934 - 58.2935 - NameClassChoiceState() { 58.2936 - this.context = PATTERN_CONTEXT; 58.2937 - } 58.2938 - 58.2939 - NameClassChoiceState(int context) { 58.2940 - this.context = context; 58.2941 - } 58.2942 - 58.2943 - void setParent(State parent) { 58.2944 - super.setParent(parent); 58.2945 - if (parent instanceof NameClassChoiceState) 58.2946 - this.context = ((NameClassChoiceState)parent).context; 58.2947 - } 58.2948 - 58.2949 - State create() { 58.2950 - return new NameClassChoiceState(); 58.2951 - } 58.2952 - 58.2953 - State createChildState(String localName) throws SAXException { 58.2954 - if (localName.equals("anyName")) { 58.2955 - if (context >= ANY_NAME_CONTEXT) { 58.2956 - error(context == ANY_NAME_CONTEXT 58.2957 - ? "any_name_except_contains_any_name" 58.2958 - : "ns_name_except_contains_any_name"); 58.2959 - return null; 58.2960 - } 58.2961 - } 58.2962 - else if (localName.equals("nsName")) { 58.2963 - if (context == NS_NAME_CONTEXT) { 58.2964 - error("ns_name_except_contains_ns_name"); 58.2965 - return null; 58.2966 - } 58.2967 - } 58.2968 - return super.createChildState(localName); 58.2969 - } 58.2970 - 58.2971 - void endChild(ParsedNameClass nc) { 58.2972 - if (nameClasses == null) 58.2973 - nameClasses = new ParsedNameClass[INIT_CHILD_ALLOC]; 58.2974 - else if (nNameClasses >= nameClasses.length) { 58.2975 - ParsedNameClass[] newNameClasses = new ParsedNameClass[nameClasses.length * 2]; 58.2976 - System.arraycopy(nameClasses, 0, newNameClasses, 0, nameClasses.length); 58.2977 - nameClasses = newNameClasses; 58.2978 - } 58.2979 - nameClasses[nNameClasses++] = nc; 58.2980 - } 58.2981 - 58.2982 - void endForeignChild(ParsedElementAnnotation ea) { 58.2983 - if (nNameClasses == 0) 58.2984 - super.endForeignChild(ea); 58.2985 - else 58.2986 - nameClasses[nNameClasses - 1] = nameClassBuilder.annotateAfter(nameClasses[nNameClasses - 1], ea); 58.2987 - } 58.2988 - 58.2989 - void end() throws SAXException { 58.2990 - if (nNameClasses == 0) { 58.2991 - error("missing_name_class"); 58.2992 - parent.endChild(nameClassBuilder.makeErrorNameClass()); 58.2993 - return; 58.2994 - } 58.2995 - if (comments != null) { 58.2996 - nameClasses[nNameClasses - 1] = nameClassBuilder.commentAfter(nameClasses[nNameClasses - 1], comments); 58.2997 - comments = null; 58.2998 - } 58.2999 - parent.endChild(nameClassBuilder.makeChoice(Arrays.asList(nameClasses).subList(0,nNameClasses), startLocation, annotations)); 58.3000 - } 58.3001 - } 58.3002 - 58.3003 - private void initPatternTable() { 58.3004 - patternTable = new Hashtable(); 58.3005 - patternTable.put("zeroOrMore", new ZeroOrMoreState()); 58.3006 - patternTable.put("oneOrMore", new OneOrMoreState()); 58.3007 - patternTable.put("optional", new OptionalState()); 58.3008 - patternTable.put("list", new ListState()); 58.3009 - patternTable.put("choice", new ChoiceState()); 58.3010 - patternTable.put("interleave", new InterleaveState()); 58.3011 - patternTable.put("group", new GroupState()); 58.3012 - patternTable.put("mixed", new MixedState()); 58.3013 - patternTable.put("element", new ElementState()); 58.3014 - patternTable.put("attribute", new AttributeState()); 58.3015 - patternTable.put("empty", new EmptyState()); 58.3016 - patternTable.put("text", new TextState()); 58.3017 - patternTable.put("value", new ValueState()); 58.3018 - patternTable.put("data", new DataState()); 58.3019 - patternTable.put("notAllowed", new NotAllowedState()); 58.3020 - patternTable.put("grammar", new GrammarState()); 58.3021 - patternTable.put("ref", new RefState()); 58.3022 - patternTable.put("parentRef", new ParentRefState()); 58.3023 - patternTable.put("externalRef", new ExternalRefState()); 58.3024 - } 58.3025 - 58.3026 - private void initNameClassTable() { 58.3027 - nameClassTable = new Hashtable(); 58.3028 - nameClassTable.put("name", new NameState()); 58.3029 - nameClassTable.put("anyName", new AnyNameState()); 58.3030 - nameClassTable.put("nsName", new NsNameState()); 58.3031 - nameClassTable.put("choice", new NameClassChoiceState()); 58.3032 - } 58.3033 - 58.3034 - public ParsedPattern getParsedPattern() throws IllegalSchemaException { 58.3035 - if (hadError) 58.3036 - throw new IllegalSchemaException(); 58.3037 - return startPattern; 58.3038 - } 58.3039 - 58.3040 - private void error(String key) throws SAXException { 58.3041 - error(key, locator); 58.3042 - } 58.3043 - 58.3044 - private void error(String key, String arg) throws SAXException { 58.3045 - error(key, arg, locator); 58.3046 - } 58.3047 - 58.3048 - void error(String key, String arg1, String arg2) throws SAXException { 58.3049 - error(key, arg1, arg2, locator); 58.3050 - } 58.3051 - 58.3052 - private void error(String key, Locator loc) throws SAXException { 58.3053 - error(new SAXParseException(localizer.message(key), loc)); 58.3054 - } 58.3055 - 58.3056 - private void error(String key, String arg, Locator loc) throws SAXException { 58.3057 - error(new SAXParseException(localizer.message(key, arg), loc)); 58.3058 - } 58.3059 - 58.3060 - private void error(String key, String arg1, String arg2, Locator loc) 58.3061 - throws SAXException { 58.3062 - error(new SAXParseException(localizer.message(key, arg1, arg2), loc)); 58.3063 - } 58.3064 - 58.3065 - private void error(SAXParseException e) throws SAXException { 58.3066 - hadError = true; 58.3067 - if (eh != null) 58.3068 - eh.error(e); 58.3069 - } 58.3070 - 58.3071 - void warning(String key) throws SAXException { 58.3072 - warning(key, locator); 58.3073 - } 58.3074 - 58.3075 - private void warning(String key, String arg) throws SAXException { 58.3076 - warning(key, arg, locator); 58.3077 - } 58.3078 - 58.3079 - private void warning(String key, String arg1, String arg2) throws SAXException { 58.3080 - warning(key, arg1, arg2, locator); 58.3081 - } 58.3082 - 58.3083 - private void warning(String key, Locator loc) throws SAXException { 58.3084 - warning(new SAXParseException(localizer.message(key), loc)); 58.3085 - } 58.3086 - 58.3087 - private void warning(String key, String arg, Locator loc) throws SAXException { 58.3088 - warning(new SAXParseException(localizer.message(key, arg), loc)); 58.3089 - } 58.3090 - 58.3091 - private void warning(String key, String arg1, String arg2, Locator loc) 58.3092 - throws SAXException { 58.3093 - warning(new SAXParseException(localizer.message(key, arg1, arg2), loc)); 58.3094 - } 58.3095 - 58.3096 - private void warning(SAXParseException e) throws SAXException { 58.3097 - if (eh != null) 58.3098 - eh.warning(e); 58.3099 - } 58.3100 - 58.3101 - SchemaParser(SAXParseable parseable, 58.3102 - XMLReader xr, 58.3103 - ErrorHandler eh, 58.3104 - SchemaBuilder schemaBuilder, 58.3105 - IncludedGrammar grammar, 58.3106 - Scope scope, 58.3107 - String inheritedNs) throws SAXException { 58.3108 - this.parseable = parseable; 58.3109 - this.xr = xr; 58.3110 - this.eh = eh; 58.3111 - this.schemaBuilder = schemaBuilder; 58.3112 - this.nameClassBuilder = schemaBuilder.getNameClassBuilder(); 58.3113 - if (eh != null) 58.3114 - xr.setErrorHandler(eh); 58.3115 - xr.setDTDHandler(context); 58.3116 - if (schemaBuilder.usesComments()) { 58.3117 - try { 58.3118 - xr.setProperty("http://xml.org/sax/properties/lexical-handler", new LexicalHandlerImpl()); 58.3119 - } 58.3120 - catch (SAXNotRecognizedException e) { 58.3121 - warning("no_comment_support", xr.getClass().getName()); 58.3122 - } 58.3123 - catch (SAXNotSupportedException e) { 58.3124 - warning("no_comment_support", xr.getClass().getName()); 58.3125 - } 58.3126 - } 58.3127 - initPatternTable(); 58.3128 - initNameClassTable(); 58.3129 - new RootState(grammar, scope, inheritedNs).set(); 58.3130 - } 58.3131 - 58.3132 - 58.3133 - private Context getContext() { 58.3134 - return context; 58.3135 - } 58.3136 - 58.3137 - class LexicalHandlerImpl extends AbstractLexicalHandler { 58.3138 - private boolean inDtd = false; 58.3139 - 58.3140 - public void startDTD(String s, String s1, String s2) throws SAXException { 58.3141 - inDtd = true; 58.3142 - } 58.3143 - 58.3144 - public void endDTD() throws SAXException { 58.3145 - inDtd = false; 58.3146 - } 58.3147 - 58.3148 - public void comment(char[] chars, int start, int length) throws SAXException { 58.3149 - if (!inDtd) 58.3150 - ((CommentHandler)xr.getContentHandler()).comment(new String(chars, start, length)); 58.3151 - } 58.3152 - } 58.3153 - 58.3154 - private ParsedNameClass expandName(String name, String ns, Annotations anno) throws SAXException { 58.3155 - int ic = name.indexOf(':'); 58.3156 - if (ic == -1) 58.3157 - return nameClassBuilder.makeName(ns, checkNCName(name), null, null, anno); 58.3158 - String prefix = checkNCName(name.substring(0, ic)); 58.3159 - String localName = checkNCName(name.substring(ic + 1)); 58.3160 - for (PrefixMapping tem = context.prefixMapping; tem != null; tem = tem.next) 58.3161 - if (tem.prefix.equals(prefix)) 58.3162 - return nameClassBuilder.makeName(tem.uri, localName, prefix, null, anno); 58.3163 - error("undefined_prefix", prefix); 58.3164 - return nameClassBuilder.makeName("", localName, null, null, anno); 58.3165 - } 58.3166 - 58.3167 - private String findPrefix(String qName, String uri) { 58.3168 - String prefix = null; 58.3169 - if (qName == null || qName.equals("")) { 58.3170 - for (PrefixMapping p = context.prefixMapping; p != null; p = p.next) 58.3171 - if (p.uri.equals(uri)) { 58.3172 - prefix = p.prefix; 58.3173 - break; 58.3174 + private void checkUri(String s) throws SAXException { 58.3175 + if (!Uri.isValid(s)) { 58.3176 + error("invalid_uri", s); 58.3177 } 58.3178 } 58.3179 - else { 58.3180 - int off = qName.indexOf(':'); 58.3181 - if (off > 0) 58.3182 - prefix = qName.substring(0, off); 58.3183 - } 58.3184 - return prefix; 58.3185 - } 58.3186 - private String checkNCName(String str) throws SAXException { 58.3187 - if (!Naming.isNcname(str)) 58.3188 - error("invalid_ncname", str); 58.3189 - return str; 58.3190 - } 58.3191 - 58.3192 - private String resolve(String systemId) throws SAXException { 58.3193 - if (Uri.hasFragmentId(systemId)) 58.3194 - error("href_fragment_id"); 58.3195 - systemId = Uri.escapeDisallowedChars(systemId); 58.3196 - return Uri.resolve(xmlBaseHandler.getBaseUri(), systemId); 58.3197 - } 58.3198 - 58.3199 - private Location makeLocation() { 58.3200 - if (locator == null) 58.3201 - return null; 58.3202 - return schemaBuilder.makeLocation(locator.getSystemId(), 58.3203 - locator.getLineNumber(), 58.3204 - locator.getColumnNumber()); 58.3205 - } 58.3206 - 58.3207 - private void checkUri(String s) throws SAXException { 58.3208 - if (!Uri.isValid(s)) 58.3209 - error("invalid_uri", s); 58.3210 - } 58.3211 }
59.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java Thu Oct 10 10:09:16 2013 -0700 59.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/rngom/xml/sax/JAXPXMLReaderCreator.java Fri Oct 11 00:07:42 2013 -0700 59.3 @@ -23,7 +23,7 @@ 59.4 * questions. 59.5 */ 59.6 /* 59.7 - * Copyright (C) 2004-2011 59.8 + * Copyright (C) 2004-2012 59.9 * 59.10 * Permission is hereby granted, free of charge, to any person obtaining a copy 59.11 * of this software and associated documentation files (the "Software"), to deal 59.12 @@ -45,10 +45,15 @@ 59.13 */ 59.14 package com.sun.xml.internal.rngom.xml.sax; 59.15 59.16 +import java.util.logging.Level; 59.17 +import java.util.logging.Logger; 59.18 +import javax.xml.XMLConstants; 59.19 import javax.xml.parsers.ParserConfigurationException; 59.20 import javax.xml.parsers.SAXParserFactory; 59.21 59.22 import org.xml.sax.SAXException; 59.23 +import org.xml.sax.SAXNotRecognizedException; 59.24 +import org.xml.sax.SAXNotSupportedException; 59.25 import org.xml.sax.XMLReader; 59.26 59.27 /** 59.28 @@ -72,7 +77,16 @@ 59.29 */ 59.30 public JAXPXMLReaderCreator() { 59.31 spf = SAXParserFactory.newInstance(); 59.32 - spf.setNamespaceAware(true); 59.33 + try { 59.34 + spf.setNamespaceAware(true); 59.35 + spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); 59.36 + } catch (ParserConfigurationException ex) { 59.37 + Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex); 59.38 + } catch (SAXNotRecognizedException ex) { 59.39 + Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex); 59.40 + } catch (SAXNotSupportedException ex) { 59.41 + Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex); 59.42 + } 59.43 } 59.44 59.45 /**
60.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java Thu Oct 10 10:09:16 2013 -0700 60.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java Fri Oct 11 00:07:42 2013 -0700 60.3 @@ -40,7 +40,6 @@ 60.4 import com.sun.xml.internal.ws.api.model.SEIModel; 60.5 import com.sun.xml.internal.ws.api.model.JavaMethod; 60.6 import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; 60.7 -import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl; 60.8 import com.sun.xml.internal.ws.model.JavaMethodImpl; 60.9 import com.sun.xml.internal.ws.model.CheckedExceptionImpl; 60.10 import com.sun.istack.internal.Nullable; 60.11 @@ -236,7 +235,7 @@ 60.12 } 60.13 WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation(); 60.14 WSDLOperation op = wbo.getOperation(); 60.15 - return ((WSDLOperationImpl) op).getInput().isDefaultAction(); 60.16 + return op.getInput().isDefaultAction(); 60.17 60.18 } 60.19
61.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java Thu Oct 10 10:09:16 2013 -0700 61.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java Fri Oct 11 00:07:42 2013 -0700 61.3 @@ -1,5 +1,5 @@ 61.4 /* 61.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 61.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 61.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 61.8 * 61.9 * This code is free software; you can redistribute it and/or modify it 61.10 @@ -27,9 +27,11 @@ 61.11 61.12 import com.sun.istack.internal.NotNull; 61.13 import com.sun.istack.internal.Nullable; 61.14 +import com.sun.xml.internal.ws.api.model.ParameterBinding; 61.15 61.16 import javax.jws.WebParam.Mode; 61.17 import javax.xml.namespace.QName; 61.18 + 61.19 import java.util.Map; 61.20 61.21 /** 61.22 @@ -79,14 +81,62 @@ 61.23 @Nullable WSDLPart getPart(@NotNull String partName, @NotNull Mode mode); 61.24 61.25 /** 61.26 + * Gets {@link ParameterBinding} for a given wsdl part in wsdl:input 61.27 + * 61.28 + * @param part Name of wsdl:part, must be non-null 61.29 + * @return null if the part is not found. 61.30 + */ 61.31 + public ParameterBinding getInputBinding(String part); 61.32 + 61.33 + /** 61.34 + * Gets {@link ParameterBinding} for a given wsdl part in wsdl:output 61.35 + * 61.36 + * @param part Name of wsdl:part, must be non-null 61.37 + * @return null if the part is not found. 61.38 + */ 61.39 + public ParameterBinding getOutputBinding(String part); 61.40 + 61.41 + /** 61.42 + * Gets {@link ParameterBinding} for a given wsdl part in wsdl:fault 61.43 + * 61.44 + * @param part Name of wsdl:part, must be non-null 61.45 + * @return null if the part is not found. 61.46 + */ 61.47 + public ParameterBinding getFaultBinding(String part); 61.48 + 61.49 + /** 61.50 + * Gets the MIME type for a given wsdl part in wsdl:input 61.51 + * 61.52 + * @param part Name of wsdl:part, must be non-null 61.53 + * @return null if the part is not found. 61.54 + */ 61.55 + public String getMimeTypeForInputPart(String part); 61.56 + 61.57 + /** 61.58 + * Gets the MIME type for a given wsdl part in wsdl:output 61.59 + * 61.60 + * @param part Name of wsdl:part, must be non-null 61.61 + * @return null if the part is not found. 61.62 + */ 61.63 + public String getMimeTypeForOutputPart(String part); 61.64 + 61.65 + /** 61.66 + * Gets the MIME type for a given wsdl part in wsdl:fault 61.67 + * 61.68 + * @param part Name of wsdl:part, must be non-null 61.69 + * @return null if the part is not found. 61.70 + */ 61.71 + public String getMimeTypeForFaultPart(String part); 61.72 + 61.73 + /** 61.74 * Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}. 61.75 */ 61.76 - @NotNull Map<String,WSDLPart> getInParts(); 61.77 + @NotNull Map<String,? extends WSDLPart> getInParts(); 61.78 61.79 /** 61.80 * Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}. 61.81 */ 61.82 - @NotNull Map<String,WSDLPart> getOutParts(); 61.83 + @NotNull Map<String,? extends WSDLPart> getOutParts(); 61.84 61.85 /** 61.86 * Gets all the {@link WSDLFault} bound to this operation. 61.87 @@ -94,13 +144,34 @@ 61.88 @NotNull Iterable<? extends WSDLBoundFault> getFaults(); 61.89 61.90 /** 61.91 + * Map of wsdl:input part name and the binding as {@link ParameterBinding} 61.92 + * 61.93 + * @return empty Map if there is no parts 61.94 + */ 61.95 + public Map<String, ParameterBinding> getInputParts(); 61.96 + 61.97 + /** 61.98 + * Map of wsdl:output part name and the binding as {@link ParameterBinding} 61.99 + * 61.100 + * @return empty Map if there is no parts 61.101 + */ 61.102 + public Map<String, ParameterBinding> getOutputParts(); 61.103 + 61.104 + /** 61.105 + * Map of wsdl:fault part name and the binding as {@link ParameterBinding} 61.106 + * 61.107 + * @return empty Map if there is no parts 61.108 + */ 61.109 + public Map<String, ParameterBinding> getFaultParts(); 61.110 + 61.111 + /** 61.112 * Gets the payload QName of the request message. 61.113 * 61.114 * <p> 61.115 * It's possible for an operation to define no body part, in which case 61.116 * this method returns null. 61.117 */ 61.118 - @Nullable QName getReqPayloadName(); 61.119 + @Nullable QName getRequestPayloadName(); 61.120 61.121 /** 61.122 * Gets the payload QName of the response message. 61.123 @@ -109,7 +180,7 @@ 61.124 * It's possible for an operation to define no body part, in which case 61.125 * this method returns null. 61.126 */ 61.127 - @Nullable QName getResPayloadName(); 61.128 + @Nullable QName getResponsePayloadName(); 61.129 61.130 /** 61.131 * Gets the namespace of request payload.
62.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java Thu Oct 10 10:09:16 2013 -0700 62.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java Fri Oct 11 00:07:42 2013 -0700 62.3 @@ -1,5 +1,5 @@ 62.4 /* 62.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 62.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 62.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 62.8 * 62.9 * This code is free software; you can redistribute it and/or modify it
63.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java Thu Oct 10 10:09:16 2013 -0700 63.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java Fri Oct 11 00:07:42 2013 -0700 63.3 @@ -1,5 +1,5 @@ 63.4 /* 63.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 63.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 63.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 63.8 * 63.9 * This code is free software; you can redistribute it and/or modify it 63.10 @@ -25,6 +25,12 @@ 63.11 63.12 package com.sun.xml.internal.ws.api.model.wsdl; 63.13 63.14 +import java.util.List; 63.15 + 63.16 +import javax.xml.namespace.QName; 63.17 + 63.18 +import org.xml.sax.Locator; 63.19 + 63.20 /** 63.21 * Interface that represents WSDL concepts that 63.22 * can have extensions. 63.23 @@ -82,4 +88,23 @@ 63.24 * must not be null. 63.25 */ 63.26 void addExtension(WSDLExtension extension); 63.27 + 63.28 + /** 63.29 + * True if all required WSDL extensions on Port and Binding are understood 63.30 + * @return true if all wsdl required extensions on Port and Binding are understood 63.31 + */ 63.32 + public boolean areRequiredExtensionsUnderstood(); 63.33 + 63.34 + /** 63.35 + * Marks extension as not understood 63.36 + * @param extnEl QName of extension 63.37 + * @param locator Locator 63.38 + */ 63.39 + public void addNotUnderstoodExtension(QName extnEl, Locator locator); 63.40 + 63.41 + /** 63.42 + * Lists extensions marked as not understood 63.43 + * @return List of not understood extensions 63.44 + */ 63.45 + public List<? extends WSDLExtension> getNotUnderstoodExtensions(); 63.46 }
64.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java Thu Oct 10 10:09:16 2013 -0700 64.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java Fri Oct 11 00:07:42 2013 -0700 64.3 @@ -1,5 +1,5 @@ 64.4 /* 64.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 64.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 64.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 64.8 * 64.9 * This code is free software; you can redistribute it and/or modify it 64.10 @@ -76,4 +76,10 @@ 64.11 * @return Action 64.12 */ 64.13 String getAction(); 64.14 + 64.15 + /** 64.16 + * True if this is the default action 64.17 + * @return 64.18 + */ 64.19 + public boolean isDefaultAction(); 64.20 }
65.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java Thu Oct 10 10:09:16 2013 -0700 65.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java Fri Oct 11 00:07:42 2013 -0700 65.3 @@ -1,5 +1,5 @@ 65.4 /* 65.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 65.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 65.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 65.8 * 65.9 * This code is free software; you can redistribute it and/or modify it 65.10 @@ -34,10 +34,12 @@ 65.11 import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory; 65.12 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; 65.13 import com.sun.xml.internal.ws.policy.PolicyMap; 65.14 + 65.15 import org.xml.sax.SAXException; 65.16 65.17 import javax.xml.namespace.QName; 65.18 import javax.xml.stream.XMLStreamException; 65.19 + 65.20 import java.io.IOException; 65.21 import java.util.Map; 65.22 65.23 @@ -96,7 +98,7 @@ 65.24 * 65.25 * @return an empty Map if the wsdl document has no wsdl:binding 65.26 */ 65.27 - @NotNull Map<QName, WSDLBoundPortType> getBindings(); 65.28 + @NotNull Map<QName, ? extends WSDLBoundPortType> getBindings(); 65.29 65.30 /** 65.31 * Gives a {@link Map} of wsdl:service qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLService} 65.32 @@ -106,6 +108,25 @@ 65.33 @NotNull Map<QName, ? extends WSDLService> getServices(); 65.34 65.35 /** 65.36 + * Returns the first service QName from insertion order 65.37 + */ 65.38 + public QName getFirstServiceName(); 65.39 + 65.40 + /** 65.41 + * Returns the message with the given QName 65.42 + * @param name Message name 65.43 + * @return Message 65.44 + */ 65.45 + public WSDLMessage getMessage(QName name); 65.46 + 65.47 + /** 65.48 + * Gives a {@link Map} of wsdl:message qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLMesage} 65.49 + * 65.50 + * @return an empty Map if the wsdl document has no wsdl:message 65.51 + */ 65.52 + @NotNull Map<QName, ? extends WSDLMessage> getMessages(); 65.53 + 65.54 + /** 65.55 * Gives the PolicyMap associated with the WSDLModel 65.56 * 65.57 * @return PolicyMap 65.58 @@ -115,7 +136,6 @@ 65.59 */ 65.60 public PolicyMap getPolicyMap(); 65.61 65.62 - 65.63 /** 65.64 * Main purpose of this class is to parsing of a WSDL and get the {@link WSDLModel} from it. 65.65 */
66.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java Thu Oct 10 10:09:16 2013 -0700 66.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java Fri Oct 11 00:07:42 2013 -0700 66.3 @@ -1,5 +1,5 @@ 66.4 /* 66.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 66.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 66.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 66.8 * 66.9 * This code is free software; you can redistribute it and/or modify it 66.10 @@ -56,8 +56,6 @@ 66.11 */ 66.12 @Nullable WSDLOutput getOutput(); 66.13 66.14 - 66.15 - 66.16 /** 66.17 * Returns true if this operation is an one-way operation. 66.18 */ 66.19 @@ -112,4 +110,10 @@ 66.20 * Gives the enclosing wsdl:portType@name attribute value. 66.21 */ 66.22 @NotNull QName getPortTypeName(); 66.23 + 66.24 + /** 66.25 + * Returns parameter order 66.26 + * @return Parameter order 66.27 + */ 66.28 + public String getParameterOrder(); 66.29 }
67.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java Thu Oct 10 10:09:16 2013 -0700 67.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java Fri Oct 11 00:07:42 2013 -0700 67.3 @@ -1,5 +1,5 @@ 67.4 /* 67.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 67.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 67.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 67.8 * 67.9 * This code is free software; you can redistribute it and/or modify it 67.10 @@ -79,4 +79,11 @@ 67.11 */ 67.12 @NotNull 67.13 QName getQName(); 67.14 + 67.15 + /** 67.16 + * Checks if the Action value is implicitly derived using the rules defined in WS-Addressing. 67.17 + * 67.18 + * @return true if the Action value is implicitly derived using the rules defined in WS-Addressing. 67.19 + */ 67.20 + public boolean isDefaultAction(); 67.21 }
68.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java Thu Oct 10 10:09:16 2013 -0700 68.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java Fri Oct 11 00:07:42 2013 -0700 68.3 @@ -1,5 +1,5 @@ 68.4 /* 68.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 68.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 68.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 68.8 * 68.9 * This code is free software; you can redistribute it and/or modify it 68.10 @@ -26,7 +26,9 @@ 68.11 package com.sun.xml.internal.ws.api.model.wsdl; 68.12 68.13 import com.sun.istack.internal.NotNull; 68.14 +import com.sun.istack.internal.Nullable; 68.15 import com.sun.xml.internal.ws.api.EndpointAddress; 68.16 +import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; 68.17 68.18 import javax.xml.namespace.QName; 68.19 68.20 @@ -64,4 +66,10 @@ 68.21 */ 68.22 @NotNull 68.23 WSDLService getOwner(); 68.24 + 68.25 + /** 68.26 + * Returns endpoint reference 68.27 + * @return Endpoint reference 68.28 + */ 68.29 + public @Nullable WSEndpointReference getEPR(); 68.30 }
69.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java Thu Oct 10 10:09:16 2013 -0700 69.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java Fri Oct 11 00:07:42 2013 -0700 69.3 @@ -1,5 +1,5 @@ 69.4 /* 69.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 69.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 69.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 69.8 * 69.9 * This code is free software; you can redistribute it and/or modify it 69.10 @@ -50,7 +50,6 @@ 69.11 */ 69.12 public WSDLOperation get(String operationName); 69.13 69.14 - 69.15 /** 69.16 * Gets {@link Iterable}<{@link WSDLOperation}> 69.17 */
70.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java Thu Oct 10 10:09:16 2013 -0700 70.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java Fri Oct 11 00:07:42 2013 -0700 70.3 @@ -1,5 +1,5 @@ 70.4 /* 70.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 70.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 70.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 70.8 * 70.9 * This code is free software; you can redistribute it and/or modify it 70.10 @@ -26,6 +26,7 @@ 70.11 package com.sun.xml.internal.ws.api.model.wsdl; 70.12 70.13 import com.sun.istack.internal.NotNull; 70.14 +import com.sun.istack.internal.Nullable; 70.15 70.16 import javax.xml.namespace.QName; 70.17 70.18 @@ -62,6 +63,12 @@ 70.19 WSDLPort getFirstPort(); 70.20 70.21 /** 70.22 + * Gets the first port in this service which matches the portType 70.23 + */ 70.24 + @Nullable 70.25 + WSDLPort getMatchingPort(QName portTypeName); 70.26 + 70.27 + /** 70.28 * Gives all the {@link WSDLPort} in a wsdl:service {@link WSDLService} 70.29 */ 70.30 Iterable<? extends WSDLPort> getPorts();
71.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 71.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundFault.java Fri Oct 11 00:07:42 2013 -0700 71.3 @@ -0,0 +1,48 @@ 71.4 +/* 71.5 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 71.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 71.7 + * 71.8 + * This code is free software; you can redistribute it and/or modify it 71.9 + * under the terms of the GNU General Public License version 2 only, as 71.10 + * published by the Free Software Foundation. Oracle designates this 71.11 + * particular file as subject to the "Classpath" exception as provided 71.12 + * by Oracle in the LICENSE file that accompanied this code. 71.13 + * 71.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 71.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 71.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 71.17 + * version 2 for more details (a copy is included in the LICENSE file that 71.18 + * accompanied this code). 71.19 + * 71.20 + * You should have received a copy of the GNU General Public License version 71.21 + * 2 along with this work; if not, write to the Free Software Foundation, 71.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 71.23 + * 71.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 71.25 + * or visit www.oracle.com if you need additional information or have any 71.26 + * questions. 71.27 + */ 71.28 + 71.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 71.30 + 71.31 +import com.sun.istack.internal.NotNull; 71.32 +import com.sun.istack.internal.Nullable; 71.33 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault; 71.34 + 71.35 +public interface EditableWSDLBoundFault extends WSDLBoundFault { 71.36 + 71.37 + @Override 71.38 + @Nullable 71.39 + EditableWSDLFault getFault(); 71.40 + 71.41 + @Override 71.42 + @NotNull 71.43 + EditableWSDLBoundOperation getBoundOperation(); 71.44 + 71.45 + /** 71.46 + * Freezes WSDL model to prevent further modification 71.47 + * 71.48 + * @param operation Operation 71.49 + */ 71.50 + void freeze(EditableWSDLBoundOperation operation); 71.51 +}
72.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 72.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundOperation.java Fri Oct 11 00:07:42 2013 -0700 72.3 @@ -0,0 +1,124 @@ 72.4 +/* 72.5 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 72.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 72.7 + * 72.8 + * This code is free software; you can redistribute it and/or modify it 72.9 + * under the terms of the GNU General Public License version 2 only, as 72.10 + * published by the Free Software Foundation. Oracle designates this 72.11 + * particular file as subject to the "Classpath" exception as provided 72.12 + * by Oracle in the LICENSE file that accompanied this code. 72.13 + * 72.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 72.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 72.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 72.17 + * version 2 for more details (a copy is included in the LICENSE file that 72.18 + * accompanied this code). 72.19 + * 72.20 + * You should have received a copy of the GNU General Public License version 72.21 + * 2 along with this work; if not, write to the Free Software Foundation, 72.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 72.23 + * 72.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 72.25 + * or visit www.oracle.com if you need additional information or have any 72.26 + * questions. 72.27 + */ 72.28 + 72.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 72.30 + 72.31 +import java.util.Map; 72.32 + 72.33 +import javax.jws.WebParam.Mode; 72.34 +import javax.jws.soap.SOAPBinding.Style; 72.35 + 72.36 +import com.sun.istack.internal.NotNull; 72.37 +import com.sun.istack.internal.Nullable; 72.38 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 72.39 + 72.40 +public interface EditableWSDLBoundOperation extends WSDLBoundOperation { 72.41 + 72.42 + @Override 72.43 + @NotNull EditableWSDLOperation getOperation(); 72.44 + 72.45 + @Override 72.46 + @NotNull EditableWSDLBoundPortType getBoundPortType(); 72.47 + 72.48 + @Override 72.49 + @Nullable EditableWSDLPart getPart(@NotNull String partName, @NotNull Mode mode); 72.50 + 72.51 + @Override 72.52 + @NotNull Map<String,? extends EditableWSDLPart> getInParts(); 72.53 + 72.54 + @Override 72.55 + @NotNull Map<String,? extends EditableWSDLPart> getOutParts(); 72.56 + 72.57 + @Override 72.58 + @NotNull Iterable<? extends EditableWSDLBoundFault> getFaults(); 72.59 + 72.60 + /** 72.61 + * Add Part 72.62 + * @param part Part 72.63 + * @param mode Mode 72.64 + */ 72.65 + public void addPart(EditableWSDLPart part, Mode mode); 72.66 + 72.67 + /** 72.68 + * Add Fault 72.69 + * @param fault Fault 72.70 + */ 72.71 + public void addFault(@NotNull EditableWSDLBoundFault fault); 72.72 + 72.73 + /** 72.74 + * Sets the soapbinding:binding/operation/wsaw:Anonymous. 72.75 + * 72.76 + * @param anonymous Anonymous value of the operation 72.77 + */ 72.78 + public void setAnonymous(ANONYMOUS anonymous); 72.79 + 72.80 + /** 72.81 + * Sets input explicit body parts 72.82 + * @param b True, if input body part is explicit 72.83 + */ 72.84 + public void setInputExplicitBodyParts(boolean b); 72.85 + 72.86 + /** 72.87 + * Sets output explicit body parts 72.88 + * @param b True, if output body part is explicit 72.89 + */ 72.90 + public void setOutputExplicitBodyParts(boolean b); 72.91 + 72.92 + /** 72.93 + * Sets fault explicit body parts 72.94 + * @param b True, if fault body part is explicit 72.95 + */ 72.96 + public void setFaultExplicitBodyParts(boolean b); 72.97 + 72.98 + /** 72.99 + * Set request namespace 72.100 + * @param ns Namespace 72.101 + */ 72.102 + public void setRequestNamespace(String ns); 72.103 + 72.104 + /** 72.105 + * Set response namespace 72.106 + * @param ns Namespace 72.107 + */ 72.108 + public void setResponseNamespace(String ns); 72.109 + 72.110 + /** 72.111 + * Set SOAP action 72.112 + * @param soapAction SOAP action 72.113 + */ 72.114 + public void setSoapAction(String soapAction); 72.115 + 72.116 + /** 72.117 + * Set parameter style 72.118 + * @param style Style 72.119 + */ 72.120 + public void setStyle(Style style); 72.121 + 72.122 + /** 72.123 + * Freezes WSDL model to prevent further modification 72.124 + * @param root WSDL Model 72.125 + */ 72.126 + public void freeze(EditableWSDLModel root); 72.127 +}
73.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 73.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLBoundPortType.java Fri Oct 11 00:07:42 2013 -0700 73.3 @@ -0,0 +1,78 @@ 73.4 +/* 73.5 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 73.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 73.7 + * 73.8 + * This code is free software; you can redistribute it and/or modify it 73.9 + * under the terms of the GNU General Public License version 2 only, as 73.10 + * published by the Free Software Foundation. Oracle designates this 73.11 + * particular file as subject to the "Classpath" exception as provided 73.12 + * by Oracle in the LICENSE file that accompanied this code. 73.13 + * 73.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 73.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 73.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 73.17 + * version 2 for more details (a copy is included in the LICENSE file that 73.18 + * accompanied this code). 73.19 + * 73.20 + * You should have received a copy of the GNU General Public License version 73.21 + * 2 along with this work; if not, write to the Free Software Foundation, 73.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 73.23 + * 73.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 73.25 + * or visit www.oracle.com if you need additional information or have any 73.26 + * questions. 73.27 + */ 73.28 + 73.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 73.30 + 73.31 +import javax.jws.soap.SOAPBinding.Style; 73.32 +import javax.xml.namespace.QName; 73.33 + 73.34 +import com.sun.istack.internal.NotNull; 73.35 +import com.sun.istack.internal.Nullable; 73.36 +import com.sun.xml.internal.ws.api.BindingID; 73.37 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 73.38 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; 73.39 + 73.40 +public interface EditableWSDLBoundPortType extends WSDLBoundPortType { 73.41 + 73.42 + @Override 73.43 + @NotNull EditableWSDLModel getOwner(); 73.44 + 73.45 + @Override 73.46 + public EditableWSDLBoundOperation get(QName operationName); 73.47 + 73.48 + @Override 73.49 + EditableWSDLPortType getPortType(); 73.50 + 73.51 + @Override 73.52 + Iterable<? extends EditableWSDLBoundOperation> getBindingOperations(); 73.53 + 73.54 + @Override 73.55 + @Nullable EditableWSDLBoundOperation getOperation(String namespaceUri, String localName); 73.56 + 73.57 + /** 73.58 + * Populates the Map that holds operation name as key and {@link WSDLBoundOperation} as the value. 73.59 + * 73.60 + * @param opName Must be non-null 73.61 + * @param ptOp Must be non-null 73.62 + * @throws NullPointerException if either opName or ptOp is null 73.63 + */ 73.64 + public void put(QName opName, EditableWSDLBoundOperation ptOp); 73.65 + 73.66 + /** 73.67 + * Sets the binding ID 73.68 + * @param bindingId Binding ID 73.69 + */ 73.70 + public void setBindingId(BindingID bindingId); 73.71 + 73.72 + /** 73.73 + * sets whether the {@link WSDLBoundPortType} is rpc or lit 73.74 + */ 73.75 + public void setStyle(Style style); 73.76 + 73.77 + /** 73.78 + * Freezes WSDL model to prevent further modification 73.79 + */ 73.80 + public void freeze(); 73.81 +}
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 74.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLFault.java Fri Oct 11 00:07:42 2013 -0700 74.3 @@ -0,0 +1,61 @@ 74.4 +/* 74.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 74.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 74.7 + * 74.8 + * This code is free software; you can redistribute it and/or modify it 74.9 + * under the terms of the GNU General Public License version 2 only, as 74.10 + * published by the Free Software Foundation. Oracle designates this 74.11 + * particular file as subject to the "Classpath" exception as provided 74.12 + * by Oracle in the LICENSE file that accompanied this code. 74.13 + * 74.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 74.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 74.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 74.17 + * version 2 for more details (a copy is included in the LICENSE file that 74.18 + * accompanied this code). 74.19 + * 74.20 + * You should have received a copy of the GNU General Public License version 74.21 + * 2 along with this work; if not, write to the Free Software Foundation, 74.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 74.23 + * 74.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 74.25 + * or visit www.oracle.com if you need additional information or have any 74.26 + * questions. 74.27 + */ 74.28 + 74.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 74.30 + 74.31 +import com.sun.istack.internal.NotNull; 74.32 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault; 74.33 + 74.34 +public interface EditableWSDLFault extends WSDLFault { 74.35 + 74.36 + @Override 74.37 + EditableWSDLMessage getMessage(); 74.38 + 74.39 + @Override 74.40 + @NotNull 74.41 + EditableWSDLOperation getOperation(); 74.42 + 74.43 + /** 74.44 + * Sets action 74.45 + * 74.46 + * @param action Action 74.47 + */ 74.48 + public void setAction(String action); 74.49 + 74.50 + /** 74.51 + * Set to true if this is the default action 74.52 + * 74.53 + * @param defaultAction True, if default action 74.54 + */ 74.55 + public void setDefaultAction(boolean defaultAction); 74.56 + 74.57 + /** 74.58 + * Freezes WSDL model to prevent further modification 74.59 + * 74.60 + * @param root WSDL Model 74.61 + */ 74.62 + public void freeze(EditableWSDLModel root); 74.63 + 74.64 +}
75.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 75.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLInput.java Fri Oct 11 00:07:42 2013 -0700 75.3 @@ -0,0 +1,61 @@ 75.4 +/* 75.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 75.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 75.7 + * 75.8 + * This code is free software; you can redistribute it and/or modify it 75.9 + * under the terms of the GNU General Public License version 2 only, as 75.10 + * published by the Free Software Foundation. Oracle designates this 75.11 + * particular file as subject to the "Classpath" exception as provided 75.12 + * by Oracle in the LICENSE file that accompanied this code. 75.13 + * 75.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 75.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 75.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 75.17 + * version 2 for more details (a copy is included in the LICENSE file that 75.18 + * accompanied this code). 75.19 + * 75.20 + * You should have received a copy of the GNU General Public License version 75.21 + * 2 along with this work; if not, write to the Free Software Foundation, 75.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 75.23 + * 75.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 75.25 + * or visit www.oracle.com if you need additional information or have any 75.26 + * questions. 75.27 + */ 75.28 + 75.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 75.30 + 75.31 +import com.sun.istack.internal.NotNull; 75.32 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput; 75.33 + 75.34 +public interface EditableWSDLInput extends WSDLInput { 75.35 + 75.36 + @Override 75.37 + EditableWSDLMessage getMessage(); 75.38 + 75.39 + @Override 75.40 + @NotNull 75.41 + EditableWSDLOperation getOperation(); 75.42 + 75.43 + /** 75.44 + * Sets action 75.45 + * 75.46 + * @param action Action 75.47 + */ 75.48 + public void setAction(String action); 75.49 + 75.50 + /** 75.51 + * Set to true if this is the default action 75.52 + * 75.53 + * @param defaultAction True, if default action 75.54 + */ 75.55 + public void setDefaultAction(boolean defaultAction); 75.56 + 75.57 + /** 75.58 + * Freezes WSDL model to prevent further modification 75.59 + * 75.60 + * @param root WSDL Model 75.61 + */ 75.62 + public void freeze(EditableWSDLModel root); 75.63 + 75.64 +}
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 76.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLMessage.java Fri Oct 11 00:07:42 2013 -0700 76.3 @@ -0,0 +1,42 @@ 76.4 +/* 76.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 76.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 76.7 + * 76.8 + * This code is free software; you can redistribute it and/or modify it 76.9 + * under the terms of the GNU General Public License version 2 only, as 76.10 + * published by the Free Software Foundation. Oracle designates this 76.11 + * particular file as subject to the "Classpath" exception as provided 76.12 + * by Oracle in the LICENSE file that accompanied this code. 76.13 + * 76.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 76.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 76.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 76.17 + * version 2 for more details (a copy is included in the LICENSE file that 76.18 + * accompanied this code). 76.19 + * 76.20 + * You should have received a copy of the GNU General Public License version 76.21 + * 2 along with this work; if not, write to the Free Software Foundation, 76.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 76.23 + * 76.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 76.25 + * or visit www.oracle.com if you need additional information or have any 76.26 + * questions. 76.27 + */ 76.28 + 76.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 76.30 + 76.31 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage; 76.32 + 76.33 +public interface EditableWSDLMessage extends WSDLMessage { 76.34 + 76.35 + @Override 76.36 + Iterable<? extends EditableWSDLPart> parts(); 76.37 + 76.38 + /** 76.39 + * Add part 76.40 + * 76.41 + * @param part Part 76.42 + */ 76.43 + public void add(EditableWSDLPart part); 76.44 + 76.45 +}
77.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 77.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLModel.java Fri Oct 11 00:07:42 2013 -0700 77.3 @@ -0,0 +1,115 @@ 77.4 +/* 77.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 77.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 77.7 + * 77.8 + * This code is free software; you can redistribute it and/or modify it 77.9 + * under the terms of the GNU General Public License version 2 only, as 77.10 + * published by the Free Software Foundation. Oracle designates this 77.11 + * particular file as subject to the "Classpath" exception as provided 77.12 + * by Oracle in the LICENSE file that accompanied this code. 77.13 + * 77.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 77.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 77.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 77.17 + * version 2 for more details (a copy is included in the LICENSE file that 77.18 + * accompanied this code). 77.19 + * 77.20 + * You should have received a copy of the GNU General Public License version 77.21 + * 2 along with this work; if not, write to the Free Software Foundation, 77.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 77.23 + * 77.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 77.25 + * or visit www.oracle.com if you need additional information or have any 77.26 + * questions. 77.27 + */ 77.28 + 77.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 77.30 + 77.31 +import java.util.Map; 77.32 + 77.33 +import javax.xml.namespace.QName; 77.34 + 77.35 +import com.sun.istack.internal.NotNull; 77.36 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 77.37 +import com.sun.xml.internal.ws.policy.PolicyMap; 77.38 + 77.39 +public interface EditableWSDLModel extends WSDLModel { 77.40 + 77.41 + @Override 77.42 + EditableWSDLPortType getPortType(@NotNull QName name); 77.43 + 77.44 + /** 77.45 + * Add Binding 77.46 + * 77.47 + * @param portType Bound port type 77.48 + */ 77.49 + void addBinding(EditableWSDLBoundPortType portType); 77.50 + 77.51 + @Override 77.52 + EditableWSDLBoundPortType getBinding(@NotNull QName name); 77.53 + 77.54 + @Override 77.55 + EditableWSDLBoundPortType getBinding(@NotNull QName serviceName, @NotNull QName portName); 77.56 + 77.57 + @Override 77.58 + EditableWSDLService getService(@NotNull QName name); 77.59 + 77.60 + @Override 77.61 + @NotNull 77.62 + Map<QName, ? extends EditableWSDLMessage> getMessages(); 77.63 + 77.64 + /** 77.65 + * Add message 77.66 + * 77.67 + * @param msg Message 77.68 + */ 77.69 + public void addMessage(EditableWSDLMessage msg); 77.70 + 77.71 + @Override 77.72 + @NotNull 77.73 + Map<QName, ? extends EditableWSDLPortType> getPortTypes(); 77.74 + 77.75 + /** 77.76 + * Add port type 77.77 + * 77.78 + * @param pt Port type 77.79 + */ 77.80 + public void addPortType(EditableWSDLPortType pt); 77.81 + 77.82 + @Override 77.83 + @NotNull 77.84 + Map<QName, ? extends EditableWSDLBoundPortType> getBindings(); 77.85 + 77.86 + @Override 77.87 + @NotNull 77.88 + Map<QName, ? extends EditableWSDLService> getServices(); 77.89 + 77.90 + /** 77.91 + * Add service 77.92 + * 77.93 + * @param svc Service 77.94 + */ 77.95 + public void addService(EditableWSDLService svc); 77.96 + 77.97 + @Override 77.98 + public EditableWSDLMessage getMessage(QName name); 77.99 + 77.100 + /** 77.101 + * @param policyMap 77.102 + * @deprecated 77.103 + */ 77.104 + public void setPolicyMap(PolicyMap policyMap); 77.105 + 77.106 + /** 77.107 + * Finalize rpc-lit binding 77.108 + * 77.109 + * @param portType Binding 77.110 + */ 77.111 + public void finalizeRpcLitBinding(EditableWSDLBoundPortType portType); 77.112 + 77.113 + /** 77.114 + * Freezes WSDL model to prevent further modification 77.115 + */ 77.116 + public void freeze(); 77.117 + 77.118 +}
78.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 78.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOperation.java Fri Oct 11 00:07:42 2013 -0700 78.3 @@ -0,0 +1,85 @@ 78.4 +/* 78.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 78.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 78.7 + * 78.8 + * This code is free software; you can redistribute it and/or modify it 78.9 + * under the terms of the GNU General Public License version 2 only, as 78.10 + * published by the Free Software Foundation. Oracle designates this 78.11 + * particular file as subject to the "Classpath" exception as provided 78.12 + * by Oracle in the LICENSE file that accompanied this code. 78.13 + * 78.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 78.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 78.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 78.17 + * version 2 for more details (a copy is included in the LICENSE file that 78.18 + * accompanied this code). 78.19 + * 78.20 + * You should have received a copy of the GNU General Public License version 78.21 + * 2 along with this work; if not, write to the Free Software Foundation, 78.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 78.23 + * 78.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 78.25 + * or visit www.oracle.com if you need additional information or have any 78.26 + * questions. 78.27 + */ 78.28 + 78.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 78.30 + 78.31 +import javax.xml.namespace.QName; 78.32 + 78.33 +import com.sun.istack.internal.NotNull; 78.34 +import com.sun.istack.internal.Nullable; 78.35 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 78.36 + 78.37 +public interface EditableWSDLOperation extends WSDLOperation { 78.38 + 78.39 + @Override 78.40 + @NotNull 78.41 + EditableWSDLInput getInput(); 78.42 + 78.43 + /** 78.44 + * Set input 78.45 + * 78.46 + * @param input Input 78.47 + */ 78.48 + public void setInput(EditableWSDLInput input); 78.49 + 78.50 + @Override 78.51 + @Nullable 78.52 + EditableWSDLOutput getOutput(); 78.53 + 78.54 + /** 78.55 + * Set output 78.56 + * 78.57 + * @param output Output 78.58 + */ 78.59 + public void setOutput(EditableWSDLOutput output); 78.60 + 78.61 + @Override 78.62 + Iterable<? extends EditableWSDLFault> getFaults(); 78.63 + 78.64 + /** 78.65 + * Add fault 78.66 + * 78.67 + * @param fault Fault 78.68 + */ 78.69 + public void addFault(EditableWSDLFault fault); 78.70 + 78.71 + @Override 78.72 + @Nullable 78.73 + EditableWSDLFault getFault(QName faultDetailName); 78.74 + 78.75 + /** 78.76 + * Set parameter order 78.77 + * 78.78 + * @param parameterOrder Parameter order 78.79 + */ 78.80 + public void setParameterOrder(String parameterOrder); 78.81 + 78.82 + /** 78.83 + * Freezes WSDL model to prevent further modification 78.84 + * 78.85 + * @param root WSDL Model 78.86 + */ 78.87 + public void freeze(EditableWSDLModel root); 78.88 +}
79.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 79.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLOutput.java Fri Oct 11 00:07:42 2013 -0700 79.3 @@ -0,0 +1,61 @@ 79.4 +/* 79.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 79.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 79.7 + * 79.8 + * This code is free software; you can redistribute it and/or modify it 79.9 + * under the terms of the GNU General Public License version 2 only, as 79.10 + * published by the Free Software Foundation. Oracle designates this 79.11 + * particular file as subject to the "Classpath" exception as provided 79.12 + * by Oracle in the LICENSE file that accompanied this code. 79.13 + * 79.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 79.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 79.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 79.17 + * version 2 for more details (a copy is included in the LICENSE file that 79.18 + * accompanied this code). 79.19 + * 79.20 + * You should have received a copy of the GNU General Public License version 79.21 + * 2 along with this work; if not, write to the Free Software Foundation, 79.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 79.23 + * 79.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 79.25 + * or visit www.oracle.com if you need additional information or have any 79.26 + * questions. 79.27 + */ 79.28 + 79.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 79.30 + 79.31 +import com.sun.istack.internal.NotNull; 79.32 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput; 79.33 + 79.34 +public interface EditableWSDLOutput extends WSDLOutput { 79.35 + 79.36 + @Override 79.37 + EditableWSDLMessage getMessage(); 79.38 + 79.39 + @Override 79.40 + @NotNull 79.41 + EditableWSDLOperation getOperation(); 79.42 + 79.43 + /** 79.44 + * Sets action 79.45 + * 79.46 + * @param action Action 79.47 + */ 79.48 + public void setAction(String action); 79.49 + 79.50 + /** 79.51 + * Set to true if this is the default action 79.52 + * 79.53 + * @param defaultAction True, if default action 79.54 + */ 79.55 + public void setDefaultAction(boolean defaultAction); 79.56 + 79.57 + /** 79.58 + * Freezes WSDL model to prevent further modification 79.59 + * 79.60 + * @param root WSDL Model 79.61 + */ 79.62 + public void freeze(EditableWSDLModel root); 79.63 + 79.64 +}
80.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 80.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPart.java Fri Oct 11 00:07:42 2013 -0700 80.3 @@ -0,0 +1,47 @@ 80.4 +/* 80.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 80.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 80.7 + * 80.8 + * This code is free software; you can redistribute it and/or modify it 80.9 + * under the terms of the GNU General Public License version 2 only, as 80.10 + * published by the Free Software Foundation. Oracle designates this 80.11 + * particular file as subject to the "Classpath" exception as provided 80.12 + * by Oracle in the LICENSE file that accompanied this code. 80.13 + * 80.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 80.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 80.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 80.17 + * version 2 for more details (a copy is included in the LICENSE file that 80.18 + * accompanied this code). 80.19 + * 80.20 + * You should have received a copy of the GNU General Public License version 80.21 + * 2 along with this work; if not, write to the Free Software Foundation, 80.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 80.23 + * 80.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 80.25 + * or visit www.oracle.com if you need additional information or have any 80.26 + * questions. 80.27 + */ 80.28 + 80.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 80.30 + 80.31 +import com.sun.xml.internal.ws.api.model.ParameterBinding; 80.32 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart; 80.33 + 80.34 +public interface EditableWSDLPart extends WSDLPart { 80.35 + 80.36 + /** 80.37 + * Sets binding 80.38 + * 80.39 + * @param binding Binding 80.40 + */ 80.41 + public void setBinding(ParameterBinding binding); 80.42 + 80.43 + /** 80.44 + * Sets index 80.45 + * 80.46 + * @param index Index 80.47 + */ 80.48 + public void setIndex(int index); 80.49 + 80.50 +}
81.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 81.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPort.java Fri Oct 11 00:07:42 2013 -0700 81.3 @@ -0,0 +1,63 @@ 81.4 +/* 81.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 81.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 81.7 + * 81.8 + * This code is free software; you can redistribute it and/or modify it 81.9 + * under the terms of the GNU General Public License version 2 only, as 81.10 + * published by the Free Software Foundation. Oracle designates this 81.11 + * particular file as subject to the "Classpath" exception as provided 81.12 + * by Oracle in the LICENSE file that accompanied this code. 81.13 + * 81.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 81.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 81.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 81.17 + * version 2 for more details (a copy is included in the LICENSE file that 81.18 + * accompanied this code). 81.19 + * 81.20 + * You should have received a copy of the GNU General Public License version 81.21 + * 2 along with this work; if not, write to the Free Software Foundation, 81.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 81.23 + * 81.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 81.25 + * or visit www.oracle.com if you need additional information or have any 81.26 + * questions. 81.27 + */ 81.28 + 81.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 81.30 + 81.31 +import com.sun.istack.internal.NotNull; 81.32 +import com.sun.xml.internal.ws.api.EndpointAddress; 81.33 +import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; 81.34 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 81.35 + 81.36 +public interface EditableWSDLPort extends WSDLPort { 81.37 + 81.38 + @Override 81.39 + @NotNull 81.40 + EditableWSDLBoundPortType getBinding(); 81.41 + 81.42 + @Override 81.43 + @NotNull 81.44 + EditableWSDLService getOwner(); 81.45 + 81.46 + /** 81.47 + * Sets endpoint address 81.48 + * 81.49 + * @param address Endpoint address 81.50 + */ 81.51 + public void setAddress(EndpointAddress address); 81.52 + 81.53 + /** 81.54 + * Sets endpoint reference 81.55 + * 81.56 + * @param epr Endpoint reference 81.57 + */ 81.58 + public void setEPR(@NotNull WSEndpointReference epr); 81.59 + 81.60 + /** 81.61 + * Freezes WSDL model to prevent further modification 81.62 + * 81.63 + * @param root WSDL Model 81.64 + */ 81.65 + void freeze(EditableWSDLModel root); 81.66 +}
82.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 82.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLPortType.java Fri Oct 11 00:07:42 2013 -0700 82.3 @@ -0,0 +1,50 @@ 82.4 +/* 82.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 82.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 82.7 + * 82.8 + * This code is free software; you can redistribute it and/or modify it 82.9 + * under the terms of the GNU General Public License version 2 only, as 82.10 + * published by the Free Software Foundation. Oracle designates this 82.11 + * particular file as subject to the "Classpath" exception as provided 82.12 + * by Oracle in the LICENSE file that accompanied this code. 82.13 + * 82.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 82.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 82.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 82.17 + * version 2 for more details (a copy is included in the LICENSE file that 82.18 + * accompanied this code). 82.19 + * 82.20 + * You should have received a copy of the GNU General Public License version 82.21 + * 2 along with this work; if not, write to the Free Software Foundation, 82.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 82.23 + * 82.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 82.25 + * or visit www.oracle.com if you need additional information or have any 82.26 + * questions. 82.27 + */ 82.28 + 82.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 82.30 + 82.31 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType; 82.32 + 82.33 +public interface EditableWSDLPortType extends WSDLPortType { 82.34 + 82.35 + @Override 82.36 + public EditableWSDLOperation get(String operationName); 82.37 + 82.38 + @Override 82.39 + public Iterable<? extends EditableWSDLOperation> getOperations(); 82.40 + 82.41 + /** 82.42 + * Associate WSDL operation with operation name 82.43 + * 82.44 + * @param opName Operation name 82.45 + * @param ptOp Operation 82.46 + */ 82.47 + public void put(String opName, EditableWSDLOperation ptOp); 82.48 + 82.49 + /** 82.50 + * Freezes WSDL model to prevent further modification 82.51 + */ 82.52 + public void freeze(); 82.53 +}
83.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 83.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/editable/EditableWSDLService.java Fri Oct 11 00:07:42 2013 -0700 83.3 @@ -0,0 +1,67 @@ 83.4 +/* 83.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 83.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 83.7 + * 83.8 + * This code is free software; you can redistribute it and/or modify it 83.9 + * under the terms of the GNU General Public License version 2 only, as 83.10 + * published by the Free Software Foundation. Oracle designates this 83.11 + * particular file as subject to the "Classpath" exception as provided 83.12 + * by Oracle in the LICENSE file that accompanied this code. 83.13 + * 83.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 83.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 83.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 83.17 + * version 2 for more details (a copy is included in the LICENSE file that 83.18 + * accompanied this code). 83.19 + * 83.20 + * You should have received a copy of the GNU General Public License version 83.21 + * 2 along with this work; if not, write to the Free Software Foundation, 83.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 83.23 + * 83.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 83.25 + * or visit www.oracle.com if you need additional information or have any 83.26 + * questions. 83.27 + */ 83.28 + 83.29 +package com.sun.xml.internal.ws.api.model.wsdl.editable; 83.30 + 83.31 +import javax.xml.namespace.QName; 83.32 + 83.33 +import com.sun.istack.internal.NotNull; 83.34 +import com.sun.istack.internal.Nullable; 83.35 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 83.36 + 83.37 +public interface EditableWSDLService extends WSDLService { 83.38 + 83.39 + @Override 83.40 + @NotNull 83.41 + EditableWSDLModel getParent(); 83.42 + 83.43 + @Override 83.44 + EditableWSDLPort get(QName portName); 83.45 + 83.46 + @Override 83.47 + EditableWSDLPort getFirstPort(); 83.48 + 83.49 + @Override 83.50 + @Nullable 83.51 + EditableWSDLPort getMatchingPort(QName portTypeName); 83.52 + 83.53 + @Override 83.54 + Iterable<? extends EditableWSDLPort> getPorts(); 83.55 + 83.56 + /** 83.57 + * Associate WSDL port with port QName 83.58 + * 83.59 + * @param portName Port QName 83.60 + * @param port Port 83.61 + */ 83.62 + public void put(QName portName, EditableWSDLPort port); 83.63 + 83.64 + /** 83.65 + * Freezes WSDL model to prevent further modification 83.66 + * 83.67 + * @param root WSDL Model 83.68 + */ 83.69 + void freeze(EditableWSDLModel root); 83.70 +}
84.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java Thu Oct 10 10:09:16 2013 -0700 84.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java Fri Oct 11 00:07:42 2013 -0700 84.3 @@ -1,5 +1,5 @@ 84.4 /* 84.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 84.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 84.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 84.8 * 84.9 * This code is free software; you can redistribute it and/or modify it 84.10 @@ -26,7 +26,17 @@ 84.11 package com.sun.xml.internal.ws.api.wsdl.parser; 84.12 84.13 import com.sun.xml.internal.ws.api.WSService; 84.14 -import com.sun.xml.internal.ws.api.model.wsdl.*; 84.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault; 84.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 84.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 84.18 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault; 84.19 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput; 84.20 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 84.21 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 84.22 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput; 84.23 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort; 84.24 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 84.25 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService; 84.26 import com.sun.xml.internal.ws.api.pipe.Tube; 84.27 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; 84.28 84.29 @@ -138,34 +148,36 @@ 84.30 * @author Kohsuke Kawaguchi 84.31 */ 84.32 public abstract class WSDLParserExtension { 84.33 + 84.34 public void start(WSDLParserExtensionContext context){ 84.35 // noop 84.36 } 84.37 - public void serviceAttributes(WSDLService service, XMLStreamReader reader) { 84.38 + 84.39 + public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) { 84.40 // noop 84.41 } 84.42 84.43 - public boolean serviceElements(WSDLService service, XMLStreamReader reader) { 84.44 + public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) { 84.45 return false; 84.46 } 84.47 84.48 - public void portAttributes(WSDLPort port, XMLStreamReader reader) { 84.49 + public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) { 84.50 // noop 84.51 } 84.52 84.53 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 84.54 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 84.55 return false; 84.56 } 84.57 84.58 - public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) { 84.59 + public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) { 84.60 return false; 84.61 } 84.62 84.63 - public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) { 84.64 + public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) { 84.65 return false; 84.66 } 84.67 84.68 - public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) { 84.69 + public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) { 84.70 return false; 84.71 } 84.72 84.73 @@ -173,81 +185,81 @@ 84.74 return false; 84.75 } 84.76 84.77 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) { 84.78 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 84.79 return false; 84.80 } 84.81 84.82 - public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader) { 84.83 + public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 84.84 } 84.85 84.86 - public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) { 84.87 + public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) { 84.88 return false; 84.89 } 84.90 84.91 - public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) { 84.92 + public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) { 84.93 } 84.94 84.95 - public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) { 84.96 + public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) { 84.97 return false; 84.98 } 84.99 84.100 - public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) { 84.101 + public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) { 84.102 } 84.103 84.104 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 84.105 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 84.106 return false; 84.107 } 84.108 84.109 - public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 84.110 + public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 84.111 } 84.112 84.113 - public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) { 84.114 + public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) { 84.115 return false; 84.116 } 84.117 84.118 - public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) { 84.119 + public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) { 84.120 } 84.121 84.122 - public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) { 84.123 + public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) { 84.124 return false; 84.125 } 84.126 84.127 - public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) { 84.128 + public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) { 84.129 } 84.130 84.131 - public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) { 84.132 + public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) { 84.133 return false; 84.134 } 84.135 84.136 - public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) { 84.137 + public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) { 84.138 } 84.139 84.140 - public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) { 84.141 + public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) { 84.142 return false; 84.143 } 84.144 84.145 - public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) { 84.146 + public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) { 84.147 } 84.148 84.149 - public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 84.150 + public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 84.151 return false; 84.152 } 84.153 84.154 - public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 84.155 + public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 84.156 } 84.157 84.158 - public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 84.159 + public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 84.160 return false; 84.161 } 84.162 84.163 - public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 84.164 + public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 84.165 } 84.166 84.167 - public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) { 84.168 + public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) { 84.169 return false; 84.170 } 84.171 84.172 - public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) { 84.173 + public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) { 84.174 } 84.175 84.176 // TODO: complete the rest of the callback
85.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java Thu Oct 10 10:09:16 2013 -0700 85.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java Fri Oct 11 00:07:42 2013 -0700 85.3 @@ -1,5 +1,5 @@ 85.4 /* 85.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 85.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 85.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 85.8 * 85.9 * This code is free software; you can redistribute it and/or modify it 85.10 @@ -26,7 +26,7 @@ 85.11 package com.sun.xml.internal.ws.api.wsdl.parser; 85.12 85.13 import com.sun.istack.internal.NotNull; 85.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 85.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 85.16 import com.sun.xml.internal.ws.api.server.Container; 85.17 import com.sun.xml.internal.ws.api.policy.PolicyResolver; 85.18 85.19 @@ -44,10 +44,10 @@ 85.20 boolean isClientSide(); 85.21 85.22 /** 85.23 - * Gives the {@link WSDLModel}. The WSDLModel may not be complete until 85.24 + * Gives the {@link EditableWSDLModel}. The WSDLModel may not be complete until 85.25 * {@link WSDLParserExtension#finished(WSDLParserExtensionContext)} is called. 85.26 */ 85.27 - WSDLModel getWSDLModel(); 85.28 + EditableWSDLModel getWSDLModel(); 85.29 85.30 /** 85.31 * Provides the {@link Container} in which this service or client is running.
86.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java Thu Oct 10 10:09:16 2013 -0700 86.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java Fri Oct 11 00:07:42 2013 -0700 86.3 @@ -38,7 +38,6 @@ 86.4 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 86.5 import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject; 86.6 import com.sun.xml.internal.ws.model.RuntimeModelerException; 86.7 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 86.8 import com.sun.xml.internal.ws.resources.ModelerMessages; 86.9 import com.sun.xml.internal.bind.util.Which; 86.10 86.11 @@ -440,9 +439,9 @@ 86.12 } 86.13 86.14 /** 86.15 - * Extracts features from {@link WSDLPortImpl#getFeatures()}. Extra features 86.16 + * Extracts features from {@link WSDLPort#getFeatures()}. Extra features 86.17 * that are not already set on binding. i.e, if a feature is set already on 86.18 - * binding through someother API the coresponding wsdlFeature is not set. 86.19 + * binding through some other API the corresponding wsdlFeature is not set. 86.20 * 86.21 * @param wsdlPort 86.22 * WSDLPort model 86.23 @@ -452,7 +451,7 @@ 86.24 * true 86.25 * @param reportConflicts 86.26 * If true, checks if the feature setting in WSDL (wsdl extension 86.27 - * or policy configuration) colflicts with feature setting in 86.28 + * or policy configuration) conflicts with feature setting in 86.29 * Deployed Service and logs warning if there are any conflicts. 86.30 */ 86.31 public void mergeFeatures(@NotNull WSDLPort wsdlPort,
87.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java Thu Oct 10 10:09:16 2013 -0700 87.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java Fri Oct 11 00:07:42 2013 -0700 87.3 @@ -25,14 +25,18 @@ 87.4 87.5 package com.sun.xml.internal.ws.client; 87.6 87.7 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 87.8 import com.sun.xml.internal.ws.api.server.Container; 87.9 -import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl; 87.10 + 87.11 import java.util.Map; 87.12 + 87.13 import javax.xml.namespace.QName; 87.14 + 87.15 import com.sun.org.glassfish.gmbal.AMXMetadata; 87.16 import com.sun.org.glassfish.gmbal.Description; 87.17 import com.sun.org.glassfish.gmbal.ManagedAttribute; 87.18 import com.sun.org.glassfish.gmbal.ManagedObject; 87.19 + 87.20 import java.net.URL; 87.21 87.22 /** 87.23 @@ -74,7 +78,7 @@ 87.24 private URL wsdlDocumentLocation() { return stub.owner.getWSDLDocumentLocation(); } 87.25 87.26 @ManagedAttribute 87.27 - private WSDLServiceImpl wsdlService() { return stub.owner.getWsdlService(); } 87.28 + private WSDLService wsdlService() { return stub.owner.getWsdlService(); } 87.29 87.30 87.31
88.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java Thu Oct 10 10:09:16 2013 -0700 88.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java Fri Oct 11 00:07:42 2013 -0700 88.3 @@ -1,5 +1,5 @@ 88.4 /* 88.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 88.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 88.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 88.8 * 88.9 * This code is free software; you can redistribute it and/or modify it 88.10 @@ -36,8 +36,6 @@ 88.11 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 88.12 import com.sun.xml.internal.ws.binding.BindingImpl; 88.13 import com.sun.xml.internal.ws.binding.WebServiceFeatureList; 88.14 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 88.15 -import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; 88.16 import com.sun.xml.internal.ws.policy.PolicyMap; 88.17 import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil; 88.18 88.19 @@ -96,7 +94,7 @@ 88.20 public PolicyMap createPolicyMap() { 88.21 PolicyMap map; 88.22 if(portModel != null) { 88.23 - map = ((WSDLModelImpl) portModel.getOwner().getParent()).getPolicyMap(); 88.24 + map = portModel.getOwner().getParent().getPolicyMap(); 88.25 } else { 88.26 map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer())); 88.27 } 88.28 @@ -154,8 +152,8 @@ 88.29 private WSDLPort getPortModel(WSServiceDelegate owner, QName portName) { 88.30 88.31 if (owner.getWsdlService() != null){ 88.32 - Iterable<WSDLPortImpl> ports = owner.getWsdlService().getPorts(); 88.33 - for (WSDLPortImpl port : ports){ 88.34 + Iterable<? extends WSDLPort> ports = owner.getWsdlService().getPorts(); 88.35 + for (WSDLPort port : ports){ 88.36 if (port.getName().equals(portName)) 88.37 return port; 88.38 }
89.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java Thu Oct 10 10:09:16 2013 -0700 89.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java Fri Oct 11 00:07:42 2013 -0700 89.3 @@ -62,7 +62,6 @@ 89.4 import com.sun.xml.internal.ws.developer.JAXWSProperties; 89.5 import com.sun.xml.internal.ws.developer.WSBindingProvider; 89.6 import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties; 89.7 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 89.8 import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties; 89.9 import com.sun.xml.internal.ws.model.wsdl.WSDLProperties; 89.10 import com.sun.xml.internal.ws.resources.ClientMessages; 89.11 @@ -354,7 +353,7 @@ 89.12 */ 89.13 private static void checkAllWSDLExtensionsUnderstood(WSPortInfo port, WSBinding binding) { 89.14 if (port.getPort() != null && binding.isFeatureEnabled(RespectBindingFeature.class)) { 89.15 - ((WSDLPortImpl) port.getPort()).areRequiredExtensionsUnderstood(); 89.16 + port.getPort().areRequiredExtensionsUnderstood(); 89.17 } 89.18 } 89.19 89.20 @@ -649,7 +648,7 @@ 89.21 89.22 //gather EPRExtensions specified in WSDL. 89.23 try { 89.24 - WSEndpointReference wsdlEpr = ((WSDLPortImpl) wsdlPort).getEPR(); 89.25 + WSEndpointReference wsdlEpr = wsdlPort.getEPR(); 89.26 if (wsdlEpr != null) { 89.27 for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) { 89.28 wsdlEPRExtensions.add(new WSEPRExtension(
90.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java Thu Oct 10 10:09:16 2013 -0700 90.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java Fri Oct 11 00:07:42 2013 -0700 90.3 @@ -41,7 +41,9 @@ 90.4 import com.sun.xml.internal.ws.api.databinding.DatabindingFactory; 90.5 import com.sun.xml.internal.ws.api.databinding.MetadataReader; 90.6 import com.sun.xml.internal.ws.api.model.SEIModel; 90.7 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 90.8 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 90.9 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 90.10 import com.sun.xml.internal.ws.api.pipe.Stubs; 90.11 import com.sun.xml.internal.ws.api.server.Container; 90.12 import com.sun.xml.internal.ws.api.server.ContainerResolver; 90.13 @@ -51,15 +53,11 @@ 90.14 import com.sun.xml.internal.ws.client.HandlerConfigurator.AnnotationConfigurator; 90.15 import com.sun.xml.internal.ws.client.HandlerConfigurator.HandlerResolverImpl; 90.16 import com.sun.xml.internal.ws.client.sei.SEIStub; 90.17 - 90.18 import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; 90.19 import com.sun.xml.internal.ws.developer.UsesJAXBContextFeature; 90.20 import com.sun.xml.internal.ws.developer.WSBindingProvider; 90.21 import com.sun.xml.internal.ws.model.RuntimeModeler; 90.22 import com.sun.xml.internal.ws.model.SOAPSEIModel; 90.23 -import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; 90.24 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 90.25 -import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl; 90.26 import com.sun.xml.internal.ws.resources.ClientMessages; 90.27 import com.sun.xml.internal.ws.resources.DispatchMessages; 90.28 import com.sun.xml.internal.ws.resources.ProviderApiMessages; 90.29 @@ -67,6 +65,7 @@ 90.30 import com.sun.xml.internal.ws.util.ServiceConfigurationError; 90.31 import com.sun.xml.internal.ws.util.ServiceFinder; 90.32 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; 90.33 + 90.34 import org.xml.sax.EntityResolver; 90.35 import org.xml.sax.SAXException; 90.36 90.37 @@ -86,6 +85,7 @@ 90.38 import javax.xml.ws.WebServiceFeature; 90.39 import javax.xml.ws.handler.HandlerResolver; 90.40 import javax.xml.ws.soap.AddressingFeature; 90.41 + 90.42 import java.io.IOException; 90.43 import java.lang.reflect.InvocationHandler; 90.44 import java.lang.reflect.Proxy; 90.45 @@ -179,7 +179,7 @@ 90.46 * This fiels can be be null if the service is created without wsdl but later 90.47 * the epr supplies a wsdl that can be parsed. 90.48 */ 90.49 - private @Nullable WSDLServiceImpl wsdlService; 90.50 + private @Nullable WSDLService wsdlService; 90.51 90.52 private final Container container; 90.53 /** 90.54 @@ -219,7 +219,7 @@ 90.55 * @param serviceClass 90.56 * Either {@link Service}.class or other generated service-derived classes. 90.57 */ 90.58 - public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) { 90.59 + public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLService service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) { 90.60 this(wsdl, service, serviceName, serviceClass, new WebServiceFeatureList(features)); 90.61 } 90.62 90.63 @@ -227,7 +227,7 @@ 90.64 * @param serviceClass 90.65 * Either {@link Service}.class or other generated service-derived classes. 90.66 */ 90.67 - public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) { 90.68 + public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLService service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) { 90.69 //we cant create a Service without serviceName 90.70 if (serviceName == null) { 90.71 throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME_NULL(null)); 90.72 @@ -303,7 +303,7 @@ 90.73 if (wsdl != null) { 90.74 try { 90.75 URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId()); 90.76 - WSDLModelImpl model = parseWSDL(url, wsdl, serviceClass); 90.77 + WSDLModel model = parseWSDL(url, wsdl, serviceClass); 90.78 service = model.getService(this.serviceName); 90.79 if (service == null) 90.80 throw new WebServiceException( 90.81 @@ -316,6 +316,10 @@ 90.82 throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId())); 90.83 } 90.84 } 90.85 + } else { 90.86 + // fill in statically known ports 90.87 + for (WSDLPort port : service.getPorts()) 90.88 + ports.put(port.getName(), new PortInfo(this, port)); 90.89 } 90.90 this.wsdlService = service; 90.91 90.92 @@ -339,7 +343,7 @@ 90.93 * Either this or <tt>wsdl</tt> parameter must be given. 90.94 * Null location means the system won't be able to resolve relative references in the WSDL, 90.95 */ 90.96 - private WSDLModelImpl parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) { 90.97 + private WSDLModel parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) { 90.98 try { 90.99 return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createCatalogResolver(), 90.100 true, getContainer(), serviceClass, ServiceFinder.find(WSDLParserExtension.class).toArray()); 90.101 @@ -385,7 +389,7 @@ 90.102 public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) { 90.103 if (portName == null || portInterface == null) 90.104 throw new IllegalArgumentException(); 90.105 - WSDLServiceImpl tWsdlService = this.wsdlService; 90.106 + WSDLService tWsdlService = this.wsdlService; 90.107 if (tWsdlService == null) { 90.108 // assigning it to local variable and not setting it back to this.wsdlService intentionally 90.109 // as we don't want to include the service instance with information gathered from sei 90.110 @@ -396,7 +400,7 @@ 90.111 } 90.112 90.113 } 90.114 - WSDLPortImpl portModel = getPortModel(tWsdlService, portName); 90.115 + WSDLPort portModel = getPortModel(tWsdlService, portName); 90.116 return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features)); 90.117 } 90.118 90.119 @@ -436,7 +440,7 @@ 90.120 public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) { 90.121 //get the portType from SEI 90.122 QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); 90.123 - WSDLServiceImpl tmpWsdlService = this.wsdlService; 90.124 + WSDLService tmpWsdlService = this.wsdlService; 90.125 if (tmpWsdlService == null) { 90.126 // assigning it to local variable and not setting it back to this.wsdlService intentionally 90.127 // as we don't want to include the service instance with information gathered from sei 90.128 @@ -447,7 +451,7 @@ 90.129 } 90.130 } 90.131 //get the first port corresponding to the SEI 90.132 - WSDLPortImpl port = tmpWsdlService.getMatchingPort(portTypeName); 90.133 + WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName); 90.134 if (port == null) { 90.135 throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); 90.136 } 90.137 @@ -672,7 +676,7 @@ 90.138 throw new WebServiceException(ProviderApiMessages.NULL_WSDL()); 90.139 } 90.140 try { 90.141 - WSDLModelImpl eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null); 90.142 + WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null); 90.143 wsdlService = eprWsdlMdl.getService(serviceName); 90.144 if (wsdlService == null) 90.145 throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName, 90.146 @@ -685,7 +689,7 @@ 90.147 90.148 if (portName == null && portTypeName != null) { 90.149 //get the first port corresponding to the SEI 90.150 - WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName); 90.151 + WSDLPort port = wsdlService.getMatchingPort(portTypeName); 90.152 if (port == null) 90.153 throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); 90.154 portName = port.getName(); 90.155 @@ -732,7 +736,7 @@ 90.156 ); 90.157 } 90.158 90.159 - private WSDLServiceImpl getWSDLModelfromSEI(final Class sei) { 90.160 + private WSDLService getWSDLModelfromSEI(final Class sei) { 90.161 WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() { 90.162 public WebService run() { 90.163 return (WebService) sei.getAnnotation(WebService.class); 90.164 @@ -743,11 +747,11 @@ 90.165 String wsdlLocation = ws.wsdlLocation(); 90.166 wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation)); 90.167 Source wsdl = new StreamSource(wsdlLocation); 90.168 - WSDLServiceImpl service = null; 90.169 + WSDLService service = null; 90.170 90.171 try { 90.172 URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId()); 90.173 - WSDLModelImpl model = parseWSDL(url, wsdl, sei); 90.174 + WSDLModel model = parseWSDL(url, wsdl, sei); 90.175 service = model.getService(this.serviceName); 90.176 if (service == null) 90.177 throw new WebServiceException( 90.178 @@ -815,7 +819,7 @@ 90.179 */ 90.180 private StringBuilder buildWsdlPortNames() { 90.181 Set<QName> wsdlPortNames = new HashSet<QName>(); 90.182 - for (WSDLPortImpl port : wsdlService.getPorts()) { 90.183 + for (WSDLPort port : wsdlService.getPorts()) { 90.184 wsdlPortNames.add(port.getName()); 90.185 } 90.186 return buildNameList(wsdlPortNames); 90.187 @@ -826,8 +830,8 @@ 90.188 * 90.189 * @return guaranteed to be non-null. 90.190 */ 90.191 - public @NotNull WSDLPortImpl getPortModel(WSDLServiceImpl wsdlService, QName portName) { 90.192 - WSDLPortImpl port = wsdlService.get(portName); 90.193 + public @NotNull WSDLPort getPortModel(WSDLService wsdlService, QName portName) { 90.194 + WSDLPort port = wsdlService.get(portName); 90.195 if (port == null) 90.196 throw new WebServiceException( 90.197 ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames())); 90.198 @@ -884,7 +888,7 @@ 90.199 } 90.200 90.201 private SEIPortInfo createSEIPortInfo(QName portName, Class portInterface, WebServiceFeatureList features) { 90.202 - WSDLPortImpl wsdlPort = getPortModel(wsdlService, portName); 90.203 + WSDLPort wsdlPort = getPortModel(wsdlService, portName); 90.204 SEIModel model = buildRuntimeModel(serviceName, portName, portInterface, wsdlPort, features); 90.205 90.206 return new SEIPortInfo(this, portInterface, (SOAPSEIModel) model, wsdlPort); 90.207 @@ -894,7 +898,7 @@ 90.208 return features.contains(UsesJAXBContextFeature.class); 90.209 } 90.210 90.211 - public WSDLServiceImpl getWsdlService() { 90.212 + public WSDLService getWsdlService() { 90.213 return wsdlService; 90.214 } 90.215
91.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java Thu Oct 10 10:09:16 2013 -0700 91.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java Fri Oct 11 00:07:42 2013 -0700 91.3 @@ -75,13 +75,13 @@ 91.4 private Map<String, JavaWsdlMappingType> readers = new HashMap<String, JavaWsdlMappingType>(); 91.5 91.6 public ExternalMetadataReader(Collection<File> files, Collection<String> resourcePaths, ClassLoader classLoader, 91.7 - boolean xsdValidation, boolean disableSecureXmlProcessing) { 91.8 + boolean xsdValidation, boolean disableXmlSecurity) { 91.9 91.10 if (files != null) { 91.11 for (File file : files) { 91.12 try { 91.13 - String namespace = Util.documentRootNamespace(newSource(file), disableSecureXmlProcessing); 91.14 - JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableSecureXmlProcessing); 91.15 + String namespace = Util.documentRootNamespace(newSource(file), disableXmlSecurity); 91.16 + JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableXmlSecurity); 91.17 readers.put(externalMapping.getJavaTypeName(), externalMapping); 91.18 } catch (Exception e) { 91.19 throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", file.getAbsolutePath()); 91.20 @@ -92,8 +92,8 @@ 91.21 if (resourcePaths != null) { 91.22 for (String resourcePath : resourcePaths) { 91.23 try { 91.24 - String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableSecureXmlProcessing); 91.25 - JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableSecureXmlProcessing); 91.26 + String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableXmlSecurity); 91.27 + JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableXmlSecurity); 91.28 readers.put(externalMapping.getJavaTypeName(), externalMapping); 91.29 } catch (Exception e) { 91.30 throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", resourcePath); 91.31 @@ -107,11 +107,11 @@ 91.32 return new StreamSource(is); 91.33 } 91.34 91.35 - private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableSecureXmlProcessing) throws JAXBException, IOException, TransformerException { 91.36 + private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableXmlSecurity) throws JAXBException, IOException, TransformerException { 91.37 if (NAMESPACE_WEBLOGIC_WSEE_DATABINDING.equals(namespace)) { 91.38 - return Util.transformAndRead(source, disableSecureXmlProcessing); 91.39 + return Util.transformAndRead(source, disableXmlSecurity); 91.40 } if (NAMESPACE_JAXWS_RI_EXTERNAL_METADATA.equals(namespace)) { 91.41 - return Util.read(source, xsdValidation, disableSecureXmlProcessing); 91.42 + return Util.read(source, xsdValidation, disableXmlSecurity); 91.43 } else { 91.44 throw new RuntimeModelerException("runtime.modeler.external.metadata.unsupported.schema", namespace, Arrays.asList(NAMESPACE_WEBLOGIC_WSEE_DATABINDING, NAMESPACE_JAXWS_RI_EXTERNAL_METADATA).toString()); 91.45 } 91.46 @@ -425,8 +425,8 @@ 91.47 } 91.48 91.49 @SuppressWarnings("unchecked") 91.50 - public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableSecureXmlProcessing) throws IOException, JAXBException { 91.51 - JAXBContext ctx = jaxbContext(disableSecureXmlProcessing); 91.52 + public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableXmlSecurity) throws IOException, JAXBException { 91.53 + JAXBContext ctx = jaxbContext(disableXmlSecurity); 91.54 try { 91.55 Unmarshaller um = ctx.createUnmarshaller(); 91.56 if (xsdValidation) { 91.57 @@ -455,16 +455,16 @@ 91.58 } 91.59 } 91.60 91.61 - private static JAXBContext jaxbContext(boolean disableSecureXmlProcessing) { 91.62 + private static JAXBContext jaxbContext(boolean disableXmlSecurity) { 91.63 // as it is supposed to have security enabled in most cases, we create and don't cache 91.64 // "insecure" JAXBContext - these should be corner cases 91.65 - return disableSecureXmlProcessing ? createJaxbContext(true) : jaxbContext; 91.66 + return disableXmlSecurity ? createJaxbContext(true) : jaxbContext; 91.67 } 91.68 91.69 - public static JavaWsdlMappingType transformAndRead(Source src, boolean disableSecureXmlProcessing) throws TransformerException, JAXBException { 91.70 + public static JavaWsdlMappingType transformAndRead(Source src, boolean disableXmlSecurity) throws TransformerException, JAXBException { 91.71 Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL)); 91.72 - JAXBResult result = new JAXBResult(jaxbContext(disableSecureXmlProcessing)); 91.73 - TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing); 91.74 + JAXBResult result = new JAXBResult(jaxbContext(disableXmlSecurity)); 91.75 + TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity); 91.76 Transformer transformer = tf.newTemplates(xsl).newTransformer(); 91.77 transformer.transform(src, result); 91.78 return getJavaWsdlMapping(result.getResult()); 91.79 @@ -534,9 +534,9 @@ 91.80 return elems.toArray(new Element[elems.size()]); 91.81 } 91.82 91.83 - static String documentRootNamespace(Source src, boolean disableSecureXmlProcessing) throws XMLStreamException { 91.84 + static String documentRootNamespace(Source src, boolean disableXmlSecurity) throws XMLStreamException { 91.85 XMLInputFactory factory; 91.86 - factory = XmlUtil.newXMLInputFactory(!disableSecureXmlProcessing); 91.87 + factory = XmlUtil.newXMLInputFactory(!disableXmlSecurity); 91.88 XMLStreamReader streamReader = factory.createXMLStreamReader(src); 91.89 XMLStreamReaderUtil.nextElementContent(streamReader); 91.90 String namespaceURI = streamReader.getName().getNamespaceURI();
92.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java Thu Oct 10 10:09:16 2013 -0700 92.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java Fri Oct 11 00:07:42 2013 -0700 92.3 @@ -25,7 +25,6 @@ 92.4 92.5 package com.sun.xml.internal.ws.model; 92.6 92.7 -import com.sun.istack.internal.NotNull; 92.8 import com.sun.xml.internal.bind.api.TypeReference; 92.9 import com.sun.xml.internal.ws.api.databinding.MetadataReader; 92.10 import com.sun.xml.internal.ws.api.model.JavaMethod; 92.11 @@ -216,14 +215,14 @@ 92.12 * @return soap:Body's first child name for request message. 92.13 */ 92.14 public @Nullable QName getRequestPayloadName() { 92.15 - return (wsdlOperation != null)? wsdlOperation.getReqPayloadName(): requestPayloadName; 92.16 + return (wsdlOperation != null)? wsdlOperation.getRequestPayloadName(): requestPayloadName; 92.17 } 92.18 92.19 /** 92.20 * @return soap:Body's first child name for response message. 92.21 */ 92.22 public @Nullable QName getResponsePayloadName() { 92.23 - return (mep == MEP.ONE_WAY) ? null : wsdlOperation.getResPayloadName(); 92.24 + return (mep == MEP.ONE_WAY) ? null : wsdlOperation.getResponsePayloadName(); 92.25 } 92.26 92.27 /**
93.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java Thu Oct 10 10:09:16 2013 -0700 93.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java Fri Oct 11 00:07:42 2013 -0700 93.3 @@ -1,5 +1,5 @@ 93.4 /* 93.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 93.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 93.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 93.8 * 93.9 * This code is free software; you can redistribute it and/or modify it 93.10 @@ -29,11 +29,9 @@ 93.11 import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtension; 93.12 import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject; 93.13 import com.sun.xml.internal.ws.resources.UtilMessages; 93.14 -import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants; 93.15 import com.sun.istack.internal.NotNull; 93.16 93.17 import javax.xml.stream.XMLStreamReader; 93.18 -import javax.xml.stream.Location; 93.19 import javax.xml.namespace.QName; 93.20 import javax.xml.ws.WebServiceException; 93.21 import java.util.ArrayList; 93.22 @@ -42,7 +40,6 @@ 93.23 import java.util.Set; 93.24 93.25 import org.xml.sax.Locator; 93.26 -import org.xml.sax.helpers.LocatorImpl; 93.27 93.28 /** 93.29 * All the WSDL 1.1 elements that are extensible should subclass from this abstract implementation of 93.30 @@ -95,6 +92,10 @@ 93.31 extensions.add(ex); 93.32 } 93.33 93.34 + public List<? extends UnknownWSDLExtension> getNotUnderstoodExtensions() { 93.35 + return notUnderstoodExtensions; 93.36 + } 93.37 + 93.38 /** 93.39 * This can be used if a WSDL extension element that has wsdl:required=true 93.40 * is not understood
94.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java Thu Oct 10 10:09:16 2013 -0700 94.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java Fri Oct 11 00:07:42 2013 -0700 94.3 @@ -1,5 +1,5 @@ 94.4 /* 94.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 94.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 94.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 94.8 * 94.9 * This code is free software; you can redistribute it and/or modify it 94.10 @@ -26,10 +26,10 @@ 94.11 package com.sun.xml.internal.ws.model.wsdl; 94.12 94.13 import com.sun.istack.internal.NotNull; 94.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault; 94.15 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault; 94.16 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 94.17 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 94.18 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault; 94.19 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 94.20 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault; 94.21 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 94.22 94.23 import javax.xml.stream.XMLStreamReader; 94.24 import javax.xml.namespace.QName; 94.25 @@ -37,12 +37,12 @@ 94.26 /** 94.27 * @author Vivek Pandey 94.28 */ 94.29 -public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements WSDLBoundFault { 94.30 +public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements EditableWSDLBoundFault { 94.31 private final String name; 94.32 - private WSDLFault fault; 94.33 - private WSDLBoundOperationImpl owner; 94.34 + private EditableWSDLFault fault; 94.35 + private EditableWSDLBoundOperation owner; 94.36 94.37 - public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, WSDLBoundOperationImpl owner) { 94.38 + public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, EditableWSDLBoundOperation owner) { 94.39 super(xsr); 94.40 this.name = name; 94.41 this.owner = owner; 94.42 @@ -61,20 +61,20 @@ 94.43 return null; 94.44 } 94.45 94.46 - public WSDLFault getFault() { 94.47 + public EditableWSDLFault getFault() { 94.48 return fault; 94.49 } 94.50 94.51 @NotNull 94.52 - public WSDLBoundOperation getBoundOperation() { 94.53 + public EditableWSDLBoundOperation getBoundOperation() { 94.54 return owner; 94.55 } 94.56 94.57 - void freeze(WSDLBoundOperationImpl root) { 94.58 + public void freeze(EditableWSDLBoundOperation root) { 94.59 assert root != null; 94.60 - WSDLOperation op = root.getOperation(); 94.61 + EditableWSDLOperation op = root.getOperation(); 94.62 if (op != null) { 94.63 - for (WSDLFault f : op.getFaults()) { 94.64 + for (EditableWSDLFault f : op.getFaults()) { 94.65 if (f.getName().equals(name)) { 94.66 this.fault = f; 94.67 break;
95.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java Thu Oct 10 10:09:16 2013 -0700 95.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java Fri Oct 11 00:07:42 2013 -0700 95.3 @@ -29,12 +29,20 @@ 95.4 import com.sun.istack.internal.NotNull; 95.5 import com.sun.xml.internal.ws.api.model.ParameterBinding; 95.6 import com.sun.xml.internal.ws.api.model.wsdl.*; 95.7 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault; 95.8 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 95.9 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 95.10 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 95.11 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 95.12 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 95.13 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart; 95.14 import com.sun.xml.internal.ws.model.RuntimeModeler; 95.15 95.16 import javax.jws.WebParam.Mode; 95.17 import javax.jws.soap.SOAPBinding.Style; 95.18 import javax.xml.namespace.QName; 95.19 import javax.xml.stream.XMLStreamReader; 95.20 + 95.21 import java.util.*; 95.22 95.23 /** 95.24 @@ -42,7 +50,7 @@ 95.25 * 95.26 * @author Vivek Pandey 95.27 */ 95.28 -public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements WSDLBoundOperation { 95.29 +public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements EditableWSDLBoundOperation { 95.30 private final QName name; 95.31 95.32 // map of wsdl:part to the binding 95.33 @@ -61,20 +69,20 @@ 95.34 private Boolean emptyOutputBody; 95.35 private Boolean emptyFaultBody; 95.36 95.37 - private final Map<String, WSDLPartImpl> inParts; 95.38 - private final Map<String, WSDLPartImpl> outParts; 95.39 - private final List<WSDLBoundFaultImpl> wsdlBoundFaults; 95.40 - private WSDLOperationImpl operation; 95.41 + private final Map<String, EditableWSDLPart> inParts; 95.42 + private final Map<String, EditableWSDLPart> outParts; 95.43 + private final List<EditableWSDLBoundFault> wsdlBoundFaults; 95.44 + private EditableWSDLOperation operation; 95.45 private String soapAction; 95.46 private ANONYMOUS anonymous; 95.47 95.48 - private final WSDLBoundPortTypeImpl owner; 95.49 + private final EditableWSDLBoundPortType owner; 95.50 95.51 /** 95.52 * 95.53 * @param name wsdl:operation name qualified value 95.54 */ 95.55 - public WSDLBoundOperationImpl(XMLStreamReader xsr, WSDLBoundPortTypeImpl owner, QName name) { 95.56 + public WSDLBoundOperationImpl(XMLStreamReader xsr, EditableWSDLBoundPortType owner, QName name) { 95.57 super(xsr); 95.58 this.name = name; 95.59 inputParts = new HashMap<String, ParameterBinding>(); 95.60 @@ -83,9 +91,9 @@ 95.61 inputMimeTypes = new HashMap<String, String>(); 95.62 outputMimeTypes = new HashMap<String, String>(); 95.63 faultMimeTypes = new HashMap<String, String>(); 95.64 - inParts = new HashMap<String, WSDLPartImpl>(); 95.65 - outParts = new HashMap<String, WSDLPartImpl>(); 95.66 - wsdlBoundFaults = new ArrayList<WSDLBoundFaultImpl>(); 95.67 + inParts = new HashMap<String, EditableWSDLPart>(); 95.68 + outParts = new HashMap<String, EditableWSDLPart>(); 95.69 + wsdlBoundFaults = new ArrayList<EditableWSDLBoundFault>(); 95.70 this.owner = owner; 95.71 } 95.72 95.73 @@ -104,7 +112,7 @@ 95.74 } 95.75 95.76 @Override 95.77 - public WSDLPartImpl getPart(String partName, Mode mode) { 95.78 + public EditableWSDLPart getPart(String partName, Mode mode) { 95.79 if(mode==Mode.IN){ 95.80 return inParts.get(partName); 95.81 }else if(mode==Mode.OUT){ 95.82 @@ -113,7 +121,7 @@ 95.83 return null; 95.84 } 95.85 95.86 - public void addPart(WSDLPartImpl part, Mode mode){ 95.87 + public void addPart(EditableWSDLPart part, Mode mode){ 95.88 if(mode==Mode.IN) 95.89 inParts.put(part.getName(), part); 95.90 else if(mode==Mode.OUT) 95.91 @@ -149,54 +157,27 @@ 95.92 95.93 // TODO: what's the difference between this and inputParts/outputParts? 95.94 @Override 95.95 - public Map<String,WSDLPart> getInParts() { 95.96 - return Collections.<String,WSDLPart>unmodifiableMap(inParts); 95.97 + public Map<String, ? extends EditableWSDLPart> getInParts() { 95.98 + return Collections.<String, EditableWSDLPart>unmodifiableMap(inParts); 95.99 } 95.100 95.101 @Override 95.102 - public Map<String,WSDLPart> getOutParts() { 95.103 - return Collections.<String,WSDLPart>unmodifiableMap(outParts); 95.104 + public Map<String, ? extends EditableWSDLPart> getOutParts() { 95.105 + return Collections.<String, EditableWSDLPart>unmodifiableMap(outParts); 95.106 } 95.107 95.108 @NotNull 95.109 @Override 95.110 - public List<WSDLBoundFaultImpl> getFaults() { 95.111 + public List<? extends EditableWSDLBoundFault> getFaults() { 95.112 return wsdlBoundFaults; 95.113 } 95.114 95.115 - public void addFault(@NotNull WSDLBoundFaultImpl fault){ 95.116 + public void addFault(@NotNull EditableWSDLBoundFault fault){ 95.117 wsdlBoundFaults.add(fault); 95.118 } 95.119 95.120 95.121 /** 95.122 - * Map of mime:content@part and the mime type from mime:content@type for wsdl:output 95.123 - * 95.124 - * @return empty Map if there is no parts 95.125 - */ 95.126 - public Map<String, String> getInputMimeTypes() { 95.127 - return inputMimeTypes; 95.128 - } 95.129 - 95.130 - /** 95.131 - * Map of mime:content@part and the mime type from mime:content@type for wsdl:output 95.132 - * 95.133 - * @return empty Map if there is no parts 95.134 - */ 95.135 - public Map<String, String> getOutputMimeTypes() { 95.136 - return outputMimeTypes; 95.137 - } 95.138 - 95.139 - /** 95.140 - * Map of mime:content@part and the mime type from mime:content@type for wsdl:fault 95.141 - * 95.142 - * @return empty Map if there is no parts 95.143 - */ 95.144 - public Map<String, String> getFaultMimeTypes() { 95.145 - return faultMimeTypes; 95.146 - } 95.147 - 95.148 - /** 95.149 * Gets {@link ParameterBinding} for a given wsdl part in wsdl:input 95.150 * 95.151 * @param part Name of wsdl:part, must be non-null 95.152 @@ -296,13 +277,13 @@ 95.153 } 95.154 95.155 @Override 95.156 - public WSDLOperationImpl getOperation() { 95.157 + public EditableWSDLOperation getOperation() { 95.158 return operation; 95.159 } 95.160 95.161 95.162 @Override 95.163 - public WSDLBoundPortType getBoundPortType() { 95.164 + public EditableWSDLBoundPortType getBoundPortType() { 95.165 return owner; 95.166 } 95.167 95.168 @@ -324,7 +305,7 @@ 95.169 } 95.170 95.171 @Override 95.172 - public @Nullable QName getReqPayloadName() { 95.173 + public @Nullable QName getRequestPayloadName() { 95.174 if (emptyRequestPayload) 95.175 return null; 95.176 95.177 @@ -337,8 +318,8 @@ 95.178 return requestPayloadName; 95.179 }else{ 95.180 QName inMsgName = operation.getInput().getMessage().getName(); 95.181 - WSDLMessageImpl message = messages.get(inMsgName); 95.182 - for(WSDLPartImpl part:message.parts()){ 95.183 + EditableWSDLMessage message = messages.get(inMsgName); 95.184 + for(EditableWSDLPart part:message.parts()){ 95.185 ParameterBinding binding = getInputBinding(part.getName()); 95.186 if(binding.isBody()){ 95.187 requestPayloadName = part.getDescriptor().name(); 95.188 @@ -354,7 +335,7 @@ 95.189 } 95.190 95.191 @Override 95.192 - public @Nullable QName getResPayloadName() { 95.193 + public @Nullable QName getResponsePayloadName() { 95.194 if (emptyResponsePayload) 95.195 return null; 95.196 95.197 @@ -367,8 +348,8 @@ 95.198 return responsePayloadName; 95.199 }else{ 95.200 QName outMsgName = operation.getOutput().getMessage().getName(); 95.201 - WSDLMessageImpl message = messages.get(outMsgName); 95.202 - for(WSDLPartImpl part:message.parts()){ 95.203 + EditableWSDLMessage message = messages.get(outMsgName); 95.204 + for(EditableWSDLPart part:message.parts()){ 95.205 ParameterBinding binding = getOutputBinding(part.getName()); 95.206 if(binding.isBody()){ 95.207 responsePayloadName = part.getDescriptor().name(); 95.208 @@ -402,7 +383,6 @@ 95.209 reqNamespace = ns; 95.210 } 95.211 95.212 - 95.213 /** 95.214 * For rpclit gives namespace value on soapbinding:body@namespace 95.215 * 95.216 @@ -418,7 +398,7 @@ 95.217 respNamespace = ns; 95.218 } 95.219 95.220 - WSDLBoundPortTypeImpl getOwner(){ 95.221 + EditableWSDLBoundPortType getOwner(){ 95.222 return owner; 95.223 } 95.224 95.225 @@ -426,12 +406,12 @@ 95.226 private QName responsePayloadName; 95.227 private boolean emptyRequestPayload; 95.228 private boolean emptyResponsePayload; 95.229 - private Map<QName, WSDLMessageImpl> messages; 95.230 + private Map<QName, ? extends EditableWSDLMessage> messages; 95.231 95.232 - void freeze(WSDLModelImpl parent) { 95.233 + public void freeze(EditableWSDLModel parent) { 95.234 messages = parent.getMessages(); 95.235 operation = owner.getPortType().get(name.getLocalPart()); 95.236 - for(WSDLBoundFaultImpl bf : wsdlBoundFaults){ 95.237 + for(EditableWSDLBoundFault bf : wsdlBoundFaults){ 95.238 bf.freeze(this); 95.239 } 95.240 }
96.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java Thu Oct 10 10:09:16 2013 -0700 96.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java Fri Oct 11 00:07:42 2013 -0700 96.3 @@ -1,5 +1,5 @@ 96.4 /* 96.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 96.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 96.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 96.8 * 96.9 * This code is free software; you can redistribute it and/or modify it 96.10 @@ -31,6 +31,10 @@ 96.11 import com.sun.xml.internal.ws.api.model.ParameterBinding; 96.12 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 96.13 import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; 96.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 96.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 96.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 96.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 96.18 import com.sun.xml.internal.ws.resources.ClientMessages; 96.19 import com.sun.xml.internal.ws.util.QNameMap; 96.20 import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException; 96.21 @@ -47,26 +51,26 @@ 96.22 * 96.23 * @author Vivek Pandey 96.24 */ 96.25 -public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements WSDLBoundPortType { 96.26 +public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements EditableWSDLBoundPortType { 96.27 private final QName name; 96.28 private final QName portTypeName; 96.29 - private WSDLPortTypeImpl portType; 96.30 + private EditableWSDLPortType portType; 96.31 private BindingID bindingId; 96.32 - private final @NotNull WSDLModelImpl owner; 96.33 - private final QNameMap<WSDLBoundOperationImpl> bindingOperations = new QNameMap<WSDLBoundOperationImpl>(); 96.34 + private final @NotNull EditableWSDLModel owner; 96.35 + private final QNameMap<EditableWSDLBoundOperation> bindingOperations = new QNameMap<EditableWSDLBoundOperation>(); 96.36 96.37 /** 96.38 * Operations keyed by the payload tag name. 96.39 */ 96.40 - private QNameMap<WSDLBoundOperationImpl> payloadMap; 96.41 + private QNameMap<EditableWSDLBoundOperation> payloadMap; 96.42 /** 96.43 * {@link #payloadMap} doesn't allow null key, so we store the value for it here. 96.44 */ 96.45 - private WSDLBoundOperationImpl emptyPayloadOperation; 96.46 + private EditableWSDLBoundOperation emptyPayloadOperation; 96.47 96.48 96.49 96.50 - public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull WSDLModelImpl owner, QName name, QName portTypeName) { 96.51 + public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull EditableWSDLModel owner, QName name, QName portTypeName) { 96.52 super(xsr); 96.53 this.owner = owner; 96.54 this.name = name; 96.55 @@ -78,11 +82,11 @@ 96.56 return name; 96.57 } 96.58 96.59 - public @NotNull WSDLModelImpl getOwner() { 96.60 + public @NotNull EditableWSDLModel getOwner() { 96.61 return owner; 96.62 } 96.63 96.64 - public WSDLBoundOperationImpl get(QName operationName) { 96.65 + public EditableWSDLBoundOperation get(QName operationName) { 96.66 return bindingOperations.get(operationName); 96.67 } 96.68 96.69 @@ -93,7 +97,7 @@ 96.70 * @param ptOp Must be non-null 96.71 * @throws NullPointerException if either opName or ptOp is null 96.72 */ 96.73 - public void put(QName opName, WSDLBoundOperationImpl ptOp) { 96.74 + public void put(QName opName, EditableWSDLBoundOperation ptOp) { 96.75 bindingOperations.put(opName,ptOp); 96.76 } 96.77 96.78 @@ -101,11 +105,11 @@ 96.79 return portTypeName; 96.80 } 96.81 96.82 - public WSDLPortTypeImpl getPortType() { 96.83 + public EditableWSDLPortType getPortType() { 96.84 return portType; 96.85 } 96.86 96.87 - public Iterable<WSDLBoundOperationImpl> getBindingOperations() { 96.88 + public Iterable<EditableWSDLBoundOperation> getBindingOperations() { 96.89 return bindingOperations.values(); 96.90 } 96.91 96.92 @@ -149,7 +153,7 @@ 96.93 * @return null if the binding could not be resolved for the part. 96.94 */ 96.95 public ParameterBinding getBinding(QName operation, String part, Mode mode) { 96.96 - WSDLBoundOperationImpl op = get(operation); 96.97 + EditableWSDLBoundOperation op = get(operation); 96.98 if (op == null) { 96.99 //TODO throw exception 96.100 return null; 96.101 @@ -160,23 +164,7 @@ 96.102 return op.getOutputBinding(part); 96.103 } 96.104 96.105 - /** 96.106 - * Gets mime:content@part value which is the MIME type for a given operation, part and {@link Mode}. 96.107 - * 96.108 - * @param operation wsdl:operation@name value. Must be non-null. 96.109 - * @param part wsdl:part@name such as value of soap:header@part. Must be non-null. 96.110 - * @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null. 96.111 - * @return null if the binding could not be resolved for the part. 96.112 - */ 96.113 - public String getMimeType(QName operation, String part, Mode mode) { 96.114 - WSDLBoundOperationImpl op = get(operation); 96.115 - if (Mode.IN == mode) 96.116 - return op.getMimeTypeForInputPart(part); 96.117 - else 96.118 - return op.getMimeTypeForOutputPart(part); 96.119 - } 96.120 - 96.121 - public WSDLBoundOperationImpl getOperation(String namespaceUri, String localName) { 96.122 + public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName) { 96.123 if(namespaceUri==null && localName == null) 96.124 return emptyPayloadOperation; 96.125 else{ 96.126 @@ -184,19 +172,7 @@ 96.127 } 96.128 } 96.129 96.130 - public void enableMTOM() { 96.131 - features.add(new MTOMFeature()); 96.132 - } 96.133 - 96.134 - public boolean isMTOMEnabled() { 96.135 - return features.isEnabled(MTOMFeature.class); 96.136 - } 96.137 - 96.138 - public SOAPVersion getSOAPVersion(){ 96.139 - return getBindingId().getSOAPVersion(); 96.140 - } 96.141 - 96.142 - void freeze() { 96.143 + public void freeze() { 96.144 portType = owner.getPortType(portTypeName); 96.145 if(portType == null){ 96.146 throw new LocatableWebServiceException( 96.147 @@ -204,7 +180,7 @@ 96.148 } 96.149 portType.freeze(); 96.150 96.151 - for (WSDLBoundOperationImpl op : bindingOperations.values()) { 96.152 + for (EditableWSDLBoundOperation op : bindingOperations.values()) { 96.153 op.freeze(owner); 96.154 } 96.155 96.156 @@ -214,15 +190,15 @@ 96.157 96.158 private void freezePayloadMap() { 96.159 if(style== Style.RPC) { 96.160 - payloadMap = new QNameMap<WSDLBoundOperationImpl>(); 96.161 - for(WSDLBoundOperationImpl op : bindingOperations.values()){ 96.162 - payloadMap.put(op.getReqPayloadName(), op); 96.163 + payloadMap = new QNameMap<EditableWSDLBoundOperation>(); 96.164 + for(EditableWSDLBoundOperation op : bindingOperations.values()){ 96.165 + payloadMap.put(op.getRequestPayloadName(), op); 96.166 } 96.167 } else { 96.168 - payloadMap = new QNameMap<WSDLBoundOperationImpl>(); 96.169 + payloadMap = new QNameMap<EditableWSDLBoundOperation>(); 96.170 // For doclit The tag will be the operation that has the same input part descriptor value 96.171 - for(WSDLBoundOperationImpl op : bindingOperations.values()){ 96.172 - QName name = op.getReqPayloadName(); 96.173 + for(EditableWSDLBoundOperation op : bindingOperations.values()){ 96.174 + QName name = op.getRequestPayloadName(); 96.175 if(name == null){ 96.176 //empty payload 96.177 emptyPayloadOperation = op;
97.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java Thu Oct 10 10:09:16 2013 -0700 97.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java Fri Oct 11 00:07:42 2013 -0700 97.3 @@ -1,5 +1,5 @@ 97.4 /* 97.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 97.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 97.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 97.8 * 97.9 * This code is free software; you can redistribute it and/or modify it 97.10 @@ -25,8 +25,10 @@ 97.11 97.12 package com.sun.xml.internal.ws.model.wsdl; 97.13 97.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault; 97.15 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 97.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault; 97.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 97.18 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 97.19 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 97.20 import com.sun.istack.internal.NotNull; 97.21 97.22 import javax.xml.namespace.QName; 97.23 @@ -35,15 +37,15 @@ 97.24 /** 97.25 * @author Vivek Pandey 97.26 */ 97.27 -public final class WSDLFaultImpl extends AbstractExtensibleImpl implements WSDLFault { 97.28 +public final class WSDLFaultImpl extends AbstractExtensibleImpl implements EditableWSDLFault { 97.29 private final String name; 97.30 private final QName messageName; 97.31 - private WSDLMessageImpl message; 97.32 - private WSDLOperationImpl operation; 97.33 + private EditableWSDLMessage message; 97.34 + private EditableWSDLOperation operation; 97.35 private String action = ""; 97.36 private boolean defaultAction = true; 97.37 97.38 - public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, WSDLOperationImpl operation) { 97.39 + public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, EditableWSDLOperation operation) { 97.40 super(xsr); 97.41 this.name = name; 97.42 this.messageName = messageName; 97.43 @@ -54,12 +56,12 @@ 97.44 return name; 97.45 } 97.46 97.47 - public WSDLMessageImpl getMessage() { 97.48 + public EditableWSDLMessage getMessage() { 97.49 return message; 97.50 } 97.51 97.52 @NotNull 97.53 - public WSDLOperation getOperation() { 97.54 + public EditableWSDLOperation getOperation() { 97.55 return operation; 97.56 } 97.57 97.58 @@ -72,6 +74,7 @@ 97.59 public String getAction() { 97.60 return action; 97.61 } 97.62 + 97.63 public void setAction(String action) { 97.64 this.action = action; 97.65 } 97.66 @@ -84,7 +87,7 @@ 97.67 this.defaultAction = defaultAction; 97.68 } 97.69 97.70 - void freeze(WSDLModelImpl root){ 97.71 + public void freeze(EditableWSDLModel root){ 97.72 message = root.getMessage(messageName); 97.73 } 97.74 }
98.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java Thu Oct 10 10:09:16 2013 -0700 98.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java Fri Oct 11 00:07:42 2013 -0700 98.3 @@ -1,5 +1,5 @@ 98.4 /* 98.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 98.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 98.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 98.8 * 98.9 * This code is free software; you can redistribute it and/or modify it 98.10 @@ -25,11 +25,11 @@ 98.11 98.12 package com.sun.xml.internal.ws.model.wsdl; 98.13 98.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput; 98.15 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage; 98.16 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 98.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput; 98.18 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 98.19 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 98.20 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 98.21 import com.sun.istack.internal.NotNull; 98.22 -import com.sun.istack.internal.Nullable; 98.23 98.24 import javax.xml.namespace.QName; 98.25 import javax.xml.stream.XMLStreamReader; 98.26 @@ -37,15 +37,15 @@ 98.27 /** 98.28 * @author Vivek Pandey 98.29 */ 98.30 -public final class WSDLInputImpl extends AbstractExtensibleImpl implements WSDLInput { 98.31 +public final class WSDLInputImpl extends AbstractExtensibleImpl implements EditableWSDLInput { 98.32 private String name; 98.33 private QName messageName; 98.34 - private WSDLOperationImpl operation; 98.35 - private WSDLMessageImpl message; 98.36 + private EditableWSDLOperation operation; 98.37 + private EditableWSDLMessage message; 98.38 private String action; 98.39 private boolean defaultAction = true; 98.40 98.41 - public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, WSDLOperationImpl operation) { 98.42 + public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) { 98.43 super(xsr); 98.44 this.name = name; 98.45 this.messageName = messageName; 98.46 @@ -59,7 +59,7 @@ 98.47 return (operation.isOneWay())?operation.getName().getLocalPart():operation.getName().getLocalPart()+"Request"; 98.48 } 98.49 98.50 - public WSDLMessage getMessage() { 98.51 + public EditableWSDLMessage getMessage() { 98.52 return message; 98.53 } 98.54 98.55 @@ -68,7 +68,7 @@ 98.56 } 98.57 98.58 @NotNull 98.59 - public WSDLOperation getOperation() { 98.60 + public EditableWSDLOperation getOperation() { 98.61 return operation; 98.62 } 98.63 98.64 @@ -88,7 +88,7 @@ 98.65 this.defaultAction = defaultAction; 98.66 } 98.67 98.68 - void freeze(WSDLModelImpl parent) { 98.69 + public void freeze(EditableWSDLModel parent) { 98.70 message = parent.getMessage(messageName); 98.71 } 98.72 }
99.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java Thu Oct 10 10:09:16 2013 -0700 99.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java Fri Oct 11 00:07:42 2013 -0700 99.3 @@ -1,5 +1,5 @@ 99.4 /* 99.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 99.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 99.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 99.8 * 99.9 * This code is free software; you can redistribute it and/or modify it 99.10 @@ -25,19 +25,21 @@ 99.11 99.12 package com.sun.xml.internal.ws.model.wsdl; 99.13 99.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage; 99.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 99.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart; 99.17 99.18 import javax.xml.namespace.QName; 99.19 import javax.xml.stream.XMLStreamReader; 99.20 + 99.21 import java.util.ArrayList; 99.22 99.23 /** 99.24 * Provides abstraction for wsdl:message 99.25 * @author Vivek Pandey 99.26 */ 99.27 -public final class WSDLMessageImpl extends AbstractExtensibleImpl implements WSDLMessage { 99.28 +public final class WSDLMessageImpl extends AbstractExtensibleImpl implements EditableWSDLMessage { 99.29 private final QName name; 99.30 - private final ArrayList<WSDLPartImpl> parts; 99.31 + private final ArrayList<EditableWSDLPart> parts; 99.32 99.33 /** 99.34 * @param name wsdl:message name attribute value 99.35 @@ -45,18 +47,18 @@ 99.36 public WSDLMessageImpl(XMLStreamReader xsr,QName name) { 99.37 super(xsr); 99.38 this.name = name; 99.39 - this.parts = new ArrayList<WSDLPartImpl>(); 99.40 + this.parts = new ArrayList<EditableWSDLPart>(); 99.41 } 99.42 99.43 public QName getName() { 99.44 return name; 99.45 } 99.46 99.47 - public void add(WSDLPartImpl part){ 99.48 + public void add(EditableWSDLPart part){ 99.49 parts.add(part); 99.50 } 99.51 99.52 - public Iterable<WSDLPartImpl> parts(){ 99.53 + public Iterable<EditableWSDLPart> parts(){ 99.54 return parts; 99.55 } 99.56 }
100.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java Thu Oct 10 10:09:16 2013 -0700 100.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java Fri Oct 11 00:07:42 2013 -0700 100.3 @@ -1,5 +1,5 @@ 100.4 /* 100.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 100.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 100.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 100.8 * 100.9 * This code is free software; you can redistribute it and/or modify it 100.10 @@ -27,21 +27,25 @@ 100.11 100.12 import com.sun.istack.internal.NotNull; 100.13 import com.sun.xml.internal.ws.api.model.ParameterBinding; 100.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; 100.15 import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage; 100.16 import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 100.17 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 100.18 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 100.19 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType; 100.20 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 100.21 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 100.22 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 100.23 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 100.24 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 100.25 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart; 100.26 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort; 100.27 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 100.28 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService; 100.29 import com.sun.xml.internal.ws.policy.PolicyMap; 100.30 100.31 import javax.jws.WebParam.Mode; 100.32 import javax.xml.namespace.QName; 100.33 -import java.net.URL; 100.34 + 100.35 import java.util.Collections; 100.36 import java.util.HashMap; 100.37 -import java.util.Iterator; 100.38 import java.util.LinkedHashMap; 100.39 import java.util.Map; 100.40 100.41 @@ -50,15 +54,15 @@ 100.42 * 100.43 * @author Vivek Pandey 100.44 */ 100.45 -public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLModel { 100.46 - private final Map<QName, WSDLMessageImpl> messages = new HashMap<QName, WSDLMessageImpl>(); 100.47 - private final Map<QName, WSDLPortTypeImpl> portTypes = new HashMap<QName, WSDLPortTypeImpl>(); 100.48 - private final Map<QName, WSDLBoundPortTypeImpl> bindings = new HashMap<QName, WSDLBoundPortTypeImpl>(); 100.49 - private final Map<QName, WSDLServiceImpl> services = new LinkedHashMap<QName, WSDLServiceImpl>(); 100.50 +public final class WSDLModelImpl extends AbstractExtensibleImpl implements EditableWSDLModel { 100.51 + private final Map<QName, EditableWSDLMessage> messages = new HashMap<QName, EditableWSDLMessage>(); 100.52 + private final Map<QName, EditableWSDLPortType> portTypes = new HashMap<QName, EditableWSDLPortType>(); 100.53 + private final Map<QName, EditableWSDLBoundPortType> bindings = new HashMap<QName, EditableWSDLBoundPortType>(); 100.54 + private final Map<QName, EditableWSDLService> services = new LinkedHashMap<QName, EditableWSDLService>(); 100.55 100.56 private PolicyMap policyMap; 100.57 - private final Map<QName,WSDLBoundPortType> unmBindings 100.58 - = Collections.<QName,WSDLBoundPortType>unmodifiableMap(bindings); 100.59 + private final Map<QName, EditableWSDLBoundPortType> unmBindings 100.60 + = Collections.<QName, EditableWSDLBoundPortType>unmodifiableMap(bindings); 100.61 100.62 100.63 public WSDLModelImpl(@NotNull String systemId) { 100.64 @@ -72,52 +76,52 @@ 100.65 super(null,-1); 100.66 } 100.67 100.68 - public void addMessage(WSDLMessageImpl msg){ 100.69 + public void addMessage(EditableWSDLMessage msg){ 100.70 messages.put(msg.getName(), msg); 100.71 } 100.72 100.73 - public WSDLMessageImpl getMessage(QName name){ 100.74 + public EditableWSDLMessage getMessage(QName name){ 100.75 return messages.get(name); 100.76 } 100.77 100.78 - public void addPortType(WSDLPortTypeImpl pt){ 100.79 + public void addPortType(EditableWSDLPortType pt){ 100.80 portTypes.put(pt.getName(), pt); 100.81 } 100.82 100.83 - public WSDLPortTypeImpl getPortType(QName name){ 100.84 + public EditableWSDLPortType getPortType(QName name){ 100.85 return portTypes.get(name); 100.86 } 100.87 100.88 - public void addBinding(WSDLBoundPortTypeImpl boundPortType){ 100.89 + public void addBinding(EditableWSDLBoundPortType boundPortType){ 100.90 assert !bindings.containsValue(boundPortType); 100.91 bindings.put(boundPortType.getName(), boundPortType); 100.92 } 100.93 100.94 - public WSDLBoundPortTypeImpl getBinding(QName name){ 100.95 + public EditableWSDLBoundPortType getBinding(QName name){ 100.96 return bindings.get(name); 100.97 } 100.98 100.99 - public void addService(WSDLServiceImpl svc){ 100.100 + public void addService(EditableWSDLService svc){ 100.101 services.put(svc.getName(), svc); 100.102 } 100.103 100.104 - public WSDLServiceImpl getService(QName name){ 100.105 + public EditableWSDLService getService(QName name){ 100.106 return services.get(name); 100.107 } 100.108 100.109 - public Map<QName, WSDLMessageImpl> getMessages() { 100.110 + public Map<QName, EditableWSDLMessage> getMessages() { 100.111 return messages; 100.112 } 100.113 100.114 - public @NotNull Map<QName, WSDLPortTypeImpl> getPortTypes() { 100.115 + public @NotNull Map<QName, EditableWSDLPortType> getPortTypes() { 100.116 return portTypes; 100.117 } 100.118 100.119 - public @NotNull Map<QName, WSDLBoundPortType> getBindings() { 100.120 + public @NotNull Map<QName, ? extends EditableWSDLBoundPortType> getBindings() { 100.121 return unmBindings; 100.122 } 100.123 100.124 - public @NotNull Map<QName, WSDLServiceImpl> getServices(){ 100.125 + public @NotNull Map<QName, EditableWSDLService> getServices(){ 100.126 return services; 100.127 } 100.128 100.129 @@ -131,50 +135,23 @@ 100.130 } 100.131 100.132 /** 100.133 - * Returns first port QName from first service as per the insertion order 100.134 - */ 100.135 - public QName getFirstPortName(){ 100.136 - WSDLPort fp = getFirstPort(); 100.137 - if(fp==null) 100.138 - return null; 100.139 - else 100.140 - return fp.getName(); 100.141 - } 100.142 - 100.143 - private WSDLPort getFirstPort(){ 100.144 - if(services.isEmpty()) 100.145 - return null; 100.146 - WSDLService service = services.values().iterator().next(); 100.147 - Iterator<? extends WSDLPort> iter = service.getPorts().iterator(); 100.148 - WSDLPort port = iter.hasNext()?iter.next():null; 100.149 - return port; 100.150 - } 100.151 - 100.152 - /** 100.153 - * gets the first port in the wsdl which matches the serviceName and portType 100.154 - */ 100.155 - public WSDLPortImpl getMatchingPort(QName serviceName, QName portType){ 100.156 - return getService(serviceName).getMatchingPort(portType); 100.157 - } 100.158 - 100.159 - /** 100.160 * 100.161 * @param serviceName non-null service QName 100.162 * @param portName non-null port QName 100.163 * @return 100.164 * WSDLBoundOperation on success otherwise null. throws NPE if any of the parameters null 100.165 */ 100.166 - public WSDLBoundPortTypeImpl getBinding(QName serviceName, QName portName){ 100.167 - WSDLServiceImpl service = services.get(serviceName); 100.168 + public EditableWSDLBoundPortType getBinding(QName serviceName, QName portName){ 100.169 + EditableWSDLService service = services.get(serviceName); 100.170 if(service != null){ 100.171 - WSDLPortImpl port = service.get(portName); 100.172 + EditableWSDLPort port = service.get(portName); 100.173 if(port != null) 100.174 return port.getBinding(); 100.175 } 100.176 return null; 100.177 } 100.178 100.179 - void finalizeRpcLitBinding(WSDLBoundPortTypeImpl boundPortType){ 100.180 + public void finalizeRpcLitBinding(EditableWSDLBoundPortType boundPortType){ 100.181 assert(boundPortType != null); 100.182 QName portTypeName = boundPortType.getPortTypeName(); 100.183 if(portTypeName == null) 100.184 @@ -182,15 +159,15 @@ 100.185 WSDLPortType pt = portTypes.get(portTypeName); 100.186 if(pt == null) 100.187 return; 100.188 - for (WSDLBoundOperationImpl bop : boundPortType.getBindingOperations()) { 100.189 + for (EditableWSDLBoundOperation bop : boundPortType.getBindingOperations()) { 100.190 WSDLOperation pto = pt.get(bop.getName().getLocalPart()); 100.191 WSDLMessage inMsgName = pto.getInput().getMessage(); 100.192 if(inMsgName == null) 100.193 continue; 100.194 - WSDLMessageImpl inMsg = messages.get(inMsgName.getName()); 100.195 + EditableWSDLMessage inMsg = messages.get(inMsgName.getName()); 100.196 int bodyindex = 0; 100.197 if(inMsg != null){ 100.198 - for(WSDLPartImpl part:inMsg.parts()){ 100.199 + for(EditableWSDLPart part:inMsg.parts()){ 100.200 String name = part.getName(); 100.201 ParameterBinding pb = bop.getInputBinding(name); 100.202 if(pb.isBody()){ 100.203 @@ -206,9 +183,9 @@ 100.204 WSDLMessage outMsgName = pto.getOutput().getMessage(); 100.205 if(outMsgName == null) 100.206 continue; 100.207 - WSDLMessageImpl outMsg = messages.get(outMsgName.getName()); 100.208 + EditableWSDLMessage outMsg = messages.get(outMsgName.getName()); 100.209 if(outMsg!= null){ 100.210 - for(WSDLPartImpl part:outMsg.parts()){ 100.211 + for(EditableWSDLPart part:outMsg.parts()){ 100.212 String name = part.getName(); 100.213 ParameterBinding pb = bop.getOutputBinding(name); 100.214 if(pb.isBody()){ 100.215 @@ -242,14 +219,14 @@ 100.216 * Invoked at the end of the model construction to fix up references, etc. 100.217 */ 100.218 public void freeze() { 100.219 - for (WSDLServiceImpl service : services.values()) { 100.220 + for (EditableWSDLService service : services.values()) { 100.221 service.freeze(this); 100.222 } 100.223 - for (WSDLBoundPortTypeImpl bp : bindings.values()) { 100.224 + for (EditableWSDLBoundPortType bp : bindings.values()) { 100.225 bp.freeze(); 100.226 } 100.227 // Enforce freeze all the portTypes referenced by this endpoints, see Bug8966673 for detail 100.228 - for (WSDLPortTypeImpl pt : portTypes.values()) { 100.229 + for (EditableWSDLPortType pt : portTypes.values()) { 100.230 pt.freeze(); 100.231 } 100.232 }
101.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java Thu Oct 10 10:09:16 2013 -0700 101.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java Fri Oct 11 00:07:42 2013 -0700 101.3 @@ -26,13 +26,20 @@ 101.4 package com.sun.xml.internal.ws.model.wsdl; 101.5 101.6 import com.sun.istack.internal.NotNull; 101.7 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault; 101.8 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 101.9 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType; 101.10 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault; 101.11 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput; 101.12 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 101.13 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 101.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 101.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput; 101.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart; 101.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 101.18 import com.sun.xml.internal.ws.util.QNameMap; 101.19 101.20 import javax.xml.namespace.QName; 101.21 import javax.xml.stream.XMLStreamReader; 101.22 + 101.23 import java.util.ArrayList; 101.24 import java.util.List; 101.25 101.26 @@ -41,21 +48,21 @@ 101.27 * 101.28 * @author Vivek Pandey 101.29 */ 101.30 -public final class WSDLOperationImpl extends AbstractExtensibleImpl implements WSDLOperation { 101.31 +public final class WSDLOperationImpl extends AbstractExtensibleImpl implements EditableWSDLOperation { 101.32 private final QName name; 101.33 private String parameterOrder; 101.34 - private WSDLInputImpl input; 101.35 - private WSDLOutputImpl output; 101.36 - private final List<WSDLFaultImpl> faults; 101.37 - private final QNameMap<WSDLFaultImpl> faultMap; 101.38 - protected Iterable<WSDLMessageImpl> messages; 101.39 - private final WSDLPortType owner; 101.40 + private EditableWSDLInput input; 101.41 + private EditableWSDLOutput output; 101.42 + private final List<EditableWSDLFault> faults; 101.43 + private final QNameMap<EditableWSDLFault> faultMap; 101.44 + protected Iterable<EditableWSDLMessage> messages; 101.45 + private final EditableWSDLPortType owner; 101.46 101.47 - public WSDLOperationImpl(XMLStreamReader xsr,WSDLPortTypeImpl owner, QName name) { 101.48 + public WSDLOperationImpl(XMLStreamReader xsr, EditableWSDLPortType owner, QName name) { 101.49 super(xsr); 101.50 this.name = name; 101.51 - this.faults = new ArrayList<WSDLFaultImpl>(); 101.52 - this.faultMap = new QNameMap<WSDLFaultImpl>(); 101.53 + this.faults = new ArrayList<EditableWSDLFault>(); 101.54 + this.faultMap = new QNameMap<EditableWSDLFault>(); 101.55 this.owner = owner; 101.56 } 101.57 101.58 @@ -71,15 +78,15 @@ 101.59 this.parameterOrder = parameterOrder; 101.60 } 101.61 101.62 - public WSDLInputImpl getInput() { 101.63 + public EditableWSDLInput getInput() { 101.64 return input; 101.65 } 101.66 101.67 - public void setInput(WSDLInputImpl input) { 101.68 + public void setInput(EditableWSDLInput input) { 101.69 this.input = input; 101.70 } 101.71 101.72 - public WSDLOutputImpl getOutput() { 101.73 + public EditableWSDLOutput getOutput() { 101.74 return output; 101.75 } 101.76 101.77 @@ -87,22 +94,22 @@ 101.78 return output == null; 101.79 } 101.80 101.81 - public void setOutput(WSDLOutputImpl output) { 101.82 + public void setOutput(EditableWSDLOutput output) { 101.83 this.output = output; 101.84 } 101.85 101.86 - public Iterable<WSDLFaultImpl> getFaults() { 101.87 + public Iterable<EditableWSDLFault> getFaults() { 101.88 return faults; 101.89 } 101.90 101.91 - public WSDLFault getFault(QName faultDetailName) { 101.92 - WSDLFaultImpl fault = faultMap.get(faultDetailName); 101.93 + public EditableWSDLFault getFault(QName faultDetailName) { 101.94 + EditableWSDLFault fault = faultMap.get(faultDetailName); 101.95 if(fault != null) 101.96 return fault; 101.97 101.98 - for(WSDLFaultImpl fi:faults){ 101.99 + for(EditableWSDLFault fi : faults){ 101.100 assert fi.getMessage().parts().iterator().hasNext(); 101.101 - WSDLPartImpl part = fi.getMessage().parts().iterator().next(); 101.102 + EditableWSDLPart part = fi.getMessage().parts().iterator().next(); 101.103 if(part.getDescriptor().name().equals(faultDetailName)){ 101.104 faultMap.put(faultDetailName, fi); 101.105 return fi; 101.106 @@ -111,25 +118,21 @@ 101.107 return null; 101.108 } 101.109 101.110 - WSDLPortType getOwner() { 101.111 - return owner; 101.112 - } 101.113 - 101.114 @NotNull 101.115 public QName getPortTypeName() { 101.116 return owner.getName(); 101.117 } 101.118 101.119 - public void addFault(WSDLFaultImpl fault) { 101.120 + public void addFault(EditableWSDLFault fault) { 101.121 faults.add(fault); 101.122 } 101.123 101.124 - public void freez(WSDLModelImpl root) { 101.125 + public void freeze(EditableWSDLModel root) { 101.126 assert input != null; 101.127 input.freeze(root); 101.128 if(output != null) 101.129 output.freeze(root); 101.130 - for(WSDLFaultImpl fault : faults){ 101.131 + for(EditableWSDLFault fault : faults){ 101.132 fault.freeze(root); 101.133 } 101.134 }
102.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java Thu Oct 10 10:09:16 2013 -0700 102.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java Fri Oct 11 00:07:42 2013 -0700 102.3 @@ -1,5 +1,5 @@ 102.4 /* 102.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 102.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 102.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 102.8 * 102.9 * This code is free software; you can redistribute it and/or modify it 102.10 @@ -25,9 +25,10 @@ 102.11 102.12 package com.sun.xml.internal.ws.model.wsdl; 102.13 102.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage; 102.15 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput; 102.16 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 102.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 102.18 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 102.19 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 102.20 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput; 102.21 import com.sun.istack.internal.NotNull; 102.22 102.23 import javax.xml.namespace.QName; 102.24 @@ -36,14 +37,15 @@ 102.25 /** 102.26 * @author Vivek Pandey 102.27 */ 102.28 -public final class WSDLOutputImpl extends AbstractExtensibleImpl implements WSDLOutput { 102.29 +public final class WSDLOutputImpl extends AbstractExtensibleImpl implements EditableWSDLOutput { 102.30 private String name; 102.31 private QName messageName; 102.32 - private WSDLOperationImpl operation; 102.33 - private WSDLMessageImpl message; 102.34 + private EditableWSDLOperation operation; 102.35 + private EditableWSDLMessage message; 102.36 private String action; 102.37 private boolean defaultAction = true; 102.38 - public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, WSDLOperationImpl operation) { 102.39 + 102.40 + public WSDLOutputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) { 102.41 super(xsr); 102.42 this.name = name; 102.43 this.messageName = messageName; 102.44 @@ -54,7 +56,7 @@ 102.45 return (name == null)?operation.getName().getLocalPart()+"Response":name; 102.46 } 102.47 102.48 - public WSDLMessage getMessage() { 102.49 + public EditableWSDLMessage getMessage() { 102.50 return message; 102.51 } 102.52 102.53 @@ -71,7 +73,7 @@ 102.54 } 102.55 102.56 @NotNull 102.57 - public WSDLOperation getOperation() { 102.58 + public EditableWSDLOperation getOperation() { 102.59 return operation; 102.60 } 102.61 102.62 @@ -84,7 +86,7 @@ 102.63 this.action = action; 102.64 } 102.65 102.66 - void freeze(WSDLModelImpl root) { 102.67 + public void freeze(EditableWSDLModel root) { 102.68 message = root.getMessage(messageName); 102.69 } 102.70 }
103.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java Thu Oct 10 10:09:16 2013 -0700 103.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java Fri Oct 11 00:07:42 2013 -0700 103.3 @@ -1,5 +1,5 @@ 103.4 /* 103.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 103.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 103.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 103.8 * 103.9 * This code is free software; you can redistribute it and/or modify it 103.10 @@ -28,6 +28,7 @@ 103.11 import com.sun.xml.internal.ws.api.model.ParameterBinding; 103.12 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart; 103.13 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPartDescriptor; 103.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart; 103.15 103.16 import javax.xml.stream.XMLStreamReader; 103.17 103.18 @@ -36,7 +37,7 @@ 103.19 * 103.20 * @author Vivek Pandey 103.21 */ 103.22 -public final class WSDLPartImpl extends AbstractObjectImpl implements WSDLPart { 103.23 +public final class WSDLPartImpl extends AbstractObjectImpl implements EditableWSDLPart { 103.24 private final String name; 103.25 private ParameterBinding binding; 103.26 private int index; 103.27 @@ -72,10 +73,6 @@ 103.28 this.index = index; 103.29 } 103.30 103.31 - boolean isBody(){ 103.32 - return binding.isBody(); 103.33 - } 103.34 - 103.35 public WSDLPartDescriptor getDescriptor() { 103.36 return descriptor; 103.37 }
104.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java Thu Oct 10 10:09:16 2013 -0700 104.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java Fri Oct 11 00:07:42 2013 -0700 104.3 @@ -1,5 +1,5 @@ 104.4 /* 104.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 104.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 104.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 104.8 * 104.9 * This code is free software; you can redistribute it and/or modify it 104.10 @@ -25,10 +25,16 @@ 104.11 104.12 package com.sun.xml.internal.ws.model.wsdl; 104.13 104.14 +import java.util.List; 104.15 + 104.16 import com.sun.xml.internal.ws.api.EndpointAddress; 104.17 import com.sun.xml.internal.ws.api.SOAPVersion; 104.18 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; 104.19 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 104.20 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 104.21 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 104.22 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort; 104.23 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService; 104.24 import com.sun.xml.internal.ws.resources.ClientMessages; 104.25 import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException; 104.26 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; 104.27 @@ -44,19 +50,19 @@ 104.28 * 104.29 * @author Vivek Pandey 104.30 */ 104.31 -public final class WSDLPortImpl extends AbstractFeaturedObjectImpl implements WSDLPort { 104.32 +public final class WSDLPortImpl extends AbstractFeaturedObjectImpl implements EditableWSDLPort { 104.33 private final QName name; 104.34 private EndpointAddress address; 104.35 private final QName bindingName; 104.36 - private final WSDLServiceImpl owner; 104.37 + private final EditableWSDLService owner; 104.38 private WSEndpointReference epr; 104.39 104.40 /** 104.41 * To be set after the WSDL parsing is complete. 104.42 */ 104.43 - private WSDLBoundPortTypeImpl boundPortType; 104.44 + private EditableWSDLBoundPortType boundPortType; 104.45 104.46 - public WSDLPortImpl(XMLStreamReader xsr,WSDLServiceImpl owner, QName name, QName binding) { 104.47 + public WSDLPortImpl(XMLStreamReader xsr, EditableWSDLService owner, QName name, QName binding) { 104.48 super(xsr); 104.49 this.owner = owner; 104.50 this.name = name; 104.51 @@ -75,7 +81,7 @@ 104.52 return address; 104.53 } 104.54 104.55 - public WSDLServiceImpl getOwner() { 104.56 + public EditableWSDLService getOwner() { 104.57 return owner; 104.58 } 104.59 104.60 @@ -99,15 +105,13 @@ 104.61 public @Nullable WSEndpointReference getEPR() { 104.62 return epr; 104.63 } 104.64 - public WSDLBoundPortTypeImpl getBinding() { 104.65 + 104.66 + public EditableWSDLBoundPortType getBinding() { 104.67 return boundPortType; 104.68 } 104.69 104.70 - public SOAPVersion getSOAPVersion(){ 104.71 - return boundPortType.getSOAPVersion(); 104.72 - } 104.73 - 104.74 - void freeze(WSDLModelImpl root) { 104.75 + @SuppressWarnings("unchecked") 104.76 + public void freeze(EditableWSDLModel root) { 104.77 boundPortType = root.getBinding(bindingName); 104.78 if(boundPortType==null) { 104.79 throw new LocatableWebServiceException( 104.80 @@ -116,6 +120,6 @@ 104.81 if(features == null) 104.82 features = new WebServiceFeatureList(); 104.83 features.setParentFeaturedObject(boundPortType); 104.84 - notUnderstoodExtensions.addAll(boundPortType.notUnderstoodExtensions); 104.85 + notUnderstoodExtensions.addAll((List<UnknownWSDLExtension>)boundPortType.getNotUnderstoodExtensions()); 104.86 } 104.87 }
105.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java Thu Oct 10 10:09:16 2013 -0700 105.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java Fri Oct 11 00:07:42 2013 -0700 105.3 @@ -1,5 +1,5 @@ 105.4 /* 105.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 105.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 105.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 105.8 * 105.9 * This code is free software; you can redistribute it and/or modify it 105.10 @@ -27,9 +27,13 @@ 105.11 105.12 import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 105.13 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType; 105.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 105.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 105.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 105.17 105.18 import javax.xml.namespace.QName; 105.19 import javax.xml.stream.XMLStreamReader; 105.20 + 105.21 import java.util.Hashtable; 105.22 import java.util.Map; 105.23 105.24 @@ -38,27 +42,27 @@ 105.25 * 105.26 * @author Vivek Pandey 105.27 */ 105.28 -public final class WSDLPortTypeImpl extends AbstractExtensibleImpl implements WSDLPortType { 105.29 +public final class WSDLPortTypeImpl extends AbstractExtensibleImpl implements EditableWSDLPortType { 105.30 private QName name; 105.31 - private final Map<String, WSDLOperationImpl> portTypeOperations; 105.32 - private WSDLModelImpl owner; 105.33 + private final Map<String, EditableWSDLOperation> portTypeOperations; 105.34 + private EditableWSDLModel owner; 105.35 105.36 - public WSDLPortTypeImpl(XMLStreamReader xsr,WSDLModelImpl owner, QName name) { 105.37 + public WSDLPortTypeImpl(XMLStreamReader xsr, EditableWSDLModel owner, QName name) { 105.38 super(xsr); 105.39 this.name = name; 105.40 this.owner = owner; 105.41 - portTypeOperations = new Hashtable<String, WSDLOperationImpl>(); 105.42 + portTypeOperations = new Hashtable<String, EditableWSDLOperation>(); 105.43 } 105.44 105.45 public QName getName() { 105.46 return name; 105.47 } 105.48 105.49 - public WSDLOperationImpl get(String operationName) { 105.50 + public EditableWSDLOperation get(String operationName) { 105.51 return portTypeOperations.get(operationName); 105.52 } 105.53 105.54 - public Iterable<WSDLOperationImpl> getOperations() { 105.55 + public Iterable<EditableWSDLOperation> getOperations() { 105.56 return portTypeOperations.values(); 105.57 } 105.58 105.59 @@ -68,17 +72,17 @@ 105.60 * @param ptOp Must be non-null 105.61 * @throws NullPointerException if either opName or ptOp is null 105.62 */ 105.63 - public void put(String opName, WSDLOperationImpl ptOp){ 105.64 + public void put(String opName, EditableWSDLOperation ptOp){ 105.65 portTypeOperations.put(opName, ptOp); 105.66 } 105.67 105.68 - WSDLModelImpl getOwner(){ 105.69 + EditableWSDLModel getOwner(){ 105.70 return owner; 105.71 } 105.72 105.73 - void freeze() { 105.74 - for(WSDLOperationImpl op : portTypeOperations.values()){ 105.75 - op.freez(owner); 105.76 + public void freeze() { 105.77 + for(EditableWSDLOperation op : portTypeOperations.values()){ 105.78 + op.freeze(owner); 105.79 } 105.80 } 105.81 }
106.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java Thu Oct 10 10:09:16 2013 -0700 106.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java Fri Oct 11 00:07:42 2013 -0700 106.3 @@ -1,5 +1,5 @@ 106.4 /* 106.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 106.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 106.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 106.8 * 106.9 * This code is free software; you can redistribute it and/or modify it 106.10 @@ -26,7 +26,6 @@ 106.11 package com.sun.xml.internal.ws.model.wsdl; 106.12 106.13 import com.oracle.webservices.internal.api.message.BasePropertySet; 106.14 -import com.oracle.webservices.internal.api.message.PropertySet; 106.15 import com.sun.istack.internal.Nullable; 106.16 import com.sun.xml.internal.ws.api.model.SEIModel; 106.17 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
107.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java Thu Oct 10 10:09:16 2013 -0700 107.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java Fri Oct 11 00:07:42 2013 -0700 107.3 @@ -1,5 +1,5 @@ 107.4 /* 107.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 107.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 107.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 107.8 * 107.9 * This code is free software; you can redistribute it and/or modify it 107.10 @@ -29,9 +29,13 @@ 107.11 import com.sun.istack.internal.Nullable; 107.12 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 107.13 import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 107.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 107.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort; 107.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService; 107.17 107.18 import javax.xml.namespace.QName; 107.19 import javax.xml.stream.XMLStreamReader; 107.20 + 107.21 import java.util.LinkedHashMap; 107.22 import java.util.Map; 107.23 107.24 @@ -40,20 +44,20 @@ 107.25 * 107.26 * @author Vivek Pandey 107.27 */ 107.28 -public final class WSDLServiceImpl extends AbstractExtensibleImpl implements WSDLService { 107.29 +public final class WSDLServiceImpl extends AbstractExtensibleImpl implements EditableWSDLService { 107.30 private final QName name; 107.31 - private final Map<QName, WSDLPortImpl> ports; 107.32 - private final WSDLModelImpl parent; 107.33 + private final Map<QName, EditableWSDLPort> ports; 107.34 + private final EditableWSDLModel parent; 107.35 107.36 - public WSDLServiceImpl(XMLStreamReader xsr,WSDLModelImpl parent, QName name) { 107.37 + public WSDLServiceImpl(XMLStreamReader xsr, EditableWSDLModel parent, QName name) { 107.38 super(xsr); 107.39 this.parent = parent; 107.40 this.name = name; 107.41 - ports = new LinkedHashMap<QName,WSDLPortImpl>(); 107.42 + ports = new LinkedHashMap<QName, EditableWSDLPort>(); 107.43 } 107.44 107.45 public @NotNull 107.46 - WSDLModelImpl getParent() { 107.47 + EditableWSDLModel getParent() { 107.48 return parent; 107.49 } 107.50 107.51 @@ -61,18 +65,18 @@ 107.52 return name; 107.53 } 107.54 107.55 - public WSDLPortImpl get(QName portName) { 107.56 + public EditableWSDLPort get(QName portName) { 107.57 return ports.get(portName); 107.58 } 107.59 107.60 - public WSDLPort getFirstPort() { 107.61 + public EditableWSDLPort getFirstPort() { 107.62 if(ports.isEmpty()) 107.63 return null; 107.64 else 107.65 return ports.values().iterator().next(); 107.66 } 107.67 107.68 - public Iterable<WSDLPortImpl> getPorts(){ 107.69 + public Iterable<EditableWSDLPort> getPorts(){ 107.70 return ports.values(); 107.71 } 107.72 107.73 @@ -80,8 +84,8 @@ 107.74 * gets the first port in this service which matches the portType 107.75 */ 107.76 public @Nullable 107.77 - WSDLPortImpl getMatchingPort(QName portTypeName){ 107.78 - for(WSDLPortImpl port : getPorts()){ 107.79 + EditableWSDLPort getMatchingPort(QName portTypeName){ 107.80 + for(EditableWSDLPort port : getPorts()){ 107.81 QName ptName = port.getBinding().getPortTypeName(); 107.82 assert (ptName != null); 107.83 if(ptName.equals(portTypeName)) 107.84 @@ -97,14 +101,14 @@ 107.85 * @param port Must be non-null 107.86 * @throws NullPointerException if either opName or ptOp is null 107.87 */ 107.88 - public void put(QName portName, WSDLPortImpl port) { 107.89 + public void put(QName portName, EditableWSDLPort port) { 107.90 if (portName == null || port == null) 107.91 throw new NullPointerException(); 107.92 ports.put(portName, port); 107.93 } 107.94 107.95 - void freeze(WSDLModelImpl root) { 107.96 - for (WSDLPortImpl port : ports.values()) { 107.97 + public void freeze(EditableWSDLModel root) { 107.98 + for (EditableWSDLPort port : ports.values()) { 107.99 port.freeze(root); 107.100 } 107.101 }
108.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java Thu Oct 10 10:09:16 2013 -0700 108.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java Fri Oct 11 00:07:42 2013 -0700 108.3 @@ -25,7 +25,8 @@ 108.4 108.5 package com.sun.xml.internal.ws.policy.jaxws; 108.6 108.7 -import com.sun.xml.internal.ws.api.model.wsdl.*; 108.8 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject; 108.9 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 108.10 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; 108.11 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext; 108.12 import com.sun.xml.internal.ws.api.policy.PolicyResolver; 108.13 @@ -37,7 +38,6 @@ 108.14 import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModelContext; 108.15 import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion; 108.16 import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken; 108.17 -import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; 108.18 import com.sun.xml.internal.ws.policy.PolicyException; 108.19 import com.sun.xml.internal.ws.policy.PolicyMap; 108.20 import com.sun.xml.internal.ws.util.xml.XmlUtil; 108.21 @@ -54,12 +54,11 @@ 108.22 import java.util.HashMap; 108.23 import java.util.LinkedList; 108.24 import java.util.Map; 108.25 + 108.26 import javax.xml.namespace.QName; 108.27 import javax.xml.stream.XMLStreamException; 108.28 import javax.xml.stream.XMLStreamReader; 108.29 -import javax.xml.stream.XMLInputFactory; 108.30 import javax.xml.ws.WebServiceException; 108.31 -import javax.xml.xpath.XPathFactoryConfigurationException; 108.32 108.33 /** 108.34 * This class parses the Policy Attachments in the WSDL and creates a PolicyMap thaty captures the policies configured on 108.35 @@ -376,7 +375,7 @@ 108.36 } 108.37 108.38 @Override 108.39 - public boolean portElements(final WSDLPort port, final XMLStreamReader reader) { 108.40 + public boolean portElements(final EditableWSDLPort port, final XMLStreamReader reader) { 108.41 LOGGER.entering(); 108.42 final boolean result = processSubelement(port, reader, getHandlers4PortMap()); 108.43 LOGGER.exiting(); 108.44 @@ -384,14 +383,14 @@ 108.45 } 108.46 108.47 @Override 108.48 - public void portAttributes(final WSDLPort port, final XMLStreamReader reader) { 108.49 + public void portAttributes(final EditableWSDLPort port, final XMLStreamReader reader) { 108.50 LOGGER.entering(); 108.51 processAttributes(port, reader, getHandlers4PortMap()); 108.52 LOGGER.exiting(); 108.53 } 108.54 108.55 @Override 108.56 - public boolean serviceElements(final WSDLService service, final XMLStreamReader reader) { 108.57 + public boolean serviceElements(final EditableWSDLService service, final XMLStreamReader reader) { 108.58 LOGGER.entering(); 108.59 final boolean result = processSubelement(service, reader, getHandlers4ServiceMap()); 108.60 LOGGER.exiting(); 108.61 @@ -399,7 +398,7 @@ 108.62 } 108.63 108.64 @Override 108.65 - public void serviceAttributes(final WSDLService service, final XMLStreamReader reader) { 108.66 + public void serviceAttributes(final EditableWSDLService service, final XMLStreamReader reader) { 108.67 LOGGER.entering(); 108.68 processAttributes(service, reader, getHandlers4ServiceMap()); 108.69 LOGGER.exiting(); 108.70 @@ -424,7 +423,7 @@ 108.71 } 108.72 108.73 @Override 108.74 - public boolean bindingElements(final WSDLBoundPortType binding, final XMLStreamReader reader) { 108.75 + public boolean bindingElements(final EditableWSDLBoundPortType binding, final XMLStreamReader reader) { 108.76 LOGGER.entering(); 108.77 final boolean result = processSubelement(binding, reader, getHandlers4BindingMap()); 108.78 LOGGER.exiting(); 108.79 @@ -432,14 +431,14 @@ 108.80 } 108.81 108.82 @Override 108.83 - public void bindingAttributes(final WSDLBoundPortType binding, final XMLStreamReader reader) { 108.84 + public void bindingAttributes(final EditableWSDLBoundPortType binding, final XMLStreamReader reader) { 108.85 LOGGER.entering(); 108.86 processAttributes(binding, reader, getHandlers4BindingMap()); 108.87 LOGGER.exiting(); 108.88 } 108.89 108.90 @Override 108.91 - public boolean portTypeElements(final WSDLPortType portType, final XMLStreamReader reader) { 108.92 + public boolean portTypeElements(final EditableWSDLPortType portType, final XMLStreamReader reader) { 108.93 LOGGER.entering(); 108.94 final boolean result = processSubelement(portType, reader, getHandlers4PortTypeMap()); 108.95 LOGGER.exiting(); 108.96 @@ -447,14 +446,14 @@ 108.97 } 108.98 108.99 @Override 108.100 - public void portTypeAttributes(final WSDLPortType portType, final XMLStreamReader reader) { 108.101 + public void portTypeAttributes(final EditableWSDLPortType portType, final XMLStreamReader reader) { 108.102 LOGGER.entering(); 108.103 processAttributes(portType, reader, getHandlers4PortTypeMap()); 108.104 LOGGER.exiting(); 108.105 } 108.106 108.107 @Override 108.108 - public boolean portTypeOperationElements(final WSDLOperation operation, final XMLStreamReader reader) { 108.109 + public boolean portTypeOperationElements(final EditableWSDLOperation operation, final XMLStreamReader reader) { 108.110 LOGGER.entering(); 108.111 final boolean result = processSubelement(operation, reader, getHandlers4OperationMap()); 108.112 LOGGER.exiting(); 108.113 @@ -462,14 +461,14 @@ 108.114 } 108.115 108.116 @Override 108.117 - public void portTypeOperationAttributes(final WSDLOperation operation, final XMLStreamReader reader) { 108.118 + public void portTypeOperationAttributes(final EditableWSDLOperation operation, final XMLStreamReader reader) { 108.119 LOGGER.entering(); 108.120 processAttributes(operation, reader, getHandlers4OperationMap()); 108.121 LOGGER.exiting(); 108.122 } 108.123 108.124 @Override 108.125 - public boolean bindingOperationElements(final WSDLBoundOperation boundOperation, final XMLStreamReader reader) { 108.126 + public boolean bindingOperationElements(final EditableWSDLBoundOperation boundOperation, final XMLStreamReader reader) { 108.127 LOGGER.entering(); 108.128 final boolean result = processSubelement(boundOperation, reader, getHandlers4BoundOperationMap()); 108.129 LOGGER.exiting(); 108.130 @@ -477,14 +476,14 @@ 108.131 } 108.132 108.133 @Override 108.134 - public void bindingOperationAttributes(final WSDLBoundOperation boundOperation, final XMLStreamReader reader) { 108.135 + public void bindingOperationAttributes(final EditableWSDLBoundOperation boundOperation, final XMLStreamReader reader) { 108.136 LOGGER.entering(); 108.137 processAttributes(boundOperation, reader, getHandlers4BoundOperationMap()); 108.138 LOGGER.exiting(); 108.139 } 108.140 108.141 @Override 108.142 - public boolean messageElements(final WSDLMessage msg, final XMLStreamReader reader) { 108.143 + public boolean messageElements(final EditableWSDLMessage msg, final XMLStreamReader reader) { 108.144 LOGGER.entering(); 108.145 final boolean result = processSubelement(msg, reader, getHandlers4MessageMap()); 108.146 LOGGER.exiting(); 108.147 @@ -492,14 +491,14 @@ 108.148 } 108.149 108.150 @Override 108.151 - public void messageAttributes(final WSDLMessage msg, final XMLStreamReader reader) { 108.152 + public void messageAttributes(final EditableWSDLMessage msg, final XMLStreamReader reader) { 108.153 LOGGER.entering(); 108.154 processAttributes(msg, reader, getHandlers4MessageMap()); 108.155 LOGGER.exiting(); 108.156 } 108.157 108.158 @Override 108.159 - public boolean portTypeOperationInputElements(final WSDLInput input, final XMLStreamReader reader) { 108.160 + public boolean portTypeOperationInputElements(final EditableWSDLInput input, final XMLStreamReader reader) { 108.161 LOGGER.entering(); 108.162 final boolean result = processSubelement(input, reader, getHandlers4InputMap()); 108.163 LOGGER.exiting(); 108.164 @@ -507,7 +506,7 @@ 108.165 } 108.166 108.167 @Override 108.168 - public void portTypeOperationInputAttributes(final WSDLInput input, final XMLStreamReader reader) { 108.169 + public void portTypeOperationInputAttributes(final EditableWSDLInput input, final XMLStreamReader reader) { 108.170 LOGGER.entering(); 108.171 processAttributes(input, reader, getHandlers4InputMap()); 108.172 LOGGER.exiting(); 108.173 @@ -515,7 +514,7 @@ 108.174 108.175 108.176 @Override 108.177 - public boolean portTypeOperationOutputElements(final WSDLOutput output, final XMLStreamReader reader) { 108.178 + public boolean portTypeOperationOutputElements(final EditableWSDLOutput output, final XMLStreamReader reader) { 108.179 LOGGER.entering(); 108.180 final boolean result = processSubelement(output, reader, getHandlers4OutputMap()); 108.181 LOGGER.exiting(); 108.182 @@ -523,7 +522,7 @@ 108.183 } 108.184 108.185 @Override 108.186 - public void portTypeOperationOutputAttributes(final WSDLOutput output, final XMLStreamReader reader) { 108.187 + public void portTypeOperationOutputAttributes(final EditableWSDLOutput output, final XMLStreamReader reader) { 108.188 LOGGER.entering(); 108.189 processAttributes(output, reader, getHandlers4OutputMap()); 108.190 LOGGER.exiting(); 108.191 @@ -531,7 +530,7 @@ 108.192 108.193 108.194 @Override 108.195 - public boolean portTypeOperationFaultElements(final WSDLFault fault, final XMLStreamReader reader) { 108.196 + public boolean portTypeOperationFaultElements(final EditableWSDLFault fault, final XMLStreamReader reader) { 108.197 LOGGER.entering(); 108.198 final boolean result = processSubelement(fault, reader, getHandlers4FaultMap()); 108.199 LOGGER.exiting(); 108.200 @@ -539,14 +538,14 @@ 108.201 } 108.202 108.203 @Override 108.204 - public void portTypeOperationFaultAttributes(final WSDLFault fault, final XMLStreamReader reader) { 108.205 + public void portTypeOperationFaultAttributes(final EditableWSDLFault fault, final XMLStreamReader reader) { 108.206 LOGGER.entering(); 108.207 processAttributes(fault, reader, getHandlers4FaultMap()); 108.208 LOGGER.exiting(); 108.209 } 108.210 108.211 @Override 108.212 - public boolean bindingOperationInputElements(final WSDLBoundOperation operation, final XMLStreamReader reader) { 108.213 + public boolean bindingOperationInputElements(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) { 108.214 LOGGER.entering(); 108.215 final boolean result = processSubelement(operation, reader, getHandlers4BindingInputOpMap()); 108.216 LOGGER.exiting(); 108.217 @@ -554,7 +553,7 @@ 108.218 } 108.219 108.220 @Override 108.221 - public void bindingOperationInputAttributes(final WSDLBoundOperation operation, final XMLStreamReader reader) { 108.222 + public void bindingOperationInputAttributes(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) { 108.223 LOGGER.entering(); 108.224 processAttributes(operation, reader, getHandlers4BindingInputOpMap()); 108.225 LOGGER.exiting(); 108.226 @@ -562,7 +561,7 @@ 108.227 108.228 108.229 @Override 108.230 - public boolean bindingOperationOutputElements(final WSDLBoundOperation operation, final XMLStreamReader reader) { 108.231 + public boolean bindingOperationOutputElements(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) { 108.232 LOGGER.entering(); 108.233 final boolean result = processSubelement(operation, reader, getHandlers4BindingOutputOpMap()); 108.234 LOGGER.exiting(); 108.235 @@ -570,14 +569,14 @@ 108.236 } 108.237 108.238 @Override 108.239 - public void bindingOperationOutputAttributes(final WSDLBoundOperation operation, final XMLStreamReader reader) { 108.240 + public void bindingOperationOutputAttributes(final EditableWSDLBoundOperation operation, final XMLStreamReader reader) { 108.241 LOGGER.entering(); 108.242 processAttributes(operation, reader, getHandlers4BindingOutputOpMap()); 108.243 LOGGER.exiting(); 108.244 } 108.245 108.246 @Override 108.247 - public boolean bindingOperationFaultElements(final WSDLBoundFault fault, final XMLStreamReader reader) { 108.248 + public boolean bindingOperationFaultElements(final EditableWSDLBoundFault fault, final XMLStreamReader reader) { 108.249 LOGGER.entering(); 108.250 final boolean result = processSubelement(fault, reader, getHandlers4BindingFaultOpMap()); 108.251 LOGGER.exiting(result); 108.252 @@ -585,7 +584,7 @@ 108.253 } 108.254 108.255 @Override 108.256 - public void bindingOperationFaultAttributes(final WSDLBoundFault fault, final XMLStreamReader reader) { 108.257 + public void bindingOperationFaultAttributes(final EditableWSDLBoundFault fault, final XMLStreamReader reader) { 108.258 LOGGER.entering(); 108.259 processAttributes(fault, reader, getHandlers4BindingFaultOpMap()); 108.260 LOGGER.exiting(); 108.261 @@ -701,7 +700,7 @@ 108.262 // may otherwise be multiple entries for policies that are contained 108.263 // by fault messages. 108.264 HashSet<BuilderHandlerMessageScope> messageSet = new HashSet<BuilderHandlerMessageScope>(); 108.265 - for (WSDLService service : context.getWSDLModel().getServices().values()) { 108.266 + for (EditableWSDLService service : context.getWSDLModel().getServices().values()) { 108.267 if (getHandlers4ServiceMap().containsKey(service)) { 108.268 getPolicyMapBuilder().registerHandler(new BuilderHandlerServiceScope( 108.269 getPolicyURIs(getHandlers4ServiceMap().get(service),modelContext) 108.270 @@ -711,7 +710,7 @@ 108.271 } 108.272 // end service scope 108.273 108.274 - for (WSDLPort port : service.getPorts()) { 108.275 + for (EditableWSDLPort port : service.getPorts()) { 108.276 if (getHandlers4PortMap().containsKey(port)) { 108.277 getPolicyMapBuilder().registerHandler( 108.278 new BuilderHandlerEndpointScope( 108.279 @@ -747,9 +746,9 @@ 108.280 } // endif handler for port type 108.281 // end endpoint scope 108.282 108.283 - for (WSDLBoundOperation boundOperation : port.getBinding().getBindingOperations()) { 108.284 + for (EditableWSDLBoundOperation boundOperation : port.getBinding().getBindingOperations()) { 108.285 108.286 - final WSDLOperation operation = boundOperation.getOperation(); 108.287 + final EditableWSDLOperation operation = boundOperation.getOperation(); 108.288 final QName operationName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundOperation.getName().getLocalPart()); 108.289 // We store the message and portType/operation under the same namespace as the binding/operation so that we can match them up later 108.290 if ( // handler for operation scope -- by boundOperation 108.291 @@ -778,9 +777,9 @@ 108.292 } // endif for portType:operation scope 108.293 // end operation scope 108.294 108.295 - final WSDLInput input = operation.getInput(); 108.296 + final EditableWSDLInput input = operation.getInput(); 108.297 if (null!=input) { 108.298 - WSDLMessage inputMsg = input.getMessage(); 108.299 + EditableWSDLMessage inputMsg = input.getMessage(); 108.300 if (inputMsg != null && getHandlers4MessageMap().containsKey(inputMsg)) { 108.301 messageSet.add(new BuilderHandlerMessageScope( 108.302 getPolicyURIs( 108.303 @@ -825,9 +824,9 @@ 108.304 } // endif portType op input msg 108.305 // end input message scope 108.306 108.307 - final WSDLOutput output = operation.getOutput(); 108.308 + final EditableWSDLOutput output = operation.getOutput(); 108.309 if (null!=output) { 108.310 - WSDLMessage outputMsg = output.getMessage(); 108.311 + EditableWSDLMessage outputMsg = output.getMessage(); 108.312 if (outputMsg != null && getHandlers4MessageMap().containsKey(outputMsg)) { 108.313 messageSet.add(new BuilderHandlerMessageScope( 108.314 getPolicyURIs( 108.315 @@ -872,8 +871,8 @@ 108.316 } // endif portType op output msg 108.317 // end output message scope 108.318 108.319 - for (WSDLBoundFault boundFault : boundOperation.getFaults()) { 108.320 - final WSDLFault fault = boundFault.getFault(); 108.321 + for (EditableWSDLBoundFault boundFault : boundOperation.getFaults()) { 108.322 + final EditableWSDLFault fault = boundFault.getFault(); 108.323 108.324 // this shouldn't happen ususally, 108.325 // but since this scenario tested in lagacy tests, dont' fail here 108.326 @@ -882,7 +881,7 @@ 108.327 continue; 108.328 } 108.329 108.330 - final WSDLMessage faultMessage = fault.getMessage(); 108.331 + final EditableWSDLMessage faultMessage = fault.getMessage(); 108.332 final QName faultName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundFault.getName()); 108.333 // We store the message and portType/fault under the same namespace as the binding/fault so that we can match them up later 108.334 if (faultMessage != null && getHandlers4MessageMap().containsKey(faultMessage)) { 108.335 @@ -948,14 +947,14 @@ 108.336 @Override 108.337 public void postFinished(final WSDLParserExtensionContext context) { 108.338 // finally register the PolicyMap on the WSDLModel 108.339 - WSDLModel wsdlModel = context.getWSDLModel(); 108.340 + EditableWSDLModel wsdlModel = context.getWSDLModel(); 108.341 PolicyMap effectiveMap; 108.342 try { 108.343 if(context.isClientSide()) 108.344 effectiveMap = context.getPolicyResolver().resolve(new PolicyResolver.ClientContext(policyBuilder.getPolicyMap(),context.getContainer())); 108.345 else 108.346 effectiveMap = context.getPolicyResolver().resolve(new PolicyResolver.ServerContext(policyBuilder.getPolicyMap(), context.getContainer(),null)); 108.347 - ((WSDLModelImpl) wsdlModel).setPolicyMap(effectiveMap); 108.348 + wsdlModel.setPolicyMap(effectiveMap); 108.349 } catch (PolicyException e) { 108.350 LOGGER.logSevereException(e); 108.351 throw LOGGER.logSevereException(new WebServiceException(PolicyMessages.WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL(), e));
109.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java Thu Oct 10 10:09:16 2013 -0700 109.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java Fri Oct 11 00:07:42 2013 -0700 109.3 @@ -507,6 +507,20 @@ 109.4 return localizer.localize(localizableSERVLET_ERROR_NO_RESPONSE_MESSAGE()); 109.5 } 109.6 109.7 + public static Localizable localizableMESSAGE_TOO_LONG(Object arg0) { 109.8 + return messageFactory.getMessage("message.too.long", arg0); 109.9 + } 109.10 + 109.11 + /** 109.12 + * 109.13 + * Message has been truncated 109.14 + * use {0} property to increase the amount of printed part of the message 109.15 + * 109.16 + */ 109.17 + public static String MESSAGE_TOO_LONG(Object arg0) { 109.18 + return localizer.localize(localizableMESSAGE_TOO_LONG(arg0)); 109.19 + } 109.20 + 109.21 public static Localizable localizableLISTENER_INFO_INITIALIZE() { 109.22 return messageFactory.getMessage("listener.info.initialize"); 109.23 }
110.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties Thu Oct 10 10:09:16 2013 -0700 110.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties Fri Oct 11 00:07:42 2013 -0700 110.3 @@ -1,5 +1,5 @@ 110.4 # 110.5 -# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 110.6 +# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 110.7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 110.8 # 110.9 # This code is free software; you can redistribute it and/or modify it 110.10 @@ -243,3 +243,6 @@ 110.11 # Concatenated with html.rootPage.body3a 110.12 #html.rootPage.body3b='>here.</a></p> 110.13 html.rootPage.body4=<p>This endpoint is incorrectly configured. Please check the location and contents of the configuration file.</p> 110.14 + 110.15 +message.too.long=\nMessage has been truncated\n\ 110.16 +use {0} property to increase the amount of printed part of the message
111.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java Thu Oct 10 10:09:16 2013 -0700 111.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java Fri Oct 11 00:07:42 2013 -0700 111.3 @@ -36,7 +36,9 @@ 111.4 import com.sun.xml.internal.ws.api.databinding.MetadataReader; 111.5 import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; 111.6 import com.sun.xml.internal.ws.api.model.SEIModel; 111.7 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 111.8 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 111.9 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 111.10 import com.sun.xml.internal.ws.api.policy.PolicyResolver; 111.11 import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory; 111.12 import com.sun.xml.internal.ws.api.server.AsyncProvider; 111.13 @@ -59,9 +61,6 @@ 111.14 import com.sun.xml.internal.ws.model.ReflectAnnotationReader; 111.15 import com.sun.xml.internal.ws.model.RuntimeModeler; 111.16 import com.sun.xml.internal.ws.model.SOAPSEIModel; 111.17 -import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; 111.18 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 111.19 -import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl; 111.20 import com.sun.xml.internal.ws.policy.PolicyMap; 111.21 import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil; 111.22 import com.sun.xml.internal.ws.resources.ServerMessages; 111.23 @@ -73,6 +72,7 @@ 111.24 import com.sun.xml.internal.ws.util.ServiceFinder; 111.25 import com.sun.xml.internal.ws.util.xml.XmlUtil; 111.26 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; 111.27 + 111.28 import org.xml.sax.EntityResolver; 111.29 import org.xml.sax.InputSource; 111.30 import org.xml.sax.SAXException; 111.31 @@ -86,6 +86,7 @@ 111.32 import javax.xml.ws.WebServiceFeature; 111.33 import javax.xml.ws.WebServiceProvider; 111.34 import javax.xml.ws.soap.SOAPBinding; 111.35 + 111.36 import java.io.IOException; 111.37 import java.net.URL; 111.38 import java.util.ArrayList; 111.39 @@ -232,7 +233,7 @@ 111.40 SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList); 111.41 111.42 EndpointAwareTube terminal; 111.43 - WSDLPortImpl wsdlPort = null; 111.44 + WSDLPort wsdlPort = null; 111.45 AbstractSEIModelImpl seiModel = null; 111.46 // create WSDL model 111.47 if (primaryDoc != null) { 111.48 @@ -709,23 +710,23 @@ 111.49 * @param container container in which this service is running 111.50 * @return non-null wsdl port object 111.51 */ 111.52 - private static @NotNull WSDLPortImpl getWSDLPort(SDDocumentSource primaryWsdl, List<? extends SDDocumentSource> metadata, 111.53 + private static @NotNull WSDLPort getWSDLPort(SDDocumentSource primaryWsdl, List<? extends SDDocumentSource> metadata, 111.54 @NotNull QName serviceName, @NotNull QName portName, Container container, 111.55 EntityResolver resolver) { 111.56 URL wsdlUrl = primaryWsdl.getSystemId(); 111.57 try { 111.58 // TODO: delegate to another entity resolver 111.59 - WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse( 111.60 + WSDLModel wsdlDoc = RuntimeWSDLParser.parse( 111.61 new Parser(primaryWsdl), new EntityResolverImpl(metadata, resolver), 111.62 false, container, ServiceFinder.find(WSDLParserExtension.class).toArray()); 111.63 if(wsdlDoc.getServices().size() == 0) { 111.64 throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(wsdlUrl)); 111.65 } 111.66 - WSDLServiceImpl wsdlService = wsdlDoc.getService(serviceName); 111.67 + WSDLService wsdlService = wsdlDoc.getService(serviceName); 111.68 if (wsdlService == null) { 111.69 throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICE(serviceName,wsdlUrl)); 111.70 } 111.71 - WSDLPortImpl wsdlPort = wsdlService.get(portName); 111.72 + WSDLPort wsdlPort = wsdlService.get(portName); 111.73 if (wsdlPort == null) { 111.74 throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_INCORRECTSERVICEPORT(serviceName, portName, wsdlUrl)); 111.75 }
112.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java Thu Oct 10 10:09:16 2013 -0700 112.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java Fri Oct 11 00:07:42 2013 -0700 112.3 @@ -46,7 +46,6 @@ 112.4 import com.sun.xml.internal.ws.binding.BindingImpl; 112.5 import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; 112.6 import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties; 112.7 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 112.8 import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties; 112.9 import com.sun.xml.internal.ws.model.wsdl.WSDLProperties; 112.10 import com.sun.xml.internal.ws.policy.PolicyMap; 112.11 @@ -195,7 +194,7 @@ 112.12 try { 112.13 if (port != null) { 112.14 //gather EPR extrensions from WSDL Model 112.15 - WSEndpointReference wsdlEpr = ((WSDLPortImpl) port).getEPR(); 112.16 + WSEndpointReference wsdlEpr = port.getEPR(); 112.17 if (wsdlEpr != null) { 112.18 for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) { 112.19 eprExtensions.put(extnEl.getQName(), extnEl);
113.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java Thu Oct 10 10:09:16 2013 -0700 113.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java Fri Oct 11 00:07:42 2013 -0700 113.3 @@ -1,5 +1,5 @@ 113.4 /* 113.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 113.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 113.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 113.8 * 113.9 * This code is free software; you can redistribute it and/or modify it 113.10 @@ -31,6 +31,7 @@ 113.11 import com.sun.xml.internal.ws.api.ServiceSharedFeatureMarker; 113.12 import com.sun.xml.internal.ws.api.addressing.AddressingVersion; 113.13 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; 113.14 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 113.15 import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 113.16 import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; 113.17 import com.sun.xml.internal.ws.api.server.BoundEndpoint; 113.18 @@ -41,12 +42,12 @@ 113.19 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; 113.20 import com.sun.xml.internal.ws.client.WSServiceDelegate; 113.21 import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference; 113.22 -import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; 113.23 import com.sun.xml.internal.ws.resources.ProviderApiMessages; 113.24 import com.sun.xml.internal.ws.transport.http.server.EndpointImpl; 113.25 import com.sun.xml.internal.ws.util.ServiceFinder; 113.26 import com.sun.xml.internal.ws.util.xml.XmlUtil; 113.27 import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; 113.28 + 113.29 import org.w3c.dom.Element; 113.30 import org.xml.sax.EntityResolver; 113.31 113.32 @@ -65,6 +66,7 @@ 113.33 import javax.xml.ws.spi.ServiceDelegate; 113.34 import javax.xml.ws.spi.Invoker; 113.35 import javax.xml.ws.wsaddressing.W3CEndpointReference; 113.36 + 113.37 import java.net.URL; 113.38 import java.security.AccessController; 113.39 import java.security.PrivilegedAction; 113.40 @@ -217,7 +219,7 @@ 113.41 EntityResolver er = XmlUtil.createDefaultCatalogResolver(); 113.42 113.43 URL wsdlLoc = new URL(wsdlDocumentLocation); 113.44 - WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er, 113.45 + WSDLModel wsdlDoc = RuntimeWSDLParser.parse(wsdlLoc, new StreamSource(wsdlLoc.toExternalForm()), er, 113.46 true, container, ServiceFinder.find(WSDLParserExtension.class).toArray()); 113.47 if (serviceName != null) { 113.48 WSDLService wsdlService = wsdlDoc.getService(serviceName);
114.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java Thu Oct 10 10:09:16 2013 -0700 114.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java Fri Oct 11 00:07:42 2013 -0700 114.3 @@ -89,6 +89,8 @@ 114.4 */ 114.5 public class HttpAdapter extends Adapter<HttpAdapter.HttpToolkit> { 114.6 114.7 + private static final Logger LOGGER = Logger.getLogger(HttpAdapter.class.getName()); 114.8 + 114.9 /** 114.10 * {@link com.sun.xml.internal.ws.api.server.SDDocument}s keyed by the query string like "?abc". 114.11 * Used for serving documents via HTTP GET. 114.12 @@ -852,7 +854,14 @@ 114.13 } 114.14 } 114.15 } 114.16 - buf.writeTo(baos); 114.17 + if (buf.size() > dump_threshold) { 114.18 + byte[] b = buf.getRawData(); 114.19 + baos.write(b, 0, dump_threshold); 114.20 + pw.println(); 114.21 + pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold")); 114.22 + } else { 114.23 + buf.writeTo(baos); 114.24 + } 114.25 pw.println("--------------------"); 114.26 114.27 String msg = baos.toString(); 114.28 @@ -946,6 +955,8 @@ 114.29 */ 114.30 public static volatile boolean dump = false; 114.31 114.32 + public static volatile int dump_threshold = 4096; 114.33 + 114.34 public static volatile boolean publishStatusPage = true; 114.35 114.36 public static synchronized void setPublishStatus(boolean publish) { 114.37 @@ -954,19 +965,32 @@ 114.38 114.39 static { 114.40 try { 114.41 - dump = Boolean.getBoolean(HttpAdapter.class.getName()+".dump"); 114.42 - } catch( Throwable t ) { 114.43 - // OK to ignore this 114.44 + dump = Boolean.getBoolean(HttpAdapter.class.getName() + ".dump"); 114.45 + } catch (SecurityException se) { 114.46 + if (LOGGER.isLoggable(Level.CONFIG)) { 114.47 + LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.", 114.48 + new Object[] {HttpAdapter.class.getName() + ".dump"}); 114.49 + } 114.50 } 114.51 try { 114.52 - setPublishStatus(System.getProperty(HttpAdapter.class.getName()+".publishStatusPage").equals("true")); 114.53 - } catch( Throwable t ) { 114.54 - // OK to ignore this 114.55 + dump_threshold = Integer.getInteger(HttpAdapter.class.getName() + ".dumpTreshold", 4096); 114.56 + } catch (SecurityException se) { 114.57 + if (LOGGER.isLoggable(Level.CONFIG)) { 114.58 + LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.", 114.59 + new Object[] {HttpAdapter.class.getName() + ".dumpTreshold"}); 114.60 + } 114.61 + } 114.62 + try { 114.63 + setPublishStatus(Boolean.getBoolean(HttpAdapter.class.getName() + ".publishStatusPage")); 114.64 + } catch (SecurityException se) { 114.65 + if (LOGGER.isLoggable(Level.CONFIG)) { 114.66 + LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.", 114.67 + new Object[] {HttpAdapter.class.getName() + ".publishStatusPage"}); 114.68 + } 114.69 } 114.70 } 114.71 114.72 public static void setDump(boolean dumpMessages) { 114.73 HttpAdapter.dump = dumpMessages; 114.74 } 114.75 - private static final Logger LOGGER = Logger.getLogger(HttpAdapter.class.getName()); 114.76 }
115.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java Thu Oct 10 10:09:16 2013 -0700 115.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java Fri Oct 11 00:07:42 2013 -0700 115.3 @@ -1,5 +1,5 @@ 115.4 /* 115.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 115.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 115.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 115.8 * 115.9 * This code is free software; you can redistribute it and/or modify it 115.10 @@ -35,7 +35,9 @@ 115.11 import com.sun.xml.internal.ws.client.ClientTransportException; 115.12 import com.sun.xml.internal.ws.developer.HttpConfigFeature; 115.13 import com.sun.xml.internal.ws.resources.ClientMessages; 115.14 +import com.sun.xml.internal.ws.resources.WsservletMessages; 115.15 import com.sun.xml.internal.ws.transport.Headers; 115.16 +import com.sun.xml.internal.ws.transport.http.HttpAdapter; 115.17 import com.sun.xml.internal.ws.util.ByteArrayBuffer; 115.18 import com.sun.xml.internal.ws.util.RuntimeVersion; 115.19 import com.sun.xml.internal.ws.util.StreamUtils; 115.20 @@ -426,7 +428,14 @@ 115.21 } 115.22 } 115.23 115.24 - buf.writeTo(baos); 115.25 + if (buf.size() > HttpAdapter.dump_threshold) { 115.26 + byte[] b = buf.getRawData(); 115.27 + baos.write(b, 0, HttpAdapter.dump_threshold); 115.28 + pw.println(); 115.29 + pw.println(WsservletMessages.MESSAGE_TOO_LONG(HttpAdapter.class.getName() + ".dumpTreshold")); 115.30 + } else { 115.31 + buf.writeTo(baos); 115.32 + } 115.33 pw.println("--------------------"); 115.34 115.35 String msg = baos.toString();
116.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java Thu Oct 10 10:09:16 2013 -0700 116.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java Fri Oct 11 00:07:42 2013 -0700 116.3 @@ -72,7 +72,7 @@ 116.4 import java.util.logging.Level; 116.5 import java.util.logging.Logger; 116.6 116.7 -import static com.sun.xml.internal.ws.util.xml.XmlUtil.allowFileAccess; 116.8 +import static com.sun.xml.internal.ws.util.xml.XmlUtil.allowExternalAccess; 116.9 116.10 /** 116.11 * {@link Tube} that does the schema validation. 116.12 @@ -92,7 +92,7 @@ 116.13 super(next); 116.14 this.binding = binding; 116.15 feature = binding.getFeature(SchemaValidationFeature.class); 116.16 - sf = allowFileAccess(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI), false); 116.17 + sf = allowExternalAccess(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI), "file", false); 116.18 } 116.19 116.20 protected AbstractSchemaValidationTube(AbstractSchemaValidationTube that, TubeCloner cloner) {
117.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties Thu Oct 10 10:09:16 2013 -0700 117.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties Fri Oct 11 00:07:42 2013 -0700 117.3 @@ -23,7 +23,7 @@ 117.4 # questions. 117.5 # 117.6 117.7 -build-id=2.2.9-b14140 117.8 -build-version=JAX-WS RI 2.2.9-b14140 117.9 +build-id=2.2.9-b130926.1035 117.10 +build-version=JAX-WS RI 2.2.9-b130926.1035 117.11 major-version=2.2.9 117.12 -svn-revision=14140 117.13 +svn-revision=8c29a9a53251ff741fca1664a8221dc876b2eac8
118.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java Thu Oct 10 10:09:16 2013 -0700 118.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java Fri Oct 11 00:07:42 2013 -0700 118.3 @@ -84,11 +84,11 @@ 118.4 118.5 private static final Logger LOGGER = Logger.getLogger(XmlUtil.class.getName()); 118.6 118.7 - private static boolean globalSecureXmlProcessingEnabled; 118.8 + private static boolean XML_SECURITY_DISABLED; 118.9 118.10 static { 118.11 - String disableSecureXmlProcessing = System.getProperty("disableSecureXmlProcessing"); 118.12 - globalSecureXmlProcessingEnabled = disableSecureXmlProcessing == null || !Boolean.valueOf(disableSecureXmlProcessing); 118.13 + String disableXmlSecurity = System.getProperty("com.sun.xml.internal.ws.disableXmlSecurity"); 118.14 + XML_SECURITY_DISABLED = disableXmlSecurity == null || !Boolean.valueOf(disableXmlSecurity); 118.15 } 118.16 118.17 public static String getPrefix(String s) { 118.18 @@ -364,9 +364,9 @@ 118.19 public static DocumentBuilderFactory newDocumentBuilderFactory(boolean secureXmlProcessing) { 118.20 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); 118.21 try { 118.22 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessing)); 118.23 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessing)); 118.24 } catch (ParserConfigurationException e) { 118.25 - LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } ); 118.26 + LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } ); 118.27 } 118.28 return factory; 118.29 } 118.30 @@ -374,9 +374,9 @@ 118.31 public static TransformerFactory newTransformerFactory(boolean secureXmlProcessingEnabled) { 118.32 TransformerFactory factory = TransformerFactory.newInstance(); 118.33 try { 118.34 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled)); 118.35 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled)); 118.36 } catch (TransformerConfigurationException e) { 118.37 - LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); 118.38 + LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); 118.39 } 118.40 return factory; 118.41 } 118.42 @@ -388,9 +388,9 @@ 118.43 public static SAXParserFactory newSAXParserFactory(boolean secureXmlProcessingEnabled) { 118.44 SAXParserFactory factory = SAXParserFactory.newInstance(); 118.45 try { 118.46 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled)); 118.47 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled)); 118.48 } catch (Exception e) { 118.49 - LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); 118.50 + LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); 118.51 } 118.52 return factory; 118.53 } 118.54 @@ -398,16 +398,16 @@ 118.55 public static XPathFactory newXPathFactory(boolean secureXmlProcessingEnabled) { 118.56 XPathFactory factory = XPathFactory.newInstance(); 118.57 try { 118.58 - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled)); 118.59 + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, isXMLSecurityDisabled(secureXmlProcessingEnabled)); 118.60 } catch (XPathFactoryConfigurationException e) { 118.61 - LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } ); 118.62 + LOGGER.log(Level.WARNING, "Factory [{0}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } ); 118.63 } 118.64 return factory; 118.65 } 118.66 118.67 public static XMLInputFactory newXMLInputFactory(boolean secureXmlProcessingEnabled) { 118.68 XMLInputFactory factory = XMLInputFactory.newInstance(); 118.69 - if (checkGlobalOverride(secureXmlProcessingEnabled)) { 118.70 + if (isXMLSecurityDisabled(secureXmlProcessingEnabled)) { 118.71 // TODO-Miran: are those apppropriate defaults? 118.72 factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); 118.73 factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); 118.74 @@ -415,25 +415,39 @@ 118.75 return factory; 118.76 } 118.77 118.78 - private static boolean checkGlobalOverride(boolean localSecureXmlProcessingEnabled) { 118.79 - return globalSecureXmlProcessingEnabled && localSecureXmlProcessingEnabled; 118.80 + private static boolean isXMLSecurityDisabled(boolean runtimeDisabled) { 118.81 + return XML_SECURITY_DISABLED || runtimeDisabled; 118.82 } 118.83 118.84 - public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) { 118.85 + public static SchemaFactory allowExternalAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) { 118.86 118.87 - // if feature secure processing enabled, nothing to do, file is allowed, 118.88 - // or user is able to control access by standard JAXP mechanisms 118.89 - if (checkGlobalOverride(disableSecureProcessing)) { 118.90 + // if xml security (feature secure processing) disabled, nothing to do, no restrictions applied 118.91 + if (isXMLSecurityDisabled(disableSecureProcessing)) { 118.92 + if (LOGGER.isLoggable(Level.FINE)) { 118.93 + LOGGER.log(Level.FINE, "Xml Security disabled, no JAXP xsd external access configuration necessary."); 118.94 + } 118.95 + return sf; 118.96 + } 118.97 + 118.98 + if (System.getProperty("javax.xml.accessExternalSchema") != null) { 118.99 + if (LOGGER.isLoggable(Level.FINE)) { 118.100 + LOGGER.log(Level.FINE, "Detected explicitly JAXP configuration, no JAXP xsd external access configuration necessary."); 118.101 + } 118.102 return sf; 118.103 } 118.104 118.105 try { 118.106 - sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file"); 118.107 - LOGGER.log(Level.FINE, "Property \"{}\" is supported and has been successfully set by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA}); 118.108 + sf.setProperty(ACCESS_EXTERNAL_SCHEMA, value); 118.109 + if (LOGGER.isLoggable(Level.FINE)) { 118.110 + LOGGER.log(Level.FINE, "Property \"{0}\" is supported and has been successfully set by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA}); 118.111 + } 118.112 } catch (SAXException ignored) { 118.113 - // depending on JDK/SAX implementation used 118.114 - LOGGER.log(Level.CONFIG, "Property \"{}\" is not supported by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA}); 118.115 + // nothing to do; support depends on version JDK or SAX implementation 118.116 + if (LOGGER.isLoggable(Level.CONFIG)) { 118.117 + LOGGER.log(Level.CONFIG, "Property \"{0}\" is not supported by used JAXP implementation.", new Object[]{ACCESS_EXTERNAL_SCHEMA}); 118.118 + } 118.119 } 118.120 return sf; 118.121 } 118.122 + 118.123 }
119.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java Thu Oct 10 10:09:16 2013 -0700 119.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java Fri Oct 11 00:07:42 2013 -0700 119.3 @@ -102,7 +102,7 @@ 119.4 } 119.5 } else { 119.6 for (WSDLBoundOperation wsdlOp : wsdlModel.getBinding().getBindingOperations()) { 119.7 - QName payloadName = wsdlOp.getReqPayloadName(); 119.8 + QName payloadName = wsdlOp.getRequestPayloadName(); 119.9 if (payloadName == null) 119.10 payloadName = EMPTY_PAYLOAD; 119.11 String action = wsdlOp.getOperation().getInput().getAction();
120.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java Thu Oct 10 10:09:16 2013 -0700 120.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java Fri Oct 11 00:07:42 2013 -0700 120.3 @@ -1,5 +1,5 @@ 120.4 /* 120.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 120.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 120.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 120.8 * 120.9 * This code is free software; you can redistribute it and/or modify it 120.10 @@ -104,7 +104,7 @@ 120.11 } 120.12 } else { 120.13 for (WSDLBoundOperation wsdlOp : wsdlModel.getBinding().getBindingOperations()) { 120.14 - QName name = wsdlOp.getReqPayloadName(); 120.15 + QName name = wsdlOp.getRequestPayloadName(); 120.16 if (name == null) 120.17 name = EMPTY_PAYLOAD; 120.18 methodHandlers.put(name, wsdlOperationMapping(wsdlOp));
121.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java Thu Oct 10 10:09:16 2013 -0700 121.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java Fri Oct 11 00:07:42 2013 -0700 121.3 @@ -1,5 +1,5 @@ 121.4 /* 121.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 121.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 121.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 121.8 * 121.9 * This code is free software; you can redistribute it and/or modify it 121.10 @@ -25,7 +25,7 @@ 121.11 121.12 package com.sun.xml.internal.ws.wsdl.parser; 121.13 121.14 -import com.sun.xml.internal.ws.api.model.wsdl.*; 121.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 121.16 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; 121.17 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext; 121.18 121.19 @@ -48,31 +48,31 @@ 121.20 core.start(context); 121.21 } 121.22 121.23 - public void serviceAttributes(WSDLService service, XMLStreamReader reader) { 121.24 + public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) { 121.25 core.serviceAttributes(service, reader); 121.26 } 121.27 121.28 - public boolean serviceElements(WSDLService service, XMLStreamReader reader) { 121.29 + public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) { 121.30 return core.serviceElements(service, reader); 121.31 } 121.32 121.33 - public void portAttributes(WSDLPort port, XMLStreamReader reader) { 121.34 + public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) { 121.35 core.portAttributes(port, reader); 121.36 } 121.37 121.38 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 121.39 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 121.40 return core.portElements(port, reader); 121.41 } 121.42 121.43 - public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) { 121.44 + public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) { 121.45 return core.portTypeOperationInput(op, reader); 121.46 } 121.47 121.48 - public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) { 121.49 + public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) { 121.50 return core.portTypeOperationOutput(op, reader); 121.51 } 121.52 121.53 - public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) { 121.54 + public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) { 121.55 return core.portTypeOperationFault(op, reader); 121.56 } 121.57 121.58 @@ -80,91 +80,91 @@ 121.59 return core.definitionsElements(reader); 121.60 } 121.61 121.62 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) { 121.63 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 121.64 return core.bindingElements(binding, reader); 121.65 } 121.66 121.67 - public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader) { 121.68 + public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 121.69 core.bindingAttributes(binding, reader); 121.70 } 121.71 121.72 - public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) { 121.73 + public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) { 121.74 return core.portTypeElements(portType, reader); 121.75 } 121.76 121.77 - public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) { 121.78 + public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) { 121.79 core.portTypeAttributes(portType, reader); 121.80 } 121.81 121.82 - public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) { 121.83 + public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) { 121.84 return core.portTypeOperationElements(operation, reader); 121.85 } 121.86 121.87 - public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) { 121.88 + public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) { 121.89 core.portTypeOperationAttributes(operation, reader); 121.90 } 121.91 121.92 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 121.93 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 121.94 return core.bindingOperationElements(operation, reader); 121.95 } 121.96 121.97 - public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 121.98 + public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 121.99 core.bindingOperationAttributes(operation, reader); 121.100 } 121.101 121.102 - public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) { 121.103 + public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) { 121.104 return core.messageElements(msg, reader); 121.105 } 121.106 121.107 - public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) { 121.108 + public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) { 121.109 core.messageAttributes(msg, reader); 121.110 } 121.111 121.112 - public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) { 121.113 + public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) { 121.114 return core.portTypeOperationInputElements(input, reader); 121.115 } 121.116 121.117 - public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) { 121.118 + public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) { 121.119 core.portTypeOperationInputAttributes(input, reader); 121.120 } 121.121 121.122 - public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) { 121.123 + public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) { 121.124 return core.portTypeOperationOutputElements(output, reader); 121.125 } 121.126 121.127 - public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) { 121.128 + public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) { 121.129 core.portTypeOperationOutputAttributes(output, reader); 121.130 } 121.131 121.132 - public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) { 121.133 + public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) { 121.134 return core.portTypeOperationFaultElements(fault, reader); 121.135 } 121.136 121.137 - public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) { 121.138 + public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) { 121.139 core.portTypeOperationFaultAttributes(fault, reader); 121.140 } 121.141 121.142 - public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 121.143 + public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 121.144 return core.bindingOperationInputElements(operation, reader); 121.145 } 121.146 121.147 - public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 121.148 + public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 121.149 core.bindingOperationInputAttributes(operation, reader); 121.150 } 121.151 121.152 - public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 121.153 + public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 121.154 return core.bindingOperationOutputElements(operation, reader); 121.155 } 121.156 121.157 - public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 121.158 + public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 121.159 core.bindingOperationOutputAttributes(operation, reader); 121.160 } 121.161 121.162 - public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) { 121.163 + public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) { 121.164 return core.bindingOperationFaultElements(fault, reader); 121.165 } 121.166 121.167 - public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) { 121.168 + public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) { 121.169 core.bindingOperationFaultAttributes(fault, reader); 121.170 } 121.171
122.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java Thu Oct 10 10:09:16 2013 -0700 122.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java Fri Oct 11 00:07:42 2013 -0700 122.3 @@ -1,5 +1,5 @@ 122.4 /* 122.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 122.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 122.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 122.8 * 122.9 * This code is free software; you can redistribute it and/or modify it 122.10 @@ -26,7 +26,7 @@ 122.11 package com.sun.xml.internal.ws.wsdl.parser; 122.12 122.13 122.14 -import com.sun.xml.internal.ws.api.model.wsdl.*; 122.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 122.16 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; 122.17 122.18 import javax.xml.namespace.QName; 122.19 @@ -73,11 +73,11 @@ 122.20 throw new AssertionError("XMLStreamReader is placed at the wrong place after invoking "+core); 122.21 } 122.22 122.23 - public boolean serviceElements(WSDLService service, XMLStreamReader reader) { 122.24 + public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) { 122.25 return post(pre(reader),reader,super.serviceElements(service, reader)); 122.26 } 122.27 122.28 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 122.29 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 122.30 return post(pre(reader),reader,super.portElements(port, reader)); 122.31 } 122.32 122.33 @@ -85,47 +85,47 @@ 122.34 return post(pre(reader),reader,super.definitionsElements(reader)); 122.35 } 122.36 122.37 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) { 122.38 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 122.39 return post(pre(reader),reader,super.bindingElements(binding, reader)); 122.40 } 122.41 122.42 - public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) { 122.43 + public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) { 122.44 return post(pre(reader),reader,super.portTypeElements(portType, reader)); 122.45 } 122.46 122.47 - public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) { 122.48 + public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) { 122.49 return post(pre(reader),reader,super.portTypeOperationElements(operation, reader)); 122.50 } 122.51 122.52 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 122.53 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 122.54 return post(pre(reader),reader,super.bindingOperationElements(operation, reader)); 122.55 } 122.56 122.57 - public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) { 122.58 + public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) { 122.59 return post(pre(reader),reader,super.messageElements(msg, reader)); 122.60 } 122.61 122.62 - public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) { 122.63 + public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) { 122.64 return post(pre(reader),reader,super.portTypeOperationInputElements(input, reader)); 122.65 } 122.66 122.67 - public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) { 122.68 + public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) { 122.69 return post(pre(reader),reader,super.portTypeOperationOutputElements(output, reader)); 122.70 } 122.71 122.72 - public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) { 122.73 + public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) { 122.74 return post(pre(reader),reader,super.portTypeOperationFaultElements(fault, reader)); 122.75 } 122.76 122.77 - public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 122.78 + public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 122.79 return super.bindingOperationInputElements(operation, reader); 122.80 } 122.81 122.82 - public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 122.83 + public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 122.84 return post(pre(reader),reader,super.bindingOperationOutputElements(operation, reader)); 122.85 } 122.86 122.87 - public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) { 122.88 + public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) { 122.89 return post(pre(reader),reader,super.bindingOperationFaultElements(fault, reader)); 122.90 } 122.91 }
123.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java Thu Oct 10 10:09:16 2013 -0700 123.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java Fri Oct 11 00:07:42 2013 -0700 123.3 @@ -1,5 +1,5 @@ 123.4 /* 123.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 123.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 123.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 123.8 * 123.9 * This code is free software; you can redistribute it and/or modify it 123.10 @@ -27,13 +27,8 @@ 123.11 123.12 import com.sun.xml.internal.ws.api.addressing.AddressingVersion; 123.13 import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; 123.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; 123.15 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; 123.16 import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject; 123.17 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; 123.18 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; 123.19 -import com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl; 123.20 -import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl; 123.21 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 123.22 import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; 123.23 123.24 import javax.xml.namespace.QName; 123.25 @@ -46,12 +41,12 @@ 123.26 */ 123.27 public class MemberSubmissionAddressingWSDLParserExtension extends W3CAddressingWSDLParserExtension { 123.28 @Override 123.29 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) { 123.30 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 123.31 return addressibleElement(reader, binding); 123.32 } 123.33 123.34 @Override 123.35 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 123.36 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 123.37 return addressibleElement(reader, port); 123.38 } 123.39 123.40 @@ -68,12 +63,12 @@ 123.41 } 123.42 123.43 @Override 123.44 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 123.45 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 123.46 return false; 123.47 } 123.48 123.49 @Override 123.50 - protected void patchAnonymousDefault(WSDLBoundPortTypeImpl binding) { 123.51 + protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) { 123.52 } 123.53 123.54 @Override
124.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java Thu Oct 10 10:09:16 2013 -0700 124.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java Fri Oct 11 00:07:42 2013 -0700 124.3 @@ -42,6 +42,20 @@ 124.4 import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; 124.5 import com.sun.xml.internal.ws.api.model.ParameterBinding; 124.6 import com.sun.xml.internal.ws.api.model.wsdl.WSDLDescriptorKind; 124.7 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 124.8 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault; 124.9 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation; 124.10 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType; 124.11 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault; 124.12 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput; 124.13 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage; 124.14 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 124.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation; 124.16 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput; 124.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart; 124.18 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort; 124.19 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType; 124.20 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService; 124.21 import com.sun.xml.internal.ws.api.server.Container; 124.22 import com.sun.xml.internal.ws.api.server.ContainerResolver; 124.23 import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; 124.24 @@ -60,6 +74,7 @@ 124.25 import com.sun.xml.internal.ws.util.ServiceFinder; 124.26 import com.sun.xml.internal.ws.util.xml.XmlUtil; 124.27 import com.sun.xml.internal.ws.policy.jaxws.PolicyWSDLParserExtension; 124.28 + 124.29 import org.xml.sax.EntityResolver; 124.30 import org.xml.sax.SAXException; 124.31 124.32 @@ -70,6 +85,7 @@ 124.33 import javax.xml.transform.stream.StreamSource; 124.34 import javax.xml.ws.Service; 124.35 import javax.xml.ws.WebServiceException; 124.36 + 124.37 import java.io.IOException; 124.38 import java.io.InputStream; 124.39 import java.io.FilterInputStream; 124.40 @@ -86,7 +102,7 @@ 124.41 */ 124.42 public class RuntimeWSDLParser { 124.43 124.44 - private final WSDLModelImpl wsdlDoc; 124.45 + private final EditableWSDLModel wsdlDoc; 124.46 /** 124.47 * Target namespace URI of the WSDL that we are currently parsing. 124.48 */ 124.49 @@ -126,7 +142,7 @@ 124.50 * Either this or <tt>wsdl</tt> parameter must be given. 124.51 * Null location means the system won't be able to resolve relative references in the WSDL, 124.52 */ 124.53 - public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.54 + public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.55 boolean isClientSide, Container container, 124.56 WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.57 return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, PolicyResolverFactory.create(),extensions); 124.58 @@ -141,7 +157,7 @@ 124.59 * Either this or <tt>wsdl</tt> parameter must be given. 124.60 * Null location means the system won't be able to resolve relative references in the WSDL, 124.61 */ 124.62 - public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.63 + public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.64 boolean isClientSide, Container container, Class serviceClass, 124.65 WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.66 return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, serviceClass, PolicyResolverFactory.create(),extensions); 124.67 @@ -156,7 +172,7 @@ 124.68 * Either this or <tt>wsdl</tt> parameter must be given. 124.69 * Null location means the system won't be able to resolve relative references in the WSDL, 124.70 */ 124.71 - public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.72 + public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.73 boolean isClientSide, Container container, @NotNull PolicyResolver policyResolver, 124.74 WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.75 return parse(wsdlLoc, wsdlSource, resolver, isClientSide, container, Service.class, policyResolver, extensions); 124.76 @@ -171,7 +187,7 @@ 124.77 * Either this or <tt>wsdl</tt> parameter must be given. 124.78 * Null location means the system won't be able to resolve relative references in the WSDL, 124.79 */ 124.80 - public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.81 + public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.82 boolean isClientSide, Container container, Class serviceClass, 124.83 @NotNull PolicyResolver policyResolver, 124.84 WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.85 @@ -187,7 +203,7 @@ 124.86 * Either this or <tt>wsdl</tt> parameter must be given. 124.87 * Null location means the system won't be able to resolve relative references in the WSDL, 124.88 */ 124.89 - public static WSDLModelImpl parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.90 + public static WSDLModel parse(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, @NotNull EntityResolver resolver, 124.91 boolean isClientSide, Container container, Class serviceClass, 124.92 @NotNull PolicyResolver policyResolver, 124.93 boolean isUseStreamFromEntityResolverWrapper, 124.94 @@ -226,10 +242,10 @@ 124.95 return wsdlParser.wsdlDoc; 124.96 } 124.97 124.98 - private static WSDLModelImpl tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException { 124.99 + private static WSDLModel tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException { 124.100 ArrayList<Throwable> exceptions = new ArrayList<Throwable>(); 124.101 try { 124.102 - WSDLModelImpl wsdlModel = wsdlParser.parseUsingMex(wsdlLoc, resolver, isClientSide, container, serviceClass, policyResolver,extensions); 124.103 + WSDLModel wsdlModel = wsdlParser.parseUsingMex(wsdlLoc, resolver, isClientSide, container, serviceClass, policyResolver,extensions); 124.104 if(wsdlModel == null){ 124.105 throw new WebServiceException(ClientMessages.FAILED_TO_PARSE(wsdlLoc.toExternalForm(), e.getMessage()), e); 124.106 } 124.107 @@ -244,7 +260,7 @@ 124.108 throw new InaccessibleWSDLException(exceptions); 124.109 } 124.110 124.111 - private WSDLModelImpl parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException { 124.112 + private WSDLModel parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException { 124.113 //try MEX 124.114 MetaDataResolver mdResolver = null; 124.115 ServiceDescriptor serviceDescriptor = null; 124.116 @@ -295,7 +311,7 @@ 124.117 return reader.getName().equals(WSDLConstants.QNAME_DEFINITIONS); 124.118 } 124.119 124.120 - public static WSDLModelImpl parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.121 + public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.122 assert resolver != null; 124.123 RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); 124.124 parser.extensionFacade.start(parser.context); 124.125 @@ -306,7 +322,7 @@ 124.126 return parser.wsdlDoc; 124.127 } 124.128 124.129 - public static WSDLModelImpl parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.130 + public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { 124.131 assert resolver != null; 124.132 RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); 124.133 parser.extensionFacade.start(parser.context); 124.134 @@ -460,7 +476,7 @@ 124.135 readNSDecl(service_nsdecl,reader); 124.136 124.137 String serviceName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME); 124.138 - WSDLServiceImpl service = new WSDLServiceImpl(reader,wsdlDoc,new QName(targetNamespace, serviceName)); 124.139 + EditableWSDLService service = new WSDLServiceImpl(reader,wsdlDoc,new QName(targetNamespace, serviceName)); 124.140 extensionFacade.serviceAttributes(service, reader); 124.141 while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { 124.142 QName name = reader.getName(); 124.143 @@ -477,7 +493,7 @@ 124.144 service_nsdecl = new HashMap<String, String>(); 124.145 } 124.146 124.147 - private void parsePort(XMLStreamReader reader, WSDLServiceImpl service) { 124.148 + private void parsePort(XMLStreamReader reader, EditableWSDLService service) { 124.149 port_nsdecl.putAll(service_nsdecl); 124.150 readNSDecl(port_nsdecl,reader); 124.151 124.152 @@ -486,7 +502,7 @@ 124.153 124.154 QName bindingName = ParserUtil.getQName(reader, binding); 124.155 QName portQName = new QName(service.getName().getNamespaceURI(), portName); 124.156 - WSDLPortImpl port = new WSDLPortImpl(reader,service, portQName, bindingName); 124.157 + EditableWSDLPort port = new WSDLPortImpl(reader,service, portQName, bindingName); 124.158 124.159 extensionFacade.portAttributes(port, reader); 124.160 124.161 @@ -551,7 +567,7 @@ 124.162 XMLStreamReaderUtil.skipElement(reader); 124.163 return; 124.164 } 124.165 - WSDLBoundPortTypeImpl binding = new WSDLBoundPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, bindingName), 124.166 + EditableWSDLBoundPortType binding = new WSDLBoundPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, bindingName), 124.167 ParserUtil.getQName(reader, portTypeName)); 124.168 extensionFacade.bindingAttributes(binding, reader); 124.169 124.170 @@ -601,7 +617,7 @@ 124.171 } 124.172 124.173 124.174 - private void parseBindingOperation(XMLStreamReader reader, WSDLBoundPortTypeImpl binding) { 124.175 + private void parseBindingOperation(XMLStreamReader reader, EditableWSDLBoundPortType binding) { 124.176 String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name"); 124.177 if (bindingOpName == null) { 124.178 //TODO: throw exception? 124.179 @@ -611,7 +627,7 @@ 124.180 } 124.181 124.182 QName opName = new QName(binding.getPortTypeName().getNamespaceURI(), bindingOpName); 124.183 - WSDLBoundOperationImpl bindingOp = new WSDLBoundOperationImpl(reader,binding, opName); 124.184 + EditableWSDLBoundOperation bindingOp = new WSDLBoundOperationImpl(reader,binding, opName); 124.185 binding.put(opName, bindingOp); 124.186 extensionFacade.bindingOperationAttributes(bindingOp, reader); 124.187 124.188 @@ -651,7 +667,7 @@ 124.189 } 124.190 } 124.191 124.192 - private void parseInputBinding(XMLStreamReader reader, WSDLBoundOperationImpl bindingOp) { 124.193 + private void parseInputBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) { 124.194 boolean bodyFound = false; 124.195 extensionFacade.bindingOperationInputAttributes(bindingOp, reader); 124.196 while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { 124.197 @@ -670,7 +686,7 @@ 124.198 } 124.199 } 124.200 124.201 - private void parseOutputBinding(XMLStreamReader reader, WSDLBoundOperationImpl bindingOp) { 124.202 + private void parseOutputBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) { 124.203 boolean bodyFound = false; 124.204 extensionFacade.bindingOperationOutputAttributes(bindingOp, reader); 124.205 while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { 124.206 @@ -689,9 +705,9 @@ 124.207 } 124.208 } 124.209 124.210 - private void parseFaultBinding(XMLStreamReader reader, WSDLBoundOperationImpl bindingOp) { 124.211 + private void parseFaultBinding(XMLStreamReader reader, EditableWSDLBoundOperation bindingOp) { 124.212 String faultName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name"); 124.213 - WSDLBoundFaultImpl wsdlBoundFault = new WSDLBoundFaultImpl(reader, faultName, bindingOp); 124.214 + EditableWSDLBoundFault wsdlBoundFault = new WSDLBoundFaultImpl(reader, faultName, bindingOp); 124.215 bindingOp.addFault(wsdlBoundFault); 124.216 124.217 extensionFacade.bindingOperationFaultAttributes(wsdlBoundFault, reader); 124.218 @@ -704,7 +720,7 @@ 124.219 private enum BindingMode { 124.220 INPUT, OUTPUT, FAULT} 124.221 124.222 - private static boolean parseSOAPBodyBinding(XMLStreamReader reader, WSDLBoundOperationImpl op, BindingMode mode) { 124.223 + private static boolean parseSOAPBodyBinding(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { 124.224 String namespace = reader.getAttributeValue(null, "namespace"); 124.225 if (mode == BindingMode.INPUT) { 124.226 op.setRequestNamespace(namespace); 124.227 @@ -749,7 +765,7 @@ 124.228 } 124.229 124.230 124.231 - private static void parseMimeMultipartBinding(XMLStreamReader reader, WSDLBoundOperationImpl op, BindingMode mode) { 124.232 + private static void parseMimeMultipartBinding(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { 124.233 while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { 124.234 QName name = reader.getName(); 124.235 if (MIMEConstants.QNAME_PART.equals(name)) { 124.236 @@ -760,7 +776,7 @@ 124.237 } 124.238 } 124.239 124.240 - private static void parseMIMEPart(XMLStreamReader reader, WSDLBoundOperationImpl op, BindingMode mode) { 124.241 + private static void parseMIMEPart(XMLStreamReader reader, EditableWSDLBoundOperation op, BindingMode mode) { 124.242 boolean bodyFound = false; 124.243 Map<String, ParameterBinding> parts = null; 124.244 if (mode == BindingMode.INPUT) { 124.245 @@ -820,7 +836,7 @@ 124.246 XMLStreamReaderUtil.skipElement(reader); 124.247 return; 124.248 } 124.249 - WSDLPortTypeImpl portType = new WSDLPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, portTypeName)); 124.250 + EditableWSDLPortType portType = new WSDLPortTypeImpl(reader,wsdlDoc, new QName(targetNamespace, portTypeName)); 124.251 extensionFacade.portTypeAttributes(portType, reader); 124.252 wsdlDoc.addPortType(portType); 124.253 while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { 124.254 @@ -834,7 +850,7 @@ 124.255 } 124.256 124.257 124.258 - private void parsePortTypeOperation(XMLStreamReader reader, WSDLPortTypeImpl portType) { 124.259 + private void parsePortTypeOperation(XMLStreamReader reader, EditableWSDLPortType portType) { 124.260 String operationName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME); 124.261 if (operationName == null) { 124.262 //TODO: throw exception? 124.263 @@ -844,7 +860,7 @@ 124.264 } 124.265 124.266 QName operationQName = new QName(portType.getName().getNamespaceURI(), operationName); 124.267 - WSDLOperationImpl operation = new WSDLOperationImpl(reader,portType, operationQName); 124.268 + EditableWSDLOperation operation = new WSDLOperationImpl(reader,portType, operationQName); 124.269 extensionFacade.portTypeOperationAttributes(operation, reader); 124.270 String parameterOrder = ParserUtil.getAttribute(reader, "parameterOrder"); 124.271 operation.setParameterOrder(parameterOrder); 124.272 @@ -864,11 +880,11 @@ 124.273 } 124.274 124.275 124.276 - private void parsePortTypeOperationFault(XMLStreamReader reader, WSDLOperationImpl operation) { 124.277 + private void parsePortTypeOperationFault(XMLStreamReader reader, EditableWSDLOperation operation) { 124.278 String msg = ParserUtil.getMandatoryNonEmptyAttribute(reader, "message"); 124.279 QName msgName = ParserUtil.getQName(reader, msg); 124.280 String name = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name"); 124.281 - WSDLFaultImpl fault = new WSDLFaultImpl(reader,name, msgName, operation); 124.282 + EditableWSDLFault fault = new WSDLFaultImpl(reader,name, msgName, operation); 124.283 operation.addFault(fault); 124.284 extensionFacade.portTypeOperationFaultAttributes(fault, reader); 124.285 extensionFacade.portTypeOperationFault(operation, reader); 124.286 @@ -877,11 +893,11 @@ 124.287 } 124.288 } 124.289 124.290 - private void parsePortTypeOperationInput(XMLStreamReader reader, WSDLOperationImpl operation) { 124.291 + private void parsePortTypeOperationInput(XMLStreamReader reader, EditableWSDLOperation operation) { 124.292 String msg = ParserUtil.getMandatoryNonEmptyAttribute(reader, "message"); 124.293 QName msgName = ParserUtil.getQName(reader, msg); 124.294 String name = ParserUtil.getAttribute(reader, "name"); 124.295 - WSDLInputImpl input = new WSDLInputImpl(reader, name, msgName, operation); 124.296 + EditableWSDLInput input = new WSDLInputImpl(reader, name, msgName, operation); 124.297 operation.setInput(input); 124.298 extensionFacade.portTypeOperationInputAttributes(input, reader); 124.299 extensionFacade.portTypeOperationInput(operation, reader); 124.300 @@ -890,11 +906,11 @@ 124.301 } 124.302 } 124.303 124.304 - private void parsePortTypeOperationOutput(XMLStreamReader reader, WSDLOperationImpl operation) { 124.305 + private void parsePortTypeOperationOutput(XMLStreamReader reader, EditableWSDLOperation operation) { 124.306 String msg = ParserUtil.getAttribute(reader, "message"); 124.307 QName msgName = ParserUtil.getQName(reader, msg); 124.308 String name = ParserUtil.getAttribute(reader, "name"); 124.309 - WSDLOutputImpl output = new WSDLOutputImpl(reader,name, msgName, operation); 124.310 + EditableWSDLOutput output = new WSDLOutputImpl(reader,name, msgName, operation); 124.311 operation.setOutput(output); 124.312 extensionFacade.portTypeOperationOutputAttributes(output, reader); 124.313 extensionFacade.portTypeOperationOutput(operation, reader); 124.314 @@ -905,7 +921,7 @@ 124.315 124.316 private void parseMessage(XMLStreamReader reader) { 124.317 String msgName = ParserUtil.getMandatoryNonEmptyAttribute(reader, WSDLConstants.ATTR_NAME); 124.318 - WSDLMessageImpl msg = new WSDLMessageImpl(reader,new QName(targetNamespace, msgName)); 124.319 + EditableWSDLMessage msg = new WSDLMessageImpl(reader,new QName(targetNamespace, msgName)); 124.320 extensionFacade.messageAttributes(msg, reader); 124.321 int partIndex = 0; 124.322 while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { 124.323 @@ -928,7 +944,7 @@ 124.324 } 124.325 } 124.326 if (desc != null) { 124.327 - WSDLPartImpl wsdlPart = new WSDLPartImpl(reader, part, partIndex, new WSDLPartDescriptorImpl(reader,ParserUtil.getQName(reader, desc), kind)); 124.328 + EditableWSDLPart wsdlPart = new WSDLPartImpl(reader, part, partIndex, new WSDLPartDescriptorImpl(reader,ParserUtil.getQName(reader, desc), kind)); 124.329 msg.add(wsdlPart); 124.330 } 124.331 if (reader.getEventType() != XMLStreamConstants.END_ELEMENT)
125.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java Thu Oct 10 10:09:16 2013 -0700 125.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java Fri Oct 11 00:07:42 2013 -0700 125.3 @@ -1,5 +1,5 @@ 125.4 /* 125.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 125.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 125.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 125.8 * 125.9 * This code is free software; you can redistribute it and/or modify it 125.10 @@ -25,9 +25,7 @@ 125.11 125.12 package com.sun.xml.internal.ws.wsdl.parser; 125.13 125.14 -import com.sun.xml.internal.ws.api.model.wsdl.*; 125.15 -import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl; 125.16 -import com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl; 125.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 125.18 import javax.xml.stream.XMLStreamReader; 125.19 import javax.xml.namespace.QName; 125.20 125.21 @@ -43,22 +41,22 @@ 125.22 String METADATA_WSDL_EXTN_NS = "http://www.w3.org/2007/05/addressing/metadata"; 125.23 QName METADATA_WSDL_ACTION_TAG = new QName(METADATA_WSDL_EXTN_NS, "Action", "wsam"); 125.24 @Override 125.25 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) { 125.26 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 125.27 return false; 125.28 } 125.29 125.30 @Override 125.31 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 125.32 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 125.33 return false; 125.34 } 125.35 125.36 @Override 125.37 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 125.38 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 125.39 return false; 125.40 } 125.41 125.42 @Override 125.43 - protected void patchAnonymousDefault(WSDLBoundPortTypeImpl binding) { 125.44 + protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) { 125.45 } 125.46 125.47 @Override
126.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java Thu Oct 10 10:09:16 2013 -0700 126.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java Fri Oct 11 00:07:42 2013 -0700 126.3 @@ -1,5 +1,5 @@ 126.4 /* 126.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 126.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 126.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 126.8 * 126.9 * This code is free software; you can redistribute it and/or modify it 126.10 @@ -26,19 +26,18 @@ 126.11 package com.sun.xml.internal.ws.wsdl.parser; 126.12 126.13 import com.sun.xml.internal.ws.api.addressing.AddressingVersion; 126.14 -import com.sun.xml.internal.ws.api.model.wsdl.*; 126.15 +import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject; 126.16 +import static com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation.ANONYMOUS; 126.17 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 126.18 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; 126.19 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext; 126.20 -import com.sun.xml.internal.ws.model.wsdl.*; 126.21 import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; 126.22 -import com.sun.xml.internal.ws.resources.AddressingMessages; 126.23 126.24 import javax.xml.namespace.QName; 126.25 import javax.xml.stream.XMLStreamException; 126.26 import javax.xml.stream.XMLStreamReader; 126.27 import javax.xml.ws.WebServiceException; 126.28 import javax.xml.ws.soap.AddressingFeature; 126.29 -import java.util.Map; 126.30 126.31 /** 126.32 * W3C WS-Addressing Runtime WSDL parser extension 126.33 @@ -47,12 +46,12 @@ 126.34 */ 126.35 public class W3CAddressingWSDLParserExtension extends WSDLParserExtension { 126.36 @Override 126.37 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) { 126.38 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) { 126.39 return addressibleElement(reader, binding); 126.40 } 126.41 126.42 @Override 126.43 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 126.44 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 126.45 return addressibleElement(reader, port); 126.46 } 126.47 126.48 @@ -69,8 +68,8 @@ 126.49 } 126.50 126.51 @Override 126.52 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 126.53 - WSDLBoundOperationImpl impl = (WSDLBoundOperationImpl)operation; 126.54 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 126.55 + EditableWSDLBoundOperation edit = (EditableWSDLBoundOperation) operation; 126.56 126.57 QName anon = reader.getName(); 126.58 if (anon.equals(AddressingVersion.W3C.wsdlAnonymousTag)) { 126.59 @@ -81,11 +80,11 @@ 126.60 // TODO: throw exception only if wsdl:required=true 126.61 // TODO: is this the right exception ? 126.62 } else if (value.equals("optional")) { 126.63 - impl.setAnonymous(WSDLBoundOperation.ANONYMOUS.optional); 126.64 + edit.setAnonymous(ANONYMOUS.optional); 126.65 } else if (value.equals("required")) { 126.66 - impl.setAnonymous(WSDLBoundOperation.ANONYMOUS.required); 126.67 + edit.setAnonymous(ANONYMOUS.required); 126.68 } else if (value.equals("prohibited")) { 126.69 - impl.setAnonymous(WSDLBoundOperation.ANONYMOUS.prohibited); 126.70 + edit.setAnonymous(ANONYMOUS.prohibited); 126.71 } else { 126.72 throw new WebServiceException("wsaw:Anonymous value \"" + value + "\" not understood."); 126.73 // TODO: throw exception only if wsdl:required=true 126.74 @@ -101,29 +100,29 @@ 126.75 return false; 126.76 } 126.77 126.78 - public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) { 126.79 + public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) { 126.80 String action = ParserUtil.getAttribute(reader, getWsdlActionTag()); 126.81 if (action != null) { 126.82 - ((WSDLInputImpl)input).setAction(action); 126.83 - ((WSDLInputImpl)input).setDefaultAction(false); 126.84 + input.setAction(action); 126.85 + input.setDefaultAction(false); 126.86 } 126.87 } 126.88 126.89 126.90 - public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) { 126.91 + public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) { 126.92 String action = ParserUtil.getAttribute(reader, getWsdlActionTag()); 126.93 if (action != null) { 126.94 - ((WSDLOutputImpl)output).setAction(action); 126.95 - ((WSDLOutputImpl)output).setDefaultAction(false); 126.96 + output.setAction(action); 126.97 + output.setDefaultAction(false); 126.98 } 126.99 } 126.100 126.101 126.102 - public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) { 126.103 + public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) { 126.104 String action = ParserUtil.getAttribute(reader, getWsdlActionTag()); 126.105 if (action != null) { 126.106 - ((WSDLFaultImpl) fault).setAction(action); 126.107 - ((WSDLFaultImpl) fault).setDefaultAction(false); 126.108 + fault.setAction(action); 126.109 + fault.setDefaultAction(false); 126.110 } 126.111 } 126.112 126.113 @@ -139,11 +138,10 @@ 126.114 */ 126.115 @Override 126.116 public void finished(WSDLParserExtensionContext context) { 126.117 - WSDLModel model = context.getWSDLModel(); 126.118 - for (WSDLService service : model.getServices().values()) { 126.119 - for (WSDLPort wp : service.getPorts()) { 126.120 - WSDLPortImpl port = (WSDLPortImpl)wp; 126.121 - WSDLBoundPortTypeImpl binding = port.getBinding(); 126.122 + EditableWSDLModel model = context.getWSDLModel(); 126.123 + for (EditableWSDLService service : model.getServices().values()) { 126.124 + for (EditableWSDLPort port : service.getPorts()) { 126.125 + EditableWSDLBoundPortType binding = port.getBinding(); 126.126 126.127 // populate actions for the messages that do not have an explicit wsaw:Action 126.128 populateActions(binding); 126.129 @@ -166,12 +164,12 @@ 126.130 * 126.131 * @param binding soapbinding:operation 126.132 */ 126.133 - private void populateActions(WSDLBoundPortTypeImpl binding) { 126.134 - WSDLPortTypeImpl porttype = binding.getPortType(); 126.135 - for (WSDLOperationImpl o : porttype.getOperations()) { 126.136 + private void populateActions(EditableWSDLBoundPortType binding) { 126.137 + EditableWSDLPortType porttype = binding.getPortType(); 126.138 + for (EditableWSDLOperation o : porttype.getOperations()) { 126.139 // TODO: this may be performance intensive. Alternatively default action 126.140 // TODO: can be calculated when the operation is actually invoked. 126.141 - WSDLBoundOperationImpl wboi = binding.get(o.getName()); 126.142 + EditableWSDLBoundOperation wboi = binding.get(o.getName()); 126.143 126.144 if (wboi == null) { 126.145 //If this operation is unbound set the action to default 126.146 @@ -202,9 +200,9 @@ 126.147 if (o.getFaults() == null || !o.getFaults().iterator().hasNext()) 126.148 continue; 126.149 126.150 - for (WSDLFault f : o.getFaults()) { 126.151 + for (EditableWSDLFault f : o.getFaults()) { 126.152 if (f.getAction() == null || f.getAction().equals("")) { 126.153 - ((WSDLFaultImpl)f).setAction(defaultFaultAction(f.getName(), o)); 126.154 + f.setAction(defaultFaultAction(f.getName(), o)); 126.155 } 126.156 126.157 } 126.158 @@ -216,26 +214,26 @@ 126.159 * 126.160 * @param binding WSDLBoundPortTypeImpl 126.161 */ 126.162 - protected void patchAnonymousDefault(WSDLBoundPortTypeImpl binding) { 126.163 - for (WSDLBoundOperationImpl wbo : binding.getBindingOperations()) { 126.164 + protected void patchAnonymousDefault(EditableWSDLBoundPortType binding) { 126.165 + for (EditableWSDLBoundOperation wbo : binding.getBindingOperations()) { 126.166 if (wbo.getAnonymous() == null) 126.167 - wbo.setAnonymous(WSDLBoundOperation.ANONYMOUS.optional); 126.168 + wbo.setAnonymous(ANONYMOUS.optional); 126.169 } 126.170 } 126.171 126.172 - private String defaultInputAction(WSDLOperation o) { 126.173 + private String defaultInputAction(EditableWSDLOperation o) { 126.174 return buildAction(o.getInput().getName(), o, false); 126.175 } 126.176 126.177 - private String defaultOutputAction(WSDLOperation o) { 126.178 + private String defaultOutputAction(EditableWSDLOperation o) { 126.179 return buildAction(o.getOutput().getName(), o, false); 126.180 } 126.181 126.182 - private String defaultFaultAction(String name, WSDLOperation o) { 126.183 + private String defaultFaultAction(String name, EditableWSDLOperation o) { 126.184 return buildAction(name, o, true); 126.185 } 126.186 126.187 - protected static final String buildAction(String name, WSDLOperation o, boolean isFault) { 126.188 + protected static final String buildAction(String name, EditableWSDLOperation o, boolean isFault) { 126.189 String tns = o.getName().getNamespaceURI(); 126.190 126.191 String delim = SLASH_DELIMITER;
127.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java Thu Oct 10 10:09:16 2013 -0700 127.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java Fri Oct 11 00:07:42 2013 -0700 127.3 @@ -1,5 +1,5 @@ 127.4 /* 127.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 127.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 127.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 127.8 * 127.9 * This code is free software; you can redistribute it and/or modify it 127.10 @@ -25,7 +25,7 @@ 127.11 127.12 package com.sun.xml.internal.ws.wsdl.parser; 127.13 127.14 -import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel; 127.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel; 127.16 import com.sun.xml.internal.ws.api.server.Container; 127.17 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext; 127.18 import com.sun.xml.internal.ws.api.policy.PolicyResolver; 127.19 @@ -38,7 +38,7 @@ 127.20 */ 127.21 final class WSDLParserExtensionContextImpl implements WSDLParserExtensionContext { 127.22 private final boolean isClientSide; 127.23 - private final WSDLModel wsdlModel; 127.24 + private final EditableWSDLModel wsdlModel; 127.25 private final Container container; 127.26 private final PolicyResolver policyResolver; 127.27 127.28 @@ -46,7 +46,7 @@ 127.29 * Construct {@link WSDLParserExtensionContextImpl} with information that whether its on client side 127.30 * or server side. 127.31 */ 127.32 - protected WSDLParserExtensionContextImpl(WSDLModel model, boolean isClientSide, Container container, PolicyResolver policyResolver) { 127.33 + protected WSDLParserExtensionContextImpl(EditableWSDLModel model, boolean isClientSide, Container container, PolicyResolver policyResolver) { 127.34 this.wsdlModel = model; 127.35 this.isClientSide = isClientSide; 127.36 this.container = container; 127.37 @@ -57,7 +57,7 @@ 127.38 return isClientSide; 127.39 } 127.40 127.41 - public WSDLModel getWSDLModel() { 127.42 + public EditableWSDLModel getWSDLModel() { 127.43 return wsdlModel; 127.44 } 127.45
128.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java Thu Oct 10 10:09:16 2013 -0700 128.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java Fri Oct 11 00:07:42 2013 -0700 128.3 @@ -1,5 +1,5 @@ 128.4 /* 128.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 128.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 128.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 128.8 * 128.9 * This code is free software; you can redistribute it and/or modify it 128.10 @@ -27,10 +27,8 @@ 128.11 128.12 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; 128.13 import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtensionContext; 128.14 -import com.sun.xml.internal.ws.api.model.wsdl.*; 128.15 +import com.sun.xml.internal.ws.api.model.wsdl.editable.*; 128.16 import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; 128.17 -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; 128.18 -import com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl; 128.19 128.20 import javax.xml.stream.XMLStreamReader; 128.21 import javax.xml.stream.Location; 128.22 @@ -66,7 +64,7 @@ 128.23 } 128.24 } 128.25 128.26 - public boolean serviceElements(WSDLService service, XMLStreamReader reader) { 128.27 + public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) { 128.28 for (WSDLParserExtension e : extensions) { 128.29 if(e.serviceElements(service,reader)) 128.30 return true; 128.31 @@ -75,12 +73,12 @@ 128.32 return true; 128.33 } 128.34 128.35 - public void serviceAttributes(WSDLService service, XMLStreamReader reader) { 128.36 + public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) { 128.37 for (WSDLParserExtension e : extensions) 128.38 e.serviceAttributes(service,reader); 128.39 } 128.40 128.41 - public boolean portElements(WSDLPort port, XMLStreamReader reader) { 128.42 + public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) { 128.43 for (WSDLParserExtension e : extensions) { 128.44 if(e.portElements(port,reader)) 128.45 return true; 128.46 @@ -88,34 +86,34 @@ 128.47 //extension is not understood by any WSDlParserExtension 128.48 //Check if it must be understood. 128.49 if(isRequiredExtension(reader)) { 128.50 - ((WSDLPortImpl)port).addNotUnderstoodExtension(reader.getName(),getLocator(reader)); 128.51 + port.addNotUnderstoodExtension(reader.getName(),getLocator(reader)); 128.52 } 128.53 XMLStreamReaderUtil.skipElement(reader); 128.54 return true; 128.55 } 128.56 128.57 - public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) { 128.58 + public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) { 128.59 for (WSDLParserExtension e : extensions) 128.60 e.portTypeOperationInput(op,reader); 128.61 128.62 return false; 128.63 } 128.64 128.65 - public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) { 128.66 + public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) { 128.67 for (WSDLParserExtension e : extensions) 128.68 e.portTypeOperationOutput(op,reader); 128.69 128.70 return false; 128.71 } 128.72 128.73 - public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) { 128.74 + public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) { 128.75 for (WSDLParserExtension e : extensions) 128.76 e.portTypeOperationFault(op,reader); 128.77 128.78 return false; 128.79 } 128.80 128.81 - public void portAttributes(WSDLPort port, XMLStreamReader reader) { 128.82 + public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) { 128.83 for (WSDLParserExtension e : extensions) 128.84 e.portAttributes(port,reader); 128.85 } 128.86 @@ -130,7 +128,7 @@ 128.87 return true; 128.88 } 128.89 128.90 - public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader){ 128.91 + public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader){ 128.92 for (WSDLParserExtension e : extensions) { 128.93 if (e.bindingElements(binding, reader)) { 128.94 return true; 128.95 @@ -139,20 +137,20 @@ 128.96 //extension is not understood by any WSDlParserExtension 128.97 //Check if it must be understood. 128.98 if (isRequiredExtension(reader)) { 128.99 - ((WSDLBoundPortTypeImpl) binding).addNotUnderstoodExtension( 128.100 + binding.addNotUnderstoodExtension( 128.101 reader.getName(), getLocator(reader)); 128.102 } 128.103 XMLStreamReaderUtil.skipElement(reader); 128.104 return true; 128.105 } 128.106 128.107 - public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader){ 128.108 + public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader){ 128.109 for (WSDLParserExtension e : extensions) { 128.110 e.bindingAttributes(binding, reader); 128.111 } 128.112 } 128.113 128.114 - public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) { 128.115 + public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) { 128.116 for (WSDLParserExtension e : extensions) { 128.117 if (e.portTypeElements(portType, reader)) { 128.118 return true; 128.119 @@ -162,13 +160,13 @@ 128.120 return true; 128.121 } 128.122 128.123 - public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) { 128.124 + public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) { 128.125 for (WSDLParserExtension e : extensions) { 128.126 e.portTypeAttributes(portType, reader); 128.127 } 128.128 } 128.129 128.130 - public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) { 128.131 + public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) { 128.132 for (WSDLParserExtension e : extensions) { 128.133 if (e.portTypeOperationElements(operation, reader)) { 128.134 return true; 128.135 @@ -178,13 +176,13 @@ 128.136 return true; 128.137 } 128.138 128.139 - public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) { 128.140 + public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) { 128.141 for (WSDLParserExtension e : extensions) { 128.142 e.portTypeOperationAttributes(operation, reader); 128.143 } 128.144 } 128.145 128.146 - public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) { 128.147 + public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 128.148 for (WSDLParserExtension e : extensions) { 128.149 if (e.bindingOperationElements(operation, reader)) { 128.150 return true; 128.151 @@ -194,13 +192,13 @@ 128.152 return true; 128.153 } 128.154 128.155 - public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 128.156 + public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 128.157 for (WSDLParserExtension e : extensions) { 128.158 e.bindingOperationAttributes(operation, reader); 128.159 } 128.160 } 128.161 128.162 - public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) { 128.163 + public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) { 128.164 for (WSDLParserExtension e : extensions) { 128.165 if (e.messageElements(msg, reader)) { 128.166 return true; 128.167 @@ -210,13 +208,13 @@ 128.168 return true; 128.169 } 128.170 128.171 - public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) { 128.172 + public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) { 128.173 for (WSDLParserExtension e : extensions) { 128.174 e.messageAttributes(msg, reader); 128.175 } 128.176 } 128.177 128.178 - public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) { 128.179 + public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) { 128.180 for (WSDLParserExtension e : extensions) { 128.181 if (e.portTypeOperationInputElements(input, reader)) { 128.182 return true; 128.183 @@ -226,13 +224,13 @@ 128.184 return true; 128.185 } 128.186 128.187 - public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) { 128.188 + public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) { 128.189 for (WSDLParserExtension e : extensions) { 128.190 e.portTypeOperationInputAttributes(input, reader); 128.191 } 128.192 } 128.193 128.194 - public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) { 128.195 + public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) { 128.196 for (WSDLParserExtension e : extensions) { 128.197 if (e.portTypeOperationOutputElements(output, reader)) { 128.198 return true; 128.199 @@ -242,13 +240,13 @@ 128.200 return true; 128.201 } 128.202 128.203 - public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) { 128.204 + public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) { 128.205 for (WSDLParserExtension e : extensions) { 128.206 e.portTypeOperationOutputAttributes(output, reader); 128.207 } 128.208 } 128.209 128.210 - public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) { 128.211 + public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) { 128.212 for (WSDLParserExtension e : extensions) { 128.213 if (e.portTypeOperationFaultElements(fault, reader)) { 128.214 return true; 128.215 @@ -258,13 +256,13 @@ 128.216 return true; 128.217 } 128.218 128.219 - public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) { 128.220 + public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) { 128.221 for (WSDLParserExtension e : extensions) { 128.222 e.portTypeOperationFaultAttributes(fault, reader); 128.223 } 128.224 } 128.225 128.226 - public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 128.227 + public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 128.228 for (WSDLParserExtension e : extensions) { 128.229 if (e.bindingOperationInputElements(operation, reader)) { 128.230 return true; 128.231 @@ -274,13 +272,13 @@ 128.232 return true; 128.233 } 128.234 128.235 - public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 128.236 + public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 128.237 for (WSDLParserExtension e : extensions) { 128.238 e.bindingOperationInputAttributes(operation, reader); 128.239 } 128.240 } 128.241 128.242 - public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) { 128.243 + public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 128.244 for (WSDLParserExtension e : extensions) { 128.245 if (e.bindingOperationOutputElements(operation, reader)) { 128.246 return true; 128.247 @@ -290,13 +288,13 @@ 128.248 return true; 128.249 } 128.250 128.251 - public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) { 128.252 + public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) { 128.253 for (WSDLParserExtension e : extensions) { 128.254 e.bindingOperationOutputAttributes(operation, reader); 128.255 } 128.256 } 128.257 128.258 - public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) { 128.259 + public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) { 128.260 for (WSDLParserExtension e : extensions) { 128.261 if (e.bindingOperationFaultElements(fault, reader)) { 128.262 return true; 128.263 @@ -306,7 +304,7 @@ 128.264 return true; 128.265 } 128.266 128.267 - public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) { 128.268 + public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) { 128.269 for (WSDLParserExtension e : extensions) { 128.270 e.bindingOperationFaultAttributes(fault, reader); 128.271 }
129.1 --- a/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java Thu Oct 10 10:09:16 2013 -0700 129.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java Fri Oct 11 00:07:42 2013 -0700 129.3 @@ -209,7 +209,7 @@ 129.4 private final Class implType; 129.5 129.6 private boolean inlineSchemas; // TODO 129.7 - private final boolean disableSecureXmlProcessing; 129.8 + private final boolean disableXmlSecurity; 129.9 129.10 /** 129.11 * Creates the WSDLGenerator 129.12 @@ -229,12 +229,12 @@ 129.13 * @param model The {@link AbstractSEIModelImpl} used to generate the WSDL 129.14 * @param wsdlResolver The {@link WSDLResolver} to use resovle names while generating the WSDL 129.15 * @param binding specifies which {@link javax.xml.ws.BindingType} to generate 129.16 - * @param disableSecureXmlProcessing specifies whether to disable the secure xml processing feature 129.17 + * @param disableXmlSecurity specifies whether to disable the secure xml processing feature 129.18 * @param extensions an array {@link WSDLGeneratorExtension} that will 129.19 * be invoked to generate WSDL extensions 129.20 */ 129.21 public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, 129.22 - Class implType, boolean inlineSchemas, boolean disableSecureXmlProcessing, 129.23 + Class implType, boolean inlineSchemas, boolean disableXmlSecurity, 129.24 WSDLGeneratorExtension... extensions) { 129.25 129.26 this.model = model; 129.27 @@ -245,7 +245,7 @@ 129.28 this.implType = implType; 129.29 extensionHandlers = new ArrayList<WSDLGeneratorExtension>(); 129.30 this.inlineSchemas = inlineSchemas; 129.31 - this.disableSecureXmlProcessing = disableSecureXmlProcessing; 129.32 + this.disableXmlSecurity = disableXmlSecurity; 129.33 129.34 // register handlers for default extensions 129.35 register(new W3CAddressingWSDLGeneratorExtension()); 129.36 @@ -463,7 +463,7 @@ 129.37 } 129.38 } 129.39 if (resolver.nonGlassfishSchemas != null) { 129.40 - TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing); 129.41 + TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity); 129.42 try { 129.43 Transformer t = tf.newTransformer(); 129.44 for (DOMResult xsd : resolver.nonGlassfishSchemas) {
130.1 --- a/src/share/jaxws_classes/javax/annotation/PostConstruct.java Thu Oct 10 10:09:16 2013 -0700 130.2 +++ b/src/share/jaxws_classes/javax/annotation/PostConstruct.java Fri Oct 11 00:07:42 2013 -0700 130.3 @@ -38,12 +38,31 @@ 130.4 * if the class does not request any resources to be injected. Only one 130.5 * method can be annotated with this annotation. The method on which the 130.6 * PostConstruct annotation is applied MUST fulfill all of the following 130.7 - * criteria:<ul> 130.8 - * <li>The method MUST NOT have any parameters except in the case of EJB 130.9 + * criteria: 130.10 + * <p> 130.11 + * <ul> 130.12 + * <li>The method MUST NOT have any parameters except in the case of 130.13 * interceptors in which case it takes an InvocationContext object as 130.14 - * defined by the EJB specification.</li> 130.15 - * <li>The return type of the method MUST be void.</li> 130.16 - * <li>The method MUST NOT throw a checked exception.</li> 130.17 + * defined by the Interceptors specification.</li> 130.18 + * <li>The method defined on an interceptor class MUST HAVE one of the 130.19 + * following signatures: 130.20 + * <p> 130.21 + * void <METHOD>(InvocationContext) 130.22 + * <p> 130.23 + * Object <METHOD>(InvocationContext) throws Exception 130.24 + * <p> 130.25 + * <i>Note: A PostConstruct interceptor method must not throw application 130.26 + * exceptions, but it may be declared to throw checked exceptions including 130.27 + * the java.lang.Exception if the same interceptor method interposes on 130.28 + * business or timeout methods in addition to lifecycle events. If a 130.29 + * PostConstruct interceptor method returns a value, it is ignored by 130.30 + * the container.</i> 130.31 + * </li> 130.32 + * <li>The method defined on a non-interceptor class MUST HAVE the 130.33 + * following signature: 130.34 + * <p> 130.35 + * void <METHOD>() 130.36 + * </li> 130.37 * <li>The method on which PostConstruct is applied MAY be public, protected, 130.38 * package private or private.</li> 130.39 * <li>The method MUST NOT be static except for the application client.</li>
131.1 --- a/src/share/jaxws_classes/javax/annotation/PreDestroy.java Thu Oct 10 10:09:16 2013 -0700 131.2 +++ b/src/share/jaxws_classes/javax/annotation/PreDestroy.java Fri Oct 11 00:07:42 2013 -0700 131.3 @@ -37,18 +37,38 @@ 131.4 * supported by all container managed objects that support PostConstruct 131.5 * except the application client container in Java EE 5. The method on which 131.6 * the PreDestroy annotation is applied MUST fulfill all of the following 131.7 - * criteria:<ul> 131.8 - * <li>The method MUST NOT have any parameters except in the case of EJB 131.9 - * interceptors in which case it takes an InvocationContext object as defined 131.10 - * by the EJB specification.</li> 131.11 - * <li>The return type of the method MUST be void.</li> 131.12 - * <li>The method MUST NOT throw a checked exception.</li> 131.13 + * criteria: 131.14 + * <p> 131.15 + * <ul> 131.16 + * <li>The method MUST NOT have any parameters except in the case of 131.17 + * interceptors in which case it takes an InvocationContext object as 131.18 + * defined by the Interceptors specification.</li> 131.19 + * <li>The method defined on an interceptor class MUST HAVE one of the 131.20 + * following signatures: 131.21 + * <p> 131.22 + * void <METHOD>(InvocationContext) 131.23 + * <p> 131.24 + * Object <METHOD>(InvocationContext) throws Exception 131.25 + * <p> 131.26 + * <i>Note: A PreDestroy interceptor method must not throw application 131.27 + * exceptions, but it may be declared to throw checked exceptions including 131.28 + * the java.lang.Exception if the same interceptor method interposes on 131.29 + * business or timeout methods in addition to lifecycle events. If a 131.30 + * PreDestroy interceptor method returns a value, it is ignored by 131.31 + * the container.</i> 131.32 + * </li> 131.33 + * <li>The method defined on a non-interceptor class MUST HAVE the 131.34 + * following signature: 131.35 + * <p> 131.36 + * void <METHOD>() 131.37 + * </li> 131.38 * <li>The method on which PreDestroy is applied MAY be public, protected, 131.39 * package private or private.</li> 131.40 * <li>The method MUST NOT be static.</li> 131.41 * <li>The method MAY be final.</li> 131.42 * <li>If the method throws an unchecked exception it is ignored except in the 131.43 * case of EJBs where the EJB can handle exceptions.</li> 131.44 + * </ul> 131.45 * 131.46 * @see javax.annotation.PostConstruct 131.47 * @see javax.annotation.Resource
132.1 --- a/src/share/jaxws_classes/javax/xml/bind/JAXBException.java Thu Oct 10 10:09:16 2013 -0700 132.2 +++ b/src/share/jaxws_classes/javax/xml/bind/JAXBException.java Fri Oct 11 00:07:42 2013 -0700 132.3 @@ -48,7 +48,7 @@ 132.4 * Exception reference 132.5 * 132.6 */ 132.7 - private Throwable linkedException; 132.8 + private volatile Throwable linkedException; 132.9 132.10 static final long serialVersionUID = -5621384651494307979L; 132.11 132.12 @@ -133,7 +133,7 @@ 132.13 * indicates that the linked exception does not exist or 132.14 * is unknown). 132.15 */ 132.16 - public synchronized void setLinkedException( Throwable exception ) { 132.17 + public void setLinkedException( Throwable exception ) { 132.18 this.linkedException = exception; 132.19 } 132.20
133.1 --- a/src/share/jaxws_classes/javax/xml/bind/Marshaller.java Thu Oct 10 10:09:16 2013 -0700 133.2 +++ b/src/share/jaxws_classes/javax/xml/bind/Marshaller.java Fri Oct 11 00:07:42 2013 -0700 133.3 @@ -175,9 +175,7 @@ 133.4 * encoding used during these marshal operations. Client applications are 133.5 * expected to supply a valid character encoding name as defined in the 133.6 * <a href="http://www.w3.org/TR/2000/REC-xml-20001006#charencoding">W3C XML 1.0 133.7 - * Recommendation</a> and supported by your 133.8 - * <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/package-summary.html#charenc"> 133.9 - * Java Platform</a>. 133.10 + * Recommendation</a> and supported by your Java Platform</a>. 133.11 * </blockquote> 133.12 * 133.13 * <p> 133.14 @@ -292,7 +290,7 @@ 133.15 * boolean beforeMarshal(Marshaller); 133.16 * 133.17 * // Invoked by Marshaller after it has marshalled all properties of this object. 133.18 - * void afterMmarshal(Marshaller); 133.19 + * void afterMarshal(Marshaller); 133.20 * </pre> 133.21 * </blockquote> 133.22 * The class defined event callback methods should be used when the callback method requires
134.1 --- a/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java Thu Oct 10 10:09:16 2013 -0700 134.2 +++ b/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java Fri Oct 11 00:07:42 2013 -0700 134.3 @@ -57,7 +57,7 @@ 134.4 * Exception reference 134.5 * 134.6 */ 134.7 - private Throwable linkedException; 134.8 + private volatile Throwable linkedException; 134.9 134.10 134.11 /** 134.12 @@ -141,7 +141,7 @@ 134.13 * indicates that the linked exception does not exist or 134.14 * is unknown). 134.15 */ 134.16 - public synchronized void setLinkedException( Throwable exception ) { 134.17 + public void setLinkedException( Throwable exception ) { 134.18 this.linkedException = exception; 134.19 } 134.20
135.1 --- a/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html Thu Oct 10 10:09:16 2013 -0700 135.2 +++ b/src/share/jaxws_classes/javax/xml/bind/annotation/adapters/package.html Fri Oct 11 00:07:42 2013 -0700 135.3 @@ -38,8 +38,7 @@ 135.4 <h2>Package Specification</h2> 135.5 135.6 <ul> 135.7 - <li><a href="http://java.sun.com/xml/downloads/jaxb.html">JAXB 135.8 - Specification</a> 135.9 + <li><a href="http://jcp.org/en/jsr/detail?id=222">JAXB Specification</a> 135.10 </ul> 135.11 135.12 <h2>Related Documentation</h2> 135.13 @@ -47,8 +46,7 @@ 135.14 For overviews, tutorials, examples, guides, and tool documentation, 135.15 please see: 135.16 <ul> 135.17 - <li>The <a href="http://java.sun.com/xml/jaxb/index.html">JAXB 135.18 - Website</a> 135.19 + <li>The <a href="http://jaxb.java.net">JAXB Website</a> 135.20 </ul> 135.21 135.22 <!-- Put @see and @since tags down here. -->
136.1 --- a/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java Thu Oct 10 10:09:16 2013 -0700 136.2 +++ b/src/share/jaxws_classes/javax/xml/soap/MessageFactory.java Fri Oct 11 00:07:42 2013 -0700 136.3 @@ -104,8 +104,6 @@ 136.4 MESSAGE_FACTORY_PROPERTY, 136.5 DEFAULT_MESSAGE_FACTORY, 136.6 false); 136.7 - FactoryFinder.find(MESSAGE_FACTORY_PROPERTY, 136.8 - DEFAULT_MESSAGE_FACTORY, false); 136.9 136.10 if (factory != null) { 136.11 return factory;