8025054: Update JAX-WS RI integration to 2.2.9-b130926.1035
Reviewed-by: chegar
This commit is contained in:
parent
0290019388
commit
69e3b11c83
@ -88,9 +88,9 @@ public class ExternalMetadataFeature extends WebServiceFeature {
|
||||
return ID;
|
||||
}
|
||||
|
||||
public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableSecureXmlProcessing) {
|
||||
public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableXmlSecurity) {
|
||||
if (reader != null && enabled) return reader;
|
||||
return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableSecureXmlProcessing) : null;
|
||||
return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableXmlSecurity) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -30,10 +30,10 @@ BASEDIR_DOESNT_EXIST = \
|
||||
Non-existent directory: {0}
|
||||
|
||||
VERSION = \
|
||||
schemagen 2.2.8-b20130806.1801
|
||||
schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = \
|
||||
schemagen full version "2.2.8-b20130806.1801"
|
||||
schemagen full version "2.2.8-b130911.1802"
|
||||
|
||||
USAGE = \
|
||||
Usage: schemagen [-options ...] <java files> \n\
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2}
|
||||
|
||||
BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b20130806.1801"
|
||||
FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la colu
|
||||
|
||||
BASEDIR_DOESNT_EXIST = Directorio no existente: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b20130806.1801"
|
||||
FULLVERSION = versi\u00F3n completa de schemagen "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0
|
||||
|
||||
BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b20130806.1801"
|
||||
FULLVERSION = version compl\u00E8te de schemagen "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2}
|
||||
|
||||
BASEDIR_DOESNT_EXIST = Directory non esistente: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = versione completa schemagen "2.2.8-b20130806.1801"
|
||||
FULLVERSION = versione completa schemagen "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u
|
||||
|
||||
BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801"
|
||||
FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD
|
||||
|
||||
BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801"
|
||||
FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802"
|
||||
|
||||
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.
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = {0} inesperado aparece na linha {1} coluna {2}
|
||||
|
||||
BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0}
|
||||
|
||||
VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b20130806.1801
|
||||
VERSION = gera\u00E7\u00E3o do esquema 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b20130806.1801"
|
||||
FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u
|
||||
|
||||
BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
|
||||
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -27,8 +27,8 @@ UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1
|
||||
|
||||
BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0}
|
||||
|
||||
VERSION = schemagen 2.2.8-b20130806.1801
|
||||
VERSION = schemagen 2.2.8-b130911.1802
|
||||
|
||||
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
|
||||
FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
|
||||
|
||||
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
|
||||
|
@ -269,6 +269,20 @@ public final class WscompileMessages {
|
||||
return localizer.localize(localizableWSIMPORT_USAGE(arg0));
|
||||
}
|
||||
|
||||
public static Localizable localizableWSGEN_USAGE_EXTENSIONS() {
|
||||
return messageFactory.getMessage("wsgen.usage.extensions");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Extensions:
|
||||
* -Xnocompile do not compile generated Java files
|
||||
*
|
||||
*/
|
||||
public static String WSGEN_USAGE_EXTENSIONS() {
|
||||
return localizer.localize(localizableWSGEN_USAGE_EXTENSIONS());
|
||||
}
|
||||
|
||||
public static Localizable localizablePLEASE() {
|
||||
return messageFactory.getMessage("Please");
|
||||
}
|
||||
@ -283,6 +297,19 @@ public final class WscompileMessages {
|
||||
return localizer.localize(localizablePLEASE());
|
||||
}
|
||||
|
||||
public static Localizable localizableWSCOMPILE_EXISTING_OPTION(Object arg0) {
|
||||
return messageFactory.getMessage("wscompile.existingOption", arg0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignoring already defined option {0}
|
||||
*
|
||||
*
|
||||
*/
|
||||
public static String WSCOMPILE_EXISTING_OPTION(Object arg0) {
|
||||
return localizer.localize(localizableWSCOMPILE_EXISTING_OPTION(arg0));
|
||||
}
|
||||
|
||||
public static Localizable localizableWSIMPORT_PARSING_WSDL() {
|
||||
return messageFactory.getMessage("wsimport.ParsingWSDL");
|
||||
}
|
||||
@ -323,6 +350,8 @@ public final class WscompileMessages {
|
||||
* -B<jaxbOption> Pass this option to JAXB schema compiler
|
||||
* -catalog <file> specify catalog file to resolve external entity references
|
||||
* supports TR9401, XCatalog, and OASIS XML Catalog format.
|
||||
* -classpath <path> specify where to find user class files and wsimport extensions
|
||||
* -cp <path> specify where to find user class files and wsimport extensions
|
||||
* -d <directory> specify where to place generated output files
|
||||
* -encoding <encoding> specify character encoding used by source files
|
||||
* -extension allow vendor extensions - functionality not specified
|
||||
@ -332,6 +361,7 @@ public final class WscompileMessages {
|
||||
* -help display help
|
||||
* -httpproxy:<proxy> set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort
|
||||
* (port defaults to 8080)
|
||||
* -J<javacOption> pass this option to javac
|
||||
* -keep keep generated files
|
||||
* -p <pkg> specifies the target package
|
||||
* -quiet suppress wsimport output
|
||||
@ -343,7 +373,7 @@ public final class WscompileMessages {
|
||||
* -version print version information
|
||||
* -fullversion print full version information
|
||||
* -wsdllocation <location> @WebServiceClient.wsdlLocation value
|
||||
* -clientjar <jarfile> Creates the jar file of the generated artifacts along with the
|
||||
* -clientjar <jarfile> creates the jar file of the generated artifacts along with the
|
||||
* WSDL metadata required for invoking the web service.
|
||||
* -generateJWS generate stubbed JWS implementation file
|
||||
* -implDestDir <directory> specify where to generate JWS implementation file
|
||||
@ -656,8 +686,8 @@ public final class WscompileMessages {
|
||||
* Usage: {0} [options] <SEI>
|
||||
*
|
||||
* where [options] include:
|
||||
* -classpath <path> specify where to find input class files
|
||||
* -cp <path> same as -classpath <path>
|
||||
* -classpath <path> specify where to find input class files and wsgen extensions
|
||||
* -cp <path> specify where to find input class files and wsgen extensions
|
||||
* -d <directory> specify where to place generated output files
|
||||
* -encoding <encoding> specify character encoding used by source files
|
||||
* -extension allow vendor extensions - functionality not specified
|
||||
@ -665,6 +695,7 @@ public final class WscompileMessages {
|
||||
* result in applications that are not portable or
|
||||
* may not interoperate with other implementations
|
||||
* -help display help
|
||||
* -J<javacOption> pass this option to javac
|
||||
* -keep keep generated files
|
||||
* -r <directory> resource destination directory, specify where to
|
||||
* place resouce files such as WSDLs
|
||||
@ -675,7 +706,7 @@ public final class WscompileMessages {
|
||||
* -wsdl[:protocol] generate a WSDL file. The protocol is optional.
|
||||
* Valid protocols are {1},
|
||||
* the default is soap1.1.
|
||||
* The non stanadard protocols {2}
|
||||
* The non standard protocols {2}
|
||||
* can only be used in conjunction with the
|
||||
* -extension option.
|
||||
* -inlineSchemas inline schemas in the generated wsdl. Must be
|
||||
@ -684,6 +715,7 @@ public final class WscompileMessages {
|
||||
* Used in conjunction with the -wsdl option.
|
||||
* -portname <name> specify the Port name to use in the generated WSDL
|
||||
* Used in conjunction with the -wsdl option.
|
||||
* -x <file> specify External Web Service Metadata xml descriptor
|
||||
*
|
||||
*/
|
||||
public static String WSGEN_HELP(Object arg0, Object arg1, Object arg2) {
|
||||
@ -835,6 +867,18 @@ public final class WscompileMessages {
|
||||
return localizer.localize(localizableWSIMPORT_AUTH_INFO_LINENO(arg0, arg1));
|
||||
}
|
||||
|
||||
public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
|
||||
return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0);
|
||||
}
|
||||
|
||||
/**
|
||||
* The service name "{0}" is missing a localname.
|
||||
*
|
||||
*/
|
||||
public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
|
||||
return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0));
|
||||
}
|
||||
|
||||
public static Localizable localizableWSGEN_USAGE(Object arg0) {
|
||||
return messageFactory.getMessage("wsgen.usage", arg0);
|
||||
}
|
||||
@ -849,18 +893,6 @@ public final class WscompileMessages {
|
||||
return localizer.localize(localizableWSGEN_USAGE(arg0));
|
||||
}
|
||||
|
||||
public static Localizable localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
|
||||
return messageFactory.getMessage("wsgen.servicename.missing.localname", arg0);
|
||||
}
|
||||
|
||||
/**
|
||||
* The service name "{0}" is missing a localname.
|
||||
*
|
||||
*/
|
||||
public static String WSGEN_SERVICENAME_MISSING_LOCALNAME(Object arg0) {
|
||||
return localizer.localize(localizableWSGEN_SERVICENAME_MISSING_LOCALNAME(arg0));
|
||||
}
|
||||
|
||||
public static Localizable localizableWSGEN_SERVICENAME_MISSING_NAMESPACE(Object arg0) {
|
||||
return messageFactory.getMessage("wsgen.servicename.missing.namespace", arg0);
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ wsimport.help=\nUsage: {0} [options] <WSDL_URI>\n\n\
|
||||
\ -B<jaxbOption> Pass this option to JAXB schema compiler\n\
|
||||
\ -catalog <file> specify catalog file to resolve external entity references\n\
|
||||
\ supports TR9401, XCatalog, and OASIS XML Catalog format.\n\
|
||||
\ -classpath <path> specify where to find user class files and wsimport extensions\n\
|
||||
\ -cp <path> specify where to find user class files and wsimport extensions\n\
|
||||
\ -d <directory> specify where to place generated output files\n\
|
||||
\ -encoding <encoding> specify character encoding used by source files\n\
|
||||
\ -extension allow vendor extensions - functionality not specified\n\
|
||||
@ -42,6 +44,7 @@ wsimport.help=\nUsage: {0} [options] <WSDL_URI>\n\n\
|
||||
\ -help display help\n\
|
||||
\ -httpproxy:<proxy> set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort\n\
|
||||
\ (port defaults to 8080)\n\
|
||||
\ -J<javacOption> pass this option to javac\n\
|
||||
\ -keep keep generated files\n\
|
||||
\ -p <pkg> specifies the target package\n\
|
||||
\ -quiet suppress wsimport output\n\
|
||||
@ -53,7 +56,7 @@ wsimport.help=\nUsage: {0} [options] <WSDL_URI>\n\n\
|
||||
\ -version print version information\n\
|
||||
\ -fullversion print full version information\n\
|
||||
\ -wsdllocation <location> @WebServiceClient.wsdlLocation value\n\
|
||||
\ -clientjar <jarfile> Creates the jar file of the generated artifacts along with the\n\
|
||||
\ -clientjar <jarfile> creates the jar file of the generated artifacts along with the\n\
|
||||
\ WSDL metadata required for invoking the web service.\n\
|
||||
\ -generateJWS generate stubbed JWS implementation file\n\
|
||||
\ -implDestDir <directory> specify where to generate JWS implementation file\n\
|
||||
@ -91,8 +94,8 @@ Use "wsgen -help" for a detailed description of options.
|
||||
|
||||
wsgen.help=\nUsage: {0} [options] <SEI>\n\n\
|
||||
\where [options] include:\n\
|
||||
\ -classpath <path> specify where to find input class files\n\
|
||||
\ -cp <path> same as -classpath <path>\n\
|
||||
\ -classpath <path> specify where to find input class files and wsgen extensions\n\
|
||||
\ -cp <path> specify where to find input class files and wsgen extensions\n\
|
||||
\ -d <directory> specify where to place generated output files\n\
|
||||
\ -encoding <encoding> specify character encoding used by source files\n\
|
||||
\ -extension allow vendor extensions - functionality not specified\n\
|
||||
@ -100,6 +103,7 @@ wsgen.help=\nUsage: {0} [options] <SEI>\n\n\
|
||||
\ result in applications that are not portable or\n\
|
||||
\ may not interoperate with other implementations\n\
|
||||
\ -help display help\n\
|
||||
\ -J<javacOption> pass this option to javac\n\
|
||||
\ -keep keep generated files\n\
|
||||
\ -r <directory> resource destination directory, specify where to\n\
|
||||
\ place resouce files such as WSDLs\n\
|
||||
@ -110,7 +114,7 @@ wsgen.help=\nUsage: {0} [options] <SEI>\n\n\
|
||||
\ -wsdl[:protocol] generate a WSDL file. The protocol is optional.\n\
|
||||
\ Valid protocols are {1},\n\
|
||||
\ the default is soap1.1.\n\
|
||||
\ The non stanadard protocols {2}\n\
|
||||
\ The non standard protocols {2}\n\
|
||||
\ can only be used in conjunction with the\n\
|
||||
\ -extension option.\n\
|
||||
\ -inlineSchemas inline schemas in the generated wsdl. Must be\n\
|
||||
@ -118,8 +122,12 @@ wsgen.help=\nUsage: {0} [options] <SEI>\n\n\
|
||||
\ -servicename <name> specify the Service name to use in the generated WSDL\n\
|
||||
\ Used in conjunction with the -wsdl option.\n\
|
||||
\ -portname <name> specify the Port name to use in the generated WSDL\n\
|
||||
\ Used in conjunction with the -wsdl option.
|
||||
\ Used in conjunction with the -wsdl option.\n\
|
||||
\ -x <file> specify External Web Service Metadata xml descriptor
|
||||
|
||||
wsgen.usage.extensions=\n\
|
||||
\Extensions:\n\
|
||||
\ -Xnocompile do not compile generated Java files
|
||||
|
||||
wsgen.usage.examples=\n\
|
||||
\Examples:\n\
|
||||
@ -151,6 +159,7 @@ or use -Xendorsed option.
|
||||
# Generic Messages
|
||||
#
|
||||
wscompile.invalidOption=unrecognized parameter {0}
|
||||
wscompile.existingOption=Ignoring already defined option {0}\n
|
||||
wsimport.noSuchJaxbOption=no such JAXB option: {0}
|
||||
|
||||
wscompile.error=error: {0}
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
build-id=2.2.9-b14140
|
||||
build-version=JAX-WS RI 2.2.9-b14140
|
||||
build-id=2.2.9-b130926.1035
|
||||
build-version=JAX-WS RI 2.2.9-b130926.1035
|
||||
major-version=2.2.9
|
||||
svn-revision=14140
|
||||
svn-revision=8c29a9a53251ff741fca1664a8221dc876b2eac8
|
||||
|
@ -87,6 +87,13 @@ public class Options {
|
||||
|
||||
public String classpath = System.getProperty("java.class.path");
|
||||
|
||||
/**
|
||||
* -javacOptions
|
||||
*
|
||||
* @since 2.2.9
|
||||
*/
|
||||
public List<String> javacOptions;
|
||||
|
||||
|
||||
/**
|
||||
* -Xnocompile
|
||||
@ -94,10 +101,13 @@ public class Options {
|
||||
public boolean nocompile;
|
||||
|
||||
/**
|
||||
* Disable secure xml processing.
|
||||
* -XdisableSecureXmlProcessing
|
||||
* If true XML security features when parsing XML documents will be disabled.
|
||||
* The default value is false.
|
||||
*
|
||||
* Boolean
|
||||
* @since 2.2.9
|
||||
*/
|
||||
public boolean disableSecureXmlProcessing = false;
|
||||
public boolean disableXmlSecurity;
|
||||
|
||||
public enum Target {
|
||||
V2_0, V2_1, V2_2;
|
||||
@ -354,13 +364,24 @@ public class Options {
|
||||
throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding));
|
||||
}
|
||||
return 2;
|
||||
} else if (args[i].equals("-XdisableSecureXmlProcessing")) {
|
||||
disableSecureXmlProcessing= true;
|
||||
} else if (args[i].equals("-disableXmlSecurity")) {
|
||||
disableXmlSecurity();
|
||||
return 1;
|
||||
} else if (args[i].startsWith("-J")) {
|
||||
if (javacOptions == null) {
|
||||
javacOptions = new ArrayList<String>();
|
||||
}
|
||||
javacOptions.add(args[i].substring(2));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// protected method to allow overriding
|
||||
protected void disableXmlSecurity() {
|
||||
disableXmlSecurity= true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains an operand and reports an error if it's not there.
|
||||
*/
|
||||
@ -372,7 +393,28 @@ public class Options {
|
||||
return args[i];
|
||||
}
|
||||
|
||||
|
||||
List<String> getJavacOptions(List<String> existingOptions, WsimportListener listener) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
for (String o: javacOptions) {
|
||||
if (o.contains("=") && !o.startsWith("A")) {
|
||||
int i = o.indexOf('=');
|
||||
String key = o.substring(0, i);
|
||||
if (existingOptions.contains(key)) {
|
||||
listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(key));
|
||||
} else {
|
||||
result.add(key);
|
||||
result.add(o.substring(i + 1));
|
||||
}
|
||||
} else {
|
||||
if (existingOptions.contains(o)) {
|
||||
listener.message(WscompileMessages.WSCOMPILE_EXISTING_OPTION(o));
|
||||
} else {
|
||||
result.add(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to signal that we've finished processing.
|
||||
|
@ -161,7 +161,7 @@ public class WsgenTool {
|
||||
final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener);
|
||||
|
||||
boolean bootCP = useBootClasspath(EndpointReference.class) || useBootClasspath(XmlSeeAlso.class);
|
||||
Collection<String> args = new ArrayList<String>(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0)
|
||||
List<String> args = new ArrayList<String>(6 + (bootCP ? 1 : 0) + (options.nocompile ? 1 : 0)
|
||||
+ (options.encoding != null ? 2 : 0));
|
||||
args.add("-d");
|
||||
args.add(options.destDir.getAbsolutePath());
|
||||
@ -183,6 +183,9 @@ public class WsgenTool {
|
||||
.append(File.pathSeparator)
|
||||
.append(JavaCompilerHelper.getJarFile(XmlSeeAlso.class)).toString());
|
||||
}
|
||||
if (options.javacOptions != null) {
|
||||
args.addAll(options.getJavacOptions(args, listener));
|
||||
}
|
||||
|
||||
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();// compiler = JavacTool.create();
|
||||
DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
|
||||
@ -205,9 +208,9 @@ public class WsgenTool {
|
||||
DatabindingConfig config = new DatabindingConfig();
|
||||
|
||||
List<String> externalMetadataFileNames = options.externalMetadataFiles;
|
||||
boolean disableSecureXmlProcessing = options.disableSecureXmlProcessing;
|
||||
boolean disableXmlSecurity = options.disableXmlSecurity;
|
||||
if (externalMetadataFileNames != null && externalMetadataFileNames.size() > 0) {
|
||||
config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableSecureXmlProcessing));
|
||||
config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableXmlSecurity));
|
||||
}
|
||||
|
||||
String tmpPath = options.destDir.getAbsolutePath() + File.pathSeparator + options.classpath;
|
||||
@ -243,7 +246,7 @@ public class WsgenTool {
|
||||
final Map<String, File> schemaFiles = new HashMap<String, File>();
|
||||
|
||||
WSDLGenInfo wsdlGenInfo = new WSDLGenInfo();
|
||||
wsdlGenInfo.setSecureXmlProcessingDisabled(disableSecureXmlProcessing);
|
||||
wsdlGenInfo.setSecureXmlProcessingDisabled(disableXmlSecurity);
|
||||
|
||||
wsdlGenInfo.setWsdlResolver(
|
||||
new WSDLResolver() {
|
||||
@ -404,6 +407,7 @@ public class WsgenTool {
|
||||
System.out.println(WscompileMessages.WSGEN_HELP("WSGEN",
|
||||
((WsgenOptions)options).protocols,
|
||||
((WsgenOptions)options).nonstdProtocols.keySet()));
|
||||
System.out.println(WscompileMessages.WSGEN_USAGE_EXTENSIONS());
|
||||
System.out.println(WscompileMessages.WSGEN_USAGE_EXAMPLES());
|
||||
}
|
||||
}
|
||||
|
@ -774,4 +774,10 @@ public class WsimportOptions extends Options {
|
||||
is.setSystemId(systemId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void disableXmlSecurity() {
|
||||
super.disableXmlSecurity();
|
||||
schemaCompiler.getOptions().disableXmlSecurity = true;
|
||||
}
|
||||
}
|
||||
|
@ -524,29 +524,34 @@ public class WsimportTool {
|
||||
String classDir = options.destDir.getAbsolutePath();
|
||||
String classpathString = createClasspathString();
|
||||
boolean bootCP = useBootClasspath(EndpointContext.class) || useBootClasspath(JAXBPermission.class);
|
||||
String[] args = new String[4 + (bootCP ? 1 : 0) + (options.debug ? 1 : 0)
|
||||
+ (options.encoding != null ? 2 : 0) + sourceFiles.size()];
|
||||
args[0] = "-d";
|
||||
args[1] = classDir;
|
||||
args[2] = "-classpath";
|
||||
args[3] = classpathString;
|
||||
int baseIndex = 4;
|
||||
List<String> args = new ArrayList<String>();
|
||||
args.add("-d");
|
||||
args.add(classDir);
|
||||
args.add("-classpath");
|
||||
args.add(classpathString);
|
||||
//javac is not working in osgi as the url starts with a bundle
|
||||
if (bootCP) {
|
||||
args[baseIndex++] = "-Xbootclasspath/p:"+JavaCompilerHelper.getJarFile(EndpointContext.class)+File.pathSeparator+JavaCompilerHelper.getJarFile(JAXBPermission.class);
|
||||
args.add("-Xbootclasspath/p:"
|
||||
+ JavaCompilerHelper.getJarFile(EndpointContext.class)
|
||||
+ File.pathSeparator
|
||||
+ JavaCompilerHelper.getJarFile(JAXBPermission.class));
|
||||
}
|
||||
|
||||
if (options.debug) {
|
||||
args[baseIndex++] = "-g";
|
||||
args.add("-g");
|
||||
}
|
||||
|
||||
if (options.encoding != null) {
|
||||
args[baseIndex++] = "-encoding";
|
||||
args[baseIndex++] = options.encoding;
|
||||
args.add("-encoding");
|
||||
args.add(options.encoding);
|
||||
}
|
||||
|
||||
if (options.javacOptions != null) {
|
||||
args.addAll(options.getJavacOptions(args, listener));
|
||||
}
|
||||
|
||||
for (int i = 0; i < sourceFiles.size(); ++i) {
|
||||
args[baseIndex + i] = sourceFiles.get(i);
|
||||
args.add(sourceFiles.get(i));
|
||||
}
|
||||
|
||||
listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE());
|
||||
@ -558,7 +563,7 @@ public class WsimportTool {
|
||||
listener.message("javac "+ argstr.toString());
|
||||
}
|
||||
|
||||
return JavaCompilerHelper.compile(args, out, receiver);
|
||||
return JavaCompilerHelper.compile(args.toArray(new String[args.size()]), out, receiver);
|
||||
}
|
||||
//there are no files to compile, so return true?
|
||||
return true;
|
||||
|
@ -114,7 +114,7 @@ public class DOMForest {
|
||||
this.logic = logic;
|
||||
try {
|
||||
// secure xml processing can be switched off if input requires it
|
||||
boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing;
|
||||
boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
|
||||
DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled);
|
||||
dbf.setNamespaceAware(true);
|
||||
this.documentBuilder = dbf.newDocumentBuilder();
|
||||
@ -365,7 +365,7 @@ public class DOMForest {
|
||||
try {
|
||||
// create identity transformer
|
||||
// secure xml processing can be switched off if input requires it
|
||||
boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing;
|
||||
boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity;
|
||||
TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled);
|
||||
Transformer it = tf.newTransformer();
|
||||
|
||||
|
@ -171,20 +171,20 @@ Driver.CompilingSchema = \
|
||||
Driver.FailedToGenerateCode = \
|
||||
Failed to produce code.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
Driver.FilePrologComment = \
|
||||
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b20130806.1801 \n\
|
||||
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 \n\
|
||||
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \n\
|
||||
Any modifications to this file will be lost upon recompilation of the source schema. \n\
|
||||
Generated on: {0} \n
|
||||
|
||||
Driver.Version = \
|
||||
xjc 2.2.8-b20130806.1801
|
||||
xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = \
|
||||
xjc full version "2.2.8-b20130806.1801"
|
||||
xjc full version "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = Ein Schema wird kompiliert ...
|
||||
|
||||
Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = xjc vollst\u00E4ndige Version "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = Compilando un esquema...
|
||||
|
||||
Driver.FailedToGenerateCode = Fallo al producir c\u00f3digo.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = versi\u00F3n completa de xjc "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = compilation d'un sch\u00e9ma...
|
||||
|
||||
Driver.FailedToGenerateCode = Echec de la production du code.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = version compl\u00E8te xjc "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = compilazione di uno schema in corso...
|
||||
|
||||
Driver.FailedToGenerateCode = Produzione del codice non riuscita.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = versione completa xjc "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = versione completa xjc "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\
|
||||
|
||||
Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = xjc\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294
|
||||
|
||||
Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = XJC 2.2.8-b20130806.1801
|
||||
Driver.Version = XJC 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = XJC \uC815\uC2DD \uBC84\uC804 "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = compilando um esquema...
|
||||
|
||||
Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = vers\u00E3o completa de xjc "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = \u6b63\u5728\u7f16\u8bd1\u6a21\u5f0f...
|
||||
|
||||
Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -96,14 +96,14 @@ Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981...
|
||||
|
||||
Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc.
|
||||
|
||||
# DO NOT localize the 2.2.8-b20130806.1801 string - it is a token for an ant <replaceFilter>
|
||||
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
|
||||
# DO NOT localize the 2.2.8-b130911.1802 string - it is a token for an mvn <properties filter>
|
||||
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
|
||||
|
||||
Driver.Version = xjc 2.2.8-b20130806.1801
|
||||
Driver.Version = xjc 2.2.8-b130911.1802
|
||||
|
||||
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b20130806.1801"
|
||||
Driver.FullVersion = xjc \u5B8C\u6574\u7248\u672C "2.2.8-b130911.1802"
|
||||
|
||||
Driver.BuildID = 2.2.8-b20130806.1801
|
||||
Driver.BuildID = 2.2.8-b130911.1802
|
||||
|
||||
# for JDK integration - include version in source zip
|
||||
jaxb.jdk.version=@@JAXB_JDK_VERSION@@
|
||||
|
@ -35,7 +35,7 @@ import com.sun.xml.internal.bind.v2.util.XmlFactory;
|
||||
import javax.xml.XMLConstants;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess;
|
||||
import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess;
|
||||
|
||||
/**
|
||||
* Wraps a JAXP {@link Schema} object and lazily instantiate it.
|
||||
@ -61,7 +61,7 @@ public final class SchemaCache {
|
||||
try {
|
||||
// do not disable secure processing - these are well-known schemas
|
||||
SchemaFactory sf = XmlFactory.createSchemaFactory(XMLConstants.W3C_XML_SCHEMA_NS_URI, false);
|
||||
schema = allowFileAccess(sf, false).newSchema(source);
|
||||
schema = allowExternalAccess(sf, "file", false).newSchema(source);
|
||||
} catch (SAXException e) {
|
||||
// we make sure that the schema is correct before we ship.
|
||||
throw new AssertionError(e);
|
||||
|
@ -59,7 +59,7 @@ import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.*;
|
||||
|
||||
import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowFileAccess;
|
||||
import static com.sun.xml.internal.bind.v2.util.XmlFactory.allowExternalAccess;
|
||||
import static javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI;
|
||||
|
||||
|
||||
@ -460,7 +460,7 @@ public final class DOMForest {
|
||||
}
|
||||
|
||||
try {
|
||||
allowFileAccess(sf, options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0]));
|
||||
allowExternalAccess(sf, "file,http", options.disableXmlSecurity).newSchema(sources.toArray(new SAXSource[0]));
|
||||
} catch (SAXException e) {
|
||||
// error should have been reported.
|
||||
} catch (RuntimeException re) {
|
||||
|
@ -41,6 +41,7 @@ import com.sun.xml.internal.xsom.XSParticle;
|
||||
import com.sun.xml.internal.xsom.XSType;
|
||||
import com.sun.xml.internal.xsom.XSWildcard;
|
||||
import com.sun.xml.internal.xsom.visitor.XSTermFunction;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.xml.internal.rngom.nc.ChoiceNameClass;
|
||||
import com.sun.xml.internal.rngom.nc.NameClass;
|
||||
@ -65,14 +66,17 @@ abstract class AbstractExtendedComplexTypeBuilder extends CTBuilder {
|
||||
* Computes a name class that represents everything in a given content model.
|
||||
*/
|
||||
protected final XSTermFunction<NameClass> contentModelNameClassBuilder = new XSTermFunction<NameClass>() {
|
||||
@Override
|
||||
public NameClass wildcard(XSWildcard wc) {
|
||||
return WildcardNameClassBuilder.build(wc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameClass modelGroupDecl(XSModelGroupDecl decl) {
|
||||
return modelGroup(decl.getModelGroup());
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameClass modelGroup(XSModelGroup group) {
|
||||
NameClass nc = NameClass.NULL;
|
||||
for( int i=0; i<group.getSize(); i++ )
|
||||
@ -216,7 +220,7 @@ abstract class AbstractExtendedComplexTypeBuilder extends CTBuilder {
|
||||
* Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
|
||||
*/
|
||||
private NameClass getNameClass(XSDeclaration decl) {
|
||||
return new SimpleNameClass(decl.getTargetNamespace(), decl.getName());
|
||||
return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ public class SchemaConstraintChecker {
|
||||
boolean hadErrors = false;
|
||||
|
||||
SchemaFactory sf = XmlFactory.createSchemaFactory(W3C_XML_SCHEMA_NS_URI, disableXmlSecurity);
|
||||
XmlFactory.allowExternalAccess(sf, "all", disableXmlSecurity);
|
||||
sf.setErrorHandler(errorFilter);
|
||||
if( entityResolver != null ) {
|
||||
sf.setResourceResolver(new LSResourceResolver() {
|
||||
@ -91,6 +92,7 @@ public class SchemaConstraintChecker {
|
||||
}
|
||||
|
||||
try {
|
||||
XmlFactory.allowExternalDTDAccess(sf, "all", disableXmlSecurity);
|
||||
sf.newSchema(getSchemaSource(schemas, entityResolver));
|
||||
} catch (SAXException e) {
|
||||
// TODO: we haven't thrown exceptions from here before. should we just trap them and return false?
|
||||
|
@ -42,6 +42,8 @@ public enum Messages {
|
||||
INVALID_JAXP_IMPLEMENTATION, // 1 arg
|
||||
JAXP_SUPPORTED_PROPERTY, // 1 arg
|
||||
JAXP_UNSUPPORTED_PROPERTY, // 1 arg
|
||||
JAXP_XML_SECURITY_DISABLED, // no arg
|
||||
JAXP_EXTERNAL_ACCESS_CONFIGURED, // no arg
|
||||
;
|
||||
|
||||
private static final ResourceBundle rb = ResourceBundle.getBundle(Messages.class.getName());
|
||||
|
@ -56,3 +56,9 @@ JAXP_SUPPORTED_PROPERTY =\
|
||||
|
||||
JAXP_UNSUPPORTED_PROPERTY =\
|
||||
Property "{0}" is not supported by used JAXP implementation.
|
||||
|
||||
JAXP_XML_SECURITY_DISABLED=\
|
||||
"Xml Security disabled, no JAXP xsd external access configuration necessary."
|
||||
|
||||
JAXP_EXTERNAL_ACCESS_CONFIGURED=\
|
||||
"Detected explicitly JAXP configuration, no JAXP xsd external access configuration necessary."
|
||||
|
@ -140,22 +140,23 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
|
||||
*/
|
||||
private final Loader itemsLoader = new Loader(false) {
|
||||
|
||||
private ThreadLocal<BeanT> target = new ThreadLocal<BeanT>();
|
||||
private ThreadLocal<ValueT> map = new ThreadLocal<ValueT>();
|
||||
private int depthCounter = 0; // needed to clean ThreadLocals
|
||||
private ThreadLocal<Stack<BeanT>> target = new ThreadLocal<Stack<BeanT>>();
|
||||
private ThreadLocal<Stack<ValueT>> map = new ThreadLocal<Stack<ValueT>>();
|
||||
|
||||
@Override
|
||||
public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
|
||||
// create or obtain the Map object
|
||||
try {
|
||||
target.set((BeanT)state.prev.target);
|
||||
map.set(acc.get(target.get()));
|
||||
depthCounter++;
|
||||
if(map.get() == null) {
|
||||
map.set(ClassFactory.create(mapImplClass));
|
||||
}
|
||||
map.get().clear();
|
||||
state.target = map.get();
|
||||
BeanT target = (BeanT) state.prev.target;
|
||||
ValueT mapValue = acc.get(target);
|
||||
if(mapValue == null)
|
||||
mapValue = ClassFactory.create(mapImplClass);
|
||||
else
|
||||
mapValue.clear();
|
||||
|
||||
Stack.push(this.target, target);
|
||||
Stack.push(map, mapValue);
|
||||
state.target = mapValue;
|
||||
} catch (AccessorException e) {
|
||||
// recover from error by setting a dummy Map that receives and discards the values
|
||||
handleGenericException(e,true);
|
||||
@ -167,11 +168,7 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
|
||||
public void leaveElement(State state, TagName ea) throws SAXException {
|
||||
super.leaveElement(state, ea);
|
||||
try {
|
||||
acc.set(target.get(), map.get());
|
||||
if (--depthCounter == 0) {
|
||||
target.remove();
|
||||
map.remove();
|
||||
}
|
||||
acc.set(Stack.pop(target), Stack.pop(map));
|
||||
} catch (AccessorException ex) {
|
||||
handleGenericException(ex,true);
|
||||
}
|
||||
@ -289,4 +286,36 @@ final class SingleMapNodeProperty<BeanT,ValueT extends Map> extends PropertyImpl
|
||||
return acc;
|
||||
return null;
|
||||
}
|
||||
|
||||
private static final class Stack<T> {
|
||||
private Stack<T> parent;
|
||||
private T value;
|
||||
|
||||
private Stack(Stack<T> parent, T value) {
|
||||
this.parent = parent;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private Stack(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private static <T> void push(ThreadLocal<Stack<T>> holder, T value) {
|
||||
Stack<T> parent = holder.get();
|
||||
if (parent == null)
|
||||
holder.set(new Stack<T>(value));
|
||||
else
|
||||
holder.set(new Stack<T>(parent, value));
|
||||
}
|
||||
|
||||
private static <T> T pop(ThreadLocal<Stack<T>> holder) {
|
||||
Stack<T> current = holder.get();
|
||||
if (current.parent == null)
|
||||
holder.remove();
|
||||
else
|
||||
holder.set(current.parent);
|
||||
return current.value;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,19 +63,15 @@ class AccessorInjector {
|
||||
ClassLoader cl = SecureLoader.getClassClassLoader(beanClass);
|
||||
if(cl==null) return null; // how do I inject classes to this "null" class loader? for now, back off.
|
||||
|
||||
Class c = null;
|
||||
synchronized (AccessorInjector.class) {
|
||||
c = Injector.find(cl,newClassName);
|
||||
if(c==null) {
|
||||
byte[] image = tailor(templateClassName,newClassName,replacements);
|
||||
// try {
|
||||
// new FileOutputStream("debug.class").write(image);
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
if(image==null)
|
||||
return null;
|
||||
c = Injector.inject(cl,newClassName,image);
|
||||
Class c = Injector.find(cl,newClassName);
|
||||
if (c==null) {
|
||||
byte[] image = tailor(templateClassName,newClassName,replacements);
|
||||
if (image==null) {
|
||||
return null;
|
||||
}
|
||||
c = Injector.inject(cl,newClassName,image);
|
||||
if (c == null) {
|
||||
Injector.find(cl, newClassName);
|
||||
}
|
||||
}
|
||||
return c;
|
||||
@ -112,4 +108,5 @@ class AccessorInjector {
|
||||
}
|
||||
|
||||
private static final ClassLoader CLASS_LOADER = SecureLoader.getClassClassLoader(AccessorInjector.class);
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -156,6 +156,7 @@ final class Injector {
|
||||
}
|
||||
AccessController.doPrivileged(new PrivilegedAction<Void>() {
|
||||
|
||||
@Override
|
||||
public Void run() {
|
||||
// TODO: check security implication
|
||||
// do these setAccessible allow anyone to call these methods freely?s
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -127,8 +127,11 @@ public abstract class OptimizedAccessorFactory {
|
||||
return null;
|
||||
|
||||
Accessor<B,V> acc = instanciate(opt);
|
||||
if(acc!=null)
|
||||
logger.log(Level.FINE,"Using optimized Accessor for "+getter+" and "+setter);
|
||||
if (acc!=null) {
|
||||
if (logger.isLoggable(Level.FINE)) {
|
||||
logger.log(Level.FINE, "Using optimized Accessor for {0} and {1}", new Object[]{getter, setter});
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
|
||||
@ -174,8 +177,11 @@ public abstract class OptimizedAccessorFactory {
|
||||
return null;
|
||||
|
||||
Accessor<B,V> acc = instanciate(opt);
|
||||
if(acc!=null)
|
||||
logger.log(Level.FINE,"Using optimized Accessor for "+field);
|
||||
if (acc!=null) {
|
||||
if (logger.isLoggable(Level.FINE)) {
|
||||
logger.log(Level.FINE, "Using optimized Accessor for {0}", field);
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,8 @@ import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXNotRecognizedException;
|
||||
import org.xml.sax.SAXNotSupportedException;
|
||||
|
||||
import static com.sun.xml.internal.bind.Util.getSystemProperty;
|
||||
|
||||
/**
|
||||
* Provides helper methods for creating properly configured XML parser
|
||||
* factory instances with namespace support turned on and configured for
|
||||
@ -53,6 +55,7 @@ public class XmlFactory {
|
||||
|
||||
// not in older JDK, so must be duplicated here, otherwise javax.xml.XMLConstants should be used
|
||||
public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema";
|
||||
public static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD";
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(XmlFactory.class.getName());
|
||||
|
||||
@ -65,11 +68,10 @@ public class XmlFactory {
|
||||
*/
|
||||
private static final String DISABLE_XML_SECURITY = "com.sun.xml.internal.bind.disableXmlSecurity";
|
||||
|
||||
public static final boolean DISABLE_SECURE_PROCESSING =
|
||||
Boolean.parseBoolean(Util.getSystemProperty(DISABLE_XML_SECURITY));
|
||||
public static final boolean XML_SECURITY_DISABLED = Boolean.parseBoolean(getSystemProperty(DISABLE_XML_SECURITY));
|
||||
|
||||
private static boolean xmlFeatureValue(boolean runtimeSetting) {
|
||||
return !(DISABLE_SECURE_PROCESSING || runtimeSetting);
|
||||
private static boolean isXMLSecurityDisabled(boolean runtimeSetting) {
|
||||
return XML_SECURITY_DISABLED || runtimeSetting;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -83,7 +85,7 @@ public class XmlFactory {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, "SchemaFactory instance: {0}", factory);
|
||||
}
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
|
||||
return factory;
|
||||
} catch (SAXNotRecognizedException ex) {
|
||||
LOGGER.log(Level.SEVERE, null, ex);
|
||||
@ -109,7 +111,7 @@ public class XmlFactory {
|
||||
LOGGER.log(Level.FINE, "SAXParserFactory instance: {0}", factory);
|
||||
}
|
||||
factory.setNamespaceAware(true);
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
|
||||
return factory;
|
||||
} catch (ParserConfigurationException ex) {
|
||||
LOGGER.log(Level.SEVERE, null, ex);
|
||||
@ -136,7 +138,7 @@ public class XmlFactory {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, "XPathFactory instance: {0}", factory);
|
||||
}
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
|
||||
return factory;
|
||||
} catch (XPathFactoryConfigurationException ex) {
|
||||
LOGGER.log(Level.SEVERE, null, ex);
|
||||
@ -157,7 +159,7 @@ public class XmlFactory {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, "TransformerFactory instance: {0}", factory);
|
||||
}
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
|
||||
return factory;
|
||||
} catch (TransformerConfigurationException ex) {
|
||||
LOGGER.log(Level.SEVERE, null, ex);
|
||||
@ -180,7 +182,7 @@ public class XmlFactory {
|
||||
LOGGER.log(Level.FINE, "DocumentBuilderFactory instance: {0}", factory);
|
||||
}
|
||||
factory.setNamespaceAware(true);
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xmlFeatureValue(disableSecureProcessing));
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecureProcessing));
|
||||
return factory;
|
||||
} catch (ParserConfigurationException ex) {
|
||||
LOGGER.log(Level.SEVERE, null, ex);
|
||||
@ -191,20 +193,64 @@ public class XmlFactory {
|
||||
}
|
||||
}
|
||||
|
||||
public static SchemaFactory allowFileAccess(SchemaFactory sf, boolean disableSecureProcessing) {
|
||||
public static SchemaFactory allowExternalAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) {
|
||||
|
||||
// if feature secure processing enabled, nothing to do, file is allowed,
|
||||
// or user is able to control access by standard JAXP mechanisms
|
||||
if (disableSecureProcessing) {
|
||||
// if xml security (feature secure processing) disabled, nothing to do, no restrictions applied
|
||||
if (isXMLSecurityDisabled(disableSecureProcessing)) {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_XML_SECURITY_DISABLED.format());
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
||||
if (System.getProperty("javax.xml.accessExternalSchema") != null) {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_EXTERNAL_ACCESS_CONFIGURED.format());
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
||||
try {
|
||||
sf.setProperty(ACCESS_EXTERNAL_SCHEMA, "file");
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA));
|
||||
sf.setProperty(ACCESS_EXTERNAL_SCHEMA, value);
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA));
|
||||
}
|
||||
} catch (SAXException ignored) {
|
||||
// nothing to do; support depends on version JDK or SAX implementation
|
||||
LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored);
|
||||
if (LOGGER.isLoggable(Level.CONFIG)) {
|
||||
LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_SCHEMA), ignored);
|
||||
}
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
||||
public static SchemaFactory allowExternalDTDAccess(SchemaFactory sf, String value, boolean disableSecureProcessing) {
|
||||
|
||||
// if xml security (feature secure processing) disabled, nothing to do, no restrictions applied
|
||||
if (isXMLSecurityDisabled(disableSecureProcessing)) {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_XML_SECURITY_DISABLED.format());
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
||||
if (System.getProperty("javax.xml.accessExternalDTD") != null) {
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_EXTERNAL_ACCESS_CONFIGURED.format());
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
||||
try {
|
||||
sf.setProperty(ACCESS_EXTERNAL_DTD, value);
|
||||
if (LOGGER.isLoggable(Level.FINE)) {
|
||||
LOGGER.log(Level.FINE, Messages.JAXP_SUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD));
|
||||
}
|
||||
} catch (SAXException ignored) {
|
||||
// nothing to do; support depends on version JDK or SAX implementation
|
||||
if (LOGGER.isLoggable(Level.CONFIG)) {
|
||||
LOGGER.log(Level.CONFIG, Messages.JAXP_UNSUPPORTED_PROPERTY.format(ACCESS_EXTERNAL_DTD), ignored);
|
||||
}
|
||||
}
|
||||
return sf;
|
||||
}
|
||||
|
@ -287,10 +287,11 @@ public class Base64Data implements CharSequence, Cloneable {
|
||||
* @throws IOException if i/o error occurs
|
||||
*/
|
||||
public InputStream getInputStream() throws IOException {
|
||||
if(dataHandler!=null)
|
||||
if(dataHandler!=null) {
|
||||
return dataHandler.getInputStream();
|
||||
else
|
||||
} else {
|
||||
return new ByteArrayInputStream(data,0,dataLen);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -342,8 +343,9 @@ public class Base64Data implements CharSequence, Cloneable {
|
||||
}
|
||||
|
||||
public String getMimeType() {
|
||||
if(mimeType==null)
|
||||
if (mimeType==null) {
|
||||
return "application/octet-stream";
|
||||
}
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
@ -376,31 +378,35 @@ public class Base64Data implements CharSequence, Cloneable {
|
||||
case 0:
|
||||
return Base64Encoder.encode(data[base]>>2);
|
||||
case 1:
|
||||
if(base+1<dataLen)
|
||||
if (base+1<dataLen) {
|
||||
b1 = data[base+1];
|
||||
else
|
||||
} else {
|
||||
b1 = 0;
|
||||
}
|
||||
return Base64Encoder.encode(
|
||||
((data[base]&0x3)<<4) |
|
||||
((b1>>4)&0xF));
|
||||
case 2:
|
||||
if(base+1<dataLen) {
|
||||
if (base+1<dataLen) {
|
||||
b1 = data[base+1];
|
||||
if(base+2<dataLen)
|
||||
if (base+2<dataLen) {
|
||||
b2 = data[base+2];
|
||||
else
|
||||
} else {
|
||||
b2 = 0;
|
||||
}
|
||||
|
||||
return Base64Encoder.encode(
|
||||
((b1&0xF)<<2)|
|
||||
((b2>>6)&0x3));
|
||||
} else
|
||||
} else {
|
||||
return '=';
|
||||
}
|
||||
case 3:
|
||||
if(base+2<dataLen)
|
||||
if(base+2<dataLen) {
|
||||
return Base64Encoder.encode(data[base+2]&0x3F);
|
||||
else
|
||||
} else {
|
||||
return '=';
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalStateException();
|
||||
@ -414,8 +420,9 @@ public class Base64Data implements CharSequence, Cloneable {
|
||||
public CharSequence subSequence(int start, int end) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
get(); // fill in the buffer if we haven't done so
|
||||
for( int i=start; i<end; i++ )
|
||||
for (int i=start; i<end; i++ ) {
|
||||
buf.append(charAt(i));
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
@ -473,7 +480,25 @@ public class Base64Data implements CharSequence, Cloneable {
|
||||
|
||||
@Override
|
||||
public Base64Data clone() {
|
||||
return new Base64Data(this);
|
||||
try {
|
||||
Base64Data clone = (Base64Data) super.clone();
|
||||
clone.get();
|
||||
if (clone.dataCloneByRef) {
|
||||
this.data = clone.data;
|
||||
} else {
|
||||
this.data = new byte[clone.dataLen];
|
||||
System.arraycopy(clone.data, 0, this.data, 0, clone.dataLen);
|
||||
}
|
||||
|
||||
this.dataCloneByRef = true;
|
||||
this.dataLen = clone.dataLen;
|
||||
this.dataHandler = null;
|
||||
this.mimeType = clone.mimeType;
|
||||
return clone;
|
||||
} catch (CloneNotSupportedException ex) {
|
||||
Logger.getLogger(Base64Data.class.getName()).log(Level.SEVERE, null, ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static String getProperty(final String propName) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -55,9 +55,9 @@ import org.xml.sax.Locator;
|
||||
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
|
||||
*/
|
||||
public abstract class DPattern implements ParsedPattern {
|
||||
|
||||
Locator location;
|
||||
DAnnotation annotation;
|
||||
|
||||
/**
|
||||
* Used to chain the child patterns in a doubly-linked list.
|
||||
*/
|
||||
@ -74,12 +74,12 @@ public abstract class DPattern implements ParsedPattern {
|
||||
/**
|
||||
* Returns the annotation associated with it.
|
||||
*
|
||||
* @return
|
||||
* may be empty, but never be null.
|
||||
* @return may be empty, but never be null.
|
||||
*/
|
||||
public DAnnotation getAnnotation() {
|
||||
if(annotation==null)
|
||||
if (annotation == null) {
|
||||
return DAnnotation.EMPTY;
|
||||
}
|
||||
return annotation;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ public abstract class DPattern implements ParsedPattern {
|
||||
*/
|
||||
public abstract boolean isNullable();
|
||||
|
||||
public abstract <V> V accept( DPatternVisitor<V> visitor );
|
||||
public abstract <V> V accept(DPatternVisitor<V> visitor);
|
||||
|
||||
/**
|
||||
* Creates a {@link Parseable} object that reparses this pattern.
|
||||
|
@ -110,7 +110,11 @@ public class DXMLPrinter {
|
||||
visitor.on(grammar);
|
||||
visitor.endDocument();
|
||||
} catch (XMLWriterException e) {
|
||||
throw (XMLStreamException) e.getCause();
|
||||
if (e.getCause() instanceof XMLStreamException) {
|
||||
throw (XMLStreamException) e.getCause();
|
||||
} else {
|
||||
throw new XMLStreamException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +127,11 @@ public class DXMLPrinter {
|
||||
try {
|
||||
pattern.accept(visitor);
|
||||
} catch (XMLWriterException e) {
|
||||
throw (XMLStreamException) e.getCause();
|
||||
if (e.getCause() instanceof XMLStreamException) {
|
||||
throw (XMLStreamException) e.getCause();
|
||||
} else {
|
||||
throw new XMLStreamException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +144,11 @@ public class DXMLPrinter {
|
||||
try {
|
||||
nc.accept(ncVisitor);
|
||||
} catch (XMLWriterException e) {
|
||||
throw (XMLStreamException) e.getCause();
|
||||
if (e.getCause() instanceof XMLStreamException) {
|
||||
throw (XMLStreamException) e.getCause();
|
||||
} else {
|
||||
throw new XMLStreamException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -82,8 +82,9 @@ final class DataPatternBuilderImpl implements DataPatternBuilder {
|
||||
|
||||
public ParsedPattern makePattern(ParsedPattern except, Location loc, Annotations anno) throws BuildException {
|
||||
p.except = (DPattern)except;
|
||||
if(anno!=null)
|
||||
if (anno!=null) {
|
||||
p.annotation = ((Annotation)anno).getResult();
|
||||
}
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -45,6 +45,9 @@
|
||||
*/
|
||||
package com.sun.xml.internal.rngom.digested;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.sun.xml.internal.rngom.ast.builder.Annotations;
|
||||
import com.sun.xml.internal.rngom.ast.builder.BuildException;
|
||||
import com.sun.xml.internal.rngom.ast.builder.CommentList;
|
||||
@ -58,9 +61,6 @@ import com.sun.xml.internal.rngom.ast.om.ParsedPattern;
|
||||
import com.sun.xml.internal.rngom.ast.util.LocatorImpl;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Kohsuke Kawaguchi (kk@kohsuke.org)
|
||||
*/
|
||||
@ -85,12 +85,11 @@ class GrammarBuilderImpl implements Grammar, Div {
|
||||
}
|
||||
|
||||
public ParsedPattern endGrammar(Location loc, Annotations anno) throws BuildException {
|
||||
if(anno!=null)
|
||||
grammar.annotation = ((Annotation)anno).getResult();
|
||||
if(additionalElementAnnotations!=null) {
|
||||
if(grammar.annotation==null)
|
||||
grammar.annotation = new DAnnotation();
|
||||
grammar.annotation.contents.addAll(additionalElementAnnotations);
|
||||
// Harshit : Fixed possible NPE and issue in handling of annotations
|
||||
if (anno != null) {
|
||||
if (grammar.annotation != null) {
|
||||
grammar.annotation.contents.addAll(((Annotation) anno).getResult().contents);
|
||||
}
|
||||
}
|
||||
return grammar;
|
||||
}
|
||||
@ -99,21 +98,28 @@ class GrammarBuilderImpl implements Grammar, Div {
|
||||
}
|
||||
|
||||
public void define(String name, Combine combine, ParsedPattern pattern, Location loc, Annotations anno) throws BuildException {
|
||||
if(name==START)
|
||||
if(name==START) {
|
||||
grammar.start = (DPattern)pattern;
|
||||
else {
|
||||
} else {
|
||||
// TODO: handle combine
|
||||
DDefine d = grammar.getOrAdd(name);
|
||||
d.setPattern( (DPattern) pattern );
|
||||
if(anno!=null)
|
||||
if (anno!=null) {
|
||||
d.annotation = ((Annotation)anno).getResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void topLevelAnnotation(ParsedElementAnnotation ea) throws BuildException {
|
||||
if(additionalElementAnnotations==null)
|
||||
// Harshit : Fixed issue in handling of annotations
|
||||
if (additionalElementAnnotations==null) {
|
||||
additionalElementAnnotations = new ArrayList<Element>();
|
||||
}
|
||||
additionalElementAnnotations.add(((ElementWrapper)ea).element);
|
||||
if (grammar.annotation==null) {
|
||||
grammar.annotation = new DAnnotation();
|
||||
}
|
||||
grammar.annotation.contents.addAll(additionalElementAnnotations);
|
||||
}
|
||||
|
||||
public void topLevelComment(CommentList comments) throws BuildException {
|
||||
|
@ -77,7 +77,4 @@ final class AnyNameClass extends NameClass {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static Object readReplace() {
|
||||
return NameClass.ANY;
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -65,17 +65,25 @@ public class NameClassBuilderImpl<
|
||||
A extends Annotations<E,L,CL>,
|
||||
CL extends CommentList<L>> implements NameClassBuilder<NameClass,E,L,A,CL> {
|
||||
|
||||
@Override
|
||||
public NameClass makeChoice(List<NameClass> nameClasses, L loc, A anno) {
|
||||
NameClass result = nameClasses.get(0);
|
||||
for (int i = 1; i < nameClasses.size(); i++)
|
||||
result = new ChoiceNameClass(result, nameClasses.get(i));
|
||||
return result;
|
||||
NameClass result = nameClasses.get(0);
|
||||
for (int i = 1; i < nameClasses.size(); i++) {
|
||||
result = new ChoiceNameClass(result, nameClasses.get(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameClass makeName(String ns, String localName, String prefix, L loc, A anno) {
|
||||
return new SimpleNameClass(ns, localName);
|
||||
if (prefix == null) {
|
||||
return new SimpleNameClass(ns, localName);
|
||||
} else {
|
||||
return new SimpleNameClass(ns, localName, prefix);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public NameClass makeNsName(String ns, L loc, A anno) {
|
||||
return new NsNameClass(ns);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -55,14 +55,20 @@ public class SimpleNameClass extends NameClass {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public SimpleNameClass( String nsUri, String localPart ) {
|
||||
this( new QName(nsUri,localPart) );
|
||||
public SimpleNameClass(String nsUri, String localPart) {
|
||||
this(new QName(nsUri, localPart));
|
||||
}
|
||||
|
||||
public SimpleNameClass(String nsUri, String localPart, String prefix) {
|
||||
this(new QName(nsUri, localPart, prefix));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(QName name) {
|
||||
return this.name.equals(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int containsSpecificity(QName name) {
|
||||
return contains(name) ? SPECIFICITY_NAME : SPECIFICITY_NONE;
|
||||
}
|
||||
@ -74,16 +80,19 @@ public class SimpleNameClass extends NameClass {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || !(obj instanceof SimpleNameClass))
|
||||
if (obj == null || !(obj instanceof SimpleNameClass)) {
|
||||
return false;
|
||||
}
|
||||
SimpleNameClass other = (SimpleNameClass) obj;
|
||||
return name.equals(other.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V> V accept(NameClassVisitor<V> visitor) {
|
||||
return visitor.visitName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpen() {
|
||||
return false;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2004-2011
|
||||
* Copyright (C) 2004-2012
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@ -45,10 +45,15 @@
|
||||
*/
|
||||
package com.sun.xml.internal.rngom.xml.sax;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXNotRecognizedException;
|
||||
import org.xml.sax.SAXNotSupportedException;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
/**
|
||||
@ -72,7 +77,16 @@ public class JAXPXMLReaderCreator implements XMLReaderCreator {
|
||||
*/
|
||||
public JAXPXMLReaderCreator() {
|
||||
spf = SAXParserFactory.newInstance();
|
||||
spf.setNamespaceAware(true);
|
||||
try {
|
||||
spf.setNamespaceAware(true);
|
||||
spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
} catch (ParserConfigurationException ex) {
|
||||
Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (SAXNotRecognizedException ex) {
|
||||
Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (SAXNotSupportedException ex) {
|
||||
Logger.getLogger(JAXPXMLReaderCreator.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +40,6 @@ import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.api.model.SEIModel;
|
||||
import com.sun.xml.internal.ws.api.model.JavaMethod;
|
||||
import com.sun.xml.internal.ws.api.model.WSDLOperationMapping;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl;
|
||||
import com.sun.xml.internal.ws.model.JavaMethodImpl;
|
||||
import com.sun.xml.internal.ws.model.CheckedExceptionImpl;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
@ -236,7 +235,7 @@ public abstract class WsaTubeHelper {
|
||||
}
|
||||
WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
|
||||
WSDLOperation op = wbo.getOperation();
|
||||
return ((WSDLOperationImpl) op).getInput().isDefaultAction();
|
||||
return op.getInput().isDefaultAction();
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,9 +27,11 @@ package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -78,21 +80,90 @@ public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible {
|
||||
*/
|
||||
@Nullable WSDLPart getPart(@NotNull String partName, @NotNull Mode mode);
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:input
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public ParameterBinding getInputBinding(String part);
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:output
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public ParameterBinding getOutputBinding(String part);
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:fault
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public ParameterBinding getFaultBinding(String part);
|
||||
|
||||
/**
|
||||
* Gets the MIME type for a given wsdl part in wsdl:input
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public String getMimeTypeForInputPart(String part);
|
||||
|
||||
/**
|
||||
* Gets the MIME type for a given wsdl part in wsdl:output
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public String getMimeTypeForOutputPart(String part);
|
||||
|
||||
/**
|
||||
* Gets the MIME type for a given wsdl part in wsdl:fault
|
||||
*
|
||||
* @param part Name of wsdl:part, must be non-null
|
||||
* @return null if the part is not found.
|
||||
*/
|
||||
public String getMimeTypeForFaultPart(String part);
|
||||
|
||||
/**
|
||||
* Gets all inbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
|
||||
*/
|
||||
@NotNull Map<String,WSDLPart> getInParts();
|
||||
@NotNull Map<String,? extends WSDLPart> getInParts();
|
||||
|
||||
/**
|
||||
* Gets all outbound {@link WSDLPart} by its {@link WSDLPart#getName() name}.
|
||||
*/
|
||||
@NotNull Map<String,WSDLPart> getOutParts();
|
||||
@NotNull Map<String,? extends WSDLPart> getOutParts();
|
||||
|
||||
/**
|
||||
* Gets all the {@link WSDLFault} bound to this operation.
|
||||
*/
|
||||
@NotNull Iterable<? extends WSDLBoundFault> getFaults();
|
||||
|
||||
/**
|
||||
* Map of wsdl:input part name and the binding as {@link ParameterBinding}
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, ParameterBinding> getInputParts();
|
||||
|
||||
/**
|
||||
* Map of wsdl:output part name and the binding as {@link ParameterBinding}
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, ParameterBinding> getOutputParts();
|
||||
|
||||
/**
|
||||
* Map of wsdl:fault part name and the binding as {@link ParameterBinding}
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, ParameterBinding> getFaultParts();
|
||||
|
||||
/**
|
||||
* Gets the payload QName of the request message.
|
||||
*
|
||||
@ -100,7 +171,7 @@ public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible {
|
||||
* It's possible for an operation to define no body part, in which case
|
||||
* this method returns null.
|
||||
*/
|
||||
@Nullable QName getReqPayloadName();
|
||||
@Nullable QName getRequestPayloadName();
|
||||
|
||||
/**
|
||||
* Gets the payload QName of the response message.
|
||||
@ -109,7 +180,7 @@ public interface WSDLBoundOperation extends WSDLObject, WSDLExtensible {
|
||||
* It's possible for an operation to define no body part, in which case
|
||||
* this method returns null.
|
||||
*/
|
||||
@Nullable QName getResPayloadName();
|
||||
@Nullable QName getResponsePayloadName();
|
||||
|
||||
/**
|
||||
* Gets the namespace of request payload.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,6 +25,12 @@
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
|
||||
/**
|
||||
* Interface that represents WSDL concepts that
|
||||
* can have extensions.
|
||||
@ -82,4 +88,23 @@ public interface WSDLExtensible extends WSDLObject {
|
||||
* must not be null.
|
||||
*/
|
||||
void addExtension(WSDLExtension extension);
|
||||
|
||||
/**
|
||||
* True if all required WSDL extensions on Port and Binding are understood
|
||||
* @return true if all wsdl required extensions on Port and Binding are understood
|
||||
*/
|
||||
public boolean areRequiredExtensionsUnderstood();
|
||||
|
||||
/**
|
||||
* Marks extension as not understood
|
||||
* @param extnEl QName of extension
|
||||
* @param locator Locator
|
||||
*/
|
||||
public void addNotUnderstoodExtension(QName extnEl, Locator locator);
|
||||
|
||||
/**
|
||||
* Lists extensions marked as not understood
|
||||
* @return List of not understood extensions
|
||||
*/
|
||||
public List<? extends WSDLExtension> getNotUnderstoodExtensions();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -76,4 +76,10 @@ public interface WSDLFault extends WSDLObject, WSDLExtensible {
|
||||
* @return Action
|
||||
*/
|
||||
String getAction();
|
||||
|
||||
/**
|
||||
* True if this is the default action
|
||||
* @return
|
||||
*/
|
||||
public boolean isDefaultAction();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,10 +34,12 @@ import com.sun.xml.internal.ws.api.policy.PolicyResolver;
|
||||
import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory;
|
||||
import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
|
||||
import com.sun.xml.internal.ws.policy.PolicyMap;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
@ -96,7 +98,7 @@ public interface WSDLModel extends WSDLExtensible {
|
||||
*
|
||||
* @return an empty Map if the wsdl document has no wsdl:binding
|
||||
*/
|
||||
@NotNull Map<QName, WSDLBoundPortType> getBindings();
|
||||
@NotNull Map<QName, ? extends WSDLBoundPortType> getBindings();
|
||||
|
||||
/**
|
||||
* Gives a {@link Map} of wsdl:service qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLService}
|
||||
@ -105,6 +107,25 @@ public interface WSDLModel extends WSDLExtensible {
|
||||
*/
|
||||
@NotNull Map<QName, ? extends WSDLService> getServices();
|
||||
|
||||
/**
|
||||
* Returns the first service QName from insertion order
|
||||
*/
|
||||
public QName getFirstServiceName();
|
||||
|
||||
/**
|
||||
* Returns the message with the given QName
|
||||
* @param name Message name
|
||||
* @return Message
|
||||
*/
|
||||
public WSDLMessage getMessage(QName name);
|
||||
|
||||
/**
|
||||
* Gives a {@link Map} of wsdl:message qualified name and {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLMesage}
|
||||
*
|
||||
* @return an empty Map if the wsdl document has no wsdl:message
|
||||
*/
|
||||
@NotNull Map<QName, ? extends WSDLMessage> getMessages();
|
||||
|
||||
/**
|
||||
* Gives the PolicyMap associated with the WSDLModel
|
||||
*
|
||||
@ -115,7 +136,6 @@ public interface WSDLModel extends WSDLExtensible {
|
||||
*/
|
||||
public PolicyMap getPolicyMap();
|
||||
|
||||
|
||||
/**
|
||||
* Main purpose of this class is to parsing of a WSDL and get the {@link WSDLModel} from it.
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -56,8 +56,6 @@ public interface WSDLOperation extends WSDLObject, WSDLExtensible {
|
||||
*/
|
||||
@Nullable WSDLOutput getOutput();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if this operation is an one-way operation.
|
||||
*/
|
||||
@ -112,4 +110,10 @@ public interface WSDLOperation extends WSDLObject, WSDLExtensible {
|
||||
* Gives the enclosing wsdl:portType@name attribute value.
|
||||
*/
|
||||
@NotNull QName getPortTypeName();
|
||||
|
||||
/**
|
||||
* Returns parameter order
|
||||
* @return Parameter order
|
||||
*/
|
||||
public String getParameterOrder();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -79,4 +79,11 @@ public interface WSDLOutput extends WSDLObject, WSDLExtensible {
|
||||
*/
|
||||
@NotNull
|
||||
QName getQName();
|
||||
|
||||
/**
|
||||
* Checks if the Action value is implicitly derived using the rules defined in WS-Addressing.
|
||||
*
|
||||
* @return true if the Action value is implicitly derived using the rules defined in WS-Addressing.
|
||||
*/
|
||||
public boolean isDefaultAction();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,9 @@
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.EndpointAddress;
|
||||
import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
@ -64,4 +66,10 @@ public interface WSDLPort extends WSDLFeaturedObject, WSDLExtensible {
|
||||
*/
|
||||
@NotNull
|
||||
WSDLService getOwner();
|
||||
|
||||
/**
|
||||
* Returns endpoint reference
|
||||
* @return Endpoint reference
|
||||
*/
|
||||
public @Nullable WSEndpointReference getEPR();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -50,7 +50,6 @@ public interface WSDLPortType extends WSDLObject, WSDLExtensible {
|
||||
*/
|
||||
public WSDLOperation get(String operationName);
|
||||
|
||||
|
||||
/**
|
||||
* Gets {@link Iterable}<{@link WSDLOperation}>
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,6 +26,7 @@
|
||||
package com.sun.xml.internal.ws.api.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
@ -61,6 +62,12 @@ public interface WSDLService extends WSDLObject, WSDLExtensible {
|
||||
*/
|
||||
WSDLPort getFirstPort();
|
||||
|
||||
/**
|
||||
* Gets the first port in this service which matches the portType
|
||||
*/
|
||||
@Nullable
|
||||
WSDLPort getMatchingPort(QName portTypeName);
|
||||
|
||||
/**
|
||||
* Gives all the {@link WSDLPort} in a wsdl:service {@link WSDLService}
|
||||
*/
|
||||
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
|
||||
|
||||
public interface EditableWSDLBoundFault extends WSDLBoundFault {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLFault getFault();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLBoundOperation getBoundOperation();
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param operation Operation
|
||||
*/
|
||||
void freeze(EditableWSDLBoundOperation operation);
|
||||
}
|
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.soap.SOAPBinding.Style;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
|
||||
public interface EditableWSDLBoundOperation extends WSDLBoundOperation {
|
||||
|
||||
@Override
|
||||
@NotNull EditableWSDLOperation getOperation();
|
||||
|
||||
@Override
|
||||
@NotNull EditableWSDLBoundPortType getBoundPortType();
|
||||
|
||||
@Override
|
||||
@Nullable EditableWSDLPart getPart(@NotNull String partName, @NotNull Mode mode);
|
||||
|
||||
@Override
|
||||
@NotNull Map<String,? extends EditableWSDLPart> getInParts();
|
||||
|
||||
@Override
|
||||
@NotNull Map<String,? extends EditableWSDLPart> getOutParts();
|
||||
|
||||
@Override
|
||||
@NotNull Iterable<? extends EditableWSDLBoundFault> getFaults();
|
||||
|
||||
/**
|
||||
* Add Part
|
||||
* @param part Part
|
||||
* @param mode Mode
|
||||
*/
|
||||
public void addPart(EditableWSDLPart part, Mode mode);
|
||||
|
||||
/**
|
||||
* Add Fault
|
||||
* @param fault Fault
|
||||
*/
|
||||
public void addFault(@NotNull EditableWSDLBoundFault fault);
|
||||
|
||||
/**
|
||||
* Sets the soapbinding:binding/operation/wsaw:Anonymous.
|
||||
*
|
||||
* @param anonymous Anonymous value of the operation
|
||||
*/
|
||||
public void setAnonymous(ANONYMOUS anonymous);
|
||||
|
||||
/**
|
||||
* Sets input explicit body parts
|
||||
* @param b True, if input body part is explicit
|
||||
*/
|
||||
public void setInputExplicitBodyParts(boolean b);
|
||||
|
||||
/**
|
||||
* Sets output explicit body parts
|
||||
* @param b True, if output body part is explicit
|
||||
*/
|
||||
public void setOutputExplicitBodyParts(boolean b);
|
||||
|
||||
/**
|
||||
* Sets fault explicit body parts
|
||||
* @param b True, if fault body part is explicit
|
||||
*/
|
||||
public void setFaultExplicitBodyParts(boolean b);
|
||||
|
||||
/**
|
||||
* Set request namespace
|
||||
* @param ns Namespace
|
||||
*/
|
||||
public void setRequestNamespace(String ns);
|
||||
|
||||
/**
|
||||
* Set response namespace
|
||||
* @param ns Namespace
|
||||
*/
|
||||
public void setResponseNamespace(String ns);
|
||||
|
||||
/**
|
||||
* Set SOAP action
|
||||
* @param soapAction SOAP action
|
||||
*/
|
||||
public void setSoapAction(String soapAction);
|
||||
|
||||
/**
|
||||
* Set parameter style
|
||||
* @param style Style
|
||||
*/
|
||||
public void setStyle(Style style);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import javax.jws.soap.SOAPBinding.Style;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.BindingID;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
|
||||
|
||||
public interface EditableWSDLBoundPortType extends WSDLBoundPortType {
|
||||
|
||||
@Override
|
||||
@NotNull EditableWSDLModel getOwner();
|
||||
|
||||
@Override
|
||||
public EditableWSDLBoundOperation get(QName operationName);
|
||||
|
||||
@Override
|
||||
EditableWSDLPortType getPortType();
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLBoundOperation> getBindingOperations();
|
||||
|
||||
@Override
|
||||
@Nullable EditableWSDLBoundOperation getOperation(String namespaceUri, String localName);
|
||||
|
||||
/**
|
||||
* Populates the Map that holds operation name as key and {@link WSDLBoundOperation} as the value.
|
||||
*
|
||||
* @param opName Must be non-null
|
||||
* @param ptOp Must be non-null
|
||||
* @throws NullPointerException if either opName or ptOp is null
|
||||
*/
|
||||
public void put(QName opName, EditableWSDLBoundOperation ptOp);
|
||||
|
||||
/**
|
||||
* Sets the binding ID
|
||||
* @param bindingId Binding ID
|
||||
*/
|
||||
public void setBindingId(BindingID bindingId);
|
||||
|
||||
/**
|
||||
* sets whether the {@link WSDLBoundPortType} is rpc or lit
|
||||
*/
|
||||
public void setStyle(Style style);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*/
|
||||
public void freeze();
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
|
||||
|
||||
public interface EditableWSDLFault extends WSDLFault {
|
||||
|
||||
@Override
|
||||
EditableWSDLMessage getMessage();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Sets action
|
||||
*
|
||||
* @param action Action
|
||||
*/
|
||||
public void setAction(String action);
|
||||
|
||||
/**
|
||||
* Set to true if this is the default action
|
||||
*
|
||||
* @param defaultAction True, if default action
|
||||
*/
|
||||
public void setDefaultAction(boolean defaultAction);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput;
|
||||
|
||||
public interface EditableWSDLInput extends WSDLInput {
|
||||
|
||||
@Override
|
||||
EditableWSDLMessage getMessage();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Sets action
|
||||
*
|
||||
* @param action Action
|
||||
*/
|
||||
public void setAction(String action);
|
||||
|
||||
/**
|
||||
* Set to true if this is the default action
|
||||
*
|
||||
* @param defaultAction True, if default action
|
||||
*/
|
||||
public void setDefaultAction(boolean defaultAction);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
|
||||
|
||||
public interface EditableWSDLMessage extends WSDLMessage {
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLPart> parts();
|
||||
|
||||
/**
|
||||
* Add part
|
||||
*
|
||||
* @param part Part
|
||||
*/
|
||||
public void add(EditableWSDLPart part);
|
||||
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
|
||||
import com.sun.xml.internal.ws.policy.PolicyMap;
|
||||
|
||||
public interface EditableWSDLModel extends WSDLModel {
|
||||
|
||||
@Override
|
||||
EditableWSDLPortType getPortType(@NotNull QName name);
|
||||
|
||||
/**
|
||||
* Add Binding
|
||||
*
|
||||
* @param portType Bound port type
|
||||
*/
|
||||
void addBinding(EditableWSDLBoundPortType portType);
|
||||
|
||||
@Override
|
||||
EditableWSDLBoundPortType getBinding(@NotNull QName name);
|
||||
|
||||
@Override
|
||||
EditableWSDLBoundPortType getBinding(@NotNull QName serviceName, @NotNull QName portName);
|
||||
|
||||
@Override
|
||||
EditableWSDLService getService(@NotNull QName name);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLMessage> getMessages();
|
||||
|
||||
/**
|
||||
* Add message
|
||||
*
|
||||
* @param msg Message
|
||||
*/
|
||||
public void addMessage(EditableWSDLMessage msg);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLPortType> getPortTypes();
|
||||
|
||||
/**
|
||||
* Add port type
|
||||
*
|
||||
* @param pt Port type
|
||||
*/
|
||||
public void addPortType(EditableWSDLPortType pt);
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLBoundPortType> getBindings();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
Map<QName, ? extends EditableWSDLService> getServices();
|
||||
|
||||
/**
|
||||
* Add service
|
||||
*
|
||||
* @param svc Service
|
||||
*/
|
||||
public void addService(EditableWSDLService svc);
|
||||
|
||||
@Override
|
||||
public EditableWSDLMessage getMessage(QName name);
|
||||
|
||||
/**
|
||||
* @param policyMap
|
||||
* @deprecated
|
||||
*/
|
||||
public void setPolicyMap(PolicyMap policyMap);
|
||||
|
||||
/**
|
||||
* Finalize rpc-lit binding
|
||||
*
|
||||
* @param portType Binding
|
||||
*/
|
||||
public void finalizeRpcLitBinding(EditableWSDLBoundPortType portType);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*/
|
||||
public void freeze();
|
||||
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
|
||||
public interface EditableWSDLOperation extends WSDLOperation {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLInput getInput();
|
||||
|
||||
/**
|
||||
* Set input
|
||||
*
|
||||
* @param input Input
|
||||
*/
|
||||
public void setInput(EditableWSDLInput input);
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLOutput getOutput();
|
||||
|
||||
/**
|
||||
* Set output
|
||||
*
|
||||
* @param output Output
|
||||
*/
|
||||
public void setOutput(EditableWSDLOutput output);
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLFault> getFaults();
|
||||
|
||||
/**
|
||||
* Add fault
|
||||
*
|
||||
* @param fault Fault
|
||||
*/
|
||||
public void addFault(EditableWSDLFault fault);
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLFault getFault(QName faultDetailName);
|
||||
|
||||
/**
|
||||
* Set parameter order
|
||||
*
|
||||
* @param parameterOrder Parameter order
|
||||
*/
|
||||
public void setParameterOrder(String parameterOrder);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
|
||||
|
||||
public interface EditableWSDLOutput extends WSDLOutput {
|
||||
|
||||
@Override
|
||||
EditableWSDLMessage getMessage();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLOperation getOperation();
|
||||
|
||||
/**
|
||||
* Sets action
|
||||
*
|
||||
* @param action Action
|
||||
*/
|
||||
public void setAction(String action);
|
||||
|
||||
/**
|
||||
* Set to true if this is the default action
|
||||
*
|
||||
* @param defaultAction True, if default action
|
||||
*/
|
||||
public void setDefaultAction(boolean defaultAction);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
public void freeze(EditableWSDLModel root);
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPart;
|
||||
|
||||
public interface EditableWSDLPart extends WSDLPart {
|
||||
|
||||
/**
|
||||
* Sets binding
|
||||
*
|
||||
* @param binding Binding
|
||||
*/
|
||||
public void setBinding(ParameterBinding binding);
|
||||
|
||||
/**
|
||||
* Sets index
|
||||
*
|
||||
* @param index Index
|
||||
*/
|
||||
public void setIndex(int index);
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.EndpointAddress;
|
||||
import com.sun.xml.internal.ws.api.addressing.WSEndpointReference;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
|
||||
public interface EditableWSDLPort extends WSDLPort {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLBoundPortType getBinding();
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLService getOwner();
|
||||
|
||||
/**
|
||||
* Sets endpoint address
|
||||
*
|
||||
* @param address Endpoint address
|
||||
*/
|
||||
public void setAddress(EndpointAddress address);
|
||||
|
||||
/**
|
||||
* Sets endpoint reference
|
||||
*
|
||||
* @param epr Endpoint reference
|
||||
*/
|
||||
public void setEPR(@NotNull WSEndpointReference epr);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
void freeze(EditableWSDLModel root);
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
|
||||
|
||||
public interface EditableWSDLPortType extends WSDLPortType {
|
||||
|
||||
@Override
|
||||
public EditableWSDLOperation get(String operationName);
|
||||
|
||||
@Override
|
||||
public Iterable<? extends EditableWSDLOperation> getOperations();
|
||||
|
||||
/**
|
||||
* Associate WSDL operation with operation name
|
||||
*
|
||||
* @param opName Operation name
|
||||
* @param ptOp Operation
|
||||
*/
|
||||
public void put(String opName, EditableWSDLOperation ptOp);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*/
|
||||
public void freeze();
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.api.model.wsdl.editable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
|
||||
|
||||
public interface EditableWSDLService extends WSDLService {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
EditableWSDLModel getParent();
|
||||
|
||||
@Override
|
||||
EditableWSDLPort get(QName portName);
|
||||
|
||||
@Override
|
||||
EditableWSDLPort getFirstPort();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
EditableWSDLPort getMatchingPort(QName portTypeName);
|
||||
|
||||
@Override
|
||||
Iterable<? extends EditableWSDLPort> getPorts();
|
||||
|
||||
/**
|
||||
* Associate WSDL port with port QName
|
||||
*
|
||||
* @param portName Port QName
|
||||
* @param port Port
|
||||
*/
|
||||
public void put(QName portName, EditableWSDLPort port);
|
||||
|
||||
/**
|
||||
* Freezes WSDL model to prevent further modification
|
||||
*
|
||||
* @param root WSDL Model
|
||||
*/
|
||||
void freeze(EditableWSDLModel root);
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,17 @@
|
||||
package com.sun.xml.internal.ws.api.wsdl.parser;
|
||||
|
||||
import com.sun.xml.internal.ws.api.WSService;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.*;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOutput;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
|
||||
import com.sun.xml.internal.ws.api.pipe.Tube;
|
||||
import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
|
||||
|
||||
@ -138,34 +148,36 @@ import javax.xml.ws.WebServiceException;
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public abstract class WSDLParserExtension {
|
||||
|
||||
public void start(WSDLParserExtensionContext context){
|
||||
// noop
|
||||
}
|
||||
public void serviceAttributes(WSDLService service, XMLStreamReader reader) {
|
||||
|
||||
public void serviceAttributes(EditableWSDLService service, XMLStreamReader reader) {
|
||||
// noop
|
||||
}
|
||||
|
||||
public boolean serviceElements(WSDLService service, XMLStreamReader reader) {
|
||||
public boolean serviceElements(EditableWSDLService service, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void portAttributes(WSDLPort port, XMLStreamReader reader) {
|
||||
public void portAttributes(EditableWSDLPort port, XMLStreamReader reader) {
|
||||
// noop
|
||||
}
|
||||
|
||||
public boolean portElements(WSDLPort port, XMLStreamReader reader) {
|
||||
public boolean portElements(EditableWSDLPort port, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean portTypeOperationInput(WSDLOperation op, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationInput(EditableWSDLOperation op, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean portTypeOperationOutput(WSDLOperation op, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationOutput(EditableWSDLOperation op, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean portTypeOperationFault(WSDLOperation op, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationFault(EditableWSDLOperation op, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -173,81 +185,81 @@ public abstract class WSDLParserExtension {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean bindingElements(WSDLBoundPortType binding, XMLStreamReader reader) {
|
||||
public boolean bindingElements(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void bindingAttributes(WSDLBoundPortType binding, XMLStreamReader reader) {
|
||||
public void bindingAttributes(EditableWSDLBoundPortType binding, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean portTypeElements(WSDLPortType portType, XMLStreamReader reader) {
|
||||
public boolean portTypeElements(EditableWSDLPortType portType, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void portTypeAttributes(WSDLPortType portType, XMLStreamReader reader) {
|
||||
public void portTypeAttributes(EditableWSDLPortType portType, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean portTypeOperationElements(WSDLOperation operation, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationElements(EditableWSDLOperation operation, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void portTypeOperationAttributes(WSDLOperation operation, XMLStreamReader reader) {
|
||||
public void portTypeOperationAttributes(EditableWSDLOperation operation, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean bindingOperationElements(WSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
public boolean bindingOperationElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void bindingOperationAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
public void bindingOperationAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean messageElements(WSDLMessage msg, XMLStreamReader reader) {
|
||||
public boolean messageElements(EditableWSDLMessage msg, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void messageAttributes(WSDLMessage msg, XMLStreamReader reader) {
|
||||
public void messageAttributes(EditableWSDLMessage msg, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean portTypeOperationInputElements(WSDLInput input, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationInputElements(EditableWSDLInput input, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void portTypeOperationInputAttributes(WSDLInput input, XMLStreamReader reader) {
|
||||
public void portTypeOperationInputAttributes(EditableWSDLInput input, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean portTypeOperationOutputElements(WSDLOutput output, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationOutputElements(EditableWSDLOutput output, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void portTypeOperationOutputAttributes(WSDLOutput output, XMLStreamReader reader) {
|
||||
public void portTypeOperationOutputAttributes(EditableWSDLOutput output, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean portTypeOperationFaultElements(WSDLFault fault, XMLStreamReader reader) {
|
||||
public boolean portTypeOperationFaultElements(EditableWSDLFault fault, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void portTypeOperationFaultAttributes(WSDLFault fault, XMLStreamReader reader) {
|
||||
public void portTypeOperationFaultAttributes(EditableWSDLFault fault, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean bindingOperationInputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
public boolean bindingOperationInputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void bindingOperationInputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
public void bindingOperationInputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean bindingOperationOutputElements(WSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
public boolean bindingOperationOutputElements(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void bindingOperationOutputAttributes(WSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
public void bindingOperationOutputAttributes(EditableWSDLBoundOperation operation, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
public boolean bindingOperationFaultElements(WSDLBoundFault fault, XMLStreamReader reader) {
|
||||
public boolean bindingOperationFaultElements(EditableWSDLBoundFault fault, XMLStreamReader reader) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void bindingOperationFaultAttributes(WSDLBoundFault fault, XMLStreamReader reader) {
|
||||
public void bindingOperationFaultAttributes(EditableWSDLBoundFault fault, XMLStreamReader reader) {
|
||||
}
|
||||
|
||||
// TODO: complete the rest of the callback
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,7 @@
|
||||
package com.sun.xml.internal.ws.api.wsdl.parser;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
|
||||
import com.sun.xml.internal.ws.api.server.Container;
|
||||
import com.sun.xml.internal.ws.api.policy.PolicyResolver;
|
||||
|
||||
@ -44,10 +44,10 @@ public interface WSDLParserExtensionContext {
|
||||
boolean isClientSide();
|
||||
|
||||
/**
|
||||
* Gives the {@link WSDLModel}. The WSDLModel may not be complete until
|
||||
* Gives the {@link EditableWSDLModel}. The WSDLModel may not be complete until
|
||||
* {@link WSDLParserExtension#finished(WSDLParserExtensionContext)} is called.
|
||||
*/
|
||||
WSDLModel getWSDLModel();
|
||||
EditableWSDLModel getWSDLModel();
|
||||
|
||||
/**
|
||||
* Provides the {@link Container} in which this service or client is running.
|
||||
|
@ -38,7 +38,6 @@ import com.sun.xml.internal.ws.api.FeatureConstructor;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLFeaturedObject;
|
||||
import com.sun.xml.internal.ws.model.RuntimeModelerException;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
|
||||
import com.sun.xml.internal.ws.resources.ModelerMessages;
|
||||
import com.sun.xml.internal.bind.util.Which;
|
||||
|
||||
@ -440,9 +439,9 @@ public final class WebServiceFeatureList extends AbstractMap<Class<? extends Web
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts features from {@link WSDLPortImpl#getFeatures()}. Extra features
|
||||
* Extracts features from {@link WSDLPort#getFeatures()}. Extra features
|
||||
* that are not already set on binding. i.e, if a feature is set already on
|
||||
* binding through someother API the coresponding wsdlFeature is not set.
|
||||
* binding through some other API the corresponding wsdlFeature is not set.
|
||||
*
|
||||
* @param wsdlPort
|
||||
* WSDLPort model
|
||||
@ -452,7 +451,7 @@ public final class WebServiceFeatureList extends AbstractMap<Class<? extends Web
|
||||
* true
|
||||
* @param reportConflicts
|
||||
* If true, checks if the feature setting in WSDL (wsdl extension
|
||||
* or policy configuration) colflicts with feature setting in
|
||||
* or policy configuration) conflicts with feature setting in
|
||||
* Deployed Service and logs warning if there are any conflicts.
|
||||
*/
|
||||
public void mergeFeatures(@NotNull WSDLPort wsdlPort,
|
||||
|
@ -25,14 +25,18 @@
|
||||
|
||||
package com.sun.xml.internal.ws.client;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
|
||||
import com.sun.xml.internal.ws.api.server.Container;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
import com.sun.org.glassfish.gmbal.AMXMetadata;
|
||||
import com.sun.org.glassfish.gmbal.Description;
|
||||
import com.sun.org.glassfish.gmbal.ManagedAttribute;
|
||||
import com.sun.org.glassfish.gmbal.ManagedObject;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
@ -74,7 +78,7 @@ public final class MonitorRootClient extends com.sun.xml.internal.ws.server.Moni
|
||||
private URL wsdlDocumentLocation() { return stub.owner.getWSDLDocumentLocation(); }
|
||||
|
||||
@ManagedAttribute
|
||||
private WSDLServiceImpl wsdlService() { return stub.owner.getWsdlService(); }
|
||||
private WSDLService wsdlService() { return stub.owner.getWsdlService(); }
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -36,8 +36,6 @@ import com.sun.xml.internal.ws.api.client.WSPortInfo;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.binding.BindingImpl;
|
||||
import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
|
||||
import com.sun.xml.internal.ws.policy.PolicyMap;
|
||||
import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil;
|
||||
|
||||
@ -96,7 +94,7 @@ public class PortInfo implements WSPortInfo {
|
||||
public PolicyMap createPolicyMap() {
|
||||
PolicyMap map;
|
||||
if(portModel != null) {
|
||||
map = ((WSDLModelImpl) portModel.getOwner().getParent()).getPolicyMap();
|
||||
map = portModel.getOwner().getParent().getPolicyMap();
|
||||
} else {
|
||||
map = PolicyResolverFactory.create().resolve(new PolicyResolver.ClientContext(null,owner.getContainer()));
|
||||
}
|
||||
@ -154,8 +152,8 @@ public class PortInfo implements WSPortInfo {
|
||||
private WSDLPort getPortModel(WSServiceDelegate owner, QName portName) {
|
||||
|
||||
if (owner.getWsdlService() != null){
|
||||
Iterable<WSDLPortImpl> ports = owner.getWsdlService().getPorts();
|
||||
for (WSDLPortImpl port : ports){
|
||||
Iterable<? extends WSDLPort> ports = owner.getWsdlService().getPorts();
|
||||
for (WSDLPort port : ports){
|
||||
if (port.getName().equals(portName))
|
||||
return port;
|
||||
}
|
||||
|
@ -62,7 +62,6 @@ import com.sun.xml.internal.ws.binding.BindingImpl;
|
||||
import com.sun.xml.internal.ws.developer.JAXWSProperties;
|
||||
import com.sun.xml.internal.ws.developer.WSBindingProvider;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLProperties;
|
||||
import com.sun.xml.internal.ws.resources.ClientMessages;
|
||||
@ -354,7 +353,7 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver
|
||||
*/
|
||||
private static void checkAllWSDLExtensionsUnderstood(WSPortInfo port, WSBinding binding) {
|
||||
if (port.getPort() != null && binding.isFeatureEnabled(RespectBindingFeature.class)) {
|
||||
((WSDLPortImpl) port.getPort()).areRequiredExtensionsUnderstood();
|
||||
port.getPort().areRequiredExtensionsUnderstood();
|
||||
}
|
||||
}
|
||||
|
||||
@ -649,7 +648,7 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver
|
||||
|
||||
//gather EPRExtensions specified in WSDL.
|
||||
try {
|
||||
WSEndpointReference wsdlEpr = ((WSDLPortImpl) wsdlPort).getEPR();
|
||||
WSEndpointReference wsdlEpr = wsdlPort.getEPR();
|
||||
if (wsdlEpr != null) {
|
||||
for (WSEndpointReference.EPRExtension extnEl : wsdlEpr.getEPRExtensions()) {
|
||||
wsdlEPRExtensions.add(new WSEPRExtension(
|
||||
|
@ -41,7 +41,9 @@ import com.sun.xml.internal.ws.api.databinding.DatabindingConfig;
|
||||
import com.sun.xml.internal.ws.api.databinding.DatabindingFactory;
|
||||
import com.sun.xml.internal.ws.api.databinding.MetadataReader;
|
||||
import com.sun.xml.internal.ws.api.model.SEIModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
|
||||
import com.sun.xml.internal.ws.api.pipe.Stubs;
|
||||
import com.sun.xml.internal.ws.api.server.Container;
|
||||
import com.sun.xml.internal.ws.api.server.ContainerResolver;
|
||||
@ -51,15 +53,11 @@ import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
|
||||
import com.sun.xml.internal.ws.client.HandlerConfigurator.AnnotationConfigurator;
|
||||
import com.sun.xml.internal.ws.client.HandlerConfigurator.HandlerResolverImpl;
|
||||
import com.sun.xml.internal.ws.client.sei.SEIStub;
|
||||
|
||||
import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature;
|
||||
import com.sun.xml.internal.ws.developer.UsesJAXBContextFeature;
|
||||
import com.sun.xml.internal.ws.developer.WSBindingProvider;
|
||||
import com.sun.xml.internal.ws.model.RuntimeModeler;
|
||||
import com.sun.xml.internal.ws.model.SOAPSEIModel;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl;
|
||||
import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl;
|
||||
import com.sun.xml.internal.ws.resources.ClientMessages;
|
||||
import com.sun.xml.internal.ws.resources.DispatchMessages;
|
||||
import com.sun.xml.internal.ws.resources.ProviderApiMessages;
|
||||
@ -67,6 +65,7 @@ import com.sun.xml.internal.ws.util.JAXWSUtils;
|
||||
import com.sun.xml.internal.ws.util.ServiceConfigurationError;
|
||||
import com.sun.xml.internal.ws.util.ServiceFinder;
|
||||
import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser;
|
||||
|
||||
import org.xml.sax.EntityResolver;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
@ -86,6 +85,7 @@ import javax.xml.ws.WebServiceException;
|
||||
import javax.xml.ws.WebServiceFeature;
|
||||
import javax.xml.ws.handler.HandlerResolver;
|
||||
import javax.xml.ws.soap.AddressingFeature;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Proxy;
|
||||
@ -179,7 +179,7 @@ public class WSServiceDelegate extends WSService {
|
||||
* This fiels can be be null if the service is created without wsdl but later
|
||||
* the epr supplies a wsdl that can be parsed.
|
||||
*/
|
||||
private @Nullable WSDLServiceImpl wsdlService;
|
||||
private @Nullable WSDLService wsdlService;
|
||||
|
||||
private final Container container;
|
||||
/**
|
||||
@ -219,7 +219,7 @@ public class WSServiceDelegate extends WSService {
|
||||
* @param serviceClass
|
||||
* Either {@link Service}.class or other generated service-derived classes.
|
||||
*/
|
||||
public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) {
|
||||
public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLService service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeature... features) {
|
||||
this(wsdl, service, serviceName, serviceClass, new WebServiceFeatureList(features));
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ public class WSServiceDelegate extends WSService {
|
||||
* @param serviceClass
|
||||
* Either {@link Service}.class or other generated service-derived classes.
|
||||
*/
|
||||
public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) {
|
||||
public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLService service, @NotNull QName serviceName, @NotNull final Class<? extends Service> serviceClass, WebServiceFeatureList features) {
|
||||
//we cant create a Service without serviceName
|
||||
if (serviceName == null) {
|
||||
throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME_NULL(null));
|
||||
@ -303,7 +303,7 @@ public class WSServiceDelegate extends WSService {
|
||||
if (wsdl != null) {
|
||||
try {
|
||||
URL url = wsdl.getSystemId()==null ? null : JAXWSUtils.getEncodedURL(wsdl.getSystemId());
|
||||
WSDLModelImpl model = parseWSDL(url, wsdl, serviceClass);
|
||||
WSDLModel model = parseWSDL(url, wsdl, serviceClass);
|
||||
service = model.getService(this.serviceName);
|
||||
if (service == null)
|
||||
throw new WebServiceException(
|
||||
@ -316,6 +316,10 @@ public class WSServiceDelegate extends WSService {
|
||||
throw new WebServiceException(ClientMessages.INVALID_WSDL_URL(wsdl.getSystemId()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// fill in statically known ports
|
||||
for (WSDLPort port : service.getPorts())
|
||||
ports.put(port.getName(), new PortInfo(this, port));
|
||||
}
|
||||
this.wsdlService = service;
|
||||
|
||||
@ -339,7 +343,7 @@ public class WSServiceDelegate extends WSService {
|
||||
* Either this or <tt>wsdl</tt> parameter must be given.
|
||||
* Null location means the system won't be able to resolve relative references in the WSDL,
|
||||
*/
|
||||
private WSDLModelImpl parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
|
||||
private WSDLModel parseWSDL(URL wsdlDocumentLocation, Source wsdlSource, Class serviceClass) {
|
||||
try {
|
||||
return RuntimeWSDLParser.parse(wsdlDocumentLocation, wsdlSource, createCatalogResolver(),
|
||||
true, getContainer(), serviceClass, ServiceFinder.find(WSDLParserExtension.class).toArray());
|
||||
@ -385,7 +389,7 @@ public class WSServiceDelegate extends WSService {
|
||||
public <T> T getPort(QName portName, Class<T> portInterface, WebServiceFeature... features) {
|
||||
if (portName == null || portInterface == null)
|
||||
throw new IllegalArgumentException();
|
||||
WSDLServiceImpl tWsdlService = this.wsdlService;
|
||||
WSDLService tWsdlService = this.wsdlService;
|
||||
if (tWsdlService == null) {
|
||||
// assigning it to local variable and not setting it back to this.wsdlService intentionally
|
||||
// as we don't want to include the service instance with information gathered from sei
|
||||
@ -396,7 +400,7 @@ public class WSServiceDelegate extends WSService {
|
||||
}
|
||||
|
||||
}
|
||||
WSDLPortImpl portModel = getPortModel(tWsdlService, portName);
|
||||
WSDLPort portModel = getPortModel(tWsdlService, portName);
|
||||
return getPort(portModel.getEPR(), portName, portInterface, new WebServiceFeatureList(features));
|
||||
}
|
||||
|
||||
@ -436,7 +440,7 @@ public class WSServiceDelegate extends WSService {
|
||||
public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
|
||||
//get the portType from SEI
|
||||
QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader()));
|
||||
WSDLServiceImpl tmpWsdlService = this.wsdlService;
|
||||
WSDLService tmpWsdlService = this.wsdlService;
|
||||
if (tmpWsdlService == null) {
|
||||
// assigning it to local variable and not setting it back to this.wsdlService intentionally
|
||||
// as we don't want to include the service instance with information gathered from sei
|
||||
@ -447,7 +451,7 @@ public class WSServiceDelegate extends WSService {
|
||||
}
|
||||
}
|
||||
//get the first port corresponding to the SEI
|
||||
WSDLPortImpl port = tmpWsdlService.getMatchingPort(portTypeName);
|
||||
WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName);
|
||||
if (port == null) {
|
||||
throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
|
||||
}
|
||||
@ -672,7 +676,7 @@ public class WSServiceDelegate extends WSService {
|
||||
throw new WebServiceException(ProviderApiMessages.NULL_WSDL());
|
||||
}
|
||||
try {
|
||||
WSDLModelImpl eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
|
||||
WSDLModel eprWsdlMdl = parseWSDL(new URL(wsepr.getAddress()), eprWsdlSource, null);
|
||||
wsdlService = eprWsdlMdl.getService(serviceName);
|
||||
if (wsdlService == null)
|
||||
throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME(serviceName,
|
||||
@ -685,7 +689,7 @@ public class WSServiceDelegate extends WSService {
|
||||
|
||||
if (portName == null && portTypeName != null) {
|
||||
//get the first port corresponding to the SEI
|
||||
WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName);
|
||||
WSDLPort port = wsdlService.getMatchingPort(portTypeName);
|
||||
if (port == null)
|
||||
throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
|
||||
portName = port.getName();
|
||||
@ -732,7 +736,7 @@ public class WSServiceDelegate extends WSService {
|
||||
);
|
||||
}
|
||||
|
||||
private WSDLServiceImpl getWSDLModelfromSEI(final Class sei) {
|
||||
private WSDLService getWSDLModelfromSEI(final Class sei) {
|
||||
WebService ws = AccessController.doPrivileged(new PrivilegedAction<WebService>() {
|
||||
public WebService run() {
|
||||
return (WebService) sei.getAnnotation(WebService.class);
|
||||
@ -743,11 +747,11 @@ public class WSServiceDelegate extends WSService {
|
||||
String wsdlLocation = ws.wsdlLocation();
|
||||
wsdlLocation = JAXWSUtils.absolutize(JAXWSUtils.getFileOrURLName(wsdlLocation));
|
||||
Source wsdl = new StreamSource(wsdlLocation);
|
||||
WSDLServiceImpl service = null;
|
||||
WSDLService service = null;
|
||||
|
||||
try {
|
||||
URL url = wsdl.getSystemId() == null ? null : new URL(wsdl.getSystemId());
|
||||
WSDLModelImpl model = parseWSDL(url, wsdl, sei);
|
||||
WSDLModel model = parseWSDL(url, wsdl, sei);
|
||||
service = model.getService(this.serviceName);
|
||||
if (service == null)
|
||||
throw new WebServiceException(
|
||||
@ -815,7 +819,7 @@ public class WSServiceDelegate extends WSService {
|
||||
*/
|
||||
private StringBuilder buildWsdlPortNames() {
|
||||
Set<QName> wsdlPortNames = new HashSet<QName>();
|
||||
for (WSDLPortImpl port : wsdlService.getPorts()) {
|
||||
for (WSDLPort port : wsdlService.getPorts()) {
|
||||
wsdlPortNames.add(port.getName());
|
||||
}
|
||||
return buildNameList(wsdlPortNames);
|
||||
@ -826,8 +830,8 @@ public class WSServiceDelegate extends WSService {
|
||||
*
|
||||
* @return guaranteed to be non-null.
|
||||
*/
|
||||
public @NotNull WSDLPortImpl getPortModel(WSDLServiceImpl wsdlService, QName portName) {
|
||||
WSDLPortImpl port = wsdlService.get(portName);
|
||||
public @NotNull WSDLPort getPortModel(WSDLService wsdlService, QName portName) {
|
||||
WSDLPort port = wsdlService.get(portName);
|
||||
if (port == null)
|
||||
throw new WebServiceException(
|
||||
ClientMessages.INVALID_PORT_NAME(portName,buildWsdlPortNames()));
|
||||
@ -884,7 +888,7 @@ public class WSServiceDelegate extends WSService {
|
||||
}
|
||||
|
||||
private SEIPortInfo createSEIPortInfo(QName portName, Class portInterface, WebServiceFeatureList features) {
|
||||
WSDLPortImpl wsdlPort = getPortModel(wsdlService, portName);
|
||||
WSDLPort wsdlPort = getPortModel(wsdlService, portName);
|
||||
SEIModel model = buildRuntimeModel(serviceName, portName, portInterface, wsdlPort, features);
|
||||
|
||||
return new SEIPortInfo(this, portInterface, (SOAPSEIModel) model, wsdlPort);
|
||||
@ -894,7 +898,7 @@ public class WSServiceDelegate extends WSService {
|
||||
return features.contains(UsesJAXBContextFeature.class);
|
||||
}
|
||||
|
||||
public WSDLServiceImpl getWsdlService() {
|
||||
public WSDLService getWsdlService() {
|
||||
return wsdlService;
|
||||
}
|
||||
|
||||
|
@ -75,13 +75,13 @@ public class ExternalMetadataReader extends ReflectAnnotationReader {
|
||||
private Map<String, JavaWsdlMappingType> readers = new HashMap<String, JavaWsdlMappingType>();
|
||||
|
||||
public ExternalMetadataReader(Collection<File> files, Collection<String> resourcePaths, ClassLoader classLoader,
|
||||
boolean xsdValidation, boolean disableSecureXmlProcessing) {
|
||||
boolean xsdValidation, boolean disableXmlSecurity) {
|
||||
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
try {
|
||||
String namespace = Util.documentRootNamespace(newSource(file), disableSecureXmlProcessing);
|
||||
JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableSecureXmlProcessing);
|
||||
String namespace = Util.documentRootNamespace(newSource(file), disableXmlSecurity);
|
||||
JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableXmlSecurity);
|
||||
readers.put(externalMapping.getJavaTypeName(), externalMapping);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", file.getAbsolutePath());
|
||||
@ -92,8 +92,8 @@ public class ExternalMetadataReader extends ReflectAnnotationReader {
|
||||
if (resourcePaths != null) {
|
||||
for (String resourcePath : resourcePaths) {
|
||||
try {
|
||||
String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableSecureXmlProcessing);
|
||||
JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableSecureXmlProcessing);
|
||||
String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableXmlSecurity);
|
||||
JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableXmlSecurity);
|
||||
readers.put(externalMapping.getJavaTypeName(), externalMapping);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", resourcePath);
|
||||
@ -107,11 +107,11 @@ public class ExternalMetadataReader extends ReflectAnnotationReader {
|
||||
return new StreamSource(is);
|
||||
}
|
||||
|
||||
private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableSecureXmlProcessing) throws JAXBException, IOException, TransformerException {
|
||||
private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableXmlSecurity) throws JAXBException, IOException, TransformerException {
|
||||
if (NAMESPACE_WEBLOGIC_WSEE_DATABINDING.equals(namespace)) {
|
||||
return Util.transformAndRead(source, disableSecureXmlProcessing);
|
||||
return Util.transformAndRead(source, disableXmlSecurity);
|
||||
} if (NAMESPACE_JAXWS_RI_EXTERNAL_METADATA.equals(namespace)) {
|
||||
return Util.read(source, xsdValidation, disableSecureXmlProcessing);
|
||||
return Util.read(source, xsdValidation, disableXmlSecurity);
|
||||
} else {
|
||||
throw new RuntimeModelerException("runtime.modeler.external.metadata.unsupported.schema", namespace, Arrays.asList(NAMESPACE_WEBLOGIC_WSEE_DATABINDING, NAMESPACE_JAXWS_RI_EXTERNAL_METADATA).toString());
|
||||
}
|
||||
@ -425,8 +425,8 @@ public class ExternalMetadataReader extends ReflectAnnotationReader {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableSecureXmlProcessing) throws IOException, JAXBException {
|
||||
JAXBContext ctx = jaxbContext(disableSecureXmlProcessing);
|
||||
public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableXmlSecurity) throws IOException, JAXBException {
|
||||
JAXBContext ctx = jaxbContext(disableXmlSecurity);
|
||||
try {
|
||||
Unmarshaller um = ctx.createUnmarshaller();
|
||||
if (xsdValidation) {
|
||||
@ -455,16 +455,16 @@ public class ExternalMetadataReader extends ReflectAnnotationReader {
|
||||
}
|
||||
}
|
||||
|
||||
private static JAXBContext jaxbContext(boolean disableSecureXmlProcessing) {
|
||||
private static JAXBContext jaxbContext(boolean disableXmlSecurity) {
|
||||
// as it is supposed to have security enabled in most cases, we create and don't cache
|
||||
// "insecure" JAXBContext - these should be corner cases
|
||||
return disableSecureXmlProcessing ? createJaxbContext(true) : jaxbContext;
|
||||
return disableXmlSecurity ? createJaxbContext(true) : jaxbContext;
|
||||
}
|
||||
|
||||
public static JavaWsdlMappingType transformAndRead(Source src, boolean disableSecureXmlProcessing) throws TransformerException, JAXBException {
|
||||
public static JavaWsdlMappingType transformAndRead(Source src, boolean disableXmlSecurity) throws TransformerException, JAXBException {
|
||||
Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL));
|
||||
JAXBResult result = new JAXBResult(jaxbContext(disableSecureXmlProcessing));
|
||||
TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing);
|
||||
JAXBResult result = new JAXBResult(jaxbContext(disableXmlSecurity));
|
||||
TransformerFactory tf = XmlUtil.newTransformerFactory(!disableXmlSecurity);
|
||||
Transformer transformer = tf.newTemplates(xsl).newTransformer();
|
||||
transformer.transform(src, result);
|
||||
return getJavaWsdlMapping(result.getResult());
|
||||
@ -534,9 +534,9 @@ public class ExternalMetadataReader extends ReflectAnnotationReader {
|
||||
return elems.toArray(new Element[elems.size()]);
|
||||
}
|
||||
|
||||
static String documentRootNamespace(Source src, boolean disableSecureXmlProcessing) throws XMLStreamException {
|
||||
static String documentRootNamespace(Source src, boolean disableXmlSecurity) throws XMLStreamException {
|
||||
XMLInputFactory factory;
|
||||
factory = XmlUtil.newXMLInputFactory(!disableSecureXmlProcessing);
|
||||
factory = XmlUtil.newXMLInputFactory(!disableXmlSecurity);
|
||||
XMLStreamReader streamReader = factory.createXMLStreamReader(src);
|
||||
XMLStreamReaderUtil.nextElementContent(streamReader);
|
||||
String namespaceURI = streamReader.getName().getNamespaceURI();
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
package com.sun.xml.internal.ws.model;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.bind.api.TypeReference;
|
||||
import com.sun.xml.internal.ws.api.databinding.MetadataReader;
|
||||
import com.sun.xml.internal.ws.api.model.JavaMethod;
|
||||
@ -216,14 +215,14 @@ public final class JavaMethodImpl implements JavaMethod {
|
||||
* @return soap:Body's first child name for request message.
|
||||
*/
|
||||
public @Nullable QName getRequestPayloadName() {
|
||||
return (wsdlOperation != null)? wsdlOperation.getReqPayloadName(): requestPayloadName;
|
||||
return (wsdlOperation != null)? wsdlOperation.getRequestPayloadName(): requestPayloadName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return soap:Body's first child name for response message.
|
||||
*/
|
||||
public @Nullable QName getResponsePayloadName() {
|
||||
return (mep == MEP.ONE_WAY) ? null : wsdlOperation.getResPayloadName();
|
||||
return (mep == MEP.ONE_WAY) ? null : wsdlOperation.getResponsePayloadName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,11 +29,9 @@ import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtensible;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtension;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLObject;
|
||||
import com.sun.xml.internal.ws.resources.UtilMessages;
|
||||
import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants;
|
||||
import com.sun.istack.internal.NotNull;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import javax.xml.stream.Location;
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.ws.WebServiceException;
|
||||
import java.util.ArrayList;
|
||||
@ -42,7 +40,6 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.helpers.LocatorImpl;
|
||||
|
||||
/**
|
||||
* All the WSDL 1.1 elements that are extensible should subclass from this abstract implementation of
|
||||
@ -95,6 +92,10 @@ abstract class AbstractExtensibleImpl extends AbstractObjectImpl implements WSDL
|
||||
extensions.add(ex);
|
||||
}
|
||||
|
||||
public List<? extends UnknownWSDLExtension> getNotUnderstoodExtensions() {
|
||||
return notUnderstoodExtensions;
|
||||
}
|
||||
|
||||
/**
|
||||
* This can be used if a WSDL extension element that has wsdl:required=true
|
||||
* is not understood
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,10 +26,10 @@
|
||||
package com.sun.xml.internal.ws.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
|
||||
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
import javax.xml.namespace.QName;
|
||||
@ -37,12 +37,12 @@ import javax.xml.namespace.QName;
|
||||
/**
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements WSDLBoundFault {
|
||||
public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements EditableWSDLBoundFault {
|
||||
private final String name;
|
||||
private WSDLFault fault;
|
||||
private WSDLBoundOperationImpl owner;
|
||||
private EditableWSDLFault fault;
|
||||
private EditableWSDLBoundOperation owner;
|
||||
|
||||
public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, WSDLBoundOperationImpl owner) {
|
||||
public WSDLBoundFaultImpl(XMLStreamReader xsr, String name, EditableWSDLBoundOperation owner) {
|
||||
super(xsr);
|
||||
this.name = name;
|
||||
this.owner = owner;
|
||||
@ -61,20 +61,20 @@ public class WSDLBoundFaultImpl extends AbstractExtensibleImpl implements WSDLBo
|
||||
return null;
|
||||
}
|
||||
|
||||
public WSDLFault getFault() {
|
||||
public EditableWSDLFault getFault() {
|
||||
return fault;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public WSDLBoundOperation getBoundOperation() {
|
||||
public EditableWSDLBoundOperation getBoundOperation() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
void freeze(WSDLBoundOperationImpl root) {
|
||||
public void freeze(EditableWSDLBoundOperation root) {
|
||||
assert root != null;
|
||||
WSDLOperation op = root.getOperation();
|
||||
EditableWSDLOperation op = root.getOperation();
|
||||
if (op != null) {
|
||||
for (WSDLFault f : op.getFaults()) {
|
||||
for (EditableWSDLFault f : op.getFaults()) {
|
||||
if (f.getName().equals(name)) {
|
||||
this.fault = f;
|
||||
break;
|
||||
|
@ -29,12 +29,20 @@ import com.sun.istack.internal.Nullable;
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.*;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
|
||||
import com.sun.xml.internal.ws.model.RuntimeModeler;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.jws.soap.SOAPBinding.Style;
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
@ -42,7 +50,7 @@ import java.util.*;
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements WSDLBoundOperation {
|
||||
public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl implements EditableWSDLBoundOperation {
|
||||
private final QName name;
|
||||
|
||||
// map of wsdl:part to the binding
|
||||
@ -61,20 +69,20 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
private Boolean emptyOutputBody;
|
||||
private Boolean emptyFaultBody;
|
||||
|
||||
private final Map<String, WSDLPartImpl> inParts;
|
||||
private final Map<String, WSDLPartImpl> outParts;
|
||||
private final List<WSDLBoundFaultImpl> wsdlBoundFaults;
|
||||
private WSDLOperationImpl operation;
|
||||
private final Map<String, EditableWSDLPart> inParts;
|
||||
private final Map<String, EditableWSDLPart> outParts;
|
||||
private final List<EditableWSDLBoundFault> wsdlBoundFaults;
|
||||
private EditableWSDLOperation operation;
|
||||
private String soapAction;
|
||||
private ANONYMOUS anonymous;
|
||||
|
||||
private final WSDLBoundPortTypeImpl owner;
|
||||
private final EditableWSDLBoundPortType owner;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param name wsdl:operation name qualified value
|
||||
*/
|
||||
public WSDLBoundOperationImpl(XMLStreamReader xsr, WSDLBoundPortTypeImpl owner, QName name) {
|
||||
public WSDLBoundOperationImpl(XMLStreamReader xsr, EditableWSDLBoundPortType owner, QName name) {
|
||||
super(xsr);
|
||||
this.name = name;
|
||||
inputParts = new HashMap<String, ParameterBinding>();
|
||||
@ -83,9 +91,9 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
inputMimeTypes = new HashMap<String, String>();
|
||||
outputMimeTypes = new HashMap<String, String>();
|
||||
faultMimeTypes = new HashMap<String, String>();
|
||||
inParts = new HashMap<String, WSDLPartImpl>();
|
||||
outParts = new HashMap<String, WSDLPartImpl>();
|
||||
wsdlBoundFaults = new ArrayList<WSDLBoundFaultImpl>();
|
||||
inParts = new HashMap<String, EditableWSDLPart>();
|
||||
outParts = new HashMap<String, EditableWSDLPart>();
|
||||
wsdlBoundFaults = new ArrayList<EditableWSDLBoundFault>();
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
@ -104,7 +112,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public WSDLPartImpl getPart(String partName, Mode mode) {
|
||||
public EditableWSDLPart getPart(String partName, Mode mode) {
|
||||
if(mode==Mode.IN){
|
||||
return inParts.get(partName);
|
||||
}else if(mode==Mode.OUT){
|
||||
@ -113,7 +121,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addPart(WSDLPartImpl part, Mode mode){
|
||||
public void addPart(EditableWSDLPart part, Mode mode){
|
||||
if(mode==Mode.IN)
|
||||
inParts.put(part.getName(), part);
|
||||
else if(mode==Mode.OUT)
|
||||
@ -149,53 +157,26 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
|
||||
// TODO: what's the difference between this and inputParts/outputParts?
|
||||
@Override
|
||||
public Map<String,WSDLPart> getInParts() {
|
||||
return Collections.<String,WSDLPart>unmodifiableMap(inParts);
|
||||
public Map<String, ? extends EditableWSDLPart> getInParts() {
|
||||
return Collections.<String, EditableWSDLPart>unmodifiableMap(inParts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,WSDLPart> getOutParts() {
|
||||
return Collections.<String,WSDLPart>unmodifiableMap(outParts);
|
||||
public Map<String, ? extends EditableWSDLPart> getOutParts() {
|
||||
return Collections.<String, EditableWSDLPart>unmodifiableMap(outParts);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<WSDLBoundFaultImpl> getFaults() {
|
||||
public List<? extends EditableWSDLBoundFault> getFaults() {
|
||||
return wsdlBoundFaults;
|
||||
}
|
||||
|
||||
public void addFault(@NotNull WSDLBoundFaultImpl fault){
|
||||
public void addFault(@NotNull EditableWSDLBoundFault fault){
|
||||
wsdlBoundFaults.add(fault);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Map of mime:content@part and the mime type from mime:content@type for wsdl:output
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, String> getInputMimeTypes() {
|
||||
return inputMimeTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Map of mime:content@part and the mime type from mime:content@type for wsdl:output
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, String> getOutputMimeTypes() {
|
||||
return outputMimeTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Map of mime:content@part and the mime type from mime:content@type for wsdl:fault
|
||||
*
|
||||
* @return empty Map if there is no parts
|
||||
*/
|
||||
public Map<String, String> getFaultMimeTypes() {
|
||||
return faultMimeTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets {@link ParameterBinding} for a given wsdl part in wsdl:input
|
||||
*
|
||||
@ -296,13 +277,13 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public WSDLOperationImpl getOperation() {
|
||||
public EditableWSDLOperation getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public WSDLBoundPortType getBoundPortType() {
|
||||
public EditableWSDLBoundPortType getBoundPortType() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
@ -324,7 +305,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable QName getReqPayloadName() {
|
||||
public @Nullable QName getRequestPayloadName() {
|
||||
if (emptyRequestPayload)
|
||||
return null;
|
||||
|
||||
@ -337,8 +318,8 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
return requestPayloadName;
|
||||
}else{
|
||||
QName inMsgName = operation.getInput().getMessage().getName();
|
||||
WSDLMessageImpl message = messages.get(inMsgName);
|
||||
for(WSDLPartImpl part:message.parts()){
|
||||
EditableWSDLMessage message = messages.get(inMsgName);
|
||||
for(EditableWSDLPart part:message.parts()){
|
||||
ParameterBinding binding = getInputBinding(part.getName());
|
||||
if(binding.isBody()){
|
||||
requestPayloadName = part.getDescriptor().name();
|
||||
@ -354,7 +335,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable QName getResPayloadName() {
|
||||
public @Nullable QName getResponsePayloadName() {
|
||||
if (emptyResponsePayload)
|
||||
return null;
|
||||
|
||||
@ -367,8 +348,8 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
return responsePayloadName;
|
||||
}else{
|
||||
QName outMsgName = operation.getOutput().getMessage().getName();
|
||||
WSDLMessageImpl message = messages.get(outMsgName);
|
||||
for(WSDLPartImpl part:message.parts()){
|
||||
EditableWSDLMessage message = messages.get(outMsgName);
|
||||
for(EditableWSDLPart part:message.parts()){
|
||||
ParameterBinding binding = getOutputBinding(part.getName());
|
||||
if(binding.isBody()){
|
||||
responsePayloadName = part.getDescriptor().name();
|
||||
@ -402,7 +383,6 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
reqNamespace = ns;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For rpclit gives namespace value on soapbinding:body@namespace
|
||||
*
|
||||
@ -418,7 +398,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
respNamespace = ns;
|
||||
}
|
||||
|
||||
WSDLBoundPortTypeImpl getOwner(){
|
||||
EditableWSDLBoundPortType getOwner(){
|
||||
return owner;
|
||||
}
|
||||
|
||||
@ -426,12 +406,12 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme
|
||||
private QName responsePayloadName;
|
||||
private boolean emptyRequestPayload;
|
||||
private boolean emptyResponsePayload;
|
||||
private Map<QName, WSDLMessageImpl> messages;
|
||||
private Map<QName, ? extends EditableWSDLMessage> messages;
|
||||
|
||||
void freeze(WSDLModelImpl parent) {
|
||||
public void freeze(EditableWSDLModel parent) {
|
||||
messages = parent.getMessages();
|
||||
operation = owner.getPortType().get(name.getLocalPart());
|
||||
for(WSDLBoundFaultImpl bf : wsdlBoundFaults){
|
||||
for(EditableWSDLBoundFault bf : wsdlBoundFaults){
|
||||
bf.freeze(this);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,6 +31,10 @@ import com.sun.xml.internal.ws.api.SOAPVersion;
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
|
||||
import com.sun.xml.internal.ws.resources.ClientMessages;
|
||||
import com.sun.xml.internal.ws.util.QNameMap;
|
||||
import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException;
|
||||
@ -47,26 +51,26 @@ import javax.xml.ws.soap.MTOMFeature;
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements WSDLBoundPortType {
|
||||
public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl implements EditableWSDLBoundPortType {
|
||||
private final QName name;
|
||||
private final QName portTypeName;
|
||||
private WSDLPortTypeImpl portType;
|
||||
private EditableWSDLPortType portType;
|
||||
private BindingID bindingId;
|
||||
private final @NotNull WSDLModelImpl owner;
|
||||
private final QNameMap<WSDLBoundOperationImpl> bindingOperations = new QNameMap<WSDLBoundOperationImpl>();
|
||||
private final @NotNull EditableWSDLModel owner;
|
||||
private final QNameMap<EditableWSDLBoundOperation> bindingOperations = new QNameMap<EditableWSDLBoundOperation>();
|
||||
|
||||
/**
|
||||
* Operations keyed by the payload tag name.
|
||||
*/
|
||||
private QNameMap<WSDLBoundOperationImpl> payloadMap;
|
||||
private QNameMap<EditableWSDLBoundOperation> payloadMap;
|
||||
/**
|
||||
* {@link #payloadMap} doesn't allow null key, so we store the value for it here.
|
||||
*/
|
||||
private WSDLBoundOperationImpl emptyPayloadOperation;
|
||||
private EditableWSDLBoundOperation emptyPayloadOperation;
|
||||
|
||||
|
||||
|
||||
public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull WSDLModelImpl owner, QName name, QName portTypeName) {
|
||||
public WSDLBoundPortTypeImpl(XMLStreamReader xsr,@NotNull EditableWSDLModel owner, QName name, QName portTypeName) {
|
||||
super(xsr);
|
||||
this.owner = owner;
|
||||
this.name = name;
|
||||
@ -78,11 +82,11 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
return name;
|
||||
}
|
||||
|
||||
public @NotNull WSDLModelImpl getOwner() {
|
||||
public @NotNull EditableWSDLModel getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public WSDLBoundOperationImpl get(QName operationName) {
|
||||
public EditableWSDLBoundOperation get(QName operationName) {
|
||||
return bindingOperations.get(operationName);
|
||||
}
|
||||
|
||||
@ -93,7 +97,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
* @param ptOp Must be non-null
|
||||
* @throws NullPointerException if either opName or ptOp is null
|
||||
*/
|
||||
public void put(QName opName, WSDLBoundOperationImpl ptOp) {
|
||||
public void put(QName opName, EditableWSDLBoundOperation ptOp) {
|
||||
bindingOperations.put(opName,ptOp);
|
||||
}
|
||||
|
||||
@ -101,11 +105,11 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
return portTypeName;
|
||||
}
|
||||
|
||||
public WSDLPortTypeImpl getPortType() {
|
||||
public EditableWSDLPortType getPortType() {
|
||||
return portType;
|
||||
}
|
||||
|
||||
public Iterable<WSDLBoundOperationImpl> getBindingOperations() {
|
||||
public Iterable<EditableWSDLBoundOperation> getBindingOperations() {
|
||||
return bindingOperations.values();
|
||||
}
|
||||
|
||||
@ -149,7 +153,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
* @return null if the binding could not be resolved for the part.
|
||||
*/
|
||||
public ParameterBinding getBinding(QName operation, String part, Mode mode) {
|
||||
WSDLBoundOperationImpl op = get(operation);
|
||||
EditableWSDLBoundOperation op = get(operation);
|
||||
if (op == null) {
|
||||
//TODO throw exception
|
||||
return null;
|
||||
@ -160,23 +164,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
return op.getOutputBinding(part);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets mime:content@part value which is the MIME type for a given operation, part and {@link Mode}.
|
||||
*
|
||||
* @param operation wsdl:operation@name value. Must be non-null.
|
||||
* @param part wsdl:part@name such as value of soap:header@part. Must be non-null.
|
||||
* @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null.
|
||||
* @return null if the binding could not be resolved for the part.
|
||||
*/
|
||||
public String getMimeType(QName operation, String part, Mode mode) {
|
||||
WSDLBoundOperationImpl op = get(operation);
|
||||
if (Mode.IN == mode)
|
||||
return op.getMimeTypeForInputPart(part);
|
||||
else
|
||||
return op.getMimeTypeForOutputPart(part);
|
||||
}
|
||||
|
||||
public WSDLBoundOperationImpl getOperation(String namespaceUri, String localName) {
|
||||
public EditableWSDLBoundOperation getOperation(String namespaceUri, String localName) {
|
||||
if(namespaceUri==null && localName == null)
|
||||
return emptyPayloadOperation;
|
||||
else{
|
||||
@ -184,19 +172,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
}
|
||||
}
|
||||
|
||||
public void enableMTOM() {
|
||||
features.add(new MTOMFeature());
|
||||
}
|
||||
|
||||
public boolean isMTOMEnabled() {
|
||||
return features.isEnabled(MTOMFeature.class);
|
||||
}
|
||||
|
||||
public SOAPVersion getSOAPVersion(){
|
||||
return getBindingId().getSOAPVersion();
|
||||
}
|
||||
|
||||
void freeze() {
|
||||
public void freeze() {
|
||||
portType = owner.getPortType(portTypeName);
|
||||
if(portType == null){
|
||||
throw new LocatableWebServiceException(
|
||||
@ -204,7 +180,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
}
|
||||
portType.freeze();
|
||||
|
||||
for (WSDLBoundOperationImpl op : bindingOperations.values()) {
|
||||
for (EditableWSDLBoundOperation op : bindingOperations.values()) {
|
||||
op.freeze(owner);
|
||||
}
|
||||
|
||||
@ -214,15 +190,15 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl
|
||||
|
||||
private void freezePayloadMap() {
|
||||
if(style== Style.RPC) {
|
||||
payloadMap = new QNameMap<WSDLBoundOperationImpl>();
|
||||
for(WSDLBoundOperationImpl op : bindingOperations.values()){
|
||||
payloadMap.put(op.getReqPayloadName(), op);
|
||||
payloadMap = new QNameMap<EditableWSDLBoundOperation>();
|
||||
for(EditableWSDLBoundOperation op : bindingOperations.values()){
|
||||
payloadMap.put(op.getRequestPayloadName(), op);
|
||||
}
|
||||
} else {
|
||||
payloadMap = new QNameMap<WSDLBoundOperationImpl>();
|
||||
payloadMap = new QNameMap<EditableWSDLBoundOperation>();
|
||||
// For doclit The tag will be the operation that has the same input part descriptor value
|
||||
for(WSDLBoundOperationImpl op : bindingOperations.values()){
|
||||
QName name = op.getReqPayloadName();
|
||||
for(EditableWSDLBoundOperation op : bindingOperations.values()){
|
||||
QName name = op.getRequestPayloadName();
|
||||
if(name == null){
|
||||
//empty payload
|
||||
emptyPayloadOperation = op;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,8 +25,10 @@
|
||||
|
||||
package com.sun.xml.internal.ws.model.wsdl;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLFault;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
|
||||
import com.sun.istack.internal.NotNull;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
@ -35,15 +37,15 @@ import javax.xml.stream.XMLStreamReader;
|
||||
/**
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public final class WSDLFaultImpl extends AbstractExtensibleImpl implements WSDLFault {
|
||||
public final class WSDLFaultImpl extends AbstractExtensibleImpl implements EditableWSDLFault {
|
||||
private final String name;
|
||||
private final QName messageName;
|
||||
private WSDLMessageImpl message;
|
||||
private WSDLOperationImpl operation;
|
||||
private EditableWSDLMessage message;
|
||||
private EditableWSDLOperation operation;
|
||||
private String action = "";
|
||||
private boolean defaultAction = true;
|
||||
|
||||
public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, WSDLOperationImpl operation) {
|
||||
public WSDLFaultImpl(XMLStreamReader xsr, String name, QName messageName, EditableWSDLOperation operation) {
|
||||
super(xsr);
|
||||
this.name = name;
|
||||
this.messageName = messageName;
|
||||
@ -54,12 +56,12 @@ public final class WSDLFaultImpl extends AbstractExtensibleImpl implements WSDLF
|
||||
return name;
|
||||
}
|
||||
|
||||
public WSDLMessageImpl getMessage() {
|
||||
public EditableWSDLMessage getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public WSDLOperation getOperation() {
|
||||
public EditableWSDLOperation getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
@ -72,6 +74,7 @@ public final class WSDLFaultImpl extends AbstractExtensibleImpl implements WSDLF
|
||||
public String getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
@ -84,7 +87,7 @@ public final class WSDLFaultImpl extends AbstractExtensibleImpl implements WSDLF
|
||||
this.defaultAction = defaultAction;
|
||||
}
|
||||
|
||||
void freeze(WSDLModelImpl root){
|
||||
public void freeze(EditableWSDLModel root){
|
||||
message = root.getMessage(messageName);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,11 +25,11 @@
|
||||
|
||||
package com.sun.xml.internal.ws.model.wsdl;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLInput;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLInput;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLOperation;
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.istack.internal.Nullable;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
@ -37,15 +37,15 @@ import javax.xml.stream.XMLStreamReader;
|
||||
/**
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public final class WSDLInputImpl extends AbstractExtensibleImpl implements WSDLInput {
|
||||
public final class WSDLInputImpl extends AbstractExtensibleImpl implements EditableWSDLInput {
|
||||
private String name;
|
||||
private QName messageName;
|
||||
private WSDLOperationImpl operation;
|
||||
private WSDLMessageImpl message;
|
||||
private EditableWSDLOperation operation;
|
||||
private EditableWSDLMessage message;
|
||||
private String action;
|
||||
private boolean defaultAction = true;
|
||||
|
||||
public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, WSDLOperationImpl operation) {
|
||||
public WSDLInputImpl(XMLStreamReader xsr,String name, QName messageName, EditableWSDLOperation operation) {
|
||||
super(xsr);
|
||||
this.name = name;
|
||||
this.messageName = messageName;
|
||||
@ -59,7 +59,7 @@ public final class WSDLInputImpl extends AbstractExtensibleImpl implements WSDLI
|
||||
return (operation.isOneWay())?operation.getName().getLocalPart():operation.getName().getLocalPart()+"Request";
|
||||
}
|
||||
|
||||
public WSDLMessage getMessage() {
|
||||
public EditableWSDLMessage getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ public final class WSDLInputImpl extends AbstractExtensibleImpl implements WSDLI
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public WSDLOperation getOperation() {
|
||||
public EditableWSDLOperation getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ public final class WSDLInputImpl extends AbstractExtensibleImpl implements WSDLI
|
||||
this.defaultAction = defaultAction;
|
||||
}
|
||||
|
||||
void freeze(WSDLModelImpl parent) {
|
||||
public void freeze(EditableWSDLModel parent) {
|
||||
message = parent.getMessage(messageName);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,19 +25,21 @@
|
||||
|
||||
package com.sun.xml.internal.ws.model.wsdl;
|
||||
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
|
||||
|
||||
import javax.xml.namespace.QName;
|
||||
import javax.xml.stream.XMLStreamReader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Provides abstraction for wsdl:message
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public final class WSDLMessageImpl extends AbstractExtensibleImpl implements WSDLMessage {
|
||||
public final class WSDLMessageImpl extends AbstractExtensibleImpl implements EditableWSDLMessage {
|
||||
private final QName name;
|
||||
private final ArrayList<WSDLPartImpl> parts;
|
||||
private final ArrayList<EditableWSDLPart> parts;
|
||||
|
||||
/**
|
||||
* @param name wsdl:message name attribute value
|
||||
@ -45,18 +47,18 @@ public final class WSDLMessageImpl extends AbstractExtensibleImpl implements WSD
|
||||
public WSDLMessageImpl(XMLStreamReader xsr,QName name) {
|
||||
super(xsr);
|
||||
this.name = name;
|
||||
this.parts = new ArrayList<WSDLPartImpl>();
|
||||
this.parts = new ArrayList<EditableWSDLPart>();
|
||||
}
|
||||
|
||||
public QName getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void add(WSDLPartImpl part){
|
||||
public void add(EditableWSDLPart part){
|
||||
parts.add(part);
|
||||
}
|
||||
|
||||
public Iterable<WSDLPartImpl> parts(){
|
||||
public Iterable<EditableWSDLPart> parts(){
|
||||
return parts;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -27,21 +27,25 @@ package com.sun.xml.internal.ws.model.wsdl;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import com.sun.xml.internal.ws.api.model.ParameterBinding;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.WSDLService;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundOperation;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLBoundPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLMessage;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLModel;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPart;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPort;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLPortType;
|
||||
import com.sun.xml.internal.ws.api.model.wsdl.editable.EditableWSDLService;
|
||||
import com.sun.xml.internal.ws.policy.PolicyMap;
|
||||
|
||||
import javax.jws.WebParam.Mode;
|
||||
import javax.xml.namespace.QName;
|
||||
import java.net.URL;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -50,15 +54,15 @@ import java.util.Map;
|
||||
*
|
||||
* @author Vivek Pandey
|
||||
*/
|
||||
public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLModel {
|
||||
private final Map<QName, WSDLMessageImpl> messages = new HashMap<QName, WSDLMessageImpl>();
|
||||
private final Map<QName, WSDLPortTypeImpl> portTypes = new HashMap<QName, WSDLPortTypeImpl>();
|
||||
private final Map<QName, WSDLBoundPortTypeImpl> bindings = new HashMap<QName, WSDLBoundPortTypeImpl>();
|
||||
private final Map<QName, WSDLServiceImpl> services = new LinkedHashMap<QName, WSDLServiceImpl>();
|
||||
public final class WSDLModelImpl extends AbstractExtensibleImpl implements EditableWSDLModel {
|
||||
private final Map<QName, EditableWSDLMessage> messages = new HashMap<QName, EditableWSDLMessage>();
|
||||
private final Map<QName, EditableWSDLPortType> portTypes = new HashMap<QName, EditableWSDLPortType>();
|
||||
private final Map<QName, EditableWSDLBoundPortType> bindings = new HashMap<QName, EditableWSDLBoundPortType>();
|
||||
private final Map<QName, EditableWSDLService> services = new LinkedHashMap<QName, EditableWSDLService>();
|
||||
|
||||
private PolicyMap policyMap;
|
||||
private final Map<QName,WSDLBoundPortType> unmBindings
|
||||
= Collections.<QName,WSDLBoundPortType>unmodifiableMap(bindings);
|
||||
private final Map<QName, EditableWSDLBoundPortType> unmBindings
|
||||
= Collections.<QName, EditableWSDLBoundPortType>unmodifiableMap(bindings);
|
||||
|
||||
|
||||
public WSDLModelImpl(@NotNull String systemId) {
|
||||
@ -72,52 +76,52 @@ public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLM
|
||||
super(null,-1);
|
||||
}
|
||||
|
||||
public void addMessage(WSDLMessageImpl msg){
|
||||
public void addMessage(EditableWSDLMessage msg){
|
||||
messages.put(msg.getName(), msg);
|
||||
}
|
||||
|
||||
public WSDLMessageImpl getMessage(QName name){
|
||||
public EditableWSDLMessage getMessage(QName name){
|
||||
return messages.get(name);
|
||||
}
|
||||
|
||||
public void addPortType(WSDLPortTypeImpl pt){
|
||||
public void addPortType(EditableWSDLPortType pt){
|
||||
portTypes.put(pt.getName(), pt);
|
||||
}
|
||||
|
||||
public WSDLPortTypeImpl getPortType(QName name){
|
||||
public EditableWSDLPortType getPortType(QName name){
|
||||
return portTypes.get(name);
|
||||
}
|
||||
|
||||
public void addBinding(WSDLBoundPortTypeImpl boundPortType){
|
||||
public void addBinding(EditableWSDLBoundPortType boundPortType){
|
||||
assert !bindings.containsValue(boundPortType);
|
||||
bindings.put(boundPortType.getName(), boundPortType);
|
||||
}
|
||||
|
||||
public WSDLBoundPortTypeImpl getBinding(QName name){
|
||||
public EditableWSDLBoundPortType getBinding(QName name){
|
||||
return bindings.get(name);
|
||||
}
|
||||
|
||||
public void addService(WSDLServiceImpl svc){
|
||||
public void addService(EditableWSDLService svc){
|
||||
services.put(svc.getName(), svc);
|
||||
}
|
||||
|
||||
public WSDLServiceImpl getService(QName name){
|
||||
public EditableWSDLService getService(QName name){
|
||||
return services.get(name);
|
||||
}
|
||||
|
||||
public Map<QName, WSDLMessageImpl> getMessages() {
|
||||
public Map<QName, EditableWSDLMessage> getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
public @NotNull Map<QName, WSDLPortTypeImpl> getPortTypes() {
|
||||
public @NotNull Map<QName, EditableWSDLPortType> getPortTypes() {
|
||||
return portTypes;
|
||||
}
|
||||
|
||||
public @NotNull Map<QName, WSDLBoundPortType> getBindings() {
|
||||
public @NotNull Map<QName, ? extends EditableWSDLBoundPortType> getBindings() {
|
||||
return unmBindings;
|
||||
}
|
||||
|
||||
public @NotNull Map<QName, WSDLServiceImpl> getServices(){
|
||||
public @NotNull Map<QName, EditableWSDLService> getServices(){
|
||||
return services;
|
||||
}
|
||||
|
||||
@ -130,33 +134,6 @@ public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLM
|
||||
return services.values().iterator().next().getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns first port QName from first service as per the insertion order
|
||||
*/
|
||||
public QName getFirstPortName(){
|
||||
WSDLPort fp = getFirstPort();
|
||||
if(fp==null)
|
||||
return null;
|
||||
else
|
||||
return fp.getName();
|
||||
}
|
||||
|
||||
private WSDLPort getFirstPort(){
|
||||
if(services.isEmpty())
|
||||
return null;
|
||||
WSDLService service = services.values().iterator().next();
|
||||
Iterator<? extends WSDLPort> iter = service.getPorts().iterator();
|
||||
WSDLPort port = iter.hasNext()?iter.next():null;
|
||||
return port;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the first port in the wsdl which matches the serviceName and portType
|
||||
*/
|
||||
public WSDLPortImpl getMatchingPort(QName serviceName, QName portType){
|
||||
return getService(serviceName).getMatchingPort(portType);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param serviceName non-null service QName
|
||||
@ -164,17 +141,17 @@ public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLM
|
||||
* @return
|
||||
* WSDLBoundOperation on success otherwise null. throws NPE if any of the parameters null
|
||||
*/
|
||||
public WSDLBoundPortTypeImpl getBinding(QName serviceName, QName portName){
|
||||
WSDLServiceImpl service = services.get(serviceName);
|
||||
public EditableWSDLBoundPortType getBinding(QName serviceName, QName portName){
|
||||
EditableWSDLService service = services.get(serviceName);
|
||||
if(service != null){
|
||||
WSDLPortImpl port = service.get(portName);
|
||||
EditableWSDLPort port = service.get(portName);
|
||||
if(port != null)
|
||||
return port.getBinding();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void finalizeRpcLitBinding(WSDLBoundPortTypeImpl boundPortType){
|
||||
public void finalizeRpcLitBinding(EditableWSDLBoundPortType boundPortType){
|
||||
assert(boundPortType != null);
|
||||
QName portTypeName = boundPortType.getPortTypeName();
|
||||
if(portTypeName == null)
|
||||
@ -182,15 +159,15 @@ public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLM
|
||||
WSDLPortType pt = portTypes.get(portTypeName);
|
||||
if(pt == null)
|
||||
return;
|
||||
for (WSDLBoundOperationImpl bop : boundPortType.getBindingOperations()) {
|
||||
for (EditableWSDLBoundOperation bop : boundPortType.getBindingOperations()) {
|
||||
WSDLOperation pto = pt.get(bop.getName().getLocalPart());
|
||||
WSDLMessage inMsgName = pto.getInput().getMessage();
|
||||
if(inMsgName == null)
|
||||
continue;
|
||||
WSDLMessageImpl inMsg = messages.get(inMsgName.getName());
|
||||
EditableWSDLMessage inMsg = messages.get(inMsgName.getName());
|
||||
int bodyindex = 0;
|
||||
if(inMsg != null){
|
||||
for(WSDLPartImpl part:inMsg.parts()){
|
||||
for(EditableWSDLPart part:inMsg.parts()){
|
||||
String name = part.getName();
|
||||
ParameterBinding pb = bop.getInputBinding(name);
|
||||
if(pb.isBody()){
|
||||
@ -206,9 +183,9 @@ public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLM
|
||||
WSDLMessage outMsgName = pto.getOutput().getMessage();
|
||||
if(outMsgName == null)
|
||||
continue;
|
||||
WSDLMessageImpl outMsg = messages.get(outMsgName.getName());
|
||||
EditableWSDLMessage outMsg = messages.get(outMsgName.getName());
|
||||
if(outMsg!= null){
|
||||
for(WSDLPartImpl part:outMsg.parts()){
|
||||
for(EditableWSDLPart part:outMsg.parts()){
|
||||
String name = part.getName();
|
||||
ParameterBinding pb = bop.getOutputBinding(name);
|
||||
if(pb.isBody()){
|
||||
@ -242,14 +219,14 @@ public final class WSDLModelImpl extends AbstractExtensibleImpl implements WSDLM
|
||||
* Invoked at the end of the model construction to fix up references, etc.
|
||||
*/
|
||||
public void freeze() {
|
||||
for (WSDLServiceImpl service : services.values()) {
|
||||
for (EditableWSDLService service : services.values()) {
|
||||
service.freeze(this);
|
||||
}
|
||||
for (WSDLBoundPortTypeImpl bp : bindings.values()) {
|
||||
for (EditableWSDLBoundPortType bp : bindings.values()) {
|
||||
bp.freeze();
|
||||
}
|
||||
// Enforce freeze all the portTypes referenced by this endpoints, see Bug8966673 for detail
|
||||
for (WSDLPortTypeImpl pt : portTypes.values()) {
|
||||
for (EditableWSDLPortType pt : portTypes.values()) {
|
||||
pt.freeze();
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user